Esempio n. 1
0
}
$errorFlaglog = 0;
unset($errorListlog);
if (isset($_REQUEST['login'])) {
    extract($_POST);
    if (preg_replace("/^\\s*\$/", "", $user_email) == "") {
        $errorFlaglog = 1;
        $errorListlog[] = "Email Id required.";
    }
    if (preg_replace("/^\\s*\$/", "", $login_password) == "") {
        $errorFlaglog = 1;
        $errorListlog[] = "Password required.";
    }
    //print_r($errorListlog);
    if ($errorFlaglog === 0) {
        $paswd = getEncpasd($login_password);
        $userCnt = $dbClass->getTableRecordCount('users', "user_email=? AND user_pswd=? AND user_status=?", array(trim($user_email), $paswd, '1'));
        if ($userCnt <= 0) {
            $errorListlog[] = 'Login Failed. Email or Password is Incorrect';
            $errorFlaglog = 1;
        } else {
            $result = $dbClass->getTableRecordSingle('users', "user_email=? AND user_pswd=? AND user_status=?", array(trim($user_email), $paswd, '1'));
            $_SESSION['SesUserId'] = $result['user_id'];
            if ($result['user_last_logged_in'] != '') {
                $_SESSION['user_last_login'] = date('F d Y H:i:s', strtotime($result['user_last_logged_in']));
            } else {
                $_SESSION['user_last_login'] = '******';
            }
            $updateInfo['user_last_logged_in'] = 'NOW()';
            $dbClass->prepareUpdateStatement("users", $updateInfo, 'user_id=?', array($result['user_id']));
            $qryParameters = "success";
Esempio n. 2
0
 }
 if (preg_replace("/^\\s*\$/", "", $user_conf_pswd) == "") {
     $errorFlag = 1;
     $errorList[] = "Confirm Password required.";
 }
 if ($user_pswd != $user_conf_pswd) {
     $errorFlag = 1;
     $errorList[] = "Password  and  confirm password are not matching.";
 }
 if (isset($agree_chk) && $agree_chk == 1) {
 } else {
     $errorFlaglog = 1;
     $errorList[] = "Please agree to the terms and conditions.";
 }
 if ($errorFlag === 0) {
     $pswd = getEncpasd($user_pswd);
     $insertInfo['user_firstname'] = $user_firstname;
     $insertInfo['user_lastname'] = $user_lastname;
     $insertInfo['user_pswd'] = $pswd;
     $insertInfo['user_email'] = $user_email;
     $insertInfo['user_status'] = 0;
     $insertInfo['user_payment_Status'] = 0;
     $insertInfo['user_created_date'] = 'NOW()';
     // $insertInfo['user_package_id']			= $user_package_id;
     $userId = $dbClass->prepareInsertStatement('users', $insertInfo);
     $headers = "From:Flock Mails<*****@*****.**>\n";
     $headers .= 'MIME-Version: 1.0' . "\r\n";
     $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
     $headers .= 'Cc: info@mind-labs.com' . "\r\n";
     $body = "Flock Mails New registration - Before Payment";
     $body .= "<br />";