Example #1
0
                unset($_GET);
            }
            $alert = 'Invalid point of entry';
        } else {
            $GET_email = htmlspecialchars($_GET["email"]);
            if (check_email_exist($GET_email) === true && check_email_confirmed($GET_email) === false) {
                if (send_confirm_email_again($GET_email) === true) {
                    $content = "<h3>Another confirmation email has been sent to " . $GET_email . "</h3>\n\t\t\t\t\t\t\t  <p>Please confirm your email by clicking the link provided inside the email before proceeding to login</p>\n\t\t\t\t\t\t\t  <p>If you haven't received the email, please allow up to 30 minutes for it to arrive and also check your Junk Mail folder.</p>\n\t\t\t\t\t\t\t  <div class='notice_box'><h4>*** Important Notice ***</h4>\n\t\t\t\t\t\t\t  <p>To prevent any possible abuse, we only allow up to 5 confirmation emails to be sent per email address.</p>\n\t\t\t\t\t\t\t  </div>\n\t\t\t\t\t\t\t  <h4>Having problem confirming your email address?</h4>\n\t\t\t\t\t\t\t  <p>Please give us a call at 1 (562) 860-6108 or <a href='https://www.nayadathai.com/send_comment.php?direction=developer'>submit an email to us</a></p>";
                    $content .= '
							  <h4>Still didn\'t get our email?</h4>
							  <p><a class="show_wait_box" href="confirm_email.php?action=again&email=' . $GET_email . '">Click here to let us send the confirmation email to you again<a></p>';
                } else {
                    $content = "<h3>We're sorry, we cannot send any more email to this email addreess</h3>\n\t\t\t\t\t\t\t\t<p>To prevent any possible abuse, we only allow up to 5 confirmation emails to be sent</p>\n\t\t\t\t\t\t\t\t<p>If you encounter any problem confirming your email, Please give us a call at 1 (562) 860-6108 or <a href='https://www.nayadathai.com/send_comment.php?direction=developer'>submit an email to us</a></p>";
                }
                // end else ( if the max limit has been reached )
            } elseif (check_email_exist($GET_email) === true && check_email_confirmed($GET_email) === true) {
                if (isset($_GET)) {
                    unset($_GET);
                }
                $alert = 'This email has already been confirmed';
            } else {
                if (isset($_GET)) {
                    unset($_GET);
                }
                $alert = 'Invalid email address';
            }
            // end else ( if the email has already been confirmed )
        }
        // end else ( if $_GET email is set )
    } else {
        if (isset($_GET)) {
Example #2
0
            }
            $title = "Please login to send comments";
        }
    }
    // end elseif GET["redirect"] is set
}
// end if GET is set
// Evaluate form here
if (isset($_POST["submit"])) {
    if (!isset($_SESSION["cust_login"])) {
        if (clean_input($_POST["submit"]) === "login") {
            if (!empty($_POST["email"]) && !empty($_POST["password"])) {
                $email = clean_input($_POST["email"]);
                $password = clean_input($_POST["password"]);
                if (check_email_exist($email) === true) {
                    if (check_email_confirmed($email) === true) {
                        if (get_cust_single_info($email, "suspension") == 0) {
                            if (check_need_captcha($email) === false) {
                                if (validate_password($email, $password) === true) {
                                    login($email);
                                    if (isset($_SESSION["redirect_on_logging_in"])) {
                                        $location = clean_input($_SESSION["redirect_on_logging_in"]);
                                        unset($_SESSION["redirect_on_logging_in"]);
                                        redirect($location);
                                    } else {
                                        // setup urls
                                        if ($url_set == 1 || $url_set == 2) {
                                            redirect("order.php?tab=2");
                                        } elseif ($url_set == 3) {
                                            redirect("https://www.nayadathai.com/order.php?tab=2");
                                        }