list_not_close_topic.py 650 B

12345678910111213141516171819
  1. from .tool.func import *
  2. def list_not_close_topic_2(conn):
  3. curs = conn.cursor()
  4. div = '<ul>'
  5. curs.execute(db_change('select title, sub, date, code from rd where stop != "O" order by date desc'))
  6. n_list = curs.fetchall()
  7. for data in n_list:
  8. div += '<li>' + data[2] + ' | <a href="/thread/' + data[3] + '">' + html.escape(data[1]) + '</a> (' + html.escape(data[0]) + ')</li>'
  9. div += '</ul>'
  10. return easy_minify(flask.render_template(skin_check(),
  11. imp = [load_lang('open_discussion_list'), wiki_set(), custom(), other2([0, 0])],
  12. data = div,
  13. menu = [['manager', load_lang('return')]]
  14. ))