from .tool.func import * def give_history_add_2(conn, name): curs = conn.cursor() ip = ip_check() if admin_check() != 1: return re_error('/ban') if flask.request.method == 'POST': admin_check(None, 'history_add (' + name + ')') today = get_time() content = flask.request.form.get('content', '') leng = '+' + str(len(content)) history_plus( name, content, today, 'Add:' + flask.request.form.get('get_ip', ''), flask.request.form.get('send', ''), leng, mode = 'add' ) conn.commit() return redirect('/history/' + url_pas(name)) else: curs.execute(db_change('select data from other where name = "edit_bottom_text"')) sql_d = curs.fetchall() if sql_d and sql_d[0][0] != '': b_text = '
' + sql_d[0][0] else: b_text = '' curs.execute(db_change('select data from other where name = "edit_help"')) sql_d = curs.fetchall() if sql_d and sql_d[0][0] != '': p_text = sql_d[0][0] else: p_text = load_lang('default_edit_help') return easy_minify(flask.render_template(skin_check(), imp = [load_lang('history_add'), wiki_set(), custom(), other2(['(' + name + ')', 0])], data = '''
''' + edit_button() + '''


''' + b_text + '''
''', menu = [['history/' + url_pas(name), load_lang('return')]] ))