|
|
@@ -22,6 +22,7 @@ def topic_stop_2(conn, name, sub, tool):
|
|
|
curs.execute("insert into topic (id, title, sub, data, date, ip, block, top) values (?, ?, ?, 'break', ?, ?, '', '1')", [str(int(topic_check[0][0]) + 1), name, sub, time, ip])
|
|
|
curs.execute("update rd set agree = 'O' where title = ? and sub = ?", [name, sub])
|
|
|
else:
|
|
|
+ # 이 쪽 잘못 짜여 있음 내일 수정 필요
|
|
|
if tool == 'close':
|
|
|
why = flask.request.form.get('why', '')
|
|
|
set_list = [
|
|
|
@@ -31,16 +32,35 @@ def topic_stop_2(conn, name, sub, tool):
|
|
|
'open' + (('[br][br]why : ' + why) if why else '')
|
|
|
]
|
|
|
elif tool == 'stop':
|
|
|
- set_list = ['', 'O', 'stop', 'restart']
|
|
|
+ set_list = [
|
|
|
+ '',
|
|
|
+ 'O',
|
|
|
+ 'stop',
|
|
|
+ 'restart'
|
|
|
+ ]
|
|
|
else:
|
|
|
return redirect('/topic/' + url_pas(name) + '/sub/' + url_pas(sub))
|
|
|
|
|
|
- curs.execute("select title from rd where title = ? and sub = ? and stop = ?", [name, sub, set_list[0]])
|
|
|
+ curs.execute("select title from rd where title = ? and sub = ? and stop = ?", [name, sub, set_list[1]])
|
|
|
if curs.fetchall():
|
|
|
- curs.execute("insert into topic (id, title, sub, data, date, ip, block, top) values (?, ?, ?, ?, ?, ?, '', '1')", [str(int(topic_check[0][0]) + 1), name, sub, set_list[3], time, ip])
|
|
|
+ curs.execute("insert into topic (id, title, sub, data, date, ip, block, top) values (?, ?, ?, ?, ?, ?, '', '1')", [
|
|
|
+ str(int(topic_check[0][0]) + 1),
|
|
|
+ name,
|
|
|
+ sub,
|
|
|
+ set_list[3],
|
|
|
+ time,
|
|
|
+ ip
|
|
|
+ ])
|
|
|
curs.execute("update rd set stop = '' where title = ? and sub = ?", [name, sub])
|
|
|
else:
|
|
|
- curs.execute("insert into topic (id, title, sub, data, date, ip, block, top) values (?, ?, ?, ?, ?, ?, '', '1')", [str(int(topic_check[0][0]) + 1), name, sub, set_list[2], time, ip])
|
|
|
+ curs.execute("insert into topic (id, title, sub, data, date, ip, block, top) values (?, ?, ?, ?, ?, ?, '', '1')", [
|
|
|
+ str(int(topic_check[0][0]) + 1),
|
|
|
+ name,
|
|
|
+ sub,
|
|
|
+ set_list[2],
|
|
|
+ time,
|
|
|
+ ip
|
|
|
+ ])
|
|
|
curs.execute("update rd set stop = ? where title = ? and sub = ?", [set_list[0], name, sub])
|
|
|
|
|
|
rd_plus(name, sub, time)
|