added error handling for user level page access #60

Merged
MarkHipe merged 1 commits from gelo_branch into main 2024-04-16 16:08:01 +08:00
4 changed files with 15 additions and 1 deletions

View File

@ -345,7 +345,7 @@ if ($_SESSION["userId"] <> "") {
?><?php
if ($_SESSION["isVendor"]) {
?>
<li><a class="dropdown-item" href="vendor-settings.php">My Account</a></li>
<li><a class="dropdown-item" href="vendor-dashboard.php">My Account</a></li>
<?php
} else {
?>

View File

@ -9,6 +9,10 @@ if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
if ($_SESSION["isVendor"] == true) {
header("location: vendor-dashboard.php");
}
?>
<!DOCTYPE html>
<html lang="en">

View File

@ -11,6 +11,12 @@ if ($_SESSION["userId"] <> "") {
$_SESSION["isLoggedIn"] = false;
header("location: login.php");
}
if ($_SESSION["isVendor"] == true) {
header("location: vendor-dashboard.php");
}
?>
<!DOCTYPE html>
<html lang="en">

View File

@ -13,6 +13,10 @@ if ($_SESSION["userId"] <> "") {
} else {
$_SESSION["isLoggedIn"] = false;
}
if ($_SESSION["isVendor"] == true) {
header("location: vendor-dashboard.php");
}
?>
<!DOCTYPE html>
<html lang="en">