from .tool.func import * def topic_tool_2(conn, name, sub): curs = conn.cursor() curs.execute("select id from topic where title = ? and sub = ? limit 1", [name, sub]) topic_exist = curs.fetchall() if not topic_exist: return re_error('/topic/' + url_pas(name) + '/sub/' + url_pas(sub)) all_data = '' if admin_check(3) == 1: all_data = '