function roleForm_Button_Update_OnClick(&$sender)
{
    $roleForm_Button_Update_OnClick = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $roleForm;
    //Compatibility
    //End roleForm_Button_Update_OnClick
    //Custom Code @91-2A29BDB7
    // -------------------------
    global $CCSLocales;
    global $Redirect;
    CCLogoutUser();
    $db = new clsDBhrcon();
    $SQL = "select * from f_changeuserpwd(" . $db->ToSQL($Container->user_name->Value, ccsText) . "," . $db->ToSQL($Container->CCGetSession("is_new_user")->Value, ccsText) . "," . $db->ToSQL($Container->old_password->Value, ccsText) . "," . $db->ToSQL($Container->new_password->Value, ccsText) . "," . $db->ToSQL($Container->new_password2->Value, ccsText) . "," . "" . "," . "" . ")";
    $db->query($SQL);
    $Result = $db->next_record();
    if (!$Result) {
        return;
    }
    if ($db->f('o_result_int') != 1) {
        $Container->Errors->addError($db->f('o_result_msg'));
        $roleForm_Button_Update_OnClick = false;
    } else {
        global $Redirect;
        print_r("<script language='JavaScript'>alert('Sukses');</script>");
    }
    $DBhrcon_->close();
    $Redirect = CCGetParam("ret_link", $Redirect);
    $roleForm_Button_Update_OnClick = true;
    // -------------------------
    //End Custom Code
    //Close roleForm_Button_Update_OnClick @6-65373743
    return $roleForm_Button_Update_OnClick;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
function Page_AfterInitialize()
{
    //Page_AfterInitialize @1-56434BCA
    //Logout @9-EC13F9E1
    if (strlen(CCGetParam("Logout", ""))) {
        CCLogoutUser();
        global $Redirect;
        $Redirect = "login.php";
    }
    //End Logout
}
Ejemplo n.º 4
0
function Page_AfterInitialize()
{
    //Page_AfterInitialize @1-56434BCA
    //Logout @4-676B5201
    if (strlen(CCGetParam("Logout", ""))) {
        CCLogoutUser();
        global $Redirect;
        $Redirect = "Logout.php";
    }
    //End Logout
    //Logout @10-676B5201
    if (strlen(CCGetParam("Logout", ""))) {
        CCLogoutUser();
        global $Redirect;
        $Redirect = "Logout.php";
    }
    //End Logout
}
Ejemplo n.º 5
0
function Page_AfterInitialize(&$sender)
{
    $Page_AfterInitialize = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $login;
    //Compatibility
    //End Page_AfterInitialize
    //Logout @12-FDBBC56A
    if (strlen(CCGetParam("logout", ""))) {
        CCLogoutUser();
        global $Redirect;
        $Redirect = "login.php";
    }
    //End Logout
    //Close Page_AfterInitialize @1-379D319D
    return $Page_AfterInitialize;
}
Ejemplo n.º 6
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;
}
Ejemplo n.º 7
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;
}
Ejemplo n.º 8
0
function CCLoginUser($login, $password)
{
    CCLogoutUser();
    $db = new clsDBdbConnection();
    $SQL = "SELECT id, group_id, password FROM alm_users WHERE username="******" AND password="******"UserID", $db->f("id"));
        CCSetSession("UserLogin", $login);
        CCSetSession("GroupID", $db->f("group_id"));
    }
    return $Result;
}
Ejemplo n.º 9
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;
}
Ejemplo n.º 10
0
<?php

define("RelativePath", "..");
define("PathToCurrentPage", "/main/");
define("FileName", "sip_logout.php");
include_once RelativePath . "/Common.php";
CCLogoutUser();
?>
<script language="JavaScript" type="text/javascript">
 top.location.href= "../index.php"; 
</script>
<?php 
//
?>


Ejemplo n.º 11
0
function CCLoginUser($login, $password)
{
    CCLogoutUser();
    $db = new clsDBConnection1();
    $SQL = "SELECT user_id, group_id, user_password FROM users WHERE user_login="******" AND user_password="******"UserID", $db->f("user_id"));
        CCSetSession("UserLogin", $login);
        CCSetSession("GroupID", $db->f("group_id"));
        CCSetSession("UserAddr", $_SERVER["REMOTE_ADDR"]);
    }
    return $Result;
}
Ejemplo n.º 12
0
function CCLoginUser($login, $password)
{
    CCLogoutUser();
    $db = new clsDBhrcon();
    $SQL = "SELECT p_user_id, p_user_id, user_pwd FROM p_user WHERE user_name=" . $db->ToSQL($login, ccsText);
    // . " AND user_pwd=" . $db->ToSQL($password, ccsText);
    $db->query($SQL);
    $Result = $db->next_record();
    if ($Result) {
        CCSetSession("UserID", $db->f("p_user_id"));
        CCSetSession("UserName", $login);
        CCSetSession("GroupID", $db->f("p_user_id"));
        CCSetSession("UserAddr", $_SERVER["REMOTE_ADDR"]);
    }
    return $Result;
}
Ejemplo n.º 13
0
function Login_Button_DoLogin_OnClick(&$sender)
{
    $Login_Button_DoLogin_OnClick = true;
    $Component =& $sender;
    $Container =& CCGetParentContainer($sender);
    global $Login;
    //Compatibility
    //End Login_Button_DoLogin_OnClick
    //Login @4-DE10C29C
    global $CCSLocales;
    global $Redirect;
    CCLogoutUser();
    $db = new clsDBhrcon();
    $SQL = "select * from f_userlogin(null," . $db->ToSQL($Container->username->Value, ccsText) . "," . $db->ToSQL($Container->password->Value, ccsText) . ",'localhost')";
    // . " AND user_pwd=" . $db->ToSQL($password, ccsText);
    $db->query($SQL);
    $Result = $db->next_record();
    if ($Result) {
        CCSetSession("UserID", $db->f("p_user_id"));
        CCSetSession("UserName", $Container->username->Value);
        CCSetSession("GroupID", $db->f("p_user_id"));
        CCSetSession("UserAddr", $_SERVER["REMOTE_ADDR"]);
        CCSetSession("UserStatus", $db->f("o_is_new_user"));
    }
    //o_result_int integer,
    //o_result_msg character varying,
    //o_is_new_user character varying,
    //o_is_change_pwd character varying,
    //o_last_login_text character varying,
    //o_user_id integer)
    if ($db->f('o_result_int') != 1) {
        //$Container->Errors->addError($CCSLocales->GetText("CCS_LoginError"));
        $Container->Errors->addError($db->f('o_result_msg'));
        $Container->password->SetValue("");
        $Login_Button_DoLogin_OnClick = 0;
    } else {
        global $Redirect;
        //Add CAS
        if ($db->f('o_is_new_user') == "Y") {
            $seslmenu = "" . "<div class='blockheader'><h3 class='t'>Profile</h3></div>" . "<div class='blockcontent'>" . "<div style='position:relative; width:100%; height:100%'>" . "<img border='0' height='100' src='../images/users/" . CCGetUserLogin() . ".jpg' style='display: block; margin: 0 auto;'>" . "<p style='text-align:center'><strong>" . CCGetUserLogin() . "</strong></p></div>" . "<div id='cssmenu'>" . "<ul>" . "<li><a href='../main/home.php'><span>Task Box</span></a></li>" . "<li><a href='#'><span>User profile</span></a></li>" . "<li><a href='../admin.menu/p_user_pass_change.php'><span>Change Password</span></a></li>" . "</ul>" . "</div>" . "</div>";
            CCSetSession("lmenu", $seslmenu);
            $Redirect = "../admin.menu/p_user_pass_change.php";
        } else {
            if ($db->f('o_is_change_pwd') == "Y") {
                $seslmenu = "" . "<div class='blockheader'><h3 class='t'>Profile</h3></div>" . "<div class='blockcontent'>" . "<div style='position:relative; width:100%; height:100%'>" . "<img border='0' height='100' src='../images/users/" . CCGetUserLogin() . ".jpg' style='display: block; margin: 0 auto;'>" . "<p style='text-align:center'><strong>" . CCGetUserLogin() . "</strong></p></div>" . "<div id='cssmenu'>" . "<ul>" . "<li><a href='../main/home.php'><span>Task Box</span></a></li>" . "<li><a href='#'><span>User profile</span></a></li>" . "<li><a href='../admin.menu/p_user_pass_change.php'><span>Change Password</span></a></li>" . "</ul>" . "</div>" . "</div>";
                CCSetSession("lmenu", $seslmenu);
                $Redirect = "../admin.menu/p_user_pass_change.php";
            }
        }
        //End Add CAS
        $uid = $db->f('o_user_id');
        $seshmenu = "";
        $DBhrcon_ = new clsDBhrcon();
        //$queryMD  = "select p_module_id, code, description from p_module " .
        //            "where is_active='Y' order by listing_no";
        $lsuser = CCGetUserLogin();
        $queryMD = "select * from f_display_app('" . $lsuser . "')";
        $DBhrcon_->query($queryMD);
        while ($DBhrcon_->next_record()) {
            $param = CCAddParam("", "p_module_id", $DBhrcon_->f("p_module_id"));
            $seshmenu = $seshmenu . "<li><a href='../main/modul.php?" . $param . "'" . "title='" . $DBhrcon_->f("code") . " - " . $DBhrcon_->f("description") . "' target=''>" . "<img border='0' src='../images/menu/" . $DBhrcon_->f("p_module_id") . ".gif'></a> </li>";
        }
        include_once 'user_attribute.php';
        setUserAttrib($uid);
        $DBhrcon_->close();
        CCSetSession("hmenu", $seshmenu);
        $Redirect = CCGetParam("ret_link", $Redirect);
        $Login_Button_DoLogin_OnClick = 1;
    }
    //End Login
    //Close Login_Button_DoLogin_OnClick @3-0EB5DCFE
    return $Login_Button_DoLogin_OnClick;
}
Ejemplo n.º 14
0
function CCLoginUser($login, $password)
{
    CCLogoutUser();
    $db = new clsDBConnSIKP();
    $SQL = "SELECT p_app_user_id, p_user_status_id, user_pwd FROM p_app_user WHERE app_user_name=" . $db->ToSQL($login, ccsText) . " AND user_pwd=" . $db->ToSQL($password, ccsText);
    $db->query($SQL);
    $Result = $db->next_record();
    if ($Result) {
        CCSetSession("UserID", $db->f("p_app_user_id"));
        CCSetSession("UserLogin", $login);
        CCSetSession("GroupID", $db->f("p_user_status_id"));
    }
    return $Result;
}