diff options
Diffstat (limited to 'cgi/manage.py')
-rw-r--r-- | cgi/manage.py | 24 |
1 files changed, 22 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']) |