示例#1
0
ob_start();
require_once '../config/config.php';
require_once INCLUDE_DIR . 'class.masterData.php';
$out = ob_get_clean();
$objMaster = new MasterData();
$id = $_POST['id'];
$table = $_POST['tableName'];
$option = "var optData = new Object();";
$countryId = $_POST['countryId'];
$stateId = $_POST['stateId'];
$cityId = $_POST['cityId'];
$schoolId = $_POST['schoolId'];
$username = $_POST['username'];
$password = $_POST['password'];
$user = $objMaster->checkUser($username, $password, $schoolId, $cityId, $stateId, $countryId);
if (!$user) {
    $login_error = "Username or password not matched. Please try again !!!.";
    $option .= "optData['msg']='fail';";
} else {
    $_SESSION['userId'] = $user['userId'];
    $_SESSION['countryId'] = $user['countryId'];
    $_SESSION['stateId'] = $user['stateId'];
    $_SESSION['cityId'] = $user['cityId'];
    $_SESSION['schoolId'] = $user['schoolId'];
    $_SESSION['countryName'] = $user['countryName'];
    $_SESSION['stateName'] = $user['stateName'];
    $_SESSION['cityName'] = $user['cityName'];
    $_SESSION['schoolName'] = $user['schoolName'];
    $_SESSION['userType'] = $user['userType'];
    $_SESSION['schoolLogo'] = $user['schoolLogo'];