|
@@ -71,21 +71,23 @@ def func_upload_2(conn):
|
|
|
db_data = curs.fetchall()
|
|
db_data = curs.fetchall()
|
|
|
if db_data and db_data[0][0] == 'namumark':
|
|
if db_data and db_data[0][0] == 'namumark':
|
|
|
if flask.request.form.get('f_lice_sel', 'direct_input') == 'direct_input':
|
|
if flask.request.form.get('f_lice_sel', 'direct_input') == 'direct_input':
|
|
|
- lice = g_lice + '[br][br]'
|
|
|
|
|
|
|
+ lice = '\n||' + g_lice + '||\n'
|
|
|
if ip_or_user(ip) != 0:
|
|
if ip_or_user(ip) != 0:
|
|
|
- lice += ip
|
|
|
|
|
|
|
+ lice += '||' + ip + '||\n'
|
|
|
else:
|
|
else:
|
|
|
- lice += '[[user:' + ip + ']]'
|
|
|
|
|
|
|
+ lice += '||[[user:' + ip + ']]||\n'
|
|
|
|
|
|
|
|
lice += '[[category:direct_input]]'
|
|
lice += '[[category:direct_input]]'
|
|
|
else:
|
|
else:
|
|
|
- lice = flask.request.form.get('f_lice_sel', '')
|
|
|
|
|
- lice += '[br][br]' + g_lice
|
|
|
|
|
|
|
+ lice = '\n||' + flask.request.form.get('f_lice_sel', '') + '||\n'
|
|
|
|
|
+ lice += '||' + g_lice + '||\n'
|
|
|
lice += '[[category:' + re.sub(r'\]', '_', flask.request.form.get('f_lice_sel', '')) + ']]'
|
|
lice += '[[category:' + re.sub(r'\]', '_', flask.request.form.get('f_lice_sel', '')) + ']]'
|
|
|
|
|
|
|
|
- file_d = '[[file:' + name + ']][br][br]{{{[[file:' + name + ']]}}}[br][br]' + lice
|
|
|
|
|
|
|
+ file_d = '[[file:' + name + ']]\n{{{[[file:' + name + ']]}}}\n' + lice
|
|
|
else:
|
|
else:
|
|
|
file_d = name + ' | /image/' + e_data + ((' | ' + g_lice) if g_lice != '' else '') + ' | ' + ip
|
|
file_d = name + ' | /image/' + e_data + ((' | ' + g_lice) if g_lice != '' else '') + ' | ' + ip
|
|
|
|
|
+
|
|
|
|
|
+ print([lice])
|
|
|
|
|
|
|
|
curs.execute(db_change("insert into data (title, data) values (?, ?)"), ['file:' + name, file_d])
|
|
curs.execute(db_change("insert into data (title, data) values (?, ?)"), ['file:' + name, file_d])
|
|
|
curs.execute(db_change("insert into acl (title, decu, dis, why, view) values (?, 'admin', '', '', '')"), ['file:' + name])
|
|
curs.execute(db_change("insert into acl (title, decu, dis, why, view) values (?, 'admin', '', '', '')"), ['file:' + name])
|