from .tool.func import * def topic_tool_2(conn, name, sub): curs = conn.cursor() data = '' curs.execute("select stop, agree from rd where title = ? and sub = ?", [name, sub]) close_data = curs.fetchall() if close_data: if close_data[0][0] == 'S': t_state = 'Stop' elif close_data[0][0] == 'O': t_state = 'Close' else: t_state = 'Normal' else: t_state = 'Normal' if admin_check(3) == 1: data = '''