diff options
author | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 16:48:29 +0200 |
---|---|---|
committer | Nicolas BERNSTEIN <alexis211@gmail.com> | 2011-09-17 16:48:29 +0200 |
commit | d0060968b77c39bdf8abffb071c971c166b59edb (patch) | |
tree | 0be52e00a25bd298235a0cf916fb07496d3ab95f /tpl/general/sqlerror.php | |
download | Bits-d0060968b77c39bdf8abffb071c971c166b59edb.tar.gz Bits-d0060968b77c39bdf8abffb071c971c166b59edb.zip |
First commit.
Diffstat (limited to 'tpl/general/sqlerror.php')
-rw-r--r-- | tpl/general/sqlerror.php | 13 |
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"); |