2
0

list_please.py 970 B

1234567891011121314151617181920212223242526272829
  1. from .tool.func import *
  2. def list_please_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. curs.execute(db_change('select data from other where name = "count_all_title"'))
  10. if int(curs.fetchall()[0][0]) > 30000:
  11. return re_error('/error/25')
  12. div = '<ul>'
  13. curs.execute(db_change("select distinct title from back where type = 'no' order by title asc limit ?, 50"), [sql_num])
  14. data_list = curs.fetchall()
  15. for data in data_list:
  16. div += '<li><a id="not_thing" href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'
  17. div += '</ul>' + next_fix('/please?num=', num, data_list)
  18. return easy_minify(flask.render_template(skin_check(),
  19. imp = [load_lang('need_document'), wiki_set(), custom(), other2([0, 0])],
  20. data = div,
  21. menu = [['other', load_lang('return')]]
  22. ))