diff options
author | Renard | 2020-03-14 16:15:26 -0300 |
---|---|---|
committer | Renard | 2020-03-14 16:15:42 -0300 |
commit | d4b14f91bedca70c5dcbe330ec02c060c87c7ec6 (patch) | |
tree | f14ee8c344c1431e53b2a2e02e9e7fb4a4b73189 /cgi | |
parent | 270807dda107f36e2aeb1955bf89b07e96dcd77a (diff) | |
download | weabot-d4b14f91bedca70c5dcbe330ec02c060c87c7ec6.tar.gz weabot-d4b14f91bedca70c5dcbe330ec02c060c87c7ec6.tar.xz weabot-d4b14f91bedca70c5dcbe330ec02c060c87c7ec6.zip |
Moderar posts recientes
Fix nombre variable
Fix nombre variable2
Mod: posts recientes
fix typo
ultimos arreglos
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/manage.py | 4 | ||||
-rw-r--r-- | cgi/templates/manage/recent.html | 55 |
2 files changed, 59 insertions, 0 deletions
diff --git a/cgi/manage.py b/cgi/manage.py index 0c95268..776747e 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 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': 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..b490a57 --- /dev/null +++ b/cgi/templates/manage/recent.html @@ -0,0 +1,55 @@ +<?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>#{post['id']}</td> + <td>/#{post['dir']}/</td> + <td> + <?py if post['file']: ?><a href="/${post['dir']}/src/#{post['file']}" target="_blank"><img + src="/${post['dir']}/mobile/${post['thumb']}" /></a> + <?py #endif ?> + </td> + <td> + <div data-ts="#{post['timestamp']}">#{post['timestamp_formatted']}</div> + </td> + <td> + <div style="display: block; margin-bottom: 0.5em; font-weight: bold;">#{post['subject']} #{post['name']} + #{post['tripcode']} + </div> + <div style="display: block">#{post['message']}</div> + <?py if post['parentid'] != 0: ?> + <div style="display: block; margin-top: 0.5em; font-size: 0.75em;"><a + href="#{cgi_url}manage/mod/${post['dir']}?thread=#{post['parentid']}">Ver hilo completo</a> + </div> + <?py #endif ?> + </td> + <td> + <a href="#{cgi_url}manage/mod/ipshow?ip=#{post['ip']}">#{post['ip']}</a> + </td> + <td> + <a title="Eliminar mensaje" href="#{cgi_url}manage/mod/delete/#{post['dir']}/#{post['id']}"><img + src="/static/icons/comment_delete.png" /></a> + <a title="Banear" href="#{cgi_url}manage/ban?ip=#{post['ip']}"><img src="/static/icons/user_delete.png" /></a> + <a title="Eliminar y Banear" href="#{cgi_url}manage/mod/delete/#{post['dir']}/#{post['id']}?ban=true"><img + src="/static/icons/cross.png" /></a> + </td> + </tr> + <?py #endfor ?> + </tbody> + </table> +</center> +<hr /> +<?py include('templates/base_bottom.html') ?>
\ No newline at end of file |