from .tool.func import * from .user_setting_skin_set_main import user_setting_skin_set_main_set_list def main_setting_skin_set(): with get_db_connect() as conn: curs = conn.cursor() ip = ip_check() if ban_check(ip) == 1: return re_error('/ban') set_list = user_setting_skin_set_main_set_list() if flask.request.method == 'POST': for for_b in set_list: curs.execute(db_change('select data from other where name = ?'), [for_b]) if curs.fetchall(): curs.execute(db_change("update other set data = ? where name = ?"), [ flask.request.form.get(for_b, set_list[for_b][0][0]), for_b ]) else: curs.execute(db_change('insert into other (name, data, coverage) values (?, ?, "")'), [ for_b, flask.request.form.get(for_b, set_list[for_b][0][0]) ]) conn.commit() admin_check(None, 'edit_set (skin_set)') return redirect('/setting/skin_set') else: set_data = {} for for_b in set_list: set_data[for_b] = '' curs.execute(db_change('select data from other where name = ?'), [for_b]) db_data = curs.fetchall() get_data = db_data[0][0] if db_data else '' for for_a in set_list[for_b]: if get_data == for_a[0]: set_data[for_b] = '' + set_data[for_b] else: set_data[for_b] += '' return easy_minify(flask.render_template(skin_check(), imp = [load_lang('main_skin_set_default'), wiki_set(), wiki_custom(), wiki_css(['(' + load_lang('beta') + ')', 0])], data = render_simple_set('''

''' + load_lang("render") + '''

''' + load_lang("strike") + '''

''' + load_lang("bold") + '''

''' + load_lang("category") + '''

''' + load_lang("position") + '''

''' + load_lang("category_change_title") + '''

''' + load_lang("footnote") + ''' (''' + load_lang('beta') + ''')

''' + load_lang("footnote_render") + '''

''' + load_lang("footnote_number") + '''

''' + load_lang("footnote_real_num_view") + '''

''' + load_lang("include_link") + '''

''' + load_lang("image") + '''

''' + load_lang("toc") + '''

''' + load_lang("exter_link") + '''

''' + load_lang("link_delimiter") + '''

''' + load_lang("force_darkmode") + ''' (''' + load_lang("not_working") + ''')

''' + load_lang("table_scroll") + '''

''' + load_lang("list_view_change") + '''

''' + load_lang("view_joke") + '''

''' + load_lang("math_scroll") + '''

''' + load_lang("view_history") + '''

''' + load_lang("edit") + '''

''' + load_lang("image_paste") + '''

''' + load_lang('only_korean') + ''' ''' + load_lang('unavailable_in_monaco') + '''

''' + load_lang("monaco_editor") + '''


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