from .tool.func import *
def topic_admin_2(conn, topic_num, num):
curs = conn.cursor()
topic_change_data = topic_change(topic_num)
name = topic_change_data[0]
sub = topic_change_data[1]
curs.execute(db_change("select block, ip, date from topic where title = ? and sub = ? and id = ?"), [name, sub, str(num)])
data = curs.fetchall()
if not data:
return redirect('/thread/' + str(topic_num))
ban = '''
''' + load_lang('state') + '''
- ''' + load_lang('writer') + ' : ''' + ip_pas(data[0][1]) + '''
- ''' + load_lang('time') + ' : ' + data[0][2] + '''
''' + load_lang('other_tool') + '''
'''
if admin_check(3) == 1:
curs.execute(db_change("select id from topic where title = ? and sub = ? and id = ? and top = 'O'"), [name, sub, str(num)])
top_topic_d = curs.fetchall()
curs.execute(db_change("select end from ban where block = ?"), [data[0][1]])
user_ban_d = curs.fetchall()
ban += '''
''' + load_lang('admin_tool') + '''
'''
return easy_minify(flask.render_template(skin_check(),
imp = [load_lang('discussion_tool'), wiki_set(), custom(), other2([' (#' + str(num) + ')', 0])],
data = ban,
menu = [['thread/' + str(topic_num) + '#' + str(num), load_lang('return')]]
))