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(conn, '/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(conn, '/thread/' + topic_num) ban = '''

''' + get_lang(conn, 'state') + '''

''' + get_lang(conn, 'other_tool') + '''

''' if admin_check(conn, 3) == 1: ban += '''

''' + get_lang(conn, 'admin_tool') + '''

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