from .tool.func import * def recent_history_delete(name = 'Test', rev = 1): with get_db_connect() as conn: curs = conn.cursor() num = str(rev) if admin_check(conn) != 1: return re_error(conn, '/error/3') if flask.request.method == 'POST': admin_check(conn, None, 'history delete ' + name + ' r' + num) curs.execute(db_change("delete from history where id = ? and title = ?"), [num, name]) return redirect(conn, '/history/' + url_pas(name)) else: return easy_minify(conn, flask.render_template(skin_check(conn), imp = [name, wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, 'history_delete') + ') (r' + num + ')', 0])], data = '''
''', menu = [['history/' + url_pas(name), get_lang(conn, 'return')]] ))