// ----------------------------------------------------------------------------------------- // -- HAU Single Login Test Bed // Generate a new session ID for each login, even on the same machine & browser instance // -- // -- Include all functions and definition common to all routines // -- include_once("Config.php"); // installation specific, only on Main.php include_once("Functions.php"); // Attempt to prevent cross-login within the same server by limiting cookie to specific webroot $strWebRoot = $_SESSION["gENWebRoot"]; session_destroy(); // Generate a new session ID string $txtNewSeed = uniqid(rand(),1); $txtNewSessionID = md5($txtNewSeed); session_id($txtNewSessionID); // Write to browser's cookie the new session ID //setcookie(session_name(), session_id(), time()+9999999, "/"); setcookie(session_name(), session_id(), 0, $strWebRoot); // echo "
";
// var_dump($_SESSION);
// exit;
// -----------------------------------------------------------------------------------------
//for the link that will be placed in the school's website
if(isset($_GET["s"])){
$portalType = $_GET["s"];
}
?>
echo $_SESSION["gCuTitle"]?> Portal Login
/* Set-up routine specific heading -- reformat after frontpage editing*/
include_once("Config.php");
$txtRtnName="Login to HAU Portal";
$txtRtnNote="Enter your user name and password to use the system";
$txtRtnFinder= $_SESSION["gCuSite"] . " > " . $_SESSION["gCuTitle"] . "> Log-in";
$intRtnScreen=0; // 0-Login, 1-main menu, 2-Regular, 3-Logout
$txtWNote1 = $_SESSION["gWNote1"];
$txtWNote2 = $_SESSION["gWNote2"];
$txtComName = $_SESSION["gCuName"];
$FPW= $_SESSION["gForgotPW"];
// Destroy all user session here
$_SESSION = array();
if(isset($_GET["ec"])){
switch($_GET["ec"]){
case 1201:
$txtErrorMsg = "Incorrect username or password.";
break;
case 1202:
$txtErrorMsg = "Account has been disabled. Please contact SES Registrar's Office.";
break;
case 1203:
$txtErrorMsg = "You have reach the maximum times of Failed LogIn. Pls. wait a ew mins...";
break;
default:
$txtErrorMsg = "Unknown Error.";
break;
}
}
?>