from .tool.func import *
def topic_admin_2(conn, name, sub, num):
curs = conn.cursor()
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('/topic/' + url_pas(name) + '/sub/' + url_pas(sub))
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 = [['topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '#' + str(num), load_lang('return')]]
))