summaryrefslogtreecommitdiff
path: root/templates/mod/debug/sql.html
blob: 755995f9f827a2975f68f790e17c6b3562917f52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 %}