Ejemplo n.º 1
0
<?php

// error_reporting(-1);
//member include class
require_once SITE_CLASS_APPLICATION . "class.member.php";
//initialize object of member
$memobj = new Member();
if (!isset($lgnprmobj)) {
    include_once SITE_CLASS_APPLICATION . "class.loginParameter.php";
    $lgnprmobj = new LoginParameter();
}
include_once SITE_CLASS_GEN . "class.xmlparser.php";
//$val = '';
$fname = 'home';
$fromAdmin = PostVar('fromadmin');
$fname = PostVar('fname');
if ($fname == '' || $fname == 'undefined') {
    $fname = 'home';
}
$Password = '';
if ($fromAdmin == 'Yes') {
    $_SESSION['FROM_ADMIN'] = "Yes";
    $Password = PostVar('pswd');
} else {
    $pswd = $gdbobj->encrypt(PostVar('pswd'));
    $Password = $pswd;
}
//set post variable here
$orgcode = PostVar('orgcode');
$username = PostVar('username');
$loginparameter = PostVar('loginParameter');
Ejemplo n.º 2
0
<?php

/**
 * This file is useful to check authintification of Admin Login.
 *
 * @package		auth.php
 * @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');
    }