|
@@ -1456,16 +1456,19 @@ def edit(name = None):
|
|
|
return render_template('index.html', title = '편집 오류', logo = data['name'], data = '편집 내용 기록에는 한글과 영어와 숫자, 공백만 허용 됩니다.')
|
|
return render_template('index.html', title = '편집 오류', logo = data['name'], data = '편집 내용 기록에는 한글과 영어와 숫자, 공백만 허용 됩니다.')
|
|
|
else:
|
|
else:
|
|
|
if(rows):
|
|
if(rows):
|
|
|
- ip = getip(request)
|
|
|
|
|
- can = getcan(ip, name)
|
|
|
|
|
- if(can == 1):
|
|
|
|
|
- return '<meta http-equiv="refresh" content="0;url=/ban" />'
|
|
|
|
|
|
|
+ if(rows[0]['data'] == request.form["content"]):
|
|
|
|
|
+ return render_template('index.html', title = '편집 오류', logo = data['name'], data = '내용이 원래 문서와 동일 합니다.')
|
|
|
else:
|
|
else:
|
|
|
- today = getnow()
|
|
|
|
|
- leng = getleng(len(rows[0]['data']), len(request.form["content"]))
|
|
|
|
|
- history(name, request.form["content"], today, ip, request.form["send"], leng)
|
|
|
|
|
- curs.execute("update data set data = '" + pymysql.escape_string(request.form["content"]) + "' where title = '" + pymysql.escape_string(name) + "'")
|
|
|
|
|
- conn.commit()
|
|
|
|
|
|
|
+ ip = getip(request)
|
|
|
|
|
+ can = getcan(ip, name)
|
|
|
|
|
+ if(can == 1):
|
|
|
|
|
+ return '<meta http-equiv="refresh" content="0;url=/ban" />'
|
|
|
|
|
+ else:
|
|
|
|
|
+ today = getnow()
|
|
|
|
|
+ leng = getleng(len(rows[0]['data']), len(request.form["content"]))
|
|
|
|
|
+ history(name, request.form["content"], today, ip, request.form["send"], leng)
|
|
|
|
|
+ curs.execute("update data set data = '" + pymysql.escape_string(request.form["content"]) + "' where title = '" + pymysql.escape_string(name) + "'")
|
|
|
|
|
+ conn.commit()
|
|
|
else:
|
|
else:
|
|
|
ip = getip(request)
|
|
ip = getip(request)
|
|
|
can = getcan(ip, name)
|
|
can = getcan(ip, name)
|