aboutsummaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorLibravatar Choom 2023-01-26 23:33:18 -0300
committerLibravatar Choom 2023-01-27 00:49:00 -0300
commitdd0483ce21f95385c41495c88d3c84225e14b412 (patch)
tree7df2433330fde84123c7e044f36bf2da4635c168 /cgi
parent868bc75baecb2e0a6abaf5329880e501516c2910 (diff)
downloadweabot-dd0483ce21f95385c41495c88d3c84225e14b412.tar.gz
weabot-dd0483ce21f95385c41495c88d3c84225e14b412.tar.xz
weabot-dd0483ce21f95385c41495c88d3c84225e14b412.zip
Tabla para basural
Diffstat (limited to 'cgi')
-rw-r--r--cgi/manage.py24
-rw-r--r--cgi/templates/manage/basural.html30
2 files changed, 52 insertions, 2 deletions
diff --git a/cgi/manage.py b/cgi/manage.py
index bf28768..d3595bd 100644
--- a/cgi/manage.py
+++ b/cgi/manage.py
@@ -2172,11 +2172,31 @@ def manage(self, path_split):
# reflect changes
threadUpdated(parent)
+ elif path_split[2] == 'basural':
+ if not administrator:
+ return
+
+ #basural = FetchAll('SELECT basural.id AS id, origid, timestamp_formatted AS fecha, basural.subject AS subject, basural.message AS message, boards.name AS board FROM basural INNER JOIN boards ON boardid = boards.id ORDER BY timestamp DESC')
+ #basural = FetchAll('SELECT * FROM basural')
+ #template_filename = "basural.html"
+ #template_values = {'basural': basural}
+
+ #posts = FetchAll('select * from posts where IS_DELETED = 2')
+ #
+ #count = 0
+ #for post in posts:
+ # msg = formatting.remove_html(post['message'])
+ # ts = formatTimestamp(post['timestamp'])
+ # ins = InsertDb('INSERT INTO `basural` (`origid`, `boardid`, `timestamp`, `timestamp_formatted`, `subject`, `message`) VALUES (%s, %s, %s, %s, %s, %s)', (post['id'], post['boardid'], post['timestamp'], ts, post['subject'], msg) )
+ # self.output += msg + '<br>'
+ # count += 1
+
+ #self.output += '<hr>'+str(count)
+
elif path_split[2] == 'search':
if not administrator:
return
- search_logs = FetchAll(
- 'SELECT `id`,`timestamp`,`keyword`,`ita`,INET_NTOA(`ip`) AS `ip`,`res` FROM `search_log` ORDER BY `timestamp` DESC LIMIT 256')
+ search_logs = FetchAll('SELECT `id`,`timestamp`,`keyword`,`ita`,INET_NTOA(`ip`) AS `ip`,`res` FROM `search_log` ORDER BY `timestamp` DESC LIMIT 256')
for log in search_logs:
#log['ip'] = str(inet_ntoa(log['ip']))
log['timestamp_formatted'] = formatTimestamp(log['timestamp'])
diff --git a/cgi/templates/manage/basural.html b/cgi/templates/manage/basural.html
new file mode 100644
index 0000000..f086558
--- /dev/null
+++ b/cgi/templates/manage/basural.html
@@ -0,0 +1,30 @@
+<?py include('templates/base_top.html') ?>
+<?py include('templates/manage/menu.html') ?>
+<?py from tenjin.helpers.html import * ?>
+<center>
+<div class="replymode">Salón de la vergüenza ajena</div>
+
+<table>
+<tr>
+ <td>ID</td>
+ <td>Original</td>
+ <td>Board</td>
+ <td>Fecha</td>
+ <td>Mensaje</td>
+ <td></td>
+</tr>
+<?py for basura in basural: ?>
+<tr>
+ <td>#{basura['id']}</td>
+ <td>#{basura['origid']}</td>
+ <td>#{basura['board']}</td>
+ <td>#{basura['fecha']}</td>
+ <td>#{basura['message']}</td>
+ <td>[Eliminar]</td>
+</tr>
+<?py #endfor ?>
+</table>
+
+</center>
+<hr />
+<?py include('templates/base_bottom.html') ?>