|
@@ -1,4 +1,5 @@
|
|
|
-from flask import Flask, request, send_from_directory
|
|
|
|
|
|
|
+# 모듈 불러오기
|
|
|
|
|
+from flask import Flask, request, send_from_directory
|
|
|
from flask_compress import Compress
|
|
from flask_compress import Compress
|
|
|
from flask_reggie import Reggie
|
|
from flask_reggie import Reggie
|
|
|
|
|
|
|
@@ -14,15 +15,11 @@ import logging
|
|
|
import random
|
|
import random
|
|
|
import sys
|
|
import sys
|
|
|
|
|
|
|
|
-logging.basicConfig(level = logging.ERROR)
|
|
|
|
|
-app = Flask(__name__)
|
|
|
|
|
-Reggie(app)
|
|
|
|
|
-compress = Compress()
|
|
|
|
|
-compress.init_app(app)
|
|
|
|
|
-
|
|
|
|
|
|
|
+# 버전 표기
|
|
|
r_ver = 'v3.0.0 Beta'
|
|
r_ver = 'v3.0.0 Beta'
|
|
|
print('Version : ' + r_ver)
|
|
print('Version : ' + r_ver)
|
|
|
|
|
|
|
|
|
|
+# 나머지 불러오기
|
|
|
from func import *
|
|
from func import *
|
|
|
from set_mark.tool import savemark
|
|
from set_mark.tool import savemark
|
|
|
|
|
|
|
@@ -52,8 +49,18 @@ except:
|
|
|
conn = sqlite3.connect(set_data['db'] + '.db', check_same_thread = False)
|
|
conn = sqlite3.connect(set_data['db'] + '.db', check_same_thread = False)
|
|
|
curs = conn.cursor()
|
|
curs = conn.cursor()
|
|
|
|
|
|
|
|
-# 스킨 불러오기 부분
|
|
|
|
|
-skin_check(conn)
|
|
|
|
|
|
|
+# 기타 설정 변경
|
|
|
|
|
+logging.basicConfig(level = logging.ERROR)
|
|
|
|
|
+app = Flask(__name__, template_folder = skin_check(conn))
|
|
|
|
|
+Reggie(app)
|
|
|
|
|
+compress = Compress()
|
|
|
|
|
+compress.init_app(app)
|
|
|
|
|
+
|
|
|
|
|
+# 템플릿 설정
|
|
|
|
|
+def regex(find, replace, data):
|
|
|
|
|
+ return re.sub(find, replace, data)
|
|
|
|
|
+
|
|
|
|
|
+app.jinja_env.filters['regex'] = regex
|
|
|
|
|
|
|
|
# 셋업 부분
|
|
# 셋업 부분
|
|
|
curs.execute("create table if not exists data(title text, data text)")
|
|
curs.execute("create table if not exists data(title text, data text)")
|
|
@@ -77,11 +84,13 @@ curs.execute("create table if not exists scan(user text, title text)")
|
|
|
curs.execute("create table if not exists acl(title text, dec text, dis text, why text)")
|
|
curs.execute("create table if not exists acl(title text, dec text, dis text, why text)")
|
|
|
curs.execute("create table if not exists inter(title text, link text)")
|
|
curs.execute("create table if not exists inter(title text, link text)")
|
|
|
|
|
|
|
|
|
|
+# owner 존재 확인
|
|
|
curs.execute("select name from alist where acl = 'owner'")
|
|
curs.execute("select name from alist where acl = 'owner'")
|
|
|
if not curs.fetchall():
|
|
if not curs.fetchall():
|
|
|
curs.execute("delete from alist where name = 'owner'")
|
|
curs.execute("delete from alist where name = 'owner'")
|
|
|
curs.execute("insert into alist (name, acl) values ('owner', 'owner')")
|
|
curs.execute("insert into alist (name, acl) values ('owner', 'owner')")
|
|
|
|
|
|
|
|
|
|
+# 포트 점검
|
|
|
curs.execute("select data from other where name = 'port'")
|
|
curs.execute("select data from other where name = 'port'")
|
|
|
rep_data = curs.fetchall()
|
|
rep_data = curs.fetchall()
|
|
|
if not rep_data:
|
|
if not rep_data:
|
|
@@ -99,6 +108,7 @@ else:
|
|
|
rep_port = rep_data[0][0]
|
|
rep_port = rep_data[0][0]
|
|
|
print('Port : ' + str(rep_port))
|
|
print('Port : ' + str(rep_port))
|
|
|
|
|
|
|
|
|
|
+# 비밀 키 점검
|
|
|
curs.execute("select data from other where name = 'key'")
|
|
curs.execute("select data from other where name = 'key'")
|
|
|
rep_data = curs.fetchall()
|
|
rep_data = curs.fetchall()
|
|
|
if not rep_data:
|
|
if not rep_data:
|
|
@@ -115,6 +125,7 @@ else:
|
|
|
rep_key = rep_data[0][0]
|
|
rep_key = rep_data[0][0]
|
|
|
print('Secret Key : ' + rep_key)
|
|
print('Secret Key : ' + rep_key)
|
|
|
|
|
|
|
|
|
|
+# 한번 개행
|
|
|
print('')
|
|
print('')
|
|
|
|
|
|
|
|
# 호환성 설정
|
|
# 호환성 설정
|
|
@@ -182,7 +193,6 @@ try:
|
|
|
except:
|
|
except:
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
-
|
|
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
# 이미지 폴더 생성
|
|
# 이미지 폴더 생성
|
|
@@ -244,7 +254,7 @@ def alarm():
|
|
|
da += '<li>알림이 없습니다.</li>'
|
|
da += '<li>알림이 없습니다.</li>'
|
|
|
da += '</ul>'
|
|
da += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['알림', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['알림', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = da,
|
|
data = da,
|
|
|
menu = [['user', '사용자']]
|
|
menu = [['user', '사용자']]
|
|
@@ -277,7 +287,7 @@ def inter_wiki():
|
|
|
if admin == 1:
|
|
if admin == 1:
|
|
|
div += '<a href="/plus_inter">(추가)</a>'
|
|
div += '<a href="/plus_inter">(추가)</a>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['인터위키 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['인터위키 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -303,7 +313,7 @@ def plus_inter():
|
|
|
|
|
|
|
|
return redirect('/inter_wiki')
|
|
return redirect('/inter_wiki')
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['인터위키 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['인터위키 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input placeholder="이름" type="text" name="title"><hr> \
|
|
<input placeholder="이름" type="text" name="title"><hr> \
|
|
@@ -327,7 +337,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['설정 편집', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['설정 편집', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<h2>메뉴</h2><ul>' + li_data + '</ul>',
|
|
data = '<h2>메뉴</h2><ul>' + li_data + '</ul>',
|
|
|
menu = [['manager', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -388,7 +398,7 @@ def edit_set(num = 0):
|
|
|
if d_list[10]:
|
|
if d_list[10]:
|
|
|
ch_3 = 'checked="checked"'
|
|
ch_3 = 'checked="checked"'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['기본 설정', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['기본 설정', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<span>이름</span><br><br> \
|
|
<span>이름</span><br><br> \
|
|
@@ -440,7 +450,7 @@ def edit_set(num = 0):
|
|
|
x += 1
|
|
x += 1
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['문구 관련', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['문구 관련', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<span>가입 약관</span><br><br> \
|
|
<span>가입 약관</span><br><br> \
|
|
@@ -470,7 +480,7 @@ def edit_set(num = 0):
|
|
|
else:
|
|
else:
|
|
|
data = ''
|
|
data = ''
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['전역 HEAD', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['전역 HEAD', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<span><style>CSS</style><br><script>JS</script></span><hr> \
|
|
data = '<span><style>CSS</style><br><script>JS</script></span><hr> \
|
|
|
<form method="post"> \
|
|
<form method="post"> \
|
|
@@ -512,7 +522,7 @@ def edit_set(num = 0):
|
|
|
if not data or data == '':
|
|
if not data or data == '':
|
|
|
data = ''.join(lines)
|
|
data = ''.join(lines)
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['robots.txt', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['robots.txt', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<a href="/robots.txt">(보기)</a><hr> \
|
|
data = '<a href="/robots.txt">(보기)</a><hr> \
|
|
|
<form method="post"> \
|
|
<form method="post"> \
|
|
@@ -547,7 +557,7 @@ def edit_set(num = 0):
|
|
|
x += 1
|
|
x += 1
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['구글 관련', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['구글 관련', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<span>리캡차 (HTML)</span><br><br> \
|
|
<span>리캡차 (HTML)</span><br><br> \
|
|
@@ -575,7 +585,7 @@ def not_close_topic():
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['열린 토론 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['열린 토론 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -605,7 +615,7 @@ def acl_list():
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['ACL 문서 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['ACL 문서 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -685,7 +695,7 @@ def admin_plus(name = None):
|
|
|
data += '<li><input type="checkbox" ' + state + ' name="give" ' + exist_list[6] + '> 권한 부여</li>'
|
|
data += '<li><input type="checkbox" ' + state + ' name="give" ' + exist_list[6] + '> 권한 부여</li>'
|
|
|
data += '<li><input type="checkbox" ' + state + ' name="owner" ' + exist_list[7] + '> 소유자</li></ul>'
|
|
data += '<li><input type="checkbox" ' + state + ' name="owner" ' + exist_list[7] + '> 소유자</li></ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['관리 그룹 추가', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['관리 그룹 추가', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post">' + data + '<hr><button id="save" ' + state + ' type="submit">저장</button></form>',
|
|
data = '<form method="post">' + data + '<hr><button id="save" ' + state + ' type="submit">저장</button></form>',
|
|
|
menu = [['manager', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -708,7 +718,7 @@ def admin_list():
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['관리자 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['관리자 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -773,7 +783,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['사용자 가입 기록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['사용자 가입 기록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = list_data,
|
|
data = list_data,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -798,7 +808,7 @@ def admin_log():
|
|
|
list_data += '</ul><hr><ul><li>주의 : 권한 사용 안하고 열람만 해도 기록되는 경우도 있습니다.</li></ul>'
|
|
list_data += '</ul><hr><ul><li>주의 : 권한 사용 안하고 열람만 해도 기록되는 경우도 있습니다.</li></ul>'
|
|
|
list_data += next_fix('/admin_log?num=', num, get_list)
|
|
list_data += next_fix('/admin_log?num=', num, get_list)
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['권한 사용 기록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['권한 사용 기록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = list_data,
|
|
data = list_data,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -819,7 +829,7 @@ def give_log():
|
|
|
|
|
|
|
|
list_data += '</ul><hr><a href="/manager/8">(생성)</a>'
|
|
list_data += '</ul><hr><a href="/manager/8">(생성)</a>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['관리 그룹 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['관리 그룹 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = list_data,
|
|
data = list_data,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -912,7 +922,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (역링크)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (역링크)', 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['w/' + url_pas(name), '문서']]
|
|
menu = [['w/' + url_pas(name), '문서']]
|
|
@@ -938,7 +948,7 @@ def please():
|
|
|
|
|
|
|
|
div += '</ul>' + next_fix('/please?num=', num, data_list)
|
|
div += '</ul>' + next_fix('/please?num=', num, data_list)
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['필요한 문서', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['필요한 문서', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -981,7 +991,7 @@ def recent_discuss(tools = 'normal'):
|
|
|
else:
|
|
else:
|
|
|
div += '</tbody></table>'
|
|
div += '</tbody></table>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['최근 토론내역', wiki_set(conn, 1), custom(conn), other2([m_sub, 0])],
|
|
imp = ['최근 토론내역', wiki_set(conn, 1), custom(conn), other2([m_sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = 0
|
|
menu = 0
|
|
@@ -1083,7 +1093,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['차단 기록', wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
imp = ['차단 기록', wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = menu
|
|
menu = menu
|
|
@@ -1138,7 +1148,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (검색)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (검색)', 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = 0
|
|
menu = 0
|
|
@@ -1181,7 +1191,7 @@ def raw_view(name = None, sub_t = None, num = None):
|
|
|
|
|
|
|
|
p_data = '<textarea readonly rows="25">' + p_data + '</textarea>'
|
|
p_data = '<textarea readonly rows="25">' + p_data + '</textarea>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [v_name, wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
imp = [v_name, wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
|
data = p_data,
|
|
data = p_data,
|
|
|
menu = menu
|
|
menu = menu
|
|
@@ -1243,7 +1253,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (되돌리기)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (되돌리기)', 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<span>' + request.args.get('num', '0') + '판으로 되돌리겠습니까?</span><hr> \
|
|
<span>' + request.args.get('num', '0') + '판으로 되돌리겠습니까?</span><hr> \
|
|
@@ -1280,7 +1290,7 @@ def big_delete():
|
|
|
|
|
|
|
|
return redirect('/')
|
|
return redirect('/')
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['많은 문서 삭제', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['많은 문서 삭제', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<span>문서명 A<br>문서명 B<br>문서명 C<hr>이런 식으로 적으세요.</span><hr> \
|
|
data = '<span>문서명 A<br>문서명 B<br>문서명 C<hr>이런 식으로 적으세요.</span><hr> \
|
|
|
<form method="post"> \
|
|
<form method="post"> \
|
|
@@ -1303,7 +1313,7 @@ def edit_filter():
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
div += '<hr><a href="/manager/9">(추가)</a>'
|
|
div += '<hr><a href="/manager/9">(추가)</a>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['편집 필터 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['편집 필터 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -1348,7 +1358,7 @@ def set_edit_filter(name = None):
|
|
|
else:
|
|
else:
|
|
|
stat = ''
|
|
stat = ''
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (편집 필터)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (편집 필터)', 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input ' + stat + ' placeholder="분 차단" name="end" value="' + html.escape(time_data) + '" type="text"><br><br><ul><li>비우면 영구 차단</li><li>1달은 28일로 취급</li></ul><hr> \
|
|
<input ' + stat + ' placeholder="분 차단" name="end" value="' + html.escape(time_data) + '" type="text"><br><br><ul><li>비우면 영구 차단</li><li>1달은 28일로 취급</li></ul><hr> \
|
|
@@ -1455,7 +1465,7 @@ def edit(name = None):
|
|
|
data = get_data[0][0]
|
|
data = get_data[0][0]
|
|
|
get_name = ''
|
|
get_name = ''
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (수정)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (수정)', 0])],
|
|
|
data = get_name + ' \
|
|
data = get_name + ' \
|
|
|
<form method="post" action="/edit/' + url_pas(name) + action + '"> \
|
|
<form method="post" action="/edit/' + url_pas(name) + action + '"> \
|
|
@@ -1493,7 +1503,7 @@ def preview(name = None):
|
|
|
else:
|
|
else:
|
|
|
action = ''
|
|
action = ''
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (미리보기)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (미리보기)', 0])],
|
|
|
data = '<form method="post" action="/edit/' + url_pas(name) + action + '"> \
|
|
data = '<form method="post" action="/edit/' + url_pas(name) + action + '"> \
|
|
|
<textarea rows="25" name="content">' + html.escape(request.form['content']) + '</textarea> \
|
|
<textarea rows="25" name="content">' + html.escape(request.form['content']) + '</textarea> \
|
|
@@ -1542,7 +1552,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (삭제)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (삭제)', 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
' + ip_warring(conn) + ' \
|
|
' + ip_warring(conn) + ' \
|
|
@@ -1570,7 +1580,7 @@ def move_data(name = None):
|
|
|
|
|
|
|
|
data += '</ul>'
|
|
data += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (이동 기록)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (이동 기록)', 0])],
|
|
|
data = data,
|
|
data = data,
|
|
|
menu = [['history/' + url_pas(name), '역사']]
|
|
menu = [['history/' + url_pas(name), '역사']]
|
|
@@ -1618,7 +1628,7 @@ def move(name = None):
|
|
|
|
|
|
|
|
return redirect('/w/' + url_pas(request.form['title']))
|
|
return redirect('/w/' + url_pas(request.form['title']))
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (이동)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (이동)', 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
' + ip_warring(conn) + ' \
|
|
' + ip_warring(conn) + ' \
|
|
@@ -1632,7 +1642,7 @@ def move(name = None):
|
|
|
|
|
|
|
|
@app.route('/other')
|
|
@app.route('/other')
|
|
|
def other():
|
|
def other():
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['기타 메뉴', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['기타 메뉴', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<h2>기록</h2><ul><li><a href="/block_log">차단 기록</a></li><li><a href="/user_log">가입 기록</a></li><li><a href="/admin_log">권한 사용 기록</a></li><li><a href="/manager/6">편집 기록</a></li><li><a href="/manager/7">토론 기록</a></li></ul><br><h2>목록</h2><ul><li><a href="/admin_list">관리자 목록</a></li><li><a href="/give_log">관리 그룹 목록</a></li><li><a href="/not_close_topic">열린 토론 목록</a></li></ul><br><h2>기타</h2><ul><li><a href="/title_index">모든 문서</a></li><li><a href="/acl_list">ACL 문서</a></li><li><a href="/please">필요한 문서</a></li><li><a href="/upload">파일 올리기</a></li><li><a href="/manager/10">문서 검색</a></li></ul><br><h2>관리자</h2><ul><li><a href="/manager/1">관리자 메뉴</a></li></ul><br><h2>버전</h2><ul><li>이 오픈나무는 <a href="https://github.com/2DU/openNAMU/blob/master/version.md">' + r_ver + '</a> 입니다.</li></ul>',
|
|
data = '<h2>기록</h2><ul><li><a href="/block_log">차단 기록</a></li><li><a href="/user_log">가입 기록</a></li><li><a href="/admin_log">권한 사용 기록</a></li><li><a href="/manager/6">편집 기록</a></li><li><a href="/manager/7">토론 기록</a></li></ul><br><h2>목록</h2><ul><li><a href="/admin_list">관리자 목록</a></li><li><a href="/give_log">관리 그룹 목록</a></li><li><a href="/not_close_topic">열린 토론 목록</a></li></ul><br><h2>기타</h2><ul><li><a href="/title_index">모든 문서</a></li><li><a href="/acl_list">ACL 문서</a></li><li><a href="/please">필요한 문서</a></li><li><a href="/upload">파일 올리기</a></li><li><a href="/manager/10">문서 검색</a></li></ul><br><h2>관리자</h2><ul><li><a href="/manager/1">관리자 메뉴</a></li></ul><br><h2>버전</h2><ul><li>이 오픈나무는 <a href="https://github.com/2DU/openNAMU/blob/master/version.md">' + r_ver + '</a> 입니다.</li></ul>',
|
|
|
menu = 0
|
|
menu = 0
|
|
@@ -1643,7 +1653,7 @@ def other():
|
|
|
def manager(num = 1):
|
|
def manager(num = 1):
|
|
|
title_list = [['문서 ACL', '문서명', 'acl'], ['사용자 검사', 0, 'check'], ['사용자 차단', 0, 'ban'], ['권한 주기', 0, 'admin'], ['편집 기록', 0, 'record'], ['토론 기록', 0, 'topic_record'], ['그룹 생성', '그룹명', 'admin_plus'], ['편집 필터 생성', '필터명', 'edit_filter'], ['문서 검색', '문서명', 'search'], ['차단자 검색', 0, 'block_user'], ['관리자 검색', 0, 'block_admin'], ['주시 문서 추가', '문서명', 'watch_list']]
|
|
title_list = [['문서 ACL', '문서명', 'acl'], ['사용자 검사', 0, 'check'], ['사용자 차단', 0, 'ban'], ['권한 주기', 0, 'admin'], ['편집 기록', 0, 'record'], ['토론 기록', 0, 'topic_record'], ['그룹 생성', '그룹명', 'admin_plus'], ['편집 필터 생성', '필터명', 'edit_filter'], ['문서 검색', '문서명', 'search'], ['차단자 검색', 0, 'block_user'], ['관리자 검색', 0, 'block_admin'], ['주시 문서 추가', '문서명', 'watch_list']]
|
|
|
if num == 1:
|
|
if num == 1:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['관리자 메뉴', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['관리자 메뉴', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<h2>목록</h2><ul><li><a href="/manager/2">문서 ACL</a></li><li><a href="/manager/3">사용자 검사</a></li><li><a href="/manager/4">사용자 차단</a></li><li><a href="/manager/5">권한 주기</a></li><li><a href="/big_delete">여러 문서 삭제</a></li><li><a href="edit_filter">편집 필터</a></li></ul><br><h2>소유자</h2><ul><li><a href="/indexing">인덱싱 (생성 or 삭제)</a></li><li><a href="/manager/8">관리 그룹 생성</a></li><li><a href="/edit_set">설정 편집</a></li><li><a href="/re_start">서버 재 시작</a></li><li><a href="/inter_wiki">인터위키</a></li></ul>',
|
|
data = '<h2>목록</h2><ul><li><a href="/manager/2">문서 ACL</a></li><li><a href="/manager/3">사용자 검사</a></li><li><a href="/manager/4">사용자 차단</a></li><li><a href="/manager/5">권한 주기</a></li><li><a href="/big_delete">여러 문서 삭제</a></li><li><a href="edit_filter">편집 필터</a></li></ul><br><h2>소유자</h2><ul><li><a href="/indexing">인덱싱 (생성 or 삭제)</a></li><li><a href="/manager/8">관리 그룹 생성</a></li><li><a href="/edit_set">설정 편집</a></li><li><a href="/re_start">서버 재 시작</a></li><li><a href="/inter_wiki">인터위키</a></li></ul>',
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -1657,7 +1667,7 @@ def manager(num = 1):
|
|
|
else:
|
|
else:
|
|
|
placeholder = title_list[(num - 2)][1]
|
|
placeholder = title_list[(num - 2)][1]
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [title_list[(num - 2)][0], wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = [title_list[(num - 2)][0], wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input placeholder="' + placeholder + '" name="name" type="text"><hr> \
|
|
<input placeholder="' + placeholder + '" name="name" type="text"><hr> \
|
|
@@ -1742,7 +1752,7 @@ def title_index():
|
|
|
else:
|
|
else:
|
|
|
sub = ' (' + str(num) + '개)'
|
|
sub = ' (' + str(num) + '개)'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['모든 문서', wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
imp = ['모든 문서', wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
|
data = data,
|
|
data = data,
|
|
|
menu = [['other', '기타']]
|
|
menu = [['other', '기타']]
|
|
@@ -1876,7 +1886,7 @@ def topic_admin(name = None, sub = None, num = None):
|
|
|
ban = '== 정보 ==\r\n' + ban
|
|
ban = '== 정보 ==\r\n' + ban
|
|
|
ban = '[목차(없음)]\r\n' + ban
|
|
ban = '[목차(없음)]\r\n' + ban
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['토론 도구', wiki_set(conn, 1), custom(conn), other2([' (' + str(num) + '번)', 0])],
|
|
imp = ['토론 도구', wiki_set(conn, 1), custom(conn), other2([' (' + str(num) + '번)', 0])],
|
|
|
data = ban,
|
|
data = ban,
|
|
|
menu = [['topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '#' + str(num), '토론']]
|
|
menu = [['topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '#' + str(num), '토론']]
|
|
@@ -2033,7 +2043,7 @@ def topic(name = None, sub = None):
|
|
|
|
|
|
|
|
data += '<button type="submit">전송</button></form>'
|
|
data += '<button type="submit">전송</button></form>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (토론)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (토론)', 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), '목록']]
|
|
menu = [['topic/' + url_pas(name), '목록']]
|
|
@@ -2089,7 +2099,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (' + sub + ')', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (' + sub + ')', 0])],
|
|
|
data = '<form method="post">' + div + plus + '</form>',
|
|
data = '<form method="post">' + div + plus + '</form>',
|
|
|
menu = menu
|
|
menu = menu
|
|
@@ -2141,7 +2151,7 @@ def login():
|
|
|
|
|
|
|
|
return redirect('/user')
|
|
return redirect('/user')
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['로그인', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['로그인', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input placeholder="아이디" name="id" type="text"><hr> \
|
|
<input placeholder="아이디" name="id" type="text"><hr> \
|
|
@@ -2188,7 +2198,7 @@ def change_password():
|
|
|
if custom(conn)[2] == 0:
|
|
if custom(conn)[2] == 0:
|
|
|
return redirect('/login')
|
|
return redirect('/login')
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['비밀번호 변경', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['비밀번호 변경', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input placeholder="현재 비밀번호" name="pw" type="password"><hr> \
|
|
<input placeholder="현재 비밀번호" name="pw" type="password"><hr> \
|
|
@@ -2250,7 +2260,7 @@ def user_check(name = None):
|
|
|
else:
|
|
else:
|
|
|
return re_error(conn, '/error/5')
|
|
return re_error(conn, '/error/5')
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['다중 검사', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['다중 검사', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -2261,7 +2271,7 @@ def plus_check(name):
|
|
|
if request.method == 'POST':
|
|
if request.method == 'POST':
|
|
|
return redirect('/check/' + url_pas(name) + '?plus=' + url_pas(request.form['name2']))
|
|
return redirect('/check/' + url_pas(name) + '?plus=' + url_pas(request.form['name2']))
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['대상 추가', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['대상 추가', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input placeholder="비교 대상" name="name2" type="text"><hr> \
|
|
<input placeholder="비교 대상" name="name2" type="text"><hr> \
|
|
@@ -2320,7 +2330,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['회원가입', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['회원가입', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
' + contract + ' \
|
|
' + contract + ' \
|
|
@@ -2382,7 +2392,7 @@ def user_ban(name = None):
|
|
|
|
|
|
|
|
data = '<input placeholder="사유" name="why" type="text"><hr><input placeholder="분 차단" name="end" type="text"><br><br><ul><li>비우면 영구 차단</li><li>1달은 28일로 취급</li></ul><hr>' + plus
|
|
data = '<input placeholder="사유" name="why" type="text"><hr><input placeholder="분 차단" name="end" type="text"><br><br><ul><li>비우면 영구 차단</li><li>1달은 28일로 취급</li></ul><hr>' + plus
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (' + now + ')', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), 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', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -2466,7 +2476,7 @@ def acl(name = None):
|
|
|
else:
|
|
else:
|
|
|
plus = '<option value="admin" ' + acl_list[0] + '>관리자</option>'
|
|
plus = '<option value="admin" ' + acl_list[0] + '>관리자</option>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (ACL)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (ACL)', 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<span>현재 ACL : ' + now + '</span><hr> \
|
|
<span>현재 ACL : ' + now + '</span><hr> \
|
|
@@ -2534,7 +2544,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (권한 부여)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (권한 부여)', 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<select name="select">' + div + '</select><hr> \
|
|
<select name="select">' + div + '</select><hr> \
|
|
@@ -2562,7 +2572,7 @@ def diff_data(name = None):
|
|
|
diff_data = difflib.SequenceMatcher(None, first_data, second_data)
|
|
diff_data = difflib.SequenceMatcher(None, first_data, second_data)
|
|
|
result = diff(diff_data)
|
|
result = diff(diff_data)
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (비교)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (비교)', 0])],
|
|
|
data = '<pre>' + result + '</pre>',
|
|
data = '<pre>' + result + '</pre>',
|
|
|
menu = [['history/' + url_pas(name), '역사']]
|
|
menu = [['history/' + url_pas(name), '역사']]
|
|
@@ -2582,7 +2592,7 @@ def down(name = None):
|
|
|
|
|
|
|
|
div += '</ul>'
|
|
div += '</ul>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (하위)', 0])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([' (하위)', 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['w/' + url_pas(name), '문서']]
|
|
menu = [['w/' + url_pas(name), '문서']]
|
|
@@ -2665,9 +2675,10 @@ def read_view(name = None):
|
|
|
data = curs.fetchall()
|
|
data = curs.fetchall()
|
|
|
if data:
|
|
if data:
|
|
|
else_data = data[0][1]
|
|
else_data = data[0][1]
|
|
|
|
|
+ response_data = 200
|
|
|
else:
|
|
else:
|
|
|
data_none = 1
|
|
data_none = 1
|
|
|
- response.status = 404
|
|
|
|
|
|
|
+ response_data = 404
|
|
|
else_data = ''
|
|
else_data = ''
|
|
|
|
|
|
|
|
if not num:
|
|
if not num:
|
|
@@ -2750,11 +2761,11 @@ def read_view(name = None):
|
|
|
|
|
|
|
|
div = end_data + div
|
|
div = end_data + div
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([sub + acl, r_date])],
|
|
imp = [name, wiki_set(conn, 1), custom(conn), other2([sub + acl, r_date])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = menu
|
|
menu = menu
|
|
|
- ))
|
|
|
|
|
|
|
+ ), response_data)
|
|
|
|
|
|
|
|
@app.route('/topic_record/<name>')
|
|
@app.route('/topic_record/<name>')
|
|
|
def user_topic_list(name = None):
|
|
def user_topic_list(name = None):
|
|
@@ -2798,7 +2809,7 @@ def user_topic_list(name = None):
|
|
|
else:
|
|
else:
|
|
|
sub = 0
|
|
sub = 0
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['토론 기록', wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
imp = ['토론 기록', wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['other', '기타'], ['user', '사용자'], ['count/' + url_pas(name), '횟수'], ['record/' + url_pas(name), '편집']]
|
|
menu = [['other', '기타'], ['user', '사용자'], ['count/' + url_pas(name), '횟수'], ['record/' + url_pas(name), '편집']]
|
|
@@ -2977,7 +2988,7 @@ def recent_changes(name = None, tool = 'record'):
|
|
|
if sub == '':
|
|
if sub == '':
|
|
|
sub = 0
|
|
sub = 0
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = [title, wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
imp = [title, wiki_set(conn, 1), custom(conn), other2([sub, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = menu
|
|
menu = menu
|
|
@@ -3049,7 +3060,7 @@ def upload():
|
|
|
|
|
|
|
|
return redirect('/w/파일:' + name)
|
|
return redirect('/w/파일:' + name)
|
|
|
else:
|
|
else:
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['파일 올리기', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['파일 올리기', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post" enctype="multipart/form-data" accept-charset="utf8"> \
|
|
data = '<form method="post" enctype="multipart/form-data" accept-charset="utf8"> \
|
|
|
<input type="file" name="f_data"><hr> \
|
|
<input type="file" name="f_data"><hr> \
|
|
@@ -3096,7 +3107,7 @@ def user_info():
|
|
|
ip_user = ip
|
|
ip_user = ip
|
|
|
plus = '<li><a href="/login">로그인</a></li>'
|
|
plus = '<li><a href="/login">로그인</a></li>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['사용자 메뉴', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['사용자 메뉴', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<h2>상태</h2><ul><li>' + ip_user + ' <a href="/record/' + url_pas(ip) + '">(기록)</a></li><li>권한 상태 : ' + acl + '</li></ul><br><h2>로그인</h2><ul>' + plus + '<li><a href="/register">회원가입</a></li></ul><br><h2>사용자 기능</h2><ul><li><a href="/acl/사용자:' + url_pas(ip) + '">사용자 문서 ACL</a></li><li><a href="/custom_head">사용자 HEAD</a></li></ul><br><h2>기타</h2><ul><li><a href="/alarm">알림</a></li><li><a href="/watch_list">주시 문서</a></li><li><a href="/count">활동 횟수</a></li></ul>',
|
|
data = '<h2>상태</h2><ul><li>' + ip_user + ' <a href="/record/' + url_pas(ip) + '">(기록)</a></li><li>권한 상태 : ' + acl + '</li></ul><br><h2>로그인</h2><ul>' + plus + '<li><a href="/register">회원가입</a></li></ul><br><h2>사용자 기능</h2><ul><li><a href="/acl/사용자:' + url_pas(ip) + '">사용자 문서 ACL</a></li><li><a href="/custom_head">사용자 HEAD</a></li></ul><br><h2>기타</h2><ul><li><a href="/alarm">알림</a></li><li><a href="/watch_list">주시 문서</a></li><li><a href="/count">활동 횟수</a></li></ul>',
|
|
|
menu = 0
|
|
menu = 0
|
|
@@ -3120,7 +3131,7 @@ def email():
|
|
|
else:
|
|
else:
|
|
|
email = ''
|
|
email = ''
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['이메일 수정', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['이메일 수정', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<form method="post"> \
|
|
data = '<form method="post"> \
|
|
|
<input placeholder="이메일" name="email" type="text" value="' + email + '"><hr> \
|
|
<input placeholder="이메일" name="email" type="text" value="' + email + '"><hr> \
|
|
@@ -3147,7 +3158,7 @@ def watch_list():
|
|
|
|
|
|
|
|
div += '<a href="/manager/13">(추가)</a>'
|
|
div += '<a href="/manager/13">(추가)</a>'
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['편집 필터 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['편집 필터 목록', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = div,
|
|
data = div,
|
|
|
menu = [['manager', '관리자']]
|
|
menu = [['manager', '관리자']]
|
|
@@ -3207,7 +3218,7 @@ 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(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['사용자 HEAD', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['사용자 HEAD', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = start + ' \
|
|
data = start + ' \
|
|
|
<form method="post"> \
|
|
<form method="post"> \
|
|
@@ -3239,7 +3250,7 @@ def count_edit(name = None):
|
|
|
else:
|
|
else:
|
|
|
t_data = 0
|
|
t_data = 0
|
|
|
|
|
|
|
|
- return html_minify(template('index',
|
|
|
|
|
|
|
+ return html_minify(render_template('index.html',
|
|
|
imp = ['활동 횟수', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
imp = ['활동 횟수', wiki_set(conn, 1), custom(conn), other2([0, 0])],
|
|
|
data = '<ul><li><a href="/record/' + url_pas(that) + '">편집 횟수</a> : ' + str(data) + '</li><li><a href="/topic_record/' + url_pas(that) + '">토론 횟수</a> : ' + str(t_data) + '</a></li></ul>',
|
|
data = '<ul><li><a href="/record/' + url_pas(that) + '">편집 횟수</a> : ' + str(data) + '</li><li><a href="/topic_record/' + url_pas(that) + '">토론 횟수</a> : ' + str(t_data) + '</a></li></ul>',
|
|
|
menu = [['user', '사용자']]
|
|
menu = [['user', '사용자']]
|