summaryrefslogtreecommitdiff
path: root/tpl/general/sqlerror.php
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/general/sqlerror.php')
-rw-r--r--tpl/general/sqlerror.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tpl/general/sqlerror.php b/tpl/general/sqlerror.php
new file mode 100644
index 0000000..59f0806
--- /dev/null
+++ b/tpl/general/sqlerror.php
@@ -0,0 +1,13 @@
+<?php
+global $sql_min_priv_for_debug;
+require("top.php");
+
+if ($user['priv'] >= $sql_min_priv_for_debug) {
+ echo '<div class="error">An error happenned with the following SQL query :<br />';
+ echo '<code>' . $request . '</code><br />';
+ echo 'Mysql answered : ' . $sql_error . '</div>';
+} else {
+ echo '<div class="error">An internal error occurred, sorry.</div>';
+}
+
+require("bottom.php");