from .tool.func import * def topic_close_list_2(conn, name): curs = conn.cursor() div = '' tool = flask.request.args.get('tool', '') plus = '' menu = [['topic/' + url_pas(name), load_lang('return')]] if tool == 'close': curs.execute(db_change("select sub from rd where title = ? and stop = 'O' order by sub asc"), [name]) sub = load_lang('closed_discussion') elif tool == 'agree': curs.execute(db_change("select sub from rd where title = ? and agree = 'O' order by sub asc"), [name]) sub = load_lang('agreed_discussion') else: sub = load_lang('discussion_list') menu = [['w/' + url_pas(name), load_lang('document')]] if acl_check(name, 'topic', sub) == 1: display = 'display: none;' else: display = '' curs.execute(db_change("select code from topic order by code + 0 desc limit 1")) t_data = curs.fetchall() if t_data: topic_num = str(int(t_data[0][0]) + 1) else: topic_num = '1' plus = ''' (' + load_lang('closed_discussion') + ') (' + load_lang('agreed_discussion') + ''')