From d02aa49f3c98970dd9673a68450ac1b64fba7e13 Mon Sep 17 00:00:00 2001 From: gelonspr Date: Tue, 16 Apr 2024 16:07:26 +0800 Subject: [PATCH] added error handling for user level page access --- header.php | 2 +- user-history.php | 4 ++++ user-refund-history.php | 6 ++++++ wishlist.php | 4 ++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/header.php b/header.php index 7250c11..27c737d 100644 --- a/header.php +++ b/header.php @@ -345,7 +345,7 @@ if ($_SESSION["userId"] <> "") { ?> -
  • My Account
  • +
  • My Account
  • diff --git a/user-history.php b/user-history.php index ed80055..9dd041e 100644 --- a/user-history.php +++ b/user-history.php @@ -9,6 +9,10 @@ if ($_SESSION["userId"] <> "") { $_SESSION["isLoggedIn"] = false; header("location: login.php"); } + +if ($_SESSION["isVendor"] == true) { + header("location: vendor-dashboard.php"); +} ?> diff --git a/user-refund-history.php b/user-refund-history.php index b5f6722..944a02d 100644 --- a/user-refund-history.php +++ b/user-refund-history.php @@ -11,6 +11,12 @@ if ($_SESSION["userId"] <> "") { $_SESSION["isLoggedIn"] = false; header("location: login.php"); } + +if ($_SESSION["isVendor"] == true) { + header("location: vendor-dashboard.php"); +} + + ?> diff --git a/wishlist.php b/wishlist.php index 0ad2225..1b9e588 100644 --- a/wishlist.php +++ b/wishlist.php @@ -13,6 +13,10 @@ if ($_SESSION["userId"] <> "") { } else { $_SESSION["isLoggedIn"] = false; } + +if ($_SESSION["isVendor"] == true) { + header("location: vendor-dashboard.php"); +} ?> -- 2.40.1