diff options
Diffstat (limited to 'templates/mod/debug')
| -rw-r--r-- | templates/mod/debug/antispam.html | 42 | ||||
| -rw-r--r-- | templates/mod/debug/recent_posts.html | 89 | ||||
| -rw-r--r-- | templates/mod/debug/sql.html | 26 |
3 files changed, 157 insertions, 0 deletions
diff --git a/templates/mod/debug/antispam.html b/templates/mod/debug/antispam.html index a846bc17..95aa61a6 100644 --- a/templates/mod/debug/antispam.html +++ b/templates/mod/debug/antispam.html @@ -1,4 +1,45 @@ <p style="text-align:center"> + Most recent: +</p> +<table class="modlog" style="width:700px;margin:auto"> + <tr> + <th>Board</th> + <th>Thread</th> + <th>Hash (SHA1)</th> + <th>Created</th> + <th>Expires</th> + <th>Passed</th> + </tr> + {% for hash in recent %} + <tr> + <td>{{ config.board_abbreviation|sprintf(hash.board) }}</td> + <td> + {% if hash.thread %} + {{ hash.thread }} + {% else %} + - + {% endif %}</td> + <td> + <small><code>{{ hash.hash }}</code></small> + </td> + <td> + <span title="{{ hash.created|date(config.post_date) }}">{{ hash.created|ago }} ago</span> + </td> + <td> + {% if hash.expires %} + <span title="{{ hash.expires|date(config.post_date) }}"> + {{ hash.expires|until }} + </span> + {% else %} + - + {% endif %} + </td> + <td>{{ hash.passed }}</td> + </tr> + {% endfor %} +</table> + +<p style="text-align:center"> Most used (in active): </p> <table class="modlog" style="width:700px;margin:auto"> @@ -38,6 +79,7 @@ </tr> {% endfor %} </table> + <p style="text-align:center"> Total: <strong>{{ total }}</strong> (<strong>{{ expiring }}</strong> set to expire) </p> diff --git a/templates/mod/debug/recent_posts.html b/templates/mod/debug/recent_posts.html new file mode 100644 index 00000000..740ed21e --- /dev/null +++ b/templates/mod/debug/recent_posts.html @@ -0,0 +1,89 @@ +<table class="modlog"> + <tr> + <th>Time</th> + <th>Board</th> + <th>ID</th> + <th>Thread</th> + <th>IP</th> + <th>Name</th> + <th>Subject</th> + <th>File</th> + <th>Body (snippet)</th> + </tr> + {% for post in posts %} + <tr> + <td class="minimal"> + <small>{{ post.time | ago }} ago</small> + </td> + <td class="minimal"> + <a href="?/{{ config.board_path|sprintf(post.board) }}{{ config.file_index }}">{{ config.board_abbreviation|sprintf(post.board) }}</a> + </td> + <td class="minimal" > + {% if post.thread %} + {% set thread = post.thread %} + {% else %} + {% set thread = post.id %} + {% endif %} + <a href="{{ config.root ~ post.board ~ '/' ~ config.dir.res}}{{ config.file_page|sprintf(thread) }}#{{ post.id }}"> + {{ post.id }} + </a> + </td> + <td class="minimal"> + <small> + {% if post.thread %} + {{ post.thread }} + {% else %} + (OP) + {% endif %} + </small> + </td> + <td class="minimal"> + {% if mod|hasPermission(config.mod.show_ip, post.board) %} + <a href="?/IP/{{ post.ip }}"> + {{ post.ip }} + </a> + {% else %} + <em>hidden</em> + {% endif %} + </td> + <td class="minimal" > + <small> + {% if post.email|length > 0 %} + {# start email #} + <a class="email" href="mailto:{{ post.email }}"> + {% endif %} + {% set capcode = post.capcode|capcode %} + <span {% if capcode.name %}style="{{ capcode.name }}" {% endif %}class="name">{{ post.name }}</span> + {% if post.trip|length > 0 %} + <span {% if capcode.trip %}style="{{ capcode.trip }}" {% endif %}class="trip">{{ post.trip }}</span> + {% endif %} + {% if post.email|length > 0 %} + {# end email #} + </a> + {% endif %} + {% if capcode %} + {{ capcode.cap }} + {% endif %} + </small> + </td> + <td class="minimal" > + {% if post.subject %} + <small>{{ post.subject }}</small> + {% else %} + – + {% endif %} + </td> + <td class="minimal"> + {% if post.file %} + <small>{{ post.file }} ({{ post.filesize | filesize }})</small> + {% else %} + – + {% endif %} + </td> + <td> + <small><em>{{ post.snippet }}</em></small> + </td> + </tr> + {% endfor %} +</table> + diff --git a/templates/mod/debug/sql.html b/templates/mod/debug/sql.html new file mode 100644 index 00000000..755995f9 --- /dev/null +++ b/templates/mod/debug/sql.html @@ -0,0 +1,26 @@ +<form action="" method="post"> + <input type="hidden" name="token" value="{{ security_token }}"> + <textarea style="display:block;margin:5px auto;width:90%;max-width:600px" rows="3" name="query">{{ query | e }}</textarea> + <input style="display:block;margin:5px auto" type="submit" value="Query"> +</form> + +{% if result == 'empty' %} + <p style="text-align:center">Query successful (no result).</p> +{% elseif result %} + <table class="modlog"> + <tr> + {% for key in keys %} + <th>{{ key | e }}</th> + {% endfor %} + </tr> + {% for row in result %} + <tr> + {% for col in row %} + <td>{{ col | e }}</td> + {% endfor %} + </tr> + {% endfor %} + </table> +{% elseif error %} + <p style="text-align:center;color:#d00">{{ error | e }}</p> +{% endif %} |
