$type = 'danger'; $msg = 'The e-mail that you entered has been registered.'; $page = 'self'; } else { if ($check->rows > 0) { $user_alias = cleanurl($user_fullname . '-' . $check->rows); } else { $user_alias = cleanurl($user_fullname); } if ($password != $user_password) { $type = 'danger'; $msg = 'Password does not match'; $page = 'self'; } else { $user_password = $_global->generateHash($user_password); $_register_update->register_user($user_first_name, $user_last_name, $user_fullname, $user_email, $user_password, $user_created_date, $user_alias); $user = $_register_get->get_users($user_email); /* --- SET SESSION --- */ $_SESSION['account']['login_id'] = $user->user_id; $_SESSION['account']['login_time'] = time(); /* --- SET SESSION CHECKOUT --- */ if (isset($_SESSION['order_login']) && $_SESSION['order_login'] == 1) { $_SESSION['amount_purchase'] = $_SESSION['bag']['total']; $_SESSION['amount_discount'] = $_SESSION['bag']['discount']; } /* --- WISHLIST --- */ if (isset($_SESSION['wishlist_tmp']) && $_SESSION['wishlist_tmp'] == '1') { $ajx_type = $_SESSION['wishlist_tmp_type']; $ajx_stock = $_SESSION['wishlist_tmp_stock']; $ajx_qty = $_SESSION['wishlist_tmp_qty']; $ajx_user = $_global_user->user_id;
if ($check_email->rows > 0) { $type = 'danger'; $msg = 'The e-mail that you entered has been registered.'; $page = 'login'; } else { if ($check->rows > 0) { $user_alias = cleanurl($fullname . '-' . $check->rows); } else { $user_alias = cleanurl($fullname); } if ($password != $cpassword) { $type = 'danger'; $msg = 'Password does not match'; $page = 'login'; } else { $_register_update->register_user($fname, $lname, $fullname, $email, $cpassword, $user_alias); /* --- CALL FUNCTION --- */ $user = $_register_get->get_user($email, $cpassword); /* --- SET SESSION --- */ $_SESSION['account']['login_id'] = $user->user_id; $_SESSION['account']['login_time'] = time(); /* --- SET SESSION CHECKOUT --- */ if (isset($_SESSION['order_login']) && $_SESSION['order_login'] == 1) { $_SESSION['amount_purchase'] = $_SESSION['bag']['total']; $_SESSION['amount_discount'] = $_SESSION['bag']['discount']; } /* --- WISHLIST --- */ if (isset($_SESSION['wishlist_tmp']) && $_SESSION['wishlist_tmp'] == '1') { $ajx_type = $_SESSION['wishlist_tmp_type']; $ajx_stock = $_SESSION['wishlist_tmp_stock']; $ajx_qty = $_SESSION['wishlist_tmp_qty'];
if ($check_email->rows > 0) { $type = 'danger'; $msg = 'The email that you entered has been registered.'; $page = 'self'; } else { if ($check->rows > 0) { $user_alias = cleanurl($fullname . '-' . $check->rows); } else { $user_alias = cleanurl($fullname); } if ($password != $cpassword) { $type = 'danger'; $msg = 'Email and password does not match'; $page = 'self'; } else { $_register_update->register_user($fname, $lname, $fullname, $gender, $email, $cpassword, $user_alias, $dob); /* --- CALL FUNCTION --- */ $user = $_register_get->get_user($email, $cpassword); /* --- SET SESSION --- */ $_SESSION['account']['login_id'] = $user->user_id; $_SESSION['account']['login_time'] = time(); /* --- SET SESSION CHECKOUT --- */ if (isset($_SESSION['order_login']) && $_SESSION['order_login'] == 1) { $_SESSION['amount_purchase'] = $_SESSION['bag']['total']; $_SESSION['amount_discount'] = $_SESSION['bag']['discount']; } /* --- WISHLIST --- */ if (isset($_SESSION['wishlist_tmp']) && $_SESSION['wishlist_tmp'] == '1') { $ajx_type = $_SESSION['wishlist_tmp_type']; $ajx_stock = $_SESSION['wishlist_tmp_stock']; $ajx_qty = $_SESSION['wishlist_tmp_qty'];