2
0

list_not_close_topic.py 773 B

1234567891011121314151617181920
  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 from rd where stop != "O" order by date desc'))
  6. n_list = curs.fetchall()
  7. for data in n_list:
  8. curs.execute(db_change("select code from topic where id = '1' and title = ? and sub = ?"), [data[0], data[1]])
  9. div += '<li><a href="/thread/' + url_pas(curs.fetchall()[0][0]) + '">' + html.escape(data[0]) + '</a> (' + data[1] + ') | ' + data[2] + '</li>'
  10. div += '</ul>'
  11. return easy_minify(flask.render_template(skin_check(),
  12. imp = [load_lang('open_discussion_list'), wiki_set(), custom(), other2([0, 0])],
  13. data = div,
  14. menu = [['manager', load_lang('return')]]
  15. ))