From d63720dd1515cec2033dd0e3fd1753b019bd106f Mon Sep 17 00:00:00 2001 From: Vimal M <109758195+Vimall03@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:01:34 +0530 Subject: [PATCH] fixed bugs --- menu.php | 2 +- vendor/add_menu.php | 10 ++++++++-- vendor/delete_menu.php | 2 +- vendor/edit_menu.php | 8 +++++++- vendor/home.php | 2 +- vendor/vendor_login.php | 7 +++---- vendor/vendor_signup.php | 2 +- 7 files changed, 22 insertions(+), 11 deletions(-) diff --git a/menu.php b/menu.php index e836ac2..2ec3c09 100644 --- a/menu.php +++ b/menu.php @@ -203,7 +203,7 @@ function convertCartToArray(cart) {
'; if ($row['m_type'] == "Veg") { echo ''; - } else { + } else if ($row['m_type'] == "Non-Veg") { echo ''; } echo '
diff --git a/vendor/add_menu.php b/vendor/add_menu.php index dcd7823..ba260f2 100644 --- a/vendor/add_menu.php +++ b/vendor/add_menu.php @@ -4,7 +4,7 @@ $rid = $_SESSION['r_id']; // Check if the user is logged in or redirect to the login page -if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] != true) { +if (!isset($_SESSION['vendorloggedin']) || $_SESSION['vendorloggedin'] != true) { header("location: user_login.php"); exit; } @@ -101,7 +101,13 @@ echo "Name:
"; //echo "" . $row['it"; echo "Price:
"; - echo "Category:
"; + + + echo "Category: "; + echo ""; echo ""; echo ""; diff --git a/vendor/delete_menu.php b/vendor/delete_menu.php index 1b5cb20..c9de422 100644 --- a/vendor/delete_menu.php +++ b/vendor/delete_menu.php @@ -4,7 +4,7 @@ $rid = $_SESSION['r_id']; // Check if the user is logged in or redirect to the login page -if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] != true) { +if (!isset($_SESSION['vendorloggedin']) || $_SESSION['vendorloggedin'] != true) { header("location: user_login.php"); exit; } diff --git a/vendor/edit_menu.php b/vendor/edit_menu.php index de439ae..e854e3d 100644 --- a/vendor/edit_menu.php +++ b/vendor/edit_menu.php @@ -4,7 +4,7 @@ $rid = $_SESSION['r_id']; // Check if the user is logged in or redirect to the login page -if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] != true) { +if (!isset($_SESSION['vendorloggedin']) || $_SESSION['vendorloggedin'] != true) { header("location: user_login.php"); exit; } @@ -116,6 +116,12 @@ //echo "Description:
"; echo "Price:
"; echo "Category:
"; + + echo "Category: "; + echo ""; echo ""; echo "
"; diff --git a/vendor/home.php b/vendor/home.php index 60afba7..13f87d2 100644 --- a/vendor/home.php +++ b/vendor/home.php @@ -2,7 +2,7 @@ session_start(); include 'partials/_dbconnect.php'; $rid = $_SESSION['r_id']; -if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] != true) { +if (!isset($_SESSION['vendorloggedin']) || $_SESSION['vendorloggedin'] != true) { header("location: vendor_login.php"); exit; } diff --git a/vendor/vendor_login.php b/vendor/vendor_login.php index 31e2ad1..0afed3c 100644 --- a/vendor/vendor_login.php +++ b/vendor/vendor_login.php @@ -1,5 +1,4 @@ diff --git a/vendor/vendor_signup.php b/vendor/vendor_signup.php index a29d9c4..b4d4087 100644 --- a/vendor/vendor_signup.php +++ b/vendor/vendor_signup.php @@ -156,7 +156,7 @@ -

Already have an account? Log In

+

Already have an account? Log In