error_reporting(1); require_once('Warehouse.php'); if($_REQUEST['modfunc']=='logout') { if($_SESSION) { session_destroy(); header("Location: $_SERVER[PHP_SELF]?modfunc=logout"); } } if($_REQUEST['USERNAME'] && $_REQUEST['PASSWORD']) { $login_RET = DBGet(DBQuery("SELECT USERNAME,PROFILE FROM STAFF WHERE SYEAR='".Config('SYEAR')."' AND UPPER(USERNAME)='".strtoupper($_REQUEST['USERNAME'])."' AND UPPER(PASSWORD)='".strtoupper($_REQUEST['PASSWORD'])."'")); $student_RET = DBGet(DBQuery("SELECT USERNAME,STUDENT_ID FROM STUDENTS WHERE UPPER(USERNAME)='".strtoupper($_REQUEST['USERNAME'])."' AND UPPER(PASSWORD)='".strtoupper($_REQUEST['PASSWORD'])."'")); if(strtoupper($login_RET[1]['USERNAME'])==strtoupper($_REQUEST['USERNAME']) && $login_RET[1]['PROFILE']!='none') { $_SESSION['USERNAME'] = $login_RET[1]['USERNAME']; if(Config('LOGIN')=='No') { if(!$_REQUEST['submit']) { Warehouse('header'); echo "
'; Warehouse('footer_plain'); exit; } elseif($_REQUEST['submit']=='OK') { DBQuery("UPDATE CONFIG SET LOGIN='Yes'"); @mail('schmad@miller-group.net','NEW CENTRE INSTALL',"INSERT INTO CENTRE_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','1.2','$_SERVER[PHP_SELF]','$_SERVER[DOCUMENT_ROOT]','$_SERVER[SCRIPT_NAME]')"); if(function_exists('mysql_query')) { $link = @mysql_connect('augie.miller-group.net','centre_log','centre_log'); @mysql_select_db('centre_log'); @mysql_query("INSERT INTO CENTRE_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','1.2','$_SERVER[PHP_SELF]','$_SERVER[DOCUMENT_ROOT]','$_SERVER[SCRIPT_NAME]')"); @mysql_close($link); } } elseif($_REQUEST['submit']=='Cancel') { DBQuery("UPDATE CONFIG SET LOGIN='Y'"); @mail('schmad@miller-group.net','NEW CENTRE INSTALL',"INSERT INTO CENTRE_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','1.2','$_SERVER[PHP_SELF]','','')"); if(function_exists('mysql_query')) { $link = @mysql_connect('augie.miller-group.net','centre_log','centre_log'); @mysql_select_db('centre_log'); @mysql_query("INSERT INTO CENTRE_LOG (HOST_NAME,IP_ADDRESS,LOGIN_DATE,VERSION,PHP_SELF,DOCUMENT_ROOT,SCRIPT_NAME) values('$_SERVER[SERVER_NAME]','$_SERVER[SERVER_ADDR]','".date('Y-m-d')."','1.2','$_SERVER[PHP_SELF]','','')"); @mysql_close($link); } } } } elseif($login_RET[1]['PROFILE']=='none') $error[] = "Your account has not yet been activated. When your account has been verified by school administration, you will be notified by email."; elseif(strtoupper($student_RET[1]['USERNAME'])==strtoupper($_REQUEST['USERNAME'])) $_SESSION['STUDENT_ID'] = $student_RET[1]['STUDENT_ID']; else $error[] = "You used the Wrong Username or Password.![]() |
|
|
This is a restricted network. Use of this network, its equipment, and resources
is monitored at all times and requires explicit permission from the network
administrator and ".Config('TITLE').". If you do not have this
permission in writing, you are violating the regulations of this network
and can and will be prosecuted to the full extent of the law. By continuing
into this system, you are acknowledging that you are aware of and agree
to these terms.
| |