|
@@ -54,7 +54,7 @@ conn = sqlite3.connect(set_data['db'] + '.db', check_same_thread = False)
|
|
|
curs = conn.cursor()
|
|
curs = conn.cursor()
|
|
|
|
|
|
|
|
# 보내주기
|
|
# 보내주기
|
|
|
-load_conn(conn)
|
|
|
|
|
|
|
+load_conn()
|
|
|
|
|
|
|
|
# 기타 설정 변경
|
|
# 기타 설정 변경
|
|
|
logging.basicConfig(level = logging.ERROR)
|
|
logging.basicConfig(level = logging.ERROR)
|
|
@@ -301,7 +301,7 @@ def del_alarm():
|
|
|
|
|
|
|
|
@app.route('/alarm')
|
|
@app.route('/alarm')
|
|
|
def alarm():
|
|
def alarm():
|
|
|
- if custom(conn)[2] == 0:
|
|
|
|
|
|
|
+ if custom()[2] == 0:
|
|
|
return redirect('/login')
|
|
return redirect('/login')
|
|
|
|
|
|
|
|
data = '<ul>'
|
|
data = '<ul>'
|
|
@@ -318,8 +318,8 @@ def alarm():
|
|
|
|
|
|
|
|
data += '</ul>'
|
|
data += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('alarm'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('alarm'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = data,
|
|
data = data,
|
|
|
menu = [['user', load_lang('user')]]
|
|
menu = [['user', load_lang('user')]]
|
|
|
))
|
|
))
|
|
@@ -367,8 +367,8 @@ def inter_wiki(tools = None):
|
|
|
if admin == 1:
|
|
if admin == 1:
|
|
|
div += '<a href="/' + plus_link + '">(' + load_lang('plus') + ')</a>'
|
|
div += '<a href="/' + plus_link + '">(' + load_lang('plus') + ')</a>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [title, wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [title, wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -408,8 +408,8 @@ def plus_inter(tools = None):
|
|
|
title = 'HTML Filter ' + load_lang('plus')
|
|
title = 'HTML Filter ' + load_lang('plus')
|
|
|
form_data = '<input placeholder="HTML" type="text" name="title">'
|
|
form_data = '<input placeholder="HTML" type="text" name="title">'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [title, wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [title, wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '<form method="post">' + form_data + '<hr><button type="submit">' + load_lang('plus') + '</button></form>',
|
|
data = '<form method="post">' + form_data + '<hr><button type="submit">' + load_lang('plus') + '</button></form>',
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -431,8 +431,8 @@ def edit_set(num = 0):
|
|
|
x += 1
|
|
x += 1
|
|
|
li_data += '<li><a href="/edit_set/' + str(x) + '">' + li + '</a></li>'
|
|
li_data += '<li><a href="/edit_set/' + str(x) + '">' + li + '</a></li>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('setting'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('setting'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '<h2>' + load_lang('list') + '</h2><ul>' + li_data + '</ul>',
|
|
data = '<h2>' + load_lang('list') + '</h2><ul>' + li_data + '</ul>',
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -501,8 +501,8 @@ def edit_set(num = 0):
|
|
|
else:
|
|
else:
|
|
|
div2 += '<option value="' + skin_data + '">' + skin_data + '</option>'
|
|
div2 += '<option value="' + skin_data + '">' + skin_data + '</option>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['Normal', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['Normal', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<span>''' + load_lang('name') + '''</span>
|
|
<span>''' + load_lang('name') + '''</span>
|
|
@@ -594,8 +594,8 @@ def edit_set(num = 0):
|
|
|
|
|
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['Set Text', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['Set Text', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<span>Register Text</span>
|
|
<span>Register Text</span>
|
|
@@ -634,8 +634,8 @@ def edit_set(num = 0):
|
|
|
else:
|
|
else:
|
|
|
data = ''
|
|
data = ''
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['Main HEAD', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['Main HEAD', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<textarea rows="25" name="content">''' + html.escape(data) + '''</textarea>
|
|
<textarea rows="25" name="content">''' + html.escape(data) + '''</textarea>
|
|
@@ -677,8 +677,8 @@ def edit_set(num = 0):
|
|
|
if not data or data == '':
|
|
if not data or data == '':
|
|
|
data = ''.join(lines)
|
|
data = ''.join(lines)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['robots.txt', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['robots.txt', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<a href="/robots.txt">(View)</a>
|
|
<a href="/robots.txt">(View)</a>
|
|
|
<hr>
|
|
<hr>
|
|
@@ -720,8 +720,8 @@ def edit_set(num = 0):
|
|
|
|
|
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['Google', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['Google', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<span>reCAPTCHA (HTML)</span>
|
|
<span>reCAPTCHA (HTML)</span>
|
|
@@ -755,8 +755,8 @@ def not_close_topic():
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('open') + ' ' + load_lang('discussion') + ' ' + load_lang('list'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('open') + ' ' + load_lang('discussion') + ' ' + load_lang('list'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -785,8 +785,8 @@ def acl_list():
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['ACL ' + load_lang('document') + ' ' + load_lang('list'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['ACL ' + load_lang('document') + ' ' + load_lang('list'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -865,8 +865,8 @@ def admin_plus(name = None):
|
|
|
data += '<li><input type="checkbox" ' + state + ' name="give" ' + exist_list[6] + '> ' + load_lang('authority') + '</li>'
|
|
data += '<li><input type="checkbox" ' + state + ' name="give" ' + exist_list[6] + '> ' + load_lang('authority') + '</li>'
|
|
|
data += '<li><input type="checkbox" ' + state + ' name="owner" ' + exist_list[7] + '> ' + load_lang('owner') + '</li></ul>'
|
|
data += '<li><input type="checkbox" ' + state + ' name="owner" ' + exist_list[7] + '> ' + load_lang('owner') + '</li></ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('admin_group') + ' ' + load_lang('plus'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('admin_group') + ' ' + load_lang('plus'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '<form method="post">' + data + '<hr><button id="save" ' + state + ' type="submit">' + load_lang('save') + '</button></form>',
|
|
data = '<form method="post">' + data + '<hr><button id="save" ' + state + ' type="submit">' + load_lang('save') + '</button></form>',
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -886,8 +886,8 @@ def admin_list():
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('admin') + ' ' + load_lang('list'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('admin') + ' ' + load_lang('list'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -950,8 +950,8 @@ def user_log():
|
|
|
|
|
|
|
|
list_data += next_fix('/user_log?num=', num, user_list)
|
|
list_data += next_fix('/user_log?num=', num, user_list)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('recent') + ' ' + load_lang('register') + '', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('recent') + ' ' + load_lang('register') + '', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = list_data,
|
|
data = list_data,
|
|
|
menu = 0
|
|
menu = 0
|
|
|
))
|
|
))
|
|
@@ -974,8 +974,8 @@ def admin_log():
|
|
|
list_data += '</ul>'
|
|
list_data += '</ul>'
|
|
|
list_data += next_fix('/admin_log?num=', num, get_list)
|
|
list_data += next_fix('/admin_log?num=', num, get_list)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('recent') + ' ' + load_lang('authority'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('recent') + ' ' + load_lang('authority'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = list_data,
|
|
data = list_data,
|
|
|
menu = 0
|
|
menu = 0
|
|
|
))
|
|
))
|
|
@@ -994,8 +994,8 @@ def give_log():
|
|
|
|
|
|
|
|
list_data += '</ul><hr><a href="/manager/8">(' + load_lang('create') + ')</a>'
|
|
list_data += '</ul><hr><a href="/manager/8">(' + load_lang('create') + ')</a>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('admin_group') + ' ' + load_lang('list'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('admin_group') + ' ' + load_lang('list'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = list_data,
|
|
data = list_data,
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -1084,8 +1084,8 @@ def update():
|
|
|
|
|
|
|
|
return redirect('/re_start')
|
|
return redirect('/re_start')
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('update'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('update'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = 'Auto Update Is Not Support. <a href="https://github.com/2DU/openNAMU">(GitHub)</a>',
|
|
data = 'Auto Update Is Not Support. <a href="https://github.com/2DU/openNAMU">(GitHub)</a>',
|
|
|
menu = [['manager/1', load_lang('admin')]]
|
|
menu = [['manager/1', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -1122,8 +1122,8 @@ def xref(name = None):
|
|
|
|
|
|
|
|
div += '</ul>' + next_fix('/xref/' + url_pas(name) + '?num=', num, data_list)
|
|
div += '</ul>' + next_fix('/xref/' + url_pas(name) + '?num=', num, data_list)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('backlink') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('backlink') + ')', 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['w/' + url_pas(name), load_lang('document')]]
|
|
menu = [['w/' + url_pas(name), load_lang('document')]]
|
|
|
))
|
|
))
|
|
@@ -1149,8 +1149,8 @@ def please():
|
|
|
|
|
|
|
|
div += '</ul>' + next_fix('/please?num=', num, data_list)
|
|
div += '</ul>' + next_fix('/please?num=', num, data_list)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('need') + ' ' + load_lang('document'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('need') + ' ' + load_lang('document'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -1195,8 +1195,8 @@ def recent_discuss(tools = 'normal'):
|
|
|
else:
|
|
else:
|
|
|
div += '</tbody></table>'
|
|
div += '</tbody></table>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('recent') + ' ' + load_lang('discussion'), wiki_set(1), custom(conn), other2([m_sub, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('recent') + ' ' + load_lang('discussion'), wiki_set(1), custom(), other2([m_sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = 0
|
|
menu = 0
|
|
|
))
|
|
))
|
|
@@ -1309,8 +1309,8 @@ def block_log(name = None, tool = None, tool2 = None):
|
|
|
else:
|
|
else:
|
|
|
div += next_fix('/' + url_pas(tool) + '/' + url_pas(name) + '?num=', num, data_list)
|
|
div += next_fix('/' + url_pas(tool) + '/' + url_pas(name) + '?num=', num, data_list)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('recent') + ' ' + load_lang('ban'), wiki_set(1), custom(conn), other2([sub, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('recent') + ' ' + load_lang('ban'), wiki_set(1), custom(), other2([sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = menu
|
|
menu = menu
|
|
|
))
|
|
))
|
|
@@ -1367,8 +1367,8 @@ def deep_search(name = None):
|
|
|
div += div_plus + '</ul>'
|
|
div += div_plus + '</ul>'
|
|
|
div += next_fix('/search/' + url_pas(name) + '?num=', num, all_list)
|
|
div += next_fix('/search/' + url_pas(name) + '?num=', num, all_list)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('search') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('search') + ')', 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = 0
|
|
menu = 0
|
|
|
))
|
|
))
|
|
@@ -1411,8 +1411,8 @@ def raw_view(name = None, sub_title = None, num = None):
|
|
|
p_data = html.escape(data[0][0])
|
|
p_data = html.escape(data[0][0])
|
|
|
p_data = '<textarea readonly rows="25">' + p_data + '</textarea>'
|
|
p_data = '<textarea readonly rows="25">' + p_data + '</textarea>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [v_name, wiki_set(1), custom(conn), other2([sub, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [v_name, wiki_set(1), custom(), other2([sub, 0])],
|
|
|
data = p_data,
|
|
data = p_data,
|
|
|
menu = menu
|
|
menu = menu
|
|
|
))
|
|
))
|
|
@@ -1462,9 +1462,9 @@ def revert(name = None):
|
|
|
if not curs.fetchall():
|
|
if not curs.fetchall():
|
|
|
return redirect('/w/' + url_pas(name))
|
|
return redirect('/w/' + url_pas(name))
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('revert') + ')', 0])],
|
|
|
|
|
- data = '<form method="post"><span>' + request.args.get('num', '0') + load_lang('version') + '</span><hr>' + ip_warring(conn) + '<input placeholder="' + load_lang('why') + '" name="send" type="text"><hr>' + captcha_get(conn) + '<button type="submit">' + load_lang('revert') + '</button></form>',
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('revert') + ')', 0])],
|
|
|
|
|
+ data = '<form method="post"><span>' + request.args.get('num', '0') + load_lang('version') + '</span><hr>' + ip_warring() + '<input placeholder="' + load_lang('why') + '" name="send" type="text"><hr>' + captcha_get() + '<button type="submit">' + load_lang('revert') + '</button></form>',
|
|
|
menu = [['history/' + url_pas(name), load_lang('history')], ['recent_changes', '' + load_lang('recent') + ' ' + load_lang('change') + '']]
|
|
menu = [['history/' + url_pas(name), load_lang('history')], ['recent_changes', '' + load_lang('recent') + ' ' + load_lang('change') + '']]
|
|
|
))
|
|
))
|
|
|
|
|
|
|
@@ -1496,8 +1496,8 @@ def big_delete():
|
|
|
|
|
|
|
|
return redirect('/')
|
|
return redirect('/')
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('bulk_delete'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('bulk_delete'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<span>
|
|
<span>
|
|
|
Title A
|
|
Title A
|
|
@@ -1534,8 +1534,8 @@ def edit_filter():
|
|
|
else:
|
|
else:
|
|
|
div = '<a href="/manager/9">(' + load_lang('plus') + ')</a>'
|
|
div = '<a href="/manager/9">(' + load_lang('plus') + ')</a>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('edit_filter') + ' ' + load_lang('list'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('edit_filter') + ' ' + load_lang('list'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -1589,8 +1589,8 @@ def set_edit_filter(name = None):
|
|
|
else:
|
|
else:
|
|
|
stat = ''
|
|
stat = ''
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('edit_filter') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('edit_filter') + ')', 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<input ''' + stat + ''' type="checkbox" ''' + time_data + ''' name="ban">
|
|
<input ''' + stat + ''' type="checkbox" ''' + time_data + ''' name="ban">
|
|
@@ -1739,8 +1739,8 @@ def edit(name = None):
|
|
|
|
|
|
|
|
js_data = edit_help_button()
|
|
js_data = edit_help_button()
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('edit') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('edit') + ')', 0])],
|
|
|
data = get_name + js_data[0] + '''
|
|
data = get_name + js_data[0] + '''
|
|
|
<form method="post" action="/edit/''' + url_pas(name) + action + '''">
|
|
<form method="post" action="/edit/''' + url_pas(name) + action + '''">
|
|
|
''' + js_data[1] + '''
|
|
''' + js_data[1] + '''
|
|
@@ -1749,7 +1749,7 @@ def edit(name = None):
|
|
|
<hr>
|
|
<hr>
|
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn) + ip_warring(conn) + '''
|
|
|
|
|
|
|
+ ''' + captcha_get() + ip_warring() + '''
|
|
|
<button id="save" type="submit">''' + load_lang('save') + '''</button>
|
|
<button id="save" type="submit">''' + load_lang('save') + '''</button>
|
|
|
<button id="preview" type="submit" formaction="/preview/''' + url_pas(name) + action + '">' + load_lang('preview') + '''</button>
|
|
<button id="preview" type="submit" formaction="/preview/''' + url_pas(name) + action + '">' + load_lang('preview') + '''</button>
|
|
|
</form>
|
|
</form>
|
|
@@ -1780,8 +1780,8 @@ def preview(name = None):
|
|
|
|
|
|
|
|
js_data = edit_help_button()
|
|
js_data = edit_help_button()
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('preview') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('preview') + ')', 0])],
|
|
|
data = js_data[0] + '''
|
|
data = js_data[0] + '''
|
|
|
<form method="post" action="/edit/''' + url_pas(name) + action + '''">
|
|
<form method="post" action="/edit/''' + url_pas(name) + action + '''">
|
|
|
''' + js_data[1] + '''
|
|
''' + js_data[1] + '''
|
|
@@ -1790,7 +1790,7 @@ def preview(name = None):
|
|
|
<hr>
|
|
<hr>
|
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn) + '''
|
|
|
|
|
|
|
+ ''' + captcha_get() + '''
|
|
|
<button id="save" type="submit">''' + load_lang('save') + '''</button>
|
|
<button id="save" type="submit">''' + load_lang('save') + '''</button>
|
|
|
<button id="preview" type="submit" formaction="/preview/''' + url_pas(name) + action + '">' + load_lang('preview') + '''</button>
|
|
<button id="preview" type="submit" formaction="/preview/''' + url_pas(name) + action + '">' + load_lang('preview') + '''</button>
|
|
|
</form>
|
|
</form>
|
|
@@ -1833,14 +1833,14 @@ def delete(name = None):
|
|
|
if not curs.fetchall():
|
|
if not curs.fetchall():
|
|
|
return redirect('/w/' + url_pas(name))
|
|
return redirect('/w/' + url_pas(name))
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('delete') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('delete') + ')', 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
- ''' + ip_warring(conn) + '''
|
|
|
|
|
|
|
+ ''' + ip_warring() + '''
|
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn) + '''
|
|
|
|
|
|
|
+ ''' + captcha_get() + '''
|
|
|
<button type="submit">''' + load_lang('delete') + '''</button>
|
|
<button type="submit">''' + load_lang('delete') + '''</button>
|
|
|
</form>
|
|
</form>
|
|
|
''',
|
|
''',
|
|
@@ -1864,8 +1864,8 @@ def move_data(name = None):
|
|
|
|
|
|
|
|
data += '</ul>'
|
|
data += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('move') + ' ' + load_lang('history') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('move') + ' ' + load_lang('history') + ')', 0])],
|
|
|
data = data,
|
|
data = data,
|
|
|
menu = [['history/' + url_pas(name), load_lang('history')]]
|
|
menu = [['history/' + url_pas(name), load_lang('history')]]
|
|
|
))
|
|
))
|
|
@@ -1906,16 +1906,16 @@ def move(name = None):
|
|
|
|
|
|
|
|
return redirect('/w/' + url_pas(request.form.get('title', None)))
|
|
return redirect('/w/' + url_pas(request.form.get('title', None)))
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('move') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('move') + ')', 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
- ''' + ip_warring(conn) + '''
|
|
|
|
|
|
|
+ ''' + ip_warring() + '''
|
|
|
<input placeholder="''' + load_lang('document') + ' ' + load_lang('name') + '" value="' + name + '''" name="title" type="text">
|
|
<input placeholder="''' + load_lang('document') + ' ' + load_lang('name') + '" value="' + name + '''" name="title" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
<input placeholder="''' + load_lang('why') + '''" name="send" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn) + '''
|
|
|
|
|
|
|
+ ''' + captcha_get() + '''
|
|
|
<button type="submit">''' + load_lang('move') + '''</button>
|
|
<button type="submit">''' + load_lang('move') + '''</button>
|
|
|
</form>
|
|
</form>
|
|
|
''',
|
|
''',
|
|
@@ -1924,8 +1924,8 @@ def move(name = None):
|
|
|
|
|
|
|
|
@app.route('/other')
|
|
@app.route('/other')
|
|
|
def other():
|
|
def other():
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('other') + ' ' + load_lang('tool'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('other') + ' ' + load_lang('tool'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<h2>''' + load_lang('record') + '''</h2>
|
|
<h2>''' + load_lang('record') + '''</h2>
|
|
|
<ul>
|
|
<ul>
|
|
@@ -1967,8 +1967,8 @@ def manager(num = 1):
|
|
|
title_list = [[load_lang('document') + ' ' + load_lang('name'), 'acl'], [0, 'check'], [0, 'ban'], [0, 'admin'], [0, 'record'], [0, 'topic_record'], [load_lang('name'), 'admin_plus'], [load_lang('name'), 'edit_filter'], [load_lang('document') + ' ' + load_lang('name'), 'search'], [0, 'block_user'], [0, 'block_admin'], [load_lang('document') + ' ' + load_lang('name'), 'watch_list']]
|
|
title_list = [[load_lang('document') + ' ' + load_lang('name'), 'acl'], [0, 'check'], [0, 'ban'], [0, 'admin'], [0, 'record'], [0, 'topic_record'], [load_lang('name'), 'admin_plus'], [load_lang('name'), 'edit_filter'], [load_lang('document') + ' ' + load_lang('name'), 'search'], [0, 'block_user'], [0, 'block_admin'], [load_lang('document') + ' ' + load_lang('name'), 'watch_list']]
|
|
|
|
|
|
|
|
if num == 1:
|
|
if num == 1:
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('admin') + ' ' + load_lang('tool'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('admin') + ' ' + load_lang('tool'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<h2>''' + load_lang('admin') + '''</h2>
|
|
<h2>''' + load_lang('admin') + '''</h2>
|
|
|
<ul>
|
|
<ul>
|
|
@@ -2001,8 +2001,8 @@ def manager(num = 1):
|
|
|
else:
|
|
else:
|
|
|
placeholder = title_list[(num - 2)][0]
|
|
placeholder = title_list[(num - 2)][0]
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['Redirect', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['Redirect', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '<form method="post"><input placeholder="' + placeholder + '" name="name" type="text"><hr><button type="submit">' + load_lang('move') + '</button></form>',
|
|
data = '<form method="post"><input placeholder="' + placeholder + '" name="name" type="text"><hr><button type="submit">' + load_lang('move') + '</button></form>',
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -2065,8 +2065,8 @@ def title_index():
|
|
|
data += '</ul>' + next_fix('/title_index?num=' + str(num) + '&page=', page, title_list, num)
|
|
data += '</ul>' + next_fix('/title_index?num=' + str(num) + '&page=', page, title_list, num)
|
|
|
sub = ' (' + str(num) + '개)'
|
|
sub = ' (' + str(num) + '개)'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('all') + ' ' + load_lang('document'), wiki_set(1), custom(conn), other2([sub, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('all') + ' ' + load_lang('document'), wiki_set(1), custom(), other2([sub, 0])],
|
|
|
data = data,
|
|
data = data,
|
|
|
menu = [['other', load_lang('other')]]
|
|
menu = [['other', load_lang('other')]]
|
|
|
))
|
|
))
|
|
@@ -2204,8 +2204,8 @@ def topic_admin(name = None, sub = None, num = None):
|
|
|
|
|
|
|
|
ban = '<h2>정보</h2><ul>' + ban
|
|
ban = '<h2>정보</h2><ul>' + ban
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('discussion') + ' ' + load_lang('tool'), wiki_set(1), custom(conn), other2([' (' + str(num) + '번)', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('discussion') + ' ' + load_lang('tool'), wiki_set(1), custom(), other2([' (' + str(num) + '번)', 0])],
|
|
|
data = ban,
|
|
data = ban,
|
|
|
menu = [['topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '#' + str(num), load_lang('discussion')]]
|
|
menu = [['topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '#' + str(num), load_lang('discussion')]]
|
|
|
))
|
|
))
|
|
@@ -2363,15 +2363,15 @@ def topic(name = None, sub = None):
|
|
|
<br>
|
|
<br>
|
|
|
<textarea style="height: 100px;" name="content"></textarea>
|
|
<textarea style="height: 100px;" name="content"></textarea>
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn)
|
|
|
|
|
|
|
+ ''' + captcha_get()
|
|
|
|
|
|
|
|
if display == '':
|
|
if display == '':
|
|
|
- data += ip_warring(conn)
|
|
|
|
|
|
|
+ data += ip_warring()
|
|
|
|
|
|
|
|
data += '<button type="submit">Send</button></form>'
|
|
data += '<button type="submit">Send</button></form>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('discussion') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('discussion') + ')', 0])],
|
|
|
data = '<h2 id="topic_top_title">' + sub + '</h2>' + all_data + data,
|
|
data = '<h2 id="topic_top_title">' + sub + '</h2>' + all_data + data,
|
|
|
menu = [['topic/' + url_pas(name), load_lang('list')]]
|
|
menu = [['topic/' + url_pas(name), load_lang('list')]]
|
|
|
))
|
|
))
|
|
@@ -2433,8 +2433,8 @@ def close_topic_list(name = None, tool = None):
|
|
|
if div == '':
|
|
if div == '':
|
|
|
plus = re.sub('^<br>', '', plus)
|
|
plus = re.sub('^<br>', '', plus)
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + sub + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + sub + ')', 0])],
|
|
|
data = '<form method="post">' + div + plus + '</form>',
|
|
data = '<form method="post">' + div + plus + '</form>',
|
|
|
menu = menu
|
|
menu = menu
|
|
|
))
|
|
))
|
|
@@ -2457,7 +2457,7 @@ def login():
|
|
|
|
|
|
|
|
curs.execute("select block from ban where block = ? and login = 'O'", [match])
|
|
curs.execute("select block from ban where block = ? and login = 'O'", [match])
|
|
|
if not curs.fetchall():
|
|
if not curs.fetchall():
|
|
|
- ban = ban_check(conn)
|
|
|
|
|
|
|
+ ban = ban_check()
|
|
|
else:
|
|
else:
|
|
|
ban = 0
|
|
ban = 0
|
|
|
else:
|
|
else:
|
|
@@ -2495,18 +2495,18 @@ def login():
|
|
|
|
|
|
|
|
return redirect('/user')
|
|
return redirect('/user')
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('login'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
- data = '<form method="post"><input placeholder="아이디" name="id" type="text"><hr><input placeholder="비밀번호" name="pw" type="password"><hr>' + captcha_get(conn) + '<button type="submit">' + load_lang('login') + '</button><hr><span>' + load_lang('http_warring') + '</span></form>',
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('login'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
|
|
+ data = '<form method="post"><input placeholder="아이디" name="id" type="text"><hr><input placeholder="비밀번호" name="pw" type="password"><hr>' + captcha_get() + '<button type="submit">' + load_lang('login') + '</button><hr><span>' + load_lang('http_warring') + '</span></form>',
|
|
|
menu = [['user', load_lang('user')]]
|
|
menu = [['user', load_lang('user')]]
|
|
|
))
|
|
))
|
|
|
|
|
|
|
|
@app.route('/change', methods=['POST', 'GET'])
|
|
@app.route('/change', methods=['POST', 'GET'])
|
|
|
def change_password():
|
|
def change_password():
|
|
|
- if ban_check(conn) == 1:
|
|
|
|
|
|
|
+ if ban_check() == 1:
|
|
|
return re_error('/ban')
|
|
return re_error('/ban')
|
|
|
|
|
|
|
|
- if custom(conn)[2] == 0:
|
|
|
|
|
|
|
+ if custom()[2] == 0:
|
|
|
return redirect('/login')
|
|
return redirect('/login')
|
|
|
|
|
|
|
|
if request.method == 'POST':
|
|
if request.method == 'POST':
|
|
@@ -2559,8 +2559,8 @@ def change_password():
|
|
|
else:
|
|
else:
|
|
|
div2 += '<option value="' + skin_data + '">' + skin_data + '</option>'
|
|
div2 += '<option value="' + skin_data + '">' + skin_data + '</option>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('my_info') + ' ' + load_lang('edit'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('my_info') + ' ' + load_lang('edit'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<span>ID : ''' + ip + '''</span>
|
|
<span>ID : ''' + ip + '''</span>
|
|
@@ -2638,8 +2638,8 @@ def user_check(name = None):
|
|
|
else:
|
|
else:
|
|
|
return re_error('/error/5')
|
|
return re_error('/error/5')
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('check') + '', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('check') + '', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -2649,8 +2649,8 @@ def plus_check(name):
|
|
|
if request.method == 'POST':
|
|
if request.method == 'POST':
|
|
|
return redirect('/check/' + url_pas(name) + '?plus=' + url_pas(request.form.get('name2', None)))
|
|
return redirect('/check/' + url_pas(name) + '?plus=' + url_pas(request.form.get('name2', None)))
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('plus'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('plus'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<input placeholder="' + load_lang('compare') + '" name="name2" type="text">
|
|
<input placeholder="' + load_lang('compare') + '" name="name2" type="text">
|
|
@@ -2663,7 +2663,7 @@ def plus_check(name):
|
|
|
|
|
|
|
|
@app.route('/register', methods=['POST', 'GET'])
|
|
@app.route('/register', methods=['POST', 'GET'])
|
|
|
def register():
|
|
def register():
|
|
|
- if ban_check(conn) == 1:
|
|
|
|
|
|
|
+ if ban_check() == 1:
|
|
|
return re_error('/ban')
|
|
return re_error('/ban')
|
|
|
|
|
|
|
|
if not admin_check(None, None) == 1:
|
|
if not admin_check(None, None) == 1:
|
|
@@ -2710,8 +2710,8 @@ def register():
|
|
|
if data and data[0][0] != '':
|
|
if data and data[0][0] != '':
|
|
|
contract = data[0][0] + '<hr>'
|
|
contract = data[0][0] + '<hr>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('register') + '', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('register') + '', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
''' + contract + '''
|
|
''' + contract + '''
|
|
@@ -2723,7 +2723,7 @@ def register():
|
|
|
<hr>
|
|
<hr>
|
|
|
<input placeholder="Email (Option)" name="email" type="text">
|
|
<input placeholder="Email (Option)" name="email" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn) + '''
|
|
|
|
|
|
|
+ ''' + captcha_get() + '''
|
|
|
<button type="submit">' + load_lang('register') + '</button>
|
|
<button type="submit">' + load_lang('register') + '</button>
|
|
|
<hr>
|
|
<hr>
|
|
|
<span>''' + load_lang('http_warring') + '''</span>
|
|
<span>''' + load_lang('http_warring') + '''</span>
|
|
@@ -2833,8 +2833,8 @@ def user_ban(name = None):
|
|
|
|
|
|
|
|
data += '<input placeholder="' + load_lang('why') + '" name="why" type="text"><hr>' + plus
|
|
data += '<input placeholder="' + load_lang('why') + '" name="why" type="text"><hr>' + plus
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + now + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + now + ')', 0])],
|
|
|
data = '<form method="post">' + data + '<button type="submit">' + now + '</button></form>',
|
|
data = '<form method="post">' + data + '<button type="submit">' + now + '</button></form>',
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -2850,7 +2850,7 @@ def acl(name = None):
|
|
|
|
|
|
|
|
user_data = re.search('^' + load_lang('user') + ':(.+)$', name)
|
|
user_data = re.search('^' + load_lang('user') + ':(.+)$', name)
|
|
|
if user_data:
|
|
if user_data:
|
|
|
- if check_data and custom(conn)[2] == 0:
|
|
|
|
|
|
|
+ if check_data and custom()[2] == 0:
|
|
|
return redirect('/login')
|
|
return redirect('/login')
|
|
|
|
|
|
|
|
if user_data.groups()[0] != ip_check():
|
|
if user_data.groups()[0] != ip_check():
|
|
@@ -2920,8 +2920,8 @@ def acl(name = None):
|
|
|
if acl_data:
|
|
if acl_data:
|
|
|
data += '<hr><input value="' + html.escape(acl_data[0][1]) + '" placeholder="' + load_lang('why') + '" name="why" type="text" ' + check_ok + '>'
|
|
data += '<hr><input value="' + html.escape(acl_data[0][1]) + '" placeholder="' + load_lang('why') + '" name="why" type="text" ' + check_ok + '>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (ACL)', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (ACL)', 0])],
|
|
|
data = '<form method="post">' + data + '<hr><button type="submit">ACL ' + load_lang('edit') + '</button></form>',
|
|
data = '<form method="post">' + data + '<hr><button type="submit">ACL ' + load_lang('edit') + '</button></form>',
|
|
|
menu = [['w/' + url_pas(name), load_lang('document')], ['manager', load_lang('admin')]]
|
|
menu = [['w/' + url_pas(name), load_lang('document')], ['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -2980,8 +2980,8 @@ def user_admin(name = None):
|
|
|
else:
|
|
else:
|
|
|
div += '<option value="' + data[0] + '">' + data[0] + '</option>'
|
|
div += '<option value="' + data[0] + '">' + data[0] + '</option>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('authority') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('authority') + ')', 0])],
|
|
|
data = '<form method="post"><select name="select">' + div + '</select><hr><button type="submit">' + load_lang('edit') + '</button></form>',
|
|
data = '<form method="post"><select name="select">' + div + '</select><hr><button type="submit">' + load_lang('edit') + '</button></form>',
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
@@ -3006,8 +3006,8 @@ def diff_data(name = None):
|
|
|
diff_data = difflib.SequenceMatcher(None, first_data, second_data)
|
|
diff_data = difflib.SequenceMatcher(None, first_data, second_data)
|
|
|
result = re.sub('\r', '', diff(diff_data))
|
|
result = re.sub('\r', '', diff(diff_data))
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (' + load_lang('compare') + ')', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (' + load_lang('compare') + ')', 0])],
|
|
|
data = '<pre>' + result + '</pre>',
|
|
data = '<pre>' + result + '</pre>',
|
|
|
menu = [['history/' + url_pas(name), load_lang('history')]]
|
|
menu = [['history/' + url_pas(name), load_lang('history')]]
|
|
|
))
|
|
))
|
|
@@ -3024,8 +3024,8 @@ def down(name = None):
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([' (하위)', 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([' (하위)', 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['w/' + url_pas(name), load_lang('document')]]
|
|
menu = [['w/' + url_pas(name), load_lang('document')]]
|
|
|
))
|
|
))
|
|
@@ -3176,8 +3176,8 @@ def read_view(name = None):
|
|
|
|
|
|
|
|
div = end_data + div
|
|
div = end_data + div
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [name, wiki_set(1), custom(conn), other2([sub + acl, r_date])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [name, wiki_set(1), custom(), other2([sub + acl, r_date])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = menu
|
|
menu = menu
|
|
|
)), response_data
|
|
)), response_data
|
|
@@ -3222,8 +3222,8 @@ def user_topic_list(name = None):
|
|
|
else:
|
|
else:
|
|
|
sub = 0
|
|
sub = 0
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('discussion') + ' ' + load_lang('record'), wiki_set(1), custom(conn), other2([sub, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('discussion') + ' ' + load_lang('record'), wiki_set(1), custom(), other2([sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', load_lang('other')], ['user', load_lang('user')], ['count/' + url_pas(name), '' + load_lang('count') + ''], ['record/' + url_pas(name), load_lang('record')]]
|
|
menu = [['other', load_lang('other')], ['user', load_lang('user')], ['count/' + url_pas(name), '' + load_lang('count') + ''], ['record/' + url_pas(name), load_lang('record')]]
|
|
|
))
|
|
))
|
|
@@ -3411,15 +3411,15 @@ def recent_changes(name = None, tool = 'record'):
|
|
|
if sub == '':
|
|
if sub == '':
|
|
|
sub = 0
|
|
sub = 0
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [title, wiki_set(1), custom(conn), other2([sub, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [title, wiki_set(1), custom(), other2([sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = menu
|
|
menu = menu
|
|
|
))
|
|
))
|
|
|
|
|
|
|
|
@app.route('/upload', methods=['GET', 'POST'])
|
|
@app.route('/upload', methods=['GET', 'POST'])
|
|
|
def upload():
|
|
def upload():
|
|
|
- if ban_check(conn) == 1:
|
|
|
|
|
|
|
+ if ban_check() == 1:
|
|
|
return re_error('/ban')
|
|
return re_error('/ban')
|
|
|
|
|
|
|
|
if request.method == 'POST':
|
|
if request.method == 'POST':
|
|
@@ -3459,7 +3459,7 @@ def upload():
|
|
|
if request.form.get('f_lice', None):
|
|
if request.form.get('f_lice', None):
|
|
|
lice = request.form.get('f_lice', None)
|
|
lice = request.form.get('f_lice', None)
|
|
|
else:
|
|
else:
|
|
|
- if custom(conn)[2] == 0:
|
|
|
|
|
|
|
+ if custom()[2] == 0:
|
|
|
lice = ip + ' Upload'
|
|
lice = ip + ' Upload'
|
|
|
else:
|
|
else:
|
|
|
lice = '[[' + load_lang('user') + ':' + ip + ']] Upload'
|
|
lice = '[[' + load_lang('user') + ':' + ip + ']] Upload'
|
|
@@ -3484,8 +3484,8 @@ def upload():
|
|
|
|
|
|
|
|
return redirect('/w/' + load_lang('file') + ':' + name)
|
|
return redirect('/w/' + load_lang('file') + ':' + name)
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('upload'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('upload'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<form method="post" enctype="multipart/form-data" accept-charset="utf8">
|
|
<form method="post" enctype="multipart/form-data" accept-charset="utf8">
|
|
|
<input type="file" name="f_data">
|
|
<input type="file" name="f_data">
|
|
@@ -3494,7 +3494,7 @@ def upload():
|
|
|
<hr>
|
|
<hr>
|
|
|
<input placeholder="''' + load_lang('license') + '''" name="f_lice" type="text">
|
|
<input placeholder="''' + load_lang('license') + '''" name="f_lice" type="text">
|
|
|
<hr>
|
|
<hr>
|
|
|
- ''' + captcha_get(conn) + '''
|
|
|
|
|
|
|
+ ''' + captcha_get() + '''
|
|
|
<button id="save" type="submit">''' + load_lang('save') + '''</button>
|
|
<button id="save" type="submit">''' + load_lang('save') + '''</button>
|
|
|
</form>
|
|
</form>
|
|
|
''',
|
|
''',
|
|
@@ -3507,7 +3507,7 @@ def user_info():
|
|
|
|
|
|
|
|
curs.execute("select acl from user where id = ?", [ip])
|
|
curs.execute("select acl from user where id = ?", [ip])
|
|
|
data = curs.fetchall()
|
|
data = curs.fetchall()
|
|
|
- if ban_check(conn) == 0:
|
|
|
|
|
|
|
+ if ban_check() == 0:
|
|
|
if data:
|
|
if data:
|
|
|
if data[0][0] != 'user':
|
|
if data[0][0] != 'user':
|
|
|
acl = data[0][0]
|
|
acl = data[0][0]
|
|
@@ -3538,7 +3538,7 @@ def user_info():
|
|
|
if block_data[0][2] == 'O':
|
|
if block_data[0][2] == 'O':
|
|
|
acl += ' (대역)'
|
|
acl += ' (대역)'
|
|
|
|
|
|
|
|
- if custom(conn)[2] != 0:
|
|
|
|
|
|
|
+ if custom()[2] != 0:
|
|
|
ip_user = '<a href="/w/' + load_lang('user') + ':' + ip + '">' + ip + '</a>'
|
|
ip_user = '<a href="/w/' + load_lang('user') + ':' + ip + '">' + ip + '</a>'
|
|
|
|
|
|
|
|
plus = '<li><a href="/logout">로그아웃</a></li><li><a href="/change">' + load_lang('my_info') + ' ' + load_lang('edit') + '</a></li>'
|
|
plus = '<li><a href="/logout">로그아웃</a></li><li><a href="/change">' + load_lang('my_info') + ' ' + load_lang('edit') + '</a></li>'
|
|
@@ -3556,8 +3556,8 @@ def user_info():
|
|
|
plus = '<li><a href="/login">' + load_lang('login') + '</a></li>'
|
|
plus = '<li><a href="/login">' + load_lang('login') + '</a></li>'
|
|
|
plus2 = ''
|
|
plus2 = ''
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('user') + ' ' + load_lang('tool'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('user') + ' ' + load_lang('tool'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<h2>상태</h2>
|
|
<h2>상태</h2>
|
|
|
<ul>
|
|
<ul>
|
|
@@ -3583,7 +3583,7 @@ def user_info():
|
|
|
def watch_list():
|
|
def watch_list():
|
|
|
div = 'Limit : 10<hr>'
|
|
div = 'Limit : 10<hr>'
|
|
|
|
|
|
|
|
- if custom(conn)[2] == 0:
|
|
|
|
|
|
|
+ if custom()[2] == 0:
|
|
|
return redirect('/login')
|
|
return redirect('/login')
|
|
|
|
|
|
|
|
curs.execute("select title from scan where user = ?", [ip_check()])
|
|
curs.execute("select title from scan where user = ?", [ip_check()])
|
|
@@ -3596,15 +3596,15 @@ def watch_list():
|
|
|
|
|
|
|
|
div += '<a href="/manager/13">(' + load_lang('plus') + ')</a>'
|
|
div += '<a href="/manager/13">(' + load_lang('plus') + ')</a>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('watchlist') + ' ' + load_lang('list'), wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('watchlist') + ' ' + load_lang('list'), wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', load_lang('admin')]]
|
|
menu = [['manager', load_lang('admin')]]
|
|
|
))
|
|
))
|
|
|
|
|
|
|
|
@app.route('/watch_list/<path:name>')
|
|
@app.route('/watch_list/<path:name>')
|
|
|
def watch_list_name(name = None):
|
|
def watch_list_name(name = None):
|
|
|
- if custom(conn)[2] == 0:
|
|
|
|
|
|
|
+ if custom()[2] == 0:
|
|
|
return redirect('/login')
|
|
return redirect('/login')
|
|
|
|
|
|
|
|
ip = ip_check()
|
|
ip = ip_check()
|
|
@@ -3629,7 +3629,7 @@ def custom_head_view():
|
|
|
ip = ip_check()
|
|
ip = ip_check()
|
|
|
|
|
|
|
|
if request.method == 'POST':
|
|
if request.method == 'POST':
|
|
|
- if custom(conn)[2] != 0:
|
|
|
|
|
|
|
+ if custom()[2] != 0:
|
|
|
curs.execute("select user from custom where user = ?", [ip + ' (head)'])
|
|
curs.execute("select user from custom where user = ?", [ip + ' (head)'])
|
|
|
if curs.fetchall():
|
|
if curs.fetchall():
|
|
|
curs.execute("update custom set css = ? where user = ?", [request.form.get('content', None), ip + ' (head)'])
|
|
curs.execute("update custom set css = ? where user = ?", [request.form.get('content', None), ip + ' (head)'])
|
|
@@ -3642,7 +3642,7 @@ def custom_head_view():
|
|
|
|
|
|
|
|
return redirect('/user')
|
|
return redirect('/user')
|
|
|
else:
|
|
else:
|
|
|
- if custom(conn)[2] != 0:
|
|
|
|
|
|
|
+ if custom()[2] != 0:
|
|
|
start = ''
|
|
start = ''
|
|
|
|
|
|
|
|
curs.execute("select css from custom where user = ?", [ip + ' (head)'])
|
|
curs.execute("select css from custom where user = ?", [ip + ' (head)'])
|
|
@@ -3661,8 +3661,8 @@ def custom_head_view():
|
|
|
|
|
|
|
|
start += '<span><style>CSS</style><br><script>JS</script></span><hr>'
|
|
start += '<span><style>CSS</style><br><script>JS</script></span><hr>'
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = [load_lang('user') + ' HEAD', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = [load_lang('user') + ' HEAD', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = start + '''
|
|
data = start + '''
|
|
|
<form method="post">
|
|
<form method="post">
|
|
|
<textarea rows="25" cols="100" name="content">''' + data + '''</textarea>
|
|
<textarea rows="25" cols="100" name="content">''' + data + '''</textarea>
|
|
@@ -3695,8 +3695,8 @@ def count_edit(name = None):
|
|
|
else:
|
|
else:
|
|
|
t_data = 0
|
|
t_data = 0
|
|
|
|
|
|
|
|
- return html_minify(render_template(skin_check(conn),
|
|
|
|
|
- imp = ['' + load_lang('count') + '', wiki_set(1), custom(conn), other2([0, 0])],
|
|
|
|
|
|
|
+ return html_minify(render_template(skin_check(),
|
|
|
|
|
+ imp = ['' + load_lang('count') + '', wiki_set(1), custom(), other2([0, 0])],
|
|
|
data = '''
|
|
data = '''
|
|
|
<ul>
|
|
<ul>
|
|
|
<li><a href="/record/''' + url_pas(that) + '''">''' + load_lang('edit') + '''</a> : ''' + str(data) + '''</li>
|
|
<li><a href="/record/''' + url_pas(that) + '''">''' + load_lang('edit') + '''</a> : ''' + str(data) + '''</li>
|