from .tool.func import * def recent_discuss(tool): with get_db_connect() as conn: curs = conn.cursor() div = '' admin_auth = admin_check(conn, 3) if tool == 'normal': div += '(' + get_lang(conn, 'close_discussion') + ') ' div += '(' + get_lang(conn, 'open_discussion_list') + ')' m_sub = 0 elif tool == 'close': div += '(' + get_lang(conn, 'normal') + ')' m_sub = ' (' + get_lang(conn, 'closed') + ')' else: div += '(' + get_lang(conn, 'normal') + ')' m_sub = ' (' + get_lang(conn, 'open_discussion_list') + ')' div += '''
| ''' + get_lang(conn, 'discussion_name') + ''' | ''' + get_lang(conn, 'editor') + ''' | ''' + get_lang(conn, 'time') + ''' |
| ' + \ '' + html.escape(data[1]) + ' ' + \ '(' + html.escape(data[0]) + ')' + \ (' (' + get_lang(conn, 'tool') + ')' if admin_auth == 1 else '') + \ ' | ' + \ '' + last_editor_ip_pas[last_editor[count]] + ' | ' + \ '' + data[2] + ' | ' + \ '