Ejemplo n.º 1
0
    $table = PRJ_DB_PREFIX . '_organization_user';
    //	$fname = 'dashboard';
    $iPrId = 'iUserID';
} else {
    $memtype = 'securitymanager';
    $table = PRJ_DB_PREFIX . '_security_manager';
    $fname = 'smdashboard';
    $iPrId = 'iSMID';
}
//check customer authentification to login
$member = $memobj->checkauthentication($username, $Password, $memtype, $table, $iPrId, $orgcode);
// pr($_SESSION); exit;
// prints($member);exit;
$user = "******";
$pass = "******";
$res_lgnprm = $lgnprmobj->getLoginParameter($username, $Password, $orgcode, $loginparameter);
if (!$res_lgnprm) {
    $member = "0";
}
if ($member == '1') {
    if (PostVar('chk')) {
        if (PostVar('chk') == 'true') {
            setcookie($user, $username, time() + 2592000);
            setcookie($pass, $pswd, time() + 2592000);
        } else {
            setcookie($user, "", time() + 2592000);
            setcookie($pass, "", time() + 2592000);
        }
    }
} elseif ($member == '2') {
    setcookie($user, "", time() + 2592000);
Ejemplo n.º 2
0
 * @section		login
*/
include SITE_CLASS_GEN . "class.xmlparser.php";
if (!isset($lgnprmobj)) {
    include_once SITE_CLASS_APPLICATION . "class.loginParameter.php";
    $lgnprmobj = new LoginParameter();
}
$adminobj = new Admin();
$parseObj = new xmlparser();
$userName = GetVar('uname');
$pass = md5(GetVar('pass'));
$loginparameter = GetVar('loginparameter');
$chk = GetVar('chk');
$theme = GetVar('theme');
$sucss = $adminobj->chkAuth($userName, $pass, $type);
$res_lgnprm = $lgnprmobj->getLoginParameter($userName, $pass, '', $loginparameter);
if (!$res_lgnprm) {
    $sucss = "0";
}
if ($chk == "on") {
    if ($sucss == 1) {
        $_SESSION['' . PRJ_CONST_PREFIX . '_SESS_USERTHEME'] = $theme;
        $_SESSION['' . PRJ_CONST_PREFIX . '_LOGIN_COOKIE'] = $userName;
        $_SESSION['' . PRJ_CONST_PREFIX . '_PASSWORD_COOKIE'] = GetVar('pass');
    }
    $_SESSION['' . PRJ_CONST_PREFIX . '_LOGIN_REMEMBER'] = 'Yes';
} else {
    $_SESSION['' . PRJ_CONST_PREFIX . '_LOGIN_COOKIE'] = '';
    $_SESSION['' . PRJ_CONST_PREFIX . '_LOGIN_REMEMBER'] = 'No';
    $_SESSION['' . PRJ_CONST_PREFIX . '_PASSWORD_COOKIE'] = '';
}