* @Modified By * @version 1.0 * @desc This is main file (quickreview) which is used to render quickreview page for the project */ //Includes config file include "includes/config.inc.php"; //Includes global class file include DIR_CLASSES . "/clsGlobal.php"; //Checks if session is set for admin login or not if ($_SESSION["UID"] == "" && $_SESSION["UNAME"] == "") { $strRedirect = SITE_NAME . "login.htm"; header("Location:{$strRedirect}"); } //Creates object for global class file $hldGlobal = new clsGlobal($hdlDb); $intUCheck = $hldGlobal->fnUserCheckTemp($_SESSION["UID"]); if ($intUCheck) { $hldGlobal->fnInActiveUser($_SESSION["UID"]); $strLogOut = SITE_NAME . "log/1/login.htm"; header("Location:{$strLogOut}"); } //Creates the object for sigma template. $hdlTpl =& new HTML_Template_Sigma(DIR_TEMPLATE, DIR_TEMPLATE . "/prepared"); //Loads index template file $hdlTpl->loadTemplateFile("quickreview.htm", TRUE, TRUE); $hldGlobal->fnTrackUser("Quick Review", $_SESSION["MaInId"]); $strHeader = $hldGlobal->fnGetHeader(); //Fetches header template $strMetatag = $hldGlobal->fnMetaTag(); //Fetches Metatag template $strFooter = $hldGlobal->fnGetFooter();
$strErrorMessage = ""; $intError = 1; if (trim($_POST["userid"]) == "") { $strErrorMessage .= "Please enter user name<br>"; $intError = 0; } if (trim($_POST["pass"]) == "") { $strErrorMessage .= "Please enter password<br>"; $intError = 0; } if (trim($_POST["userid"]) != "" && trim($_POST["pass"]) != "") { $arrCheck = $hldGlobal->fnCheckUserPass(trim($_POST["userid"]), trim($_POST["pass"])); if (is_array($arrCheck) && count($arrCheck) > 0) { if ($arrCheck[0]["usertype"] == "temporary") { if ($arrCheck[0]["last_logged_in"] != 0) { $intUCheck = $hldGlobal->fnUserCheckTemp($arrCheck[0]["id"]); if ($intUCheck) { $hldGlobal->fnInActiveUser($arrCheck[0]["id"]); $strLogOut = "log/1/login.htm"; header("Location:{$strLogOut}"); } } else { $hldGlobal->fnFetchUserDetails($arrCheck[0]["id"], 1); } } $_SESSION["UID"] = $arrCheck[0]["id"]; $_SESSION["UNAME"] = $_POST["userid"]; $hldGlobal->fnUserTrackMain($arrCheck[0]["id"]); header("Location:index.htm"); } else { $strErrorMessage .= "User name and password does not match<br>";