from .tool.func import * async 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 await acl_check('', 'topic_view', topic_num) == 1: return await re_error(conn, 0) 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 await acl_check(tool = 'toron_auth') != 1: ban += '''

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

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