summaryrefslogtreecommitdiff
path: root/templates/mod/debug/sql.html
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2013-01-25 23:56:55 +1100
committerMichael Save <savetheinternet@tinyboard.org>2013-01-25 23:56:55 +1100
commit9a2c33736aeee1016e45ef655d8c58690555152c (patch)
tree85bf7a94b04682647e817c74694318b81e835b7b /templates/mod/debug/sql.html
parent764d718f8426da1c1161ddf82a5dd8a82fd4b935 (diff)
New debug page: ?/debug/sql
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..63ba22f8
--- /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 }}</th>
+ {% endfor %}
+ </tr>
+ {% for row in result %}
+ <tr>
+ {% for col in row %}
+ <td>{{ col }}</td>
+ {% endfor %}
+ </tr>
+ {% endfor %}
+ </table>
+{% elseif error %}
+ <p style="text-align:center;color:#d00">{{ error }}</p>
+{% endif %}