From 251505e1c63abf44cf75daef2135b14b51b42557 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 14 Mar 2020 15:58:53 -0300 Subject: Mod: posts recientes --- cgi/manage.py | 2 +- cgi/templates/manage/recent.html | 33 ++++++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/cgi/manage.py b/cgi/manage.py index 86d8ffa..776747e 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -159,7 +159,7 @@ def manage(self, path_split): 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") + posts = FetchAll("SELECT posts.id, posts.subject, dir, parentid, file, thumb, timestamp_formatted, timestamp, posts.message, INET_NTOA(ip) AS ip, posts.name, email, tripcode FROM posts INNER JOIN boards ON posts.boardid = boards.id ORDER BY timestamp DESC LIMIT 50") template_filename = "recent.html" template_values = {"posts": posts} elif path_split[2] == 'staff': diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html index 7ec6853..c73ba59 100644 --- a/cgi/templates/manage/recent.html +++ b/cgi/templates/manage/recent.html @@ -16,20 +16,35 @@