summaryrefslogtreecommitdiff
path: root/templates/mod/debug/sql.html
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2013-01-26 15:08:48 +0100
committerMarcin Łabanowski <marcin@6irc.net>2013-01-26 15:08:48 +0100
commite6b9bad788a6d9ae5f203b999925b9368a77536c (patch)
tree5d63bffd2418701b8f703050c9f289da74c0be35 /templates/mod/debug/sql.html
parent9b7b1c996f8800efc533dd11a82dffcefdeb726e (diff)
parentdb1b50cfc3a7f3b45891b0ff69db4892b0e6929e (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Conflicts: mod.php
Diffstat (limited to 'templates/mod/debug/sql.html')
-rw-r--r--templates/mod/debug/sql.html26
1 files changed, 26 insertions, 0 deletions
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 %}