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)
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('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 code = ? and id = ? and top = 'O'"
), [topic_num, num])
top_topic_d = curs.fetchall()
curs.execute(db_change(
"select end from rb where block = ? and ongoing = '1'"
), [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(), wiki_custom(), wiki_css(['(#' + num + ')', 0])],
data = ban,
menu = [['thread/' + topic_num + '#' + num, load_lang('return')]]
))