admin_log.py 832 B

1234567891011121314151617181920212223242526
  1. from .tool.func import *
  2. def admin_log_2(conn):
  3. curs = conn.cursor()
  4. num = int(number_check(flask.request.args.get('num', '1')))
  5. if num * 50 > 0:
  6. sql_num = num * 50 - 50
  7. else:
  8. sql_num = 0
  9. list_data = '<ul>'
  10. curs.execute("select who, what, time from re_admin order by time desc limit ?, '50'", [str(sql_num)])
  11. get_list = curs.fetchall()
  12. for data in get_list:
  13. list_data += '<li>' + ip_pas(data[0]) + ' / ' + data[1] + ' / ' + data[2] + '</li>'
  14. list_data += '</ul>'
  15. list_data += next_fix('/admin_log?num=', num, get_list)
  16. return easy_minify(flask.render_template(skin_check(),
  17. imp = [load_lang('authority_use_list'), wiki_set(), custom(), other2([0, 0])],
  18. data = list_data,
  19. menu = [['other', load_lang('return')]]
  20. ))