1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-12 21:22:28 +01:00

Create MySQL error file

This commit is contained in:
Chaoyi Zha 2014-11-20 16:31:15 -05:00
parent 36aef7c3f9
commit f7779af890

24
error.php Normal file
View File

@ -0,0 +1,24 @@
<?php
$req_noredirect = true;
require_once('req.php');
require_once('header.php');
echo "<h2>Error:</h2><br />";
echo "<ul>";
$err = 0;
if (!$mysqli) {
$err++;
echo "<li>Could not connect to database. Please contact the administrator.";
}
if ($insecure == TRUE && $_SESSION['role'] == 'adm') {
$err++;
echo "<li>You are seeing the following message because you are an administrator. Your MySQL database is potentially unsafe. P
lease make sure Polr's database receives an UTF8 encoding. </li>";
}
if ($err<1) {
echo "<li>No errors to report.</li>";
}
echo "</ul>";
require_once('footer.php');