from .tool.func import * def main_func_setting_phrase(): with get_db_connect() as conn: curs = conn.cursor() if admin_check() != 1: return re_error('/ban') i_list = [ 'contract', 'no_login_warning', 'edit_bottom_text', 'copyright_checkbox_text', 'check_key_text', 'email_title', 'email_text', 'email_insert_text', 'password_search_text', 'reset_user_text', 'error_401', 'error_404', 'approval_question', 'edit_help', 'upload_help', 'upload_default', 'license', 'topic_text', 'phrase_user_page_admin', 'phrase_user_page_owner', 'phrase_old_page_warring' ] if flask.request.method == 'POST': for i in i_list: curs.execute(db_change("update other set data = ? where name = ?"), [ flask.request.form.get(i, ''), i ]) conn.commit() admin_check(None, 'edit_set (phrase)') return redirect('/setting/phrase') else: d_list = [] for i in i_list: curs.execute(db_change('select data from other where name = ?'), [i]) sql_d = curs.fetchall() if sql_d: d_list += [sql_d[0][0]] else: curs.execute(db_change('insert into other (name, data, coverage) values (?, ?, "")'), [i, '']) d_list += [''] conn.commit() return easy_minify(flask.render_template(skin_check(), imp = [load_lang('text_setting'), wiki_set(), wiki_custom(), wiki_css([0, 0])], data = render_simple_set('''

''' + load_lang('register_text') + ''' (HTML)

''' + load_lang('non_login_alert') + ''' (HTML)

''' + load_lang('edit_bottom_text') + ''' (HTML)

''' + load_lang('copyright_checkbox_text') + ''' (HTML)

''' + load_lang('check_key_text') + ''' (HTML)

''' + load_lang('email_title') + '''

''' + load_lang('email_text') + '''

''' + load_lang('email_insert_text') + '''

''' + load_lang('password_search_text') + '''

''' + load_lang('reset_user_text') + '''

''' + load_lang('error_401') + '''

''' + load_lang('error_404') + '''

''' + load_lang('approval_question') + '''

''' + load_lang('approval_question_visible_only_when_approval_on') + '''

''' + load_lang('edit_help') + '''

''' + load_lang('upload_help') + ''' (HTML)

''' + load_lang('upload_default') + '''

''' + load_lang('bottom_text') + ''' (HTML)

''' + load_lang('topic_text') + '''

''' + load_lang('phrase_user_page_admin') + ''' (HTML)

''' + load_lang('phrase_user_page_owner') + ''' (HTML)

''' + load_lang('phrase_old_page_warring') + ''' (''' + load_lang('beta') + ''') (HTML)


'''), menu = [['setting', load_lang('return')]] ))