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' ] 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) 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 = '''

1. ''' + load_lang('register_text') + ''' (HTML)

2. ''' + load_lang('non_login_alert') + ''' (HTML)

3. ''' + load_lang('edit_bottom_text') + ''' (HTML)

4. ''' + load_lang('copyright_checkbox_text') + ''' (HTML)

5. ''' + load_lang('check_key_text') + ''' (HTML)

6. ''' + load_lang('email_title') + '''

7. ''' + load_lang('email_text') + '''

8. ''' + load_lang('email_insert_text') + '''

9. ''' + load_lang('password_search_text') + '''

10. ''' + load_lang('reset_user_text') + '''

11. ''' + load_lang('error_401') + '''

12. ''' + load_lang('error_404') + '''

13. ''' + load_lang('approval_question') + '''

(1)

14. ''' + load_lang('edit_help') + '''

15. ''' + load_lang('upload_help') + ''' (HTML)

16. ''' + load_lang('upload_default') + '''

17. ''' + load_lang('bottom_text') + ''' (HTML)

18. ''' + load_lang('topic_text') + '''

19. ''' + load_lang('phrase_user_page_admin') + ''' (HTML)

20. ''' + load_lang('phrase_user_page_owner') + ''' (HTML)


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