コード例 #1
0
ファイル: login.php プロジェクト: amoldclarion/ICRS
        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>";
            $intError = 0;
        }
    }
}
$strHeader = $hldGlobal->fnGetHeader("");
//Fetches header template
$strMetatag = $hldGlobal->fnMetaTag();
//Fetches Metatag template
$strFooter = $hldGlobal->fnGetFooter();
//Fetches footer template
$strLmenu = $hldGlobal->fnMenu("", $arrMpage);
//Fetches left menu
コード例 #2
0
ファイル: logout.php プロジェクト: amoldclarion/ICRS
 *
 * @author Amol Divalkar
 * @Modified By 
 * @version 1.0 
 * @desc This is logout file which will clear all the session values.
 */
//Includes config file
include "includes/config.inc.php";
//Includes global class file
include DIR_CLASSES . "/clsGlobal.php";
//include(DIR_CLASSES."/clsAdmin.php");
//Creates object for global class file
$hldGlobal = new clsGlobal($hdlDb);
$sqlUpd = "UPDATE tblusertrack SET timeout='" . date("H:i:s") . "' WHERE id=" . $_SESSION["LaStId"];
mysql_query($sqlUpd);
$hldGlobal->fnUserTrackMain($_SESSION["UID"]);
$_SESSION["UID"] = "";
//Empty session value
$_SESSION["UNAME"] = "";
//Empty session value
$_SESSION["LaStId"] = "";
//Empty session value
$_SESSION["PaGeNaMe"] = "";
//Empty session value
$_SESSION["MaInId"] = "";
//Empty session value
unset($_SESSION["UID"]);
//unset session
unset($_SESSION["UNAME"]);
//unset session
unset($_SESSION["LaStId"]);