from .tool.func import * def topic_comment_tool(topic_num = 1, num = 1): with get_db_connect() as conn: curs = conn.cursor() num = str(num) topic_num = str(topic_num) if acl_check('', 'topic_view', topic_num) == 1: return re_error('/ban') curs.execute(db_change("select block, ip, date from topic where code = ? and id = ?"), [topic_num, num]) data = curs.fetchall() if not data: return redirect('/thread/' + topic_num) ban = '''

''' + load_lang('state') + '''

''' + load_lang('other_tool') + '''

''' if admin_check(3) == 1: curs.execute(db_change("select id from topic where code = ? and id = ? and top = 'O'"), [topic_num, num]) top_topic_d = curs.fetchall() ban += '''

''' + load_lang('admin_tool') + '''

''' return easy_minify(flask.render_template(skin_check(), imp = [load_lang('discussion_tool'), wiki_set(), wiki_custom(), wiki_css(['(#' + num + ')', 0])], data = ban, menu = [['thread/' + topic_num + '#' + num, load_lang('return')]] ))