From 4e14554c3357e76fb358602aeb43449385ce8efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Berk=20Ba=C5=9Fo=C4=9Flu?= Date: Tue, 9 Jul 2024 17:02:44 -0400 Subject: [PATCH] Updated the website. --- README.md | 2 +- action.php | 16 ++++++------ .../assets/img/{Capture.PNG => capture.png} | Bin admin/admin/products_list.php | 2 +- admin/admin/salesofday.php | 2 +- body.php | 24 ++++++++---------- database/storedatabase.sql | 8 +++--- homeaction.php | 8 +++--- product.php | 10 ++++---- products.php | 5 +++- store.php | 3 ++- 11 files changed, 40 insertions(+), 40 deletions(-) rename admin/admin/assets/img/{Capture.PNG => capture.png} (100%) diff --git a/README.md b/README.md index 66c210d..b63ae66 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A cool shopping site made using PHP, CSS, JavaScript and SQL. -Note: pricing slider and payment provider doesn't work. Also the code has security vulnerability against SQL injection. +Note: Payment provider doesn't work. Also the code has security vulnerability against SQL injection. # Installation diff --git a/action.php b/action.php index 0bf2892..9506351 100644 --- a/action.php +++ b/action.php @@ -126,10 +126,10 @@ if(isset($_POST["getProduct"])){
-
+

$cat_name

@@ -158,8 +158,8 @@ if(isset($_POST["getProduct"])){ echo "
- - + +
@@ -207,10 +207,10 @@ if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) || isse
-
+

$cat_name

@@ -239,8 +239,8 @@ if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) || isse echo "
- - + +
diff --git a/admin/admin/assets/img/Capture.PNG b/admin/admin/assets/img/capture.png similarity index 100% rename from admin/admin/assets/img/Capture.PNG rename to admin/admin/assets/img/capture.png diff --git a/admin/admin/products_list.php b/admin/admin/products_list.php index ceef303..56502ac 100644 --- a/admin/admin/products_list.php +++ b/admin/admin/products_list.php @@ -72,7 +72,7 @@ include "topheader.php"; $substr = substr($product_name,0,36); // $price = round($price*0.014,2); echo "$substr - RS $price + $price CAD "; if ($_SESSION['role'] != 'e') { diff --git a/admin/admin/salesofday.php b/admin/admin/salesofday.php index 4d63013..b93d4d4 100644 --- a/admin/admin/salesofday.php +++ b/admin/admin/salesofday.php @@ -35,7 +35,7 @@ include "topheader.php";
-

sales / Page

+

Sales Information

diff --git a/body.php b/body.php index 4af0087..2e33fa9 100644 --- a/body.php +++ b/body.php @@ -134,7 +134,7 @@ include 'db.php'; - $product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 70 AND 75"; + $product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 62 AND 67"; $run_query = mysqli_query($con,$product_query); if(mysqli_num_rows($run_query) > 0){ @@ -156,8 +156,6 @@
- -30% - NEW
@@ -188,8 +186,8 @@ echo "
- - + +
@@ -228,10 +226,9 @@ +
-
@@ -267,10 +264,9 @@
-
-
+ --> @@ -301,7 +297,7 @@ include 'db.php'; - $product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 59 AND 65"; + $product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 1 AND 7"; $run_query = mysqli_query($con,$product_query); if(mysqli_num_rows($run_query) > 0){ @@ -322,10 +318,10 @@
-
+

$cat_name

@@ -355,8 +351,8 @@ echo "
- - + +
diff --git a/database/storedatabase.sql b/database/storedatabase.sql index 18282fc..45938c4 100644 --- a/database/storedatabase.sql +++ b/database/storedatabase.sql @@ -3,7 +3,7 @@ -- https://www.phpmyadmin.net/ -- -- Host: localhost --- Generation Time: Jul 09, 2024 at 12:24 AM +-- Generation Time: Jul 09, 2024 at 09:58 PM -- Server version: 10.4.32-MariaDB -- PHP Version: 8.1.25 @@ -68,7 +68,7 @@ INSERT INTO `brands` (`brand_id`, `brand_title`) VALUES (1, 'HP'), (2, 'Samsung'), (3, 'Apple'), -(4, 'motorolla'), +(4, 'Motorolla'), (5, 'LG'), (6, 'Cloth Brand'); @@ -202,7 +202,7 @@ CREATE TABLE `orders_info` ( -- INSERT INTO `orders_info` (`order_id`, `user_id`, `f_name`, `email`, `address`, `city`, `state`, `zip`, `cardname`, `cardnumber`, `expdate`, `prod_count`, `total_amt`, `cvv`) VALUES -(1, 1, 'support', 'batuhanbasoglu@mailbox.org', 'Montreal, Quebec, Canada', 'Montreal', 'Quebec', 560074, 'pokjhgfcxc', '4321 2345 6788 7654', '12/90', 3, 77000, 1234); +(1, 1, 'Batuhan Basoglu', 'batuhanbasoglu@mailbox.org', 'Montreal, Quebec, Canada', 'Montreal', 'Quebec', 560074, 'pokjhgfcxc', '4321 2345 6788 7654', '12/90', 3, 667, 1234); -- -------------------------------------------------------- @@ -238,7 +238,7 @@ CREATE TABLE `products` ( `product_cat` int(100) NOT NULL, `product_brand` int(100) NOT NULL, `product_title` varchar(255) NOT NULL, - `product_price` int(100) NOT NULL, + `product_price` float NOT NULL, `product_desc` text NOT NULL, `product_image` text NOT NULL, `product_keywords` text NOT NULL diff --git a/homeaction.php b/homeaction.php index f0a3e64..2f2eeb4 100644 --- a/homeaction.php +++ b/homeaction.php @@ -125,10 +125,10 @@ if(isset($_POST["gethomeProduct"])){
-
+

$cat_name

@@ -158,8 +158,8 @@ if(isset($_POST["gethomeProduct"])){ echo "
- - + +
diff --git a/product.php b/product.php index 5828170..895a25f 100644 --- a/product.php +++ b/product.php @@ -168,7 +168,7 @@ include "header.php";