2
0

list_user.py 772 B

12345678910111213141516171819202122
  1. from .tool.func import *
  2. def list_user_2(conn):
  3. curs = conn.cursor()
  4. num = int(number_check(flask.request.args.get('num', '1')))
  5. sql_num = (num * 50 - 50) if num * 50 > 0 else 0
  6. list_data = '<ul>'
  7. curs.execute(db_change("select id, date from user order by date desc limit ?, 50"), [sql_num])
  8. user_list = curs.fetchall()
  9. for data in user_list:
  10. list_data += '<li>' + ip_pas(data[0]) + (' (' + data[1] + ')' if data[1] != '' else '') + '</li>'
  11. list_data += '</ul>' + next_fix('/user_log?num=', num, user_list)
  12. return easy_minify(flask.render_template(skin_check(),
  13. imp = [load_lang('member_list'), wiki_set(), custom(), other2([0, 0])],
  14. data = list_data,
  15. menu = [['other', load_lang('return')]]
  16. ))