from .tool.func import * async def main_setting_phrase(): with get_db_connect() as conn: curs = conn.cursor() if await acl_check('', 'owner_auth', '', '') == 1: return await re_error(conn, 0) 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_warning', 'bbs_help', 'bbs_comment_help', 'outdated_doc_warning', 'outdated_doc_warning_date', 'category_text', 'redirect_text', 'template_var_1', 'template_var_2', 'template_var_3', 'edit_only_bottom_text', 'move_bottom_text', 'delete_bottom_text', 'revert_bottom_text', ] if flask.request.method == 'POST': curs.executemany(db_change("update other set data = ? where name = ?"), [[flask.request.form.get(for_a, ''), for_a] for for_a in i_list]) await acl_check(tool = 'owner_auth', memo = 'edit_set (phrase)') return redirect(conn, '/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 += [''] return easy_minify(flask.render_template(await skin_check(), imp = [await get_lang('text_setting'), await wiki_set(), await wiki_custom(), wiki_css([0, 0])], data = await render_simple_set('''

''' + await get_lang('register_text') + ''' (HTML)

''' + await get_lang('non_login_alert') + ''' (HTML)

''' + await get_lang('copyright_checkbox_text') + ''' (HTML)

''' + await get_lang('check_key_text') + ''' (HTML)

''' + await get_lang('email_title') + '''

''' + await get_lang('email_text') + '''

''' + await get_lang('email_insert_text') + '''

''' + await get_lang('password_search_text') + '''

''' + await get_lang('reset_user_text') + '''

''' + await get_lang('error_401') + '''

''' + await get_lang('error_404') + '''

''' + await get_lang('approval_question') + '''

''' + await get_lang('approval_question_visible_only_when_approval_on') + '''

''' + await get_lang('edit_help') + '''

''' + await get_lang('upload_help') + ''' (HTML)

''' + await get_lang('upload_default') + '''

''' + await get_lang('bottom_text') + ''' (HTML)

''' + await get_lang('topic_text') + '''

''' + await get_lang('phrase_user_page_admin') + ''' (HTML)

''' + await get_lang('phrase_user_page_owner') + ''' (HTML)

''' + await get_lang('phrase_old_page_warning') + ''' (''' + await get_lang('beta') + ''') (HTML)

''' + await get_lang('bbs_help') + '''

''' + await get_lang('bbs_comment_help') + '''

''' + await get_lang('outdated_doc_warning') + ''' (HTML)

''' + await get_lang('period') + ''' (''' + await get_lang('day') + ''') (''' + await get_lang('off') + ''' : ''' + await get_lang('empty') + ''')

''' + await get_lang('category') + '''

''' + await get_lang('redirect') + '''

EX : {0} ➤ {1}

''' + await get_lang('template_var') + '''

''' + await get_lang('template_var_1') + ''' (''' + await get_lang('default') + ''' : ''' + await get_lang('top') + ''') (HTML)

''' + await get_lang('template_var_2') + ''' (''' + await get_lang('default') + ''' : ''' + await get_lang('sidebar') + ''') (HTML)

''' + await get_lang('template_var_3') + ''' (''' + await get_lang('default') + ''' : ''' + await get_lang('bottom') + ''') (HTML)

''' + await get_lang('edit_bottom_text') + ''' (HTML)

''' + await get_lang('edit_only_bottom_text') + ''' (HTML)

''' + await get_lang('move_bottom_text') + ''' (HTML)

''' + await get_lang('delete_bottom_text') + ''' (HTML)

''' + await get_lang('revert_bottom_text') + ''' (HTML)


'''), menu = [['setting', await get_lang('return')]] ))