From 6bc87298213ab67a3c30d675cf8e6b656f9edbed Mon Sep 17 00:00:00 2001 From: Sourabh782 Date: Tue, 15 Oct 2024 19:08:04 +0530 Subject: [PATCH] enhanced vendor ui --- Alimento | 1 - styles.css | 3 + vendor/add_menu.php | 134 +++++++++++++++++--- vendor/edit_menu.php | 218 ++++++++++++++++++++++++++++----- vendor/home.php | 147 ++++++++++++++++------ vendor/partials/_dbconnect.php | 2 +- 6 files changed, 421 insertions(+), 84 deletions(-) delete mode 160000 Alimento diff --git a/Alimento b/Alimento deleted file mode 160000 index e51cf80..0000000 --- a/Alimento +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e51cf80f93a17499e28c88dc9a55d7f14ef1eca0 diff --git a/styles.css b/styles.css index c9f4ecd..5715b5e 100644 --- a/styles.css +++ b/styles.css @@ -2,7 +2,10 @@ body { font-family: Arial, sans-serif; margin: 0; padding: 0; + max-width: 1140px; + margin: auto; } + header { background-color: #d5761d; diff --git a/vendor/add_menu.php b/vendor/add_menu.php index b400b99..ed34e55 100644 --- a/vendor/add_menu.php +++ b/vendor/add_menu.php @@ -28,36 +28,128 @@ Menu Information + + -

Menu Information |

- - - +
+ + +
+
+
+ + + +
+ - + " . $row['m_name'] . ""; //echo ""; echo ""; - echo ""; + if($row['m_type'] == "Veg"){ + echo ""; + } else { + echo ""; + } } } else { echo ""; @@ -82,7 +178,7 @@
Item ID Item Name Item Price Item Category
" . $row['item_description'] . "" . $row['m_price'] . "" . $row['m_type'] . " " . $row['m_type'] . " " . $row['m_type'] . "
ADD items in the menu to display here

Add to Menu

- +
@@ -98,9 +194,9 @@ echo ""; echo ""; echo ""; - echo ""; + echo ""; //echo ""; - echo ""; + echo ""; echo ""; + echo ""; echo ""; echo ""; $conn->close(); diff --git a/vendor/edit_menu.php b/vendor/edit_menu.php index c64bd15..539968f 100644 --- a/vendor/edit_menu.php +++ b/vendor/edit_menu.php @@ -29,34 +29,183 @@ Menu Information + + +
+ + +
+
+
-

Menu Information |

+ -
Item ID Item Name
Name:

" . $row['itPrice:

Category: "; - echo "
- +
+ - + " . $row['m_name'] . ""; //echo ""; echo ""; - echo ""; + if($row['m_type'] == "Veg"){ + echo ""; + } else { + echo ""; + } } } else { echo ""; @@ -79,14 +232,9 @@ ?>
Item ID Item Name Item Price Item Category
" . $row['item_description'] . "" . $row['m_price'] . "" . $row['m_type'] . " " . $row['m_type'] . " " . $row['m_type'] . "
ADD items in the menu to display here
- - - - - -

EDIT Menu

- +

Edit Menu

+
@@ -112,24 +260,28 @@ // Adding a form to update the item echo ""; echo ""; @@ -141,5 +293,15 @@ $conn->close(); ?>
Item ID Item Name"; + echo "
"; + echo ""; + + echo ""; + + echo ""; echo "
"; - echo ""; + echo ""; echo ""; + echo "
"; echo "
+ diff --git a/vendor/home.php b/vendor/home.php index f3f1884..eb1ed31 100644 --- a/vendor/home.php +++ b/vendor/home.php @@ -31,51 +31,119 @@ Order Information -
-

Alimento

- -
+
+ + +
+

+

Pending Order

- - - - - - - - - - - +
Order IDOrderNameAmountPhoneAddressUpdate OrderOrder Status
+ + + + + + + + + + + +
-

Menu Information | - - -

+ - + - + -
Order IDOrderNameAmountPhoneAddressUpdate OrderOrder Status
+
@@ -167,7 +240,11 @@ echo ""; echo ""; echo ""; - echo ""; + if($row['m_type'] == "Veg"){ + echo ""; + } else { + echo ""; + } echo ""; } } else { diff --git a/vendor/partials/_dbconnect.php b/vendor/partials/_dbconnect.php index 0de0415..f44ba48 100644 --- a/vendor/partials/_dbconnect.php +++ b/vendor/partials/_dbconnect.php @@ -5,7 +5,7 @@ $password = ""; $database = "homemadedb"; -$conn = mysqli_connect($server,$email, $password,$database); +$conn = mysqli_connect($server,$email, $password,$database, 3306); if(!$conn){ die("Error" . mysqli_connect_errno()); }
Item ID Item Name" . $row['m_id'] . "" . $row['m_name'] . "" . $row['m_price'] . "" . $row['m_type'] . " " . $row['m_type'] . " " . $row['m_type'] . "