function change_password_changepwd1_AfterUpdate(&$sender)
{
    $change_password_changepwd1_AfterUpdate = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $change_password;
    //Compatibility
    //End change_password_changepwd1_AfterUpdate
    //Custom Code @18-2A29BDB7
    // -------------------------
    $dbw = new clsDBconnection1();
    $sql1 = "update users set user_password ='******' where user_id=" . CCGetUserID();
    $dbw->query($sql1);
    //$Result3 = $dbw->next_record();
    if ($dbw->affected_rows() > 0) {
        $change_password->changepwd1->Errors->addError('<div class="alert alert-success">DONE! Password Succesfully Changed! Login with new password to continue...</div>');
        CCLogoutUser();
        CCSetCookie("iRadiologyLogin", "");
    } else {
        $change_password->changepwd1->Errors->addError('<div class="alert">Unable to Change Password! Try Again Later!</div>');
    }
    // -------------------------
    //End Custom Code
    //DEL
    //Close change_password_changepwd1_AfterUpdate @8-7BFDFC76
    return $change_password_changepwd1_AfterUpdate;
}
Exemple #2
0
function header_AfterInitialize(&$sender)
{
    $header_AfterInitialize = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $header;
    //Compatibility
    //End header_AfterInitialize
    //Logout @2-A3CAD524
    if (strlen(CCGetParam("Logout", ""))) {
        CCLogoutUser();
        CCSetCookie("iRadiologyLogin", "");
        global $Redirect;
        $Redirect = "../login/index.php";
    }
    //End Logout
    //Close header_AfterInitialize @1-2FE08AE2
    return $header_AfterInitialize;
}
Exemple #3
0
function Page_AfterInitialize(&$sender)
{
    $Page_AfterInitialize = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $logout;
    //Compatibility
    //End Page_AfterInitialize
    //Logout @5-F926A151
    if (strlen(CCGetParam("Logout", ""))) {
        CCLogoutUser();
        CCSetCookie("iRadiologyLogin", "");
        global $Redirect;
        $Redirect = "logout.php";
    }
    //End Logout
    //Close Page_AfterInitialize @1-379D319D
    return $Page_AfterInitialize;
}
Exemple #4
0
function Page_BeforeInitialize(&$sender)
{
    $Page_BeforeInitialize = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $index;
    //Compatibility
    //End Page_BeforeInitialize
    //Logout @13-229E921B
    CCLogoutUser();
    CCSetCookie("iRadiologyLogin", "");
    //End Logout
    //Close Page_BeforeInitialize @1-23E6A029
    return $Page_BeforeInitialize;
}
Exemple #5
0
function CCCheckAutoLoginCookies()
{
    if (!CCGetUserLogin()) {
        $parts = CCParseALCookie("iRadiologyLogin");
        if (isset($parts) && count($parts) > 2) {
            list($login, $password, $expirationDate) = $parts;
            if ($expirationDate > time()) {
                CCLoginUser($login, $password);
                if (CCGetUserLogin()) {
                    CCRefreshALCookie($expirationDate);
                    if (strlen(CCGetFromGet("ccsForm"))) {
                        header("Location: " . $_SERVER["PHP_SELF"] . "?" . CCGetQueryString("QueryString", "ccsForm"));
                        exit;
                    }
                }
            }
        }
    }
    if (!CCGetUserLogin()) {
        CCSetCookie("iRadiologyLogin", "");
    }
}