added error handling for routes on vendor pages

This commit is contained in:
jouls 2024-04-26 15:47:05 +08:00
parent 88ae2713bb
commit 0dd203aba2
2 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,11 @@ if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
if ($_SESSION["isCustomer"] == true) {
header("location: user-profile.php");
}
$products = productList();
?>
<!--=========================================================

View File

@ -15,6 +15,11 @@ if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
if ($_SESSION["isCustomer"] == true) {
header("location: user-profile.php");
}
if (isset($_GET['id'])) {
$_SESSION['vendorOrderId'] = $_GET['id'];
}