diff options
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/manage.py | 24 | ||||
-rw-r--r-- | cgi/templates/manage/basural.html | 30 |
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') ?> |