list_user.py 942 B

1234567891011121314151617181920212223242526
  1. from .tool.func import *
  2. def list_user(arg_num = 1):
  3. with get_db_connect() as conn:
  4. curs = conn.cursor()
  5. sql_num = (arg_num * 50 - 50) if arg_num * 50 > 0 else 0
  6. list_data = '<ul class="opennamu_ul">'
  7. curs.execute(db_change("select id, data from user_set where name = 'date' order by data desc limit ?, 50"), [sql_num])
  8. user_list = curs.fetchall()
  9. for data in user_list:
  10. list_data += '' + \
  11. '<li>' + \
  12. ip_pas(data[0]) + (' (' + data[1] + ')' if data[1] != '' else '') + \
  13. '</li>' + \
  14. ''
  15. list_data += '</ul>' + next_fix('/list/user/', arg_num, user_list)
  16. return easy_minify(flask.render_template(skin_check(),
  17. imp = [load_lang('member_list'), wiki_set(), wiki_custom(), wiki_css([0, 0])],
  18. data = list_data,
  19. menu = [['other', load_lang('return')]]
  20. ))