from .tool.func import * def vote_list_2(conn, list_type, num): curs = conn.cursor() sql_num = (num * 50 - 50) if num * 50 > 0 else 0 data = '' if list_type == 'normal': data += '(' + load_lang('close_vote_list') + ')' sub = 0 curs.execute(db_change('select name, id, type from vote where type = "open" or type = "n_open" limit ?, 50'), [sql_num]) else: data += '(' + load_lang('open_vote_list') + ')' sub = '(' + load_lang('closed') + ')' curs.execute(db_change('select name, id, type from vote where type = "close" or type = "n_close" limit ?, 50'), [sql_num]) data += '' if list_type == 'normal': data += ('(' + load_lang('add_vote') + ')') if admin_check() == 1 else '' data += next_fix('/vote/list/', num, data_list) else: data += next_fix('/vote/list/close/', num, data_list) return easy_minify(flask.render_template(skin_check(), imp = [load_lang('vote_list'), wiki_set(), wiki_custom(), wiki_css([sub, 0])], data = data, menu = [['other', load_lang('return')]] ))