diff --git a/install.php b/install.php
index d2e734f..aa6c32c 100644
--- a/install.php
+++ b/install.php
@@ -28,13 +28,28 @@
$sql = "SELECT * FROM users WHERE access = '". WEBMASTER ."'";
$db->query($sql);
-$web_admin = $db->resultToSingleArray();
+$web_admins = $db->resultToArray();
if(!$db->isEmpty())
{
+ $authorized = false;
+ $emails = '';
+ foreach($web_admins as $webadmin)
+ {
+ $emails .= ''.$webadmin['email'].', ';
+ if($_SESSION['ucinetid'] == $webadmin['ucinetid'])
+ {
+ $authorized = true;
+ }
+ }
+ if(!$authorized)
+ {
$sniper = new Sniper();
$sniper->storeMessage("Illegall access of install.php", $_SESSION['ucinetid'], "hacker");
- die('This is an unauthorized page. This incident will be reported. Please contact the Web Admin at '.$web_admin['email'].' if you feel you received this message in error');
+ die('ESCan has already been installed. If you are the webadmin and would like to reinstall ESCan go to the
+ Admin Page. This incident will be reported. Please contact the Web Admin at
+ '.$emails.' or esc.uci@gmail.com if you feel you received this message in error');
+ }
}
$sql = explode(';', file_get_contents('inc/setup/setup.sql'));