diff options
author | Renard | 2020-03-14 14:05:50 -0300 |
---|---|---|
committer | Renard | 2020-03-14 14:05:50 -0300 |
commit | 6cacc33541e7bec8c85a59a6ca4a60c09354ace9 (patch) | |
tree | 3077de04580cd7e5debb5c6709676b6ebc49d4d8 /cgi | |
parent | 270807dda107f36e2aeb1955bf89b07e96dcd77a (diff) | |
download | weabot-6cacc33541e7bec8c85a59a6ca4a60c09354ace9.tar.gz weabot-6cacc33541e7bec8c85a59a6ca4a60c09354ace9.tar.xz weabot-6cacc33541e7bec8c85a59a6ca4a60c09354ace9.zip |
Prueba post recientes
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/manage.py | 4 | ||||
-rw-r--r-- | cgi/templates/manage/recent.html | 41 |
2 files changed, 45 insertions, 0 deletions
diff --git a/cgi/manage.py b/cgi/manage.py index 0c95268..86d8ffa 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -158,6 +158,10 @@ def manage(self, path_split): threads = FetchAll("SELECT * FROM `posts` WHERE boardid = %s AND parentid = 0 ORDER BY `bumped` DESC" % board["id"]) template_filename = "mod.html" template_values = {"mode": 2, "dir": board["dir"], "threads": threads} + elif path_split[2] == "recent": + posts = FetchAll("SELECT * FROM `posts` WHERE parentid > 0 ORDER BY `timestamp` DESC LIMIT 50") + template_filename = "recent.html" + template_values = {"posts": posts} elif path_split[2] == 'staff': if staff_account['rights'] != '0': return diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html new file mode 100644 index 0000000..1e72d88 --- /dev/null +++ b/cgi/templates/manage/recent.html @@ -0,0 +1,41 @@ +<?py include('templates/base_top.html') ?> +<?py include('templates/manage/menu.html') ?> +<center> + <div class="replymode">Lista de posts recientes</div> + <table class="managertable"> + <thead> + <th>ID</th> + <th>Board</th> + <th>Archivo</th> + <th>Timestamp</th> + <th>Mensaje</th> + <th>IP</th> + <th>Acciones</th> + </thead> + <tbody> + <?py for post in posts: ?> + <tr> + <td>#{posts['id']}</td> + <td>/#{posts['boardid']}/</td> + <td>#{posts['file']}</td> + <td>#{posts['timestamp']}</td> + <td>#{posts['message']}</td> + <td> + <a href="#{cgi_url}manage/mod/ipshow?ip=#{posts['ip']}">#{posts['ip']}</a> + </td> + <th> + <a title="Eliminar mensaje" href="#{cgi_url}manage/mod/delete/#{posts['boardid']}/#{posts['id']}"><img + src="/icons/comment_delete.png" /></a> + <a title="Banear" href="#{cgi_url}manage/ban?ip=#{posts['ip']}"><img + src="/static/icons/user_delete.png" /></a> + <a title="Eliminar y Banear" + href="#{cgi_url}manage/mod/delete/#{posts['boardid']}/#{posts['id']}?ban=true"><img + src="/static/icons/cross.png" /></a> + </th> + </tr> + <?py #endfor ?> + </tbody> + </table> +</center> +<hr /> +<?py include('templates/base_bottom.html') ?>
\ No newline at end of file |