|
@@ -3,7 +3,7 @@ from .tool.func import *
|
|
|
def user_setting_head():
|
|
def user_setting_head():
|
|
|
with get_db_connect() as conn:
|
|
with get_db_connect() as conn:
|
|
|
curs = conn.cursor()
|
|
curs = conn.cursor()
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
ip = ip_check()
|
|
ip = ip_check()
|
|
|
|
|
|
|
|
if flask.request.method == 'POST':
|
|
if flask.request.method == 'POST':
|
|
@@ -14,16 +14,16 @@ def user_setting_head():
|
|
|
curs.execute(db_change("update user_set set data = ? where id = ? and name = 'custom_css'"), [get_data, ip])
|
|
curs.execute(db_change("update user_set set data = ? where id = ? and name = 'custom_css'"), [get_data, ip])
|
|
|
else:
|
|
else:
|
|
|
curs.execute(db_change("insert into user_set (id, name, data) values (?, 'custom_css', ?)"), [ip, get_data])
|
|
curs.execute(db_change("insert into user_set (id, name, data) values (?, 'custom_css', ?)"), [ip, get_data])
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
flask.session['head'] = get_data
|
|
flask.session['head'] = get_data
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return redirect('/change/head')
|
|
return redirect('/change/head')
|
|
|
else:
|
|
else:
|
|
|
if ip_or_user(ip) == 0:
|
|
if ip_or_user(ip) == 0:
|
|
|
start = ''
|
|
start = ''
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
curs.execute(db_change("select data from user_set where id = ? and name = 'custom_css'"), [ip])
|
|
curs.execute(db_change("select data from user_set where id = ? and name = 'custom_css'"), [ip])
|
|
|
head_data = curs.fetchall()
|
|
head_data = curs.fetchall()
|
|
|
data = head_data[0][0] if head_data else ''
|
|
data = head_data[0][0] if head_data else ''
|
|
@@ -33,7 +33,7 @@ def user_setting_head():
|
|
|
'<hr class="main_hr">' + \
|
|
'<hr class="main_hr">' + \
|
|
|
''
|
|
''
|
|
|
data = flask.session['head'] if 'head' in flask.session else ''
|
|
data = flask.session['head'] if 'head' in flask.session else ''
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
start += '' + \
|
|
start += '' + \
|
|
|
'<span>' + \
|
|
'<span>' + \
|
|
|
'<style>CSS</style>' + \
|
|
'<style>CSS</style>' + \
|
|
@@ -42,7 +42,7 @@ def user_setting_head():
|
|
|
'</span>' + \
|
|
'</span>' + \
|
|
|
'<hr class="main_hr">' + \
|
|
'<hr class="main_hr">' + \
|
|
|
''
|
|
''
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return easy_minify(flask.render_template(skin_check(),
|
|
return easy_minify(flask.render_template(skin_check(),
|
|
|
imp = [load_lang(data = 'user_head', safe = 1), wiki_set(), wiki_custom(), wiki_css([0, 0])],
|
|
imp = [load_lang(data = 'user_head', safe = 1), wiki_set(), wiki_custom(), wiki_css([0, 0])],
|
|
|
data = start + '''
|
|
data = start + '''
|