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 From e14d9f605987898b02beacc3c124360eecaa9fd2 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 14 Mar 2020 14:08:09 -0300 Subject: Fix nombre variable --- cgi/templates/manage/recent.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html index 1e72d88..510d1b7 100644 --- a/cgi/templates/manage/recent.html +++ b/cgi/templates/manage/recent.html @@ -15,21 +15,20 @@ - #{posts['id']} - /#{posts['boardid']}/ - #{posts['file']} - #{posts['timestamp']} - #{posts['message']} + #{post['id']} + /#{post['boardid']}/ + #{post['file']} + #{post['timestamp']} + #{post['message']} - #{posts['ip']} + #{post['ip']} - - + -- cgit v1.2.1-18-gbd029 From a88ff0d55d23474381093eadcb5b1e90cdd878e0 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 14 Mar 2020 14:08:53 -0300 Subject: Fix nombre variable2 --- cgi/templates/manage/recent.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html index 510d1b7..7ec6853 100644 --- a/cgi/templates/manage/recent.html +++ b/cgi/templates/manage/recent.html @@ -27,8 +27,7 @@ - -- cgit v1.2.1-18-gbd029 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 @@ #{post['id']} - /#{post['boardid']}/ - #{post['file']} - #{post['timestamp']} - #{post['message']} + /#{post['dir']}/ + + + + + +
#{post['timestamp_formatted']}
+ + +
#{post['subject']} #{post['name']} #{post['tripcode']} +
+
#{post['message']}
+ +
Ver hilo completo +
+ + #{post['ip']} - - + + - - + -- cgit v1.2.1-18-gbd029 From 144cf73b18c56672f5cceb3f3a03b2d56dec0c73 Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 14 Mar 2020 16:01:02 -0300 Subject: fix typo --- cgi/templates/manage/recent.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html index c73ba59..6fe4bb8 100644 --- a/cgi/templates/manage/recent.html +++ b/cgi/templates/manage/recent.html @@ -31,7 +31,7 @@
#{post['message']}
Ver hilo completo + href="#{cgi_url}manage/mod/#{dir}?thread=#{post['parentid']}">Ver hilo completo
-- cgit v1.2.1-18-gbd029 From db5d2d2d577f5666d70cd0a4474d5f44fa46053b Mon Sep 17 00:00:00 2001 From: Renard Date: Sat, 14 Mar 2020 16:10:19 -0300 Subject: ultimos arreglos --- cgi/templates/manage/recent.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cgi/templates/manage/recent.html b/cgi/templates/manage/recent.html index 6fe4bb8..b490a57 100644 --- a/cgi/templates/manage/recent.html +++ b/cgi/templates/manage/recent.html @@ -18,20 +18,21 @@ #{post['id']} /#{post['dir']}/ - +
#{post['timestamp_formatted']}
-
#{post['subject']} #{post['name']} #{post['tripcode']} +
#{post['subject']} #{post['name']} + #{post['tripcode']}
#{post['message']}
Ver hilo completo + href="#{cgi_url}manage/mod/${post['dir']}?thread=#{post['parentid']}">Ver hilo completo
@@ -40,7 +41,7 @@ + src="/static/icons/comment_delete.png" /> -- cgit v1.2.1-18-gbd029