From 6cacc33541e7bec8c85a59a6ca4a60c09354ace9 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 14 Mar 2020 14:05:50 -0300 Subject: Prueba post recientes --- cgi/manage.py | 4 ++++ cgi/templates/manage/recent.html | 41 +++++++++++++++++++++++++++++++++++++++ static/icons/comment_delete.png | Bin 0 -> 548 bytes static/icons/cross.png | Bin 0 -> 655 bytes static/icons/user_delete.png | Bin 0 -> 767 bytes 5 files changed, 45 insertions(+) create mode 100644 cgi/templates/manage/recent.html create mode 100644 static/icons/comment_delete.png create mode 100644 static/icons/cross.png create mode 100644 static/icons/user_delete.png 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 @@ + + +
+
Lista de posts recientes
+ + + + + + + + + + + + + + + + + + + + + + + +
IDBoardArchivoTimestampMensajeIPAcciones
#{posts['id']}/#{posts['boardid']}/#{posts['file']}#{posts['timestamp']}#{posts['message']} + #{posts['ip']} + + + + +
+
+
+ \ No newline at end of file diff --git a/static/icons/comment_delete.png b/static/icons/comment_delete.png new file mode 100644 index 0000000..643fdbe Binary files /dev/null and b/static/icons/comment_delete.png differ diff --git a/static/icons/cross.png b/static/icons/cross.png new file mode 100644 index 0000000..1514d51 Binary files /dev/null and b/static/icons/cross.png differ diff --git a/static/icons/user_delete.png b/static/icons/user_delete.png new file mode 100644 index 0000000..acbb563 Binary files /dev/null and b/static/icons/user_delete.png differ -- cgit v1.2.1-18-gbd029