From dd0483ce21f95385c41495c88d3c84225e14b412 Mon Sep 17 00:00:00 2001
From: Choom
Date: Thu, 26 Jan 2023 23:33:18 -0300
Subject: Tabla para basural
---
cgi/manage.py | 24 ++++++++++++++++++++++--
cgi/templates/manage/basural.html | 30 ++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 2 deletions(-)
create mode 100644 cgi/templates/manage/basural.html
(limited to 'cgi')
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 + '
'
+ # count += 1
+
+ #self.output += '
ID | +Original | +Board | +Fecha | +Mensaje | ++ |
#{basura['id']} | +#{basura['origid']} | +#{basura['board']} | +#{basura['fecha']} | +#{basura['message']} | +[Eliminar] | +