from .tool.func import * def topic_admin_2(conn, name, sub, num): curs = conn.cursor() curs.execute("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('other_tool') + '''

''' if admin_check(3) == 1: curs.execute("select id from topic where title = ? and sub = ? and id = ? and top = 'O'", [name, sub, str(num)]) top_topic_d = curs.fetchall() curs.execute("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')]] ))