示例#1
0
}
// LOGIN
if (isset($_POST['btn_login'])) {
    /*
    if($_SESSION['alert_front'] != "error"){
    	  header("Location:http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/my-account/");
    }else{
    	  header("Location:http://".$_SERVER['HTTP_HOST'].get_dirname($_SERVER['PHP_SELF'])."/login");
    }
    */
} else {
    if (isset($_POST['btn_confirm'])) {
        if ($_SESSION['alert'] == "error") {
            header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/confirm");
        } else {
            header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/admin/emails/admin_confirmed.php?act=&ornum=" . clean_alphanumeric($_POST['order_number']) . "&amount=" . clean_number($_POST['order_confirm_amount']));
        }
    } else {
        if (isset($_POST['btn_contact'])) {
            header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/contact");
        } else {
            if (isset($_POST['btn_search'])) {
                header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/shop-search/name-" . $_POST['search_bar']);
            } else {
                if ($_POST['btn_edit_account']) {
                    header("Location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/account-details");
                } else {
                    if ($_REQUEST['act'] == "order_/wishlist" && $_SESSION['user_id'] == null) {
                        header("location:http://" . $_SERVER['HTTP_HOST'] . get_dirname($_SERVER['PHP_SELF']) . "/login");
                    }
                }
示例#2
0
        ?>
";
</script>
<?php 
        // ALERT
        $_SESSION['alert'] = "alert-danger";
        $_SESSION['msg'] = "Incorrect email or password.";
    }
}
if (isset($_POST['btn_register'])) {
    // DEFINED VALUE
    $fname = clean_alphabet($_POST['register_fname']);
    $lname = clean_alphabet($_POST['register_lname']);
    $fullname = $fname . " " . $lname;
    $email = clean_email($_POST['register_email']);
    $password = clean_alphanumeric($_POST['regeister_repassword']);
    $check = generate_alias($fullname);
    $date = current_date_sql();
    $check_email = validate_email(clean_email($_POST['register_email']));
    if ($check_email['rows'] > 0) {
        // ALERT
        $_SESSION['alert'] = "alert-danger";
        $_SESSION['msg'] = "The e-mail that you entered has been registered.";
    } else {
        if ($check['rows'] > 0) {
            $user_alias = cleanurl($fullname . $check['rows']);
        } else {
            $user_alias = cleanurl($fullname);
        }
        register_user($fname, $lname, $fullname, $email, $password, $user_alias, $date);
        //CALL FUNCTION