├── uploads ├── pp.jpg ├── ecom.jpg ├── 1730365027pixel 6.jpg ├── 1730365062Pixel-7.jpg ├── 1730364551asus rog.jpg ├── 1730364636citycell.jpg ├── 1730364761itel india.jpg ├── 1730364817nokia 3310.jpg ├── 1730364843nokia c100.jpg ├── 1730363318tcl folding.jpg ├── 1730363416tcl folding.jpg ├── 1730364523tcl folding.jpg ├── 1730364789motorola v3i.jpg ├── 1730364880philips diga.jpg ├── 6713720ad7ada3.70174707.jpg ├── 67137237af4169.38411104.jpg ├── 173096750681wyxedDeQL._AC_SY550_.jpg ├── 173096798851HfSy7vC8L._AC_SX569_.jpg ├── 173097001571j0zMW9aUL._AC_SY550_.jpg ├── 1733646800914jUAocoXL._AC_SY550_.jpg └── 1734598614Azu6hg0hiKh7fPNAKikWaJBTHqgLBdJY5WvhBqHs.jpg ├── logout.php ├── admin ├── connection.php ├── index.php ├── navbar.php ├── layout.php ├── footer.php ├── ajax │ └── category.php ├── sidebar.php ├── header.php ├── orders.php ├── add-product.php ├── all-product.php └── categories.php ├── db └── db.php ├── ajax ├── add-to-cart.php ├── search.php ├── cart-list.php └── checkout.php ├── components ├── hero.php ├── heroBottom.php └── latestProducts.php ├── order_success.php ├── my_orders.php ├── header.php ├── order_details.php ├── single-product.php ├── change-password.php ├── all-products.php ├── navbar.php ├── signin.php ├── profile-picture.php ├── signup.php ├── search.php ├── index.php ├── contact.php ├── footer.php ├── update-profile.php ├── checkout.php └── project83.sql /uploads/pp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/pp.jpg -------------------------------------------------------------------------------- /uploads/ecom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/ecom.jpg -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /uploads/1730365027pixel 6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730365027pixel 6.jpg -------------------------------------------------------------------------------- /uploads/1730365062Pixel-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730365062Pixel-7.jpg -------------------------------------------------------------------------------- /admin/connection.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /uploads/1730364551asus rog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364551asus rog.jpg -------------------------------------------------------------------------------- /uploads/1730364636citycell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364636citycell.jpg -------------------------------------------------------------------------------- /uploads/1730364761itel india.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364761itel india.jpg -------------------------------------------------------------------------------- /uploads/1730364817nokia 3310.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364817nokia 3310.jpg -------------------------------------------------------------------------------- /uploads/1730364843nokia c100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364843nokia c100.jpg -------------------------------------------------------------------------------- /uploads/1730363318tcl folding.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730363318tcl folding.jpg -------------------------------------------------------------------------------- /uploads/1730363416tcl folding.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730363416tcl folding.jpg -------------------------------------------------------------------------------- /uploads/1730364523tcl folding.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364523tcl folding.jpg -------------------------------------------------------------------------------- /uploads/1730364789motorola v3i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364789motorola v3i.jpg -------------------------------------------------------------------------------- /uploads/1730364880philips diga.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1730364880philips diga.jpg -------------------------------------------------------------------------------- /uploads/6713720ad7ada3.70174707.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/6713720ad7ada3.70174707.jpg -------------------------------------------------------------------------------- /uploads/67137237af4169.38411104.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/67137237af4169.38411104.jpg -------------------------------------------------------------------------------- /uploads/173096750681wyxedDeQL._AC_SY550_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/173096750681wyxedDeQL._AC_SY550_.jpg -------------------------------------------------------------------------------- /uploads/173096798851HfSy7vC8L._AC_SX569_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/173096798851HfSy7vC8L._AC_SX569_.jpg -------------------------------------------------------------------------------- /uploads/173097001571j0zMW9aUL._AC_SY550_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/173097001571j0zMW9aUL._AC_SY550_.jpg -------------------------------------------------------------------------------- /uploads/1733646800914jUAocoXL._AC_SY550_.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1733646800914jUAocoXL._AC_SY550_.jpg -------------------------------------------------------------------------------- /uploads/1734598614Azu6hg0hiKh7fPNAKikWaJBTHqgLBdJY5WvhBqHs.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asif-daffodil/project83/HEAD/uploads/1734598614Azu6hg0hiKh7fPNAKikWaJBTHqgLBdJY5WvhBqHs.jpg -------------------------------------------------------------------------------- /db/db.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | 6 |

Dashboard

7 |

Welcome to the admin dashboard.

8 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /ajax/add-to-cart.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['pid']); 5 | $query = "SELECT * FROM `products` WHERE `id` = $pid"; 6 | $result = $conn->query($query); 7 | $product = $result->fetch_assoc(); 8 | echo json_encode($product); 9 | } 10 | ?> -------------------------------------------------------------------------------- /ajax/search.php: -------------------------------------------------------------------------------- 1 | query($sql); 7 | if($result->num_rows > 0){ 8 | $products = $result->fetch_all(MYSQLI_ASSOC); 9 | echo json_encode($products); 10 | }else{ 11 | echo json_encode([]); 12 | } 13 | } 14 | ?> -------------------------------------------------------------------------------- /admin/navbar.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /admin/layout.php: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 | 9 |
10 |
11 | 12 |
13 | 14 |
15 |
16 |
17 |
18 | 19 | -------------------------------------------------------------------------------- /admin/footer.php: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /components/hero.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |

Shop the Latest Trends!

7 |

Explore our collection of fashion, electronics, and more at unbeatable prices. Quality products, fast delivery, and the best customer service.

8 | Shop Now 9 |
10 | 11 |
12 | E-commerce Hero Image 13 |
14 |
15 |
16 |
-------------------------------------------------------------------------------- /components/heroBottom.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 |
100% Money-back Guarantee
8 |

Get a refund if you're not satisfied!

9 |
10 | 11 |
12 | 13 |
Free Shipping
14 |

On all orders above $50.

15 |
16 | 17 |
18 | 19 |
24/7 Customer Support
20 |

We're here to help you anytime!

21 |
22 | 23 |
24 | 25 |
Secure Payment
26 |

100% secure payments for peace of mind.

27 |
28 |
29 |
30 |
-------------------------------------------------------------------------------- /order_success.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM orders WHERE id = $order_id")->fetch_assoc(); 12 | $order_items = $conn->query("SELECT * FROM order_items WHERE order_id = $order_id"); 13 | 14 | ?> 15 |
16 |
17 |
18 |

Thank you for your order!

19 |
20 |
21 |

Order ID:

22 |

Total Price: $

23 |

Order Items:

24 |
    25 | fetch_assoc()) { ?> 26 |
  • 27 | Product ID: , 28 | Quantity: , 29 | Price: $ 30 |
  • 31 | 32 |
33 |
34 |
35 |
36 | 37 | -------------------------------------------------------------------------------- /admin/ajax/category.php: -------------------------------------------------------------------------------- 1 | real_escape_string($_POST['name']); 5 | if (!empty($name)) { 6 | if($cn->query("INSERT INTO `categories` (`name`) VALUES ('$name')")){ 7 | echo "success"; 8 | }else{ 9 | echo "failed"; 10 | } 11 | 12 | } else { 13 | echo "Please fill all the fields"; 14 | } 15 | } 16 | 17 | if(isset($_POST['editId'])){ 18 | $id = $cn->real_escape_string($_POST['id']); 19 | $result = $cn->query("SELECT * FROM `categories` WHERE `id` = $id"); 20 | $data = $result->fetch_assoc(); 21 | echo json_encode($data); 22 | } 23 | 24 | if(isset($_POST['editCategory'])){ 25 | $id = $cn->real_escape_string($_POST['id']); 26 | $name = $cn->real_escape_string($_POST['name']); 27 | if (!empty($name)) { 28 | if($cn->query("UPDATE `categories` SET `name` = '$name' WHERE `id` = $id")){ 29 | echo "success"; 30 | }else{ 31 | echo "failed"; 32 | } 33 | 34 | } else { 35 | echo "Please fill all the fields"; 36 | } 37 | } 38 | 39 | if (isset($_POST['deleteCategory'])) { 40 | $id = $cn->real_escape_string($_POST['id']); 41 | if($cn->query("DELETE FROM `categories` WHERE `id` = $id")){ 42 | echo "success"; 43 | }else{ 44 | echo "failed"; 45 | } 46 | } 47 | ?> -------------------------------------------------------------------------------- /ajax/cart-list.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM products WHERE id = $pid")->fetch_assoc(); 9 | $cartItems[] = $product; 10 | } 11 | foreach ($cartItems as $i => $item) { 12 | ?> 13 |
14 |
15 | <?= $item['name'] ?> 16 |
17 |
18 |
19 |

Price: $

20 |
21 |
22 | 23 | 24 | 25 |
26 |
27 | 28 |
29 |
30 | -------------------------------------------------------------------------------- /components/latestProducts.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM products ORDER BY id DESC LIMIT 0, 8")->fetch_all(MYSQLI_ASSOC); 3 | ?> 4 |
5 |

Latest Products

6 | 7 |
8 |
9 | <?= $product['name'] ?> 10 |
11 | 12 |
13 |
14 |

15 | BDT 16 | BDT 17 |

18 | 21 |
22 |
23 |
24 | 25 | 26 |
27 | View All 28 |
29 |
30 | -------------------------------------------------------------------------------- /my_orders.php: -------------------------------------------------------------------------------- 1 | window.location = 'signin.php'"; 6 | exit; 7 | } 8 | 9 | $user_id = intval($_SESSION['user']['id']); 10 | 11 | // Fetch orders for the current logged-in user 12 | $stmt = $conn->prepare("SELECT * FROM orders WHERE user_id = ? ORDER BY created_at DESC"); 13 | $stmt->bind_param('i', $user_id); 14 | $stmt->execute(); 15 | $orders = $stmt->get_result(); 16 | 17 | ?> 18 | 19 |
20 |

My Orders

21 | num_rows > 0) { ?> 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | fetch_assoc()) { ?> 33 | 34 | 35 | 36 | 37 | 40 | 41 | 42 | 43 |
Order IDTotal PriceOrder DateAction
$ 38 | View Details 39 |
44 | 45 |

You have no orders yet.

46 | 47 |
48 | 49 | close(); 51 | require_once 'footer.php'; // Your footer 52 | -------------------------------------------------------------------------------- /admin/sidebar.php: -------------------------------------------------------------------------------- 1 | 4 |

Ghazi Shop

5 | -------------------------------------------------------------------------------- /admin/header.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Bootstrap demo 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | Bootstrap demo 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 43 | -------------------------------------------------------------------------------- /order_details.php: -------------------------------------------------------------------------------- 1 | window.location = 'my_orders.php'"; 6 | exit; 7 | } 8 | 9 | $order_id = intval($_GET['order_id']); 10 | 11 | // Fetch order details 12 | $stmt = $conn->prepare("SELECT * FROM orders WHERE id = ?"); 13 | $stmt->bind_param('i', $order_id); 14 | $stmt->execute(); 15 | $order = $stmt->get_result()->fetch_assoc(); 16 | 17 | // Fetch order items and their status 18 | $stmt_items = $conn->prepare("SELECT * FROM order_items WHERE order_id = ?"); 19 | $stmt_items->bind_param('i', $order_id); 20 | $stmt_items->execute(); 21 | $order_items = $stmt_items->get_result(); 22 | 23 | ?> 24 | 25 |
26 |

Order Details - ID:

27 |

Total Price: $

28 |

Order Date:

29 | 30 |

Order Items:

31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | fetch_assoc()) { ?> 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
Product IDQuantityPriceStatus
$
51 |
52 | 53 | close(); 55 | $stmt_items->close(); 56 | require_once './footer.php'; 57 | ?> 58 | -------------------------------------------------------------------------------- /single-product.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM products WHERE id = $pid"); 5 | $product->num_rows == 0 && header("Location: index.php"); 6 | $product = $product->fetch_assoc(); 7 | ?> 8 |
9 |
10 |
11 | <?= $product['name'] ?> 12 |
13 |
14 |

15 |

BDT

16 |

17 | Add to Cart 18 |
19 |
20 | 21 | query("SELECT * FROM products WHERE id != $pid ORDER BY RAND() LIMIT 0, 4")->fetch_all(MYSQLI_ASSOC); 23 | ?> 24 |
25 |

You May Also Like

26 | 27 |
28 |
29 | <?= $product['name'] ?> 30 |
31 | 32 |
33 |
34 |

35 | BDT 36 | BDT 37 |

38 |
39 |
40 |
41 | 42 |
43 |
44 | -------------------------------------------------------------------------------- /ajax/checkout.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |

Items

7 |
8 |
9 | query("SELECT * FROM products WHERE id = $pid")->fetch_assoc(); 17 | $cartItems[] = $product; 18 | } 19 | foreach ($cartItems as $i => $item) { 20 | ?> 21 |
22 | 23 |
24 | <?= $item['name'] ?> 25 |
26 | 27 |
28 |
29 |

Price: $

30 |
31 | 32 |
33 | 34 | 35 | 36 |
37 | 38 |
39 |

Total: $

40 | 41 |
42 | 43 |
44 | 45 |
46 |
47 | 51 | 52 |
53 |
54 |
Total Price:
55 |
56 |
-------------------------------------------------------------------------------- /change-password.php: -------------------------------------------------------------------------------- 1 | query($sql); 13 | if($result->num_rows > 0){ 14 | $user = $result->fetch_assoc(); 15 | if(password_verify($old_password,$user['password'])){ 16 | if($new_password == $confirm_password){ 17 | $new_password = password_hash($new_password,PASSWORD_DEFAULT); 18 | $sql = "UPDATE `users` SET `password` = '$new_password' WHERE `id` = $id"; 19 | if($conn->query($sql)){ 20 | echo ""; 21 | echo ""; 22 | }else{ 23 | echo ""; 24 | } 25 | }else{ 26 | echo ""; 27 | } 28 | }else{ 29 | echo ""; 30 | } 31 | }else{ 32 | echo ""; 33 | } 34 | } 35 | ?> 36 |
37 |
38 |
39 |
40 |
41 |

Change Password

42 |
43 |
44 |
45 |
46 | 47 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | -------------------------------------------------------------------------------- /all-products.php: -------------------------------------------------------------------------------- 1 | window.location = 'all-products.php?page=1'"; 5 | exit; // Make sure to stop further execution after the redirect. 6 | } 7 | $pageNo = $_GET['page']; 8 | $limit = 8; 9 | $offset = ($pageNo - 1) * $limit; 10 | $sql = "SELECT * FROM `products` LIMIT $offset, $limit"; 11 | $result = $conn->query($sql); 12 | $totalProducts = $conn->query("SELECT * FROM `products`")->num_rows; 13 | $totalPages = ceil($totalProducts / $limit); 14 | $products = $result->fetch_all(MYSQLI_ASSOC); 15 | ?> 16 |
17 |
18 |
19 | All Products 20 |
21 | 24 |
25 |
26 | <?= $product['name'] ?> 27 |
28 |
29 |

30 | Price: 31 | 32 | 33 |

34 | 35 | 36 | 37 | 40 |
41 |
42 |
43 | 44 | 45 |
46 | 63 |
64 |
65 |
66 | 67 | 70 | -------------------------------------------------------------------------------- /navbar.php: -------------------------------------------------------------------------------- 1 | 4 | 61 | 62 |
63 |
64 |
Cart List
65 | 66 |
67 |
68 |
69 | 70 |
71 |
-------------------------------------------------------------------------------- /signin.php: -------------------------------------------------------------------------------- 1 | query($sql); 31 | if ($result->num_rows > 0) { 32 | $row = $result->fetch_assoc(); 33 | if (password_verify($password, $row['password'])) { 34 | $_SESSION['user'] = $row; 35 | echo ""; 36 | echo ""; 37 | } else { 38 | echo ""; 39 | } 40 | } else { 41 | echo ""; 42 | } 43 | } 44 | ?> 45 |
46 |
47 |
48 |
49 |
50 |

Sign In

51 |
52 |
53 |
54 |
55 | 56 | 59 |
60 |
61 |
62 | 63 | 65 |
66 |
67 |
68 | 70 |
71 |
72 | 73 |
74 | Don't have any account? Sign Up 75 |
76 |
77 |
78 |
79 |
80 |
81 | 84 | -------------------------------------------------------------------------------- /profile-picture.php: -------------------------------------------------------------------------------- 1 | query($sql)){ 25 | $_SESSION['user']['img'] = $profile_picture_destination; 26 | echo ""; 27 | echo ""; 28 | }else{ 29 | echo ""; 30 | } 31 | }else{ 32 | echo ""; 33 | } 34 | }else{ 35 | echo ""; 36 | } 37 | }else{ 38 | echo ""; 39 | } 40 | } 41 | ?> 42 |
43 |
44 |
45 |
46 |
47 |

Profile Picture

48 |
49 |
50 | " alt="" id="profile_picture_preview" class="img-fluid mb-3" style="max-height: 150px"> 51 |
52 |
53 | 54 | 55 |
56 |
57 | 58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | 77 | -------------------------------------------------------------------------------- /signup.php: -------------------------------------------------------------------------------- 1 | query($sql)) { 44 | echo ""; 45 | echo ""; 46 | } else { 47 | echo ""; 48 | } 49 | } 50 | } 51 | ?> 52 |
53 |
54 |
55 |
56 |
57 |

Sign Up

58 |
59 |
60 |
61 |
62 | 63 | 66 |
67 |
68 |
69 | 70 | 73 |
74 |
75 |
76 | 77 | 79 |
80 |
81 |
82 | 83 |
84 |
85 | Already have an account? Sign In 86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | 94 | 97 | -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |

Search

6 |
7 |
8 |
9 |
10 | 11 | 12 |
13 | 17 |
18 |
19 |
20 | 21 |
22 | prepare("SELECT * FROM `products` WHERE `name` LIKE ?"); 32 | 33 | // Bind the search term to the query 34 | $stmt->bind_param("s", $searchTerm); 35 | 36 | // Execute the query 37 | $stmt->execute(); 38 | 39 | // Get the result of the query 40 | $result = $stmt->get_result(); 41 | 42 | // Check if any products were found 43 | if ($result->num_rows > 0) { 44 | while ($product = $result->fetch_assoc()) { 45 | ?> 46 |
47 |
48 | <?= $product['name'] ?> 49 |
50 |
51 |

52 | Price: 53 | 54 | 55 |

56 | 57 | 58 | 59 | 62 |
63 |
64 |
65 | 67 |
68 |
69 | No products found for "" 70 |
71 |
72 | 73 |
74 | 75 | 76 | 97 | 98 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 6 |
7 | 8 |
9 | 10 | toastr.success('Your Message has been sent')"; 63 | } else { 64 | echo ""; 65 | } 66 | } 67 | } 68 | ?> 69 | 70 |
71 | 72 |
73 |
74 |
75 | 76 | 77 |
78 |
79 |
80 | 81 | 82 |
83 |
84 |
85 | 86 | 87 |
88 |
89 |
90 | 91 | 92 |
93 |
94 | 95 |
96 |
97 |
98 | 99 | 102 | -------------------------------------------------------------------------------- /admin/orders.php: -------------------------------------------------------------------------------- 1 | prepare("UPDATE order_items SET status = ? WHERE id = ?"); 14 | $stmt->bind_param('si', $status, $order_item_id); 15 | $stmt->execute(); 16 | 17 | echo "

Order item status updated successfully.

"; 18 | } 19 | 20 | ?> 21 |

22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | query("SELECT `orders`.* FROM `orders` GROUP BY `orders`.`id`")->fetch_all(MYSQLI_ASSOC); 37 | 38 | foreach ($orders as $i => $order) { 39 | ?> 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 51 |
SNOrder IDOrder DateTotal PriceStatus
$ 46 | Update Items Status 47 |
52 | query("SELECT * FROM order_items WHERE order_id = $order_id")->fetch_all(MYSQLI_ASSOC); 57 | 58 | if ($order_items) { ?> 59 |

Order Items for Order ID:

60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 91 | 92 | 93 | 94 |
Item IDProduct IDQuantityPriceStatusActions
$ 80 |
81 | 82 | 88 | 89 |
90 |
95 | 96 |

No items found for this order.

97 | 99 | 100 | 104 | 108 | 119 | 120 | -------------------------------------------------------------------------------- /contact.php: -------------------------------------------------------------------------------- 1 | toastr.success('Your Message has been sent')"; 56 | } else { 57 | echo ""; 58 | } 59 | } 60 | } 61 | ?> 62 | 63 |
64 |

Contact Us

65 |
66 |
67 |
68 |
69 | 70 | 73 |
74 |
75 |
76 | 77 | 80 |
81 |
82 |
83 | 84 | 87 |
88 |
89 |
90 | 91 | 93 |
94 |
95 | 97 |
98 |
99 |
100 |
101 |

Address

102 |

123, ABC Road, Dhaka, Bangladesh

103 |
104 |
105 |

Email

106 |

contact@example.com

107 |
108 |
109 |

Phone

110 |

+880 1234 567890

111 |
112 |
113 |

Working Hours

114 |

Monday - Friday: 9:00 AM - 5:00 PM

115 |
116 |
117 |

Follow Us

118 | 119 | 120 | 121 |
122 |
123 |
124 |
125 |
126 | 130 |
131 |
132 |
133 |
134 | 135 | 138 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 36 | 37 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /admin/add-product.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM `categories`"); 4 | function get_content() 5 | { 6 | ob_start(); 7 | $cn = mysqli_connect('localhost', 'root', '', 'project83'); 8 | if (isset($_POST['addProduct'])) { 9 | function safeData ($data) { 10 | $data = trim($data); 11 | $data = stripslashes($data); 12 | $data = htmlspecialchars($data); 13 | return $data; 14 | } 15 | $name = $cn->real_escape_string(safeData($_POST['name'])); 16 | $regular_price = $cn->real_escape_string(safeData($_POST['regular_price'])); 17 | $sale_price = $cn->real_escape_string(safeData($_POST['sale_price'])); 18 | $category = $cn->real_escape_string(safeData($_POST['category'])); 19 | $description = $cn->real_escape_string(string: safeData($_POST['description'])); 20 | $stocks = $cn->real_escape_string(safeData($_POST['stocks'])); 21 | $image = $_FILES['image']['name']; 22 | $tmp_name = $_FILES['image']['tmp_name']; 23 | if(empty($name)){ 24 | $errName = "Please fill the name"; 25 | }else{ 26 | $crrName = $name; 27 | } 28 | 29 | if(empty($regular_price)){ 30 | $errRegular_price = "Please fill the regular price"; 31 | }else{ 32 | $crrRegular_price = $regular_price; 33 | } 34 | 35 | if(empty($sale_price)){ 36 | $errSale_price = "Please fill the sale price"; 37 | }else{ 38 | $crrSale_price = $sale_price; 39 | } 40 | 41 | if(empty($category)){ 42 | $errCategory = "Please fill the category"; 43 | }else{ 44 | $crrCategory = $category; 45 | } 46 | 47 | if(empty($description)){ 48 | $errDescription = "Please fill the description"; 49 | }else{ 50 | $crrDescription = $description; 51 | } 52 | 53 | if(empty($stocks)){ 54 | $errStocks = "Please fill the stocks"; 55 | }else{ 56 | $crrStocks = $stocks; 57 | } 58 | 59 | if(empty($image)){ 60 | $errImage = "Please fill the image"; 61 | } 62 | 63 | // create new image name 64 | $image = time() . $image; 65 | if(!empty($crrName) && !empty($crrRegular_price) && !empty($crrSale_price) && !empty($crrCategory) && !empty($crrDescription) && !empty($image) && !empty($crrStocks)){ 66 | $query = "INSERT INTO `products` (`name`, `regular_price`, `sale_price`, `category_id`, `description`, `stocks`, `image`) VALUES ('$name', $regular_price, $sale_price, '$category', '$description', $stocks, '$image')"; 67 | $cn->query($query); 68 | move_uploaded_file($tmp_name, "../uploads/$image"); 69 | echo ""; 70 | } 71 | } 72 | 73 | ?> 74 |

Add Product

75 |
76 |
77 |
78 |
79 | 80 | 81 |
82 | 83 |
84 |
85 |
86 | 87 | 88 |
89 | 90 |
91 |
92 |
93 | 94 | 95 |
96 | 97 |
98 |
99 |
100 | 101 | 112 |
113 | 114 |
115 |
116 |
117 | 118 | 121 |
122 | 123 |
124 |
125 |
126 | 127 | 128 |
129 | 130 |
131 |
132 |
133 | 134 | 135 |
136 | 137 |
138 |
139 | 140 |
141 |
142 |
143 | 146 |
147 |
148 | 149 | 179 | -------------------------------------------------------------------------------- /admin/all-product.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | real_escape_string($_POST['name']); 11 | $regular_price = $cn->real_escape_string($_POST['regular_price']); 12 | $sale_price = $cn->real_escape_string($_POST['sale_price']); 13 | $category = $cn->real_escape_string($_POST['category']); 14 | $description = $cn->real_escape_string($_POST['description']); 15 | $oldImg = $cn->real_escape_string($_POST['oldImg']); 16 | $image = $_FILES['image']['name']; 17 | $tmp_name = $_FILES['image']['tmp_name']; 18 | if (!empty($name) && !empty($regular_price) && !empty($sale_price) && !empty($category) && !empty($description)) { 19 | if (!empty($image)) { 20 | unlink("../uploads/$oldImg"); 21 | $image = time() . $image; 22 | move_uploaded_file($tmp_name, "../uploads/$image"); 23 | $cn->query("UPDATE products SET name = '$name', regular_price = $regular_price, sale_price = $sale_price, category_id = $category, description = '$description', image = '$image' WHERE id = $id"); 24 | } else { 25 | $cn->query("UPDATE products SET name = '$name', regular_price = $regular_price, sale_price = $sale_price, category_id = $category, description = '$description' WHERE id = $id"); 26 | } 27 | echo ""; 28 | } else { 29 | echo ""; 30 | } 31 | } 32 | 33 | if (isset($_POST['deleteProduct'])) { 34 | $id = $_POST['id']; 35 | $product = $cn->query("SELECT * FROM products WHERE id = $id")->fetch_assoc(); 36 | unlink("../uploads/" . $product['image']); 37 | $cn->query("DELETE FROM products WHERE id = $id"); 38 | echo ""; 39 | } 40 | 41 | $products = $cn->query("SELECT `products`.*, `categories`.`name` AS `catName` FROM `products` INNER JOIN `categories` ON `products`.`category_id` = `categories`.`id`")->fetch_all(MYSQLI_ASSOC); 42 | ob_start(); 43 | ?> 44 |

45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 69 | 70 | 71 | 72 |
SNImageProduct NamePriceCategoryActions
<?= $product['name'] ?> 66 | Edit 67 | Delete 68 |
73 | query("SELECT `products`.*, `categories`.`name` AS `catName` FROM `products` INNER JOIN `categories` ON `products`.`category_id` = `categories`.`id` WHERE `products`.`id` = $id")->fetch_assoc(); 76 | $categories = $cn->query("SELECT * FROM `categories`"); 77 | ?> 78 |
79 |
80 |
81 | 82 | 83 |
84 | 85 | 86 |
87 |
88 | 89 | 90 |
91 |
92 | 93 | 94 |
95 |
96 | 97 | 106 |
107 |
108 | 109 | 110 |
111 |
112 | 113 | 114 |
115 |
116 | 117 |
118 |
119 |
120 |
121 | 124 |
125 |
126 | 127 |
128 |
129 |

Are you sure you want to delete this product?

130 |
131 | 132 | 133 | No 134 |
135 |
136 |
137 | 138 | 139 | 143 | 147 | 158 | 159 | 180 | -------------------------------------------------------------------------------- /admin/categories.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM `categories`"); 7 | ?> 8 |
9 |
10 |
11 |
12 |
13 |

Categories

14 |

Welcome to the admin categories.

15 |
16 |
17 | 20 |
21 |
22 |
23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | fetch_assoc()) : 37 | ?> 38 | 39 | 40 | 41 | 49 | 50 | 51 | 52 |
SNCategory NameActions
42 | 45 | 48 |
53 |
54 |
55 |
56 | 57 | 58 | 78 | 79 | 80 | 100 | 101 | 102 | 118 | 119 | 247 | -------------------------------------------------------------------------------- /update-profile.php: -------------------------------------------------------------------------------- 1 | real_escape_string(validate($name)); 25 | } 26 | 27 | if (empty($email)) { 28 | $errEmail = "Please enter email"; 29 | } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { 30 | $errEmail = "Please enter valid email"; 31 | } else { 32 | if ($email != $_SESSION['user']['email']) { 33 | $sql = "SELECT * FROM `users` WHERE `email` = '$email'"; 34 | $result = $conn->query($sql); 35 | if ($result->num_rows > 0) { 36 | $errEmail = "Email already exists"; 37 | } else { 38 | $crrEmail = $conn->real_escape_string(validate($email)); 39 | } 40 | } else { 41 | $crrEmail = $conn->real_escape_string(validate($email)); 42 | } 43 | } 44 | 45 | if (empty($address_line_1)) { 46 | $errAddressLine1 = "Please enter address line 1"; 47 | } else { 48 | $crrAddressLine1 = $conn->real_escape_string(validate($address_line_1)); 49 | } 50 | 51 | if (!empty($address_line_2)) { 52 | $crrAddressLine2 = $conn->real_escape_string(validate($address_line_2)); 53 | }else{ 54 | $crrAddressLine2 = null; 55 | } 56 | 57 | if (empty($city)) { 58 | $errCity = "Please enter city"; 59 | } else { 60 | $crrCity = $conn->real_escape_string(validate($city)); 61 | } 62 | 63 | if (empty($state)) { 64 | $errState = "Please enter state"; 65 | } else { 66 | $crrState = $conn->real_escape_string(validate($state)); 67 | } 68 | 69 | if (empty($zip)) { 70 | $errZip = "Please enter zip"; 71 | } else { 72 | $crrZip = $conn->real_escape_string(validate($zip)); 73 | } 74 | 75 | if (empty($country)) { 76 | $errCountry = "Please select country"; 77 | } else { 78 | $crrCountry = $conn->real_escape_string(validate($country)); 79 | } 80 | 81 | if (empty($phone)) { 82 | $errPhone = "Please enter phone"; 83 | } else { 84 | $crrPhone = $conn->real_escape_string(validate($phone)); 85 | } 86 | 87 | $id = $_SESSION['user']['id']; 88 | 89 | if(isset($crrName) && isset($crrEmail) && isset($crrAddressLine1) && isset($crrCity) && isset($crrState) && isset($crrZip) && isset($crrCountry) && isset($crrPhone)){ 90 | $sql = "UPDATE `users` SET `name` = '$crrName', `email` = '$crrEmail', `address_line_1` = '$crrAddressLine1', `address_line_2` = '$crrAddressLine2', `city` = '$crrCity', `state` = '$crrState', `zip` = '$crrZip', `country` = '$crrCountry', `phone` = '$crrPhone' WHERE `id` = '$id'"; 91 | if($conn->query($sql)){ 92 | $sql = "SELECT * FROM `users` WHERE `id` = '$id'"; 93 | $result = $conn->query($sql); 94 | if($result->num_rows > 0){ 95 | $row = $result->fetch_assoc(); 96 | $_SESSION['user'] = $row; 97 | echo ""; 98 | } 99 | }else{ 100 | echo ""; 101 | } 102 | } 103 | } 104 | ?> 105 |
106 |
107 |
108 |
109 |
110 |

Update Profile

111 |
112 |
113 |
114 |
115 |
116 | 117 |
118 | 119 | " value=""> 120 |
121 | 122 |
123 |
124 | 125 |
126 | 127 | " value=""> 128 |
129 | 130 |
131 |
132 | 133 |
134 | 135 | " value=""> 136 |
137 | 138 |
139 |
140 | 141 |
142 | 143 | 144 |
145 | 146 |
147 | 148 | " value=""> 149 |
150 | 151 |
152 |
153 |
154 |
155 | 156 |
157 | 158 | " value=""> 159 |
160 | 161 |
162 |
163 | 164 |
165 | 166 | " value=""> 167 |
168 | 169 |
170 |
171 | 172 |
173 | 174 | 184 |
185 | 186 |
187 |
188 | 189 |
190 | 191 | " value=""> 192 |
193 | 194 |
195 |
196 |
197 |
198 |
199 | 200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 | -------------------------------------------------------------------------------- /checkout.php: -------------------------------------------------------------------------------- 1 | window.location = 'signin.php'"; 5 | } 6 | $countries = array("Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cabo Verde", "Cambodia", "Cameroon", "Canada", "Central African Republic", "Chad", "Chile", "China", "Colombia", "Comoros", "Congo", "Congo (Democratic Republic of the)", "Costa Rica", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Eswatini", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea (North)", "Korea (South)", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Montenegro", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepal", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "North Macedonia", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "South Sudan", "Spain", "Sri Lanka", "Sudan", "Suriname", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Timor-Leste", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"); 7 | 8 | if ($_SERVER['REQUEST_METHOD'] == 'POST') { 9 | // Validate and sanitize input 10 | $name = $conn->real_escape_string(validate($_POST['name'])); 11 | $email = $conn->real_escape_string(validate($_POST['email'])); 12 | $phone = $conn->real_escape_string(validate($_POST['phone'])); 13 | $address_line_1 = $conn->real_escape_string(validate($_POST['address_line_1'])); 14 | $address_line_2 = $conn->real_escape_string(validate($_POST['address_line_2'])); 15 | $city = $conn->real_escape_string(validate($_POST['city'])); 16 | $state = $conn->real_escape_string(validate($_POST['state'])); 17 | $zip = $conn->real_escape_string(validate($_POST['zip'])); 18 | $country = $conn->real_escape_string(validate($_POST['country'])); 19 | $payment_method = $conn->real_escape_string(validate($_POST['paymentMethod'])); 20 | $transaction_id = isset($_POST['trxid']) ? $conn->real_escape_string(validate($_POST['trxid'])) : null; 21 | 22 | // Get cart data from localStorage (passed via AJAX) 23 | $cart = json_decode($_POST['cart'], true); 24 | 25 | // Calculate total price 26 | $total_price = 0; 27 | foreach ($cart as $item) { 28 | $product = $conn->query("SELECT sale_price FROM products WHERE id = " . $item['id'])->fetch_assoc(); 29 | $total_price += $product['sale_price'] * $item['qty']; 30 | } 31 | 32 | // Insert into `orders` table 33 | $user_id = $_SESSION['user']['id']; 34 | $sql = "INSERT INTO `orders` (`user_id`, `name`, `email`, `phone`, `address_line_1`, `address_line_2`, `city`, `state`, `zip`, `country`, `payment_method`, `transaction_id`, `total_price`) 35 | VALUES ('$user_id', '$name', '$email', '$phone', '$address_line_1', '$address_line_2', '$city', '$state', '$zip', '$country', '$payment_method', '$transaction_id', '$total_price')"; 36 | if ($conn->query($sql)) { 37 | $order_id = $conn->insert_id; 38 | 39 | // Insert into `order_items` table 40 | foreach ($cart as $item) { 41 | $product_id = $item['id']; 42 | $quantity = $item['qty']; 43 | $product = $conn->query("SELECT sale_price FROM products WHERE id = $product_id")->fetch_assoc(); 44 | $price = $product['sale_price']; 45 | 46 | $conn->query("INSERT INTO `order_items` (`order_id`, `product_id`, `quantity`, `price`) 47 | VALUES ('$order_id', '$product_id', '$quantity', '$price')"); 48 | } 49 | 50 | // Clear cart (optional) 51 | echo ""; 52 | 53 | // toastr notification 54 | echo ""; 55 | 56 | // Redirect to a success page after 1 second 57 | echo ""; 58 | 59 | } else { 60 | echo "Error: " . $conn->error; 61 | } 62 | } 63 | 64 | ?> 65 |
66 |
67 |
68 |
69 |
70 | 71 |
72 | 73 | 74 | ' . $errName . '
' : ''; ?> 75 |
76 |
77 |
78 | 79 | 80 | ' . $errEmail . '
' : ''; ?> 81 |
82 |
83 | 84 | 85 | ' . $errPhone . '
' : ''; ?> 86 |
87 |
88 |
89 | 90 | 91 | ' . $errAddressLine1 . '
' : ''; ?> 92 |
93 |
94 | 95 | 96 |
97 |
98 |
99 | 100 | 101 | ' . $errCity . '
' : ''; ?> 102 |
103 |
104 | 105 | 106 | ' . $errState . '
' : ''; ?> 107 | 108 |
109 | 110 | 111 | ' . $errZip . '
' : ''; ?> 112 | 113 | 114 |
115 | 116 | 124 | ' . $errCountry . '
' : ''; ?> 125 | 126 | 127 | 128 |
129 | 130 |
131 |
132 |
133 | 134 |
135 | 136 |
137 |
138 |

Payment Methods

139 |
140 |
141 | 142 | 143 |
144 | 145 |
146 | 147 | 148 | 149 |
150 | 151 |
152 | 153 | 154 | 155 |
156 | 157 |
158 | 159 | 160 | 161 |
162 |
163 |
164 | 165 |
166 |
167 | 168 | 169 | 170 | 212 | -------------------------------------------------------------------------------- /project83.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.1 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Jan 04, 2025 at 10:01 AM 7 | -- Server version: 10.4.32-MariaDB 8 | -- PHP Version: 8.2.12 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `project83` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `categories` 28 | -- 29 | 30 | CREATE TABLE `categories` ( 31 | `id` int(11) NOT NULL, 32 | `name` varchar(255) NOT NULL, 33 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 34 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 35 | 36 | -- 37 | -- Dumping data for table `categories` 38 | -- 39 | 40 | INSERT INTO `categories` (`id`, `name`, `created_at`) VALUES 41 | (1, 'Cloth', '2024-12-07 08:57:33'), 42 | (2, 'Mobile', '2024-12-07 08:59:03'), 43 | (3, 'Sports', '2024-12-12 09:13:27'), 44 | (4, 'Politics', '2024-12-12 09:17:17'); 45 | 46 | -- -------------------------------------------------------- 47 | 48 | -- 49 | -- Table structure for table `contact_messages` 50 | -- 51 | 52 | CREATE TABLE `contact_messages` ( 53 | `id` int(11) NOT NULL, 54 | `name` varchar(255) NOT NULL, 55 | `email` varchar(255) NOT NULL, 56 | `subject` varchar(255) NOT NULL, 57 | `message` mediumtext NOT NULL, 58 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 59 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 60 | 61 | -- 62 | -- Dumping data for table `contact_messages` 63 | -- 64 | 65 | INSERT INTO `contact_messages` (`id`, `name`, `email`, `subject`, `message`, `created_at`) VALUES 66 | (1, 'Aimman Ghazi', 'aiman@ghazi.com', 'SSL Certificate', 'My ssl certificate has been updated successfully.', '2024-11-23 08:54:23'); 67 | 68 | -- -------------------------------------------------------- 69 | 70 | -- 71 | -- Table structure for table `orders` 72 | -- 73 | 74 | CREATE TABLE `orders` ( 75 | `id` int(11) NOT NULL, 76 | `user_id` int(11) NOT NULL, 77 | `name` varchar(255) NOT NULL, 78 | `email` varchar(255) NOT NULL, 79 | `phone` varchar(20) NOT NULL, 80 | `address_line_1` varchar(255) NOT NULL, 81 | `address_line_2` varchar(255) DEFAULT NULL, 82 | `city` varchar(100) NOT NULL, 83 | `state` varchar(100) NOT NULL, 84 | `zip` varchar(20) NOT NULL, 85 | `country` varchar(100) NOT NULL, 86 | `payment_method` enum('Cash on Delivery','bKash','Nagad','Rocket') NOT NULL, 87 | `transaction_id` varchar(255) DEFAULT NULL, 88 | `total_price` decimal(10,2) NOT NULL, 89 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 90 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 91 | 92 | -- 93 | -- Dumping data for table `orders` 94 | -- 95 | 96 | INSERT INTO `orders` (`id`, `user_id`, `name`, `email`, `phone`, `address_line_1`, `address_line_2`, `city`, `state`, `zip`, `country`, `payment_method`, `transaction_id`, `total_price`, `created_at`) VALUES 97 | (1, 3, 'Asif Abir', 'asif@dti.ac', '01955517560', '9 Sher-E-Bangla Road', 'Hazaribagh', 'Dhaka', 'Dhaka', '1209', 'Bangladesh', 'Cash on Delivery', '', 4500.00, '2025-01-04 08:18:49'), 98 | (2, 3, 'Asif Abir', 'asif@dti.ac', '01955517560', '9 Sher-E-Bangla Road', 'Hazaribagh', 'Dhaka', 'Dhaka', '1209', 'Bangladesh', 'bKash', '', 27000.00, '2025-01-04 08:20:30'); 99 | 100 | -- -------------------------------------------------------- 101 | 102 | -- 103 | -- Table structure for table `order_items` 104 | -- 105 | 106 | CREATE TABLE `order_items` ( 107 | `id` int(11) NOT NULL, 108 | `order_id` int(11) NOT NULL, 109 | `product_id` int(11) NOT NULL, 110 | `quantity` int(11) NOT NULL, 111 | `price` decimal(10,2) NOT NULL, 112 | `status` enum('pending','shipped','delivered','canceled') DEFAULT 'pending' 113 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 114 | 115 | -- 116 | -- Dumping data for table `order_items` 117 | -- 118 | 119 | INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `quantity`, `price`, `status`) VALUES 120 | (1, 1, 16, 1, 500.00, 'pending'), 121 | (2, 1, 15, 2, 2000.00, 'pending'), 122 | (3, 2, 11, 1, 12000.00, 'delivered'), 123 | (4, 2, 10, 1, 3000.00, 'delivered'), 124 | (5, 2, 9, 1, 12000.00, 'delivered'); 125 | 126 | -- -------------------------------------------------------- 127 | 128 | -- 129 | -- Table structure for table `products` 130 | -- 131 | 132 | CREATE TABLE `products` ( 133 | `id` int(11) NOT NULL, 134 | `name` varchar(255) NOT NULL, 135 | `category_id` int(11) NOT NULL, 136 | `regular_price` int(11) NOT NULL, 137 | `sale_price` int(11) NOT NULL, 138 | `stocks` int(11) NOT NULL, 139 | `image` varchar(255) NOT NULL, 140 | `description` longtext NOT NULL, 141 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 142 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 143 | 144 | -- 145 | -- Dumping data for table `products` 146 | -- 147 | 148 | INSERT INTO `products` (`id`, `name`, `category_id`, `regular_price`, `sale_price`, `stocks`, `image`, `description`, `created_at`) VALUES 149 | (1, 'T-Shirt', 1, 1500, 1250, 20, '173096750681wyxedDeQL._AC_SY550_.jpg', '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

', '2024-10-26 08:41:12'), 150 | (3, 'Tcl Folding', 1, 6000, 5000, 20, '1730364523tcl folding.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:48:43'), 151 | (4, 'Asus Rog', 1, 20000, 15000, 20, '1730364551asus rog.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:49:11'), 152 | (5, 'Citycell', 1, 5000, 4000, 20, '1730364636citycell.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:50:36'), 153 | (6, 'iTel India', 1, 10000, 8000, 20, '1730364761itel india.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:52:41'), 154 | (7, 'Motorola V3i', 1, 13000, 11000, 20, '1730364789motorola v3i.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:53:09'), 155 | (8, 'Nokia 3310', 1, 3500, 2800, 20, '1730364817nokia 3310.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:53:37'), 156 | (9, 'Nokia C100', 1, 15000, 12000, 20, '1730364843nokia c100.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:54:03'), 157 | (10, 'Philips Diga', 1, 3500, 3000, 20, '1730364880philips diga.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:54:40'), 158 | (11, 'pixel 6', 1, 15000, 12000, 20, '1730365027pixel 6.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:57:07'), 159 | (12, 'pixel 7', 1, 15000, 12000, 20, '1730365062Pixel-7.jpg', '<p><strong>Lorem Ipsum</strong><span style="background-color:rgb(255,255,255);color:rgb(0,0,0);"> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span></p>', '2024-10-31 08:57:42'), 160 | (13, 'Stylish T-Shirt', 1, 1200, 950, 20, '173096798851HfSy7vC8L._AC_SX569_.jpg', '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

', '2024-11-07 08:26:28'), 161 | (14, 'Wome\'s T-shirt', 1, 2000, 1650, 20, '173097001571j0zMW9aUL._AC_SY550_.jpg', '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

', '2024-11-07 09:00:15'), 162 | (15, 'Pant2', 1, 3000, 2000, 20, '1733646800914jUAocoXL._AC_SY550_.jpg', '

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

', '2024-12-08 08:33:20'), 163 | (16, 'Haat Ghori', 1, 15000, 500, 1000, '1734598614Azu6hg0hiKh7fPNAKikWaJBTHqgLBdJY5WvhBqHs.jpg', '<p>Best hang clock from Mujahidul Isalm</p>', '2024-12-19 08:56:54'); 164 | 165 | -- -------------------------------------------------------- 166 | 167 | -- 168 | -- Table structure for table `users` 169 | -- 170 | 171 | CREATE TABLE `users` ( 172 | `id` int(11) NOT NULL, 173 | `name` varchar(100) NOT NULL, 174 | `email` varchar(150) NOT NULL, 175 | `password` varchar(100) NOT NULL, 176 | `img` varchar(100) DEFAULT NULL, 177 | `role` enum('admin','user') NOT NULL DEFAULT 'user', 178 | `address_line_1` varchar(255) NOT NULL, 179 | `address_line_2` varchar(255) NOT NULL, 180 | `city` varchar(255) NOT NULL, 181 | `state` varchar(255) NOT NULL, 182 | `zip` varchar(100) NOT NULL, 183 | `country` varchar(255) NOT NULL, 184 | `phone` varchar(50) NOT NULL, 185 | `created_at` timestamp NOT NULL DEFAULT current_timestamp() 186 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 187 | 188 | -- 189 | -- Dumping data for table `users` 190 | -- 191 | 192 | INSERT INTO `users` (`id`, `name`, `email`, `password`, `img`, `role`, `address_line_1`, `address_line_2`, `city`, `state`, `zip`, `country`, `phone`, `created_at`) VALUES 193 | (1, 'Aiman Ghazi', 'aiman@ghazi.com', '$2y$10$cxJM2XjLzFr6aSzqcWJKvuUBD.klPbEAgx56VFpC3rf5.o2C/2KIS', NULL, 'user', '', '', '', '', '', '0', '', '2024-10-19 08:12:14'), 194 | (2, 'Protikkha Tanwi', 'protikkha@tanwi.com', '$2y$10$1FB53J52EOmYK2Gxi6WjOOsND4WYgA4XaVHpH/34GyzaJnvaEuPI6', NULL, 'user', '', '', '', '', '', '0', '', '2024-10-19 08:14:39'), 195 | (3, 'Asif Abir', 'asif@dti.ac', '$2y$10$F2eKjhc95Q4cOX.QNCeIO.iF/crAjzkJHkWToruxZR.xBqNBG88Li', 'uploads/67137237af4169.38411104.jpg', 'admin', '9 Sher-E-Bangla Road', 'Hazaribagh', 'Dhaka', 'Dhaka', '1209', 'Bangladesh', '01955517560', '2024-10-19 08:15:36'), 196 | (4, 'Muzahidul Islam', 'muzahid@gmail.com', '$2y$10$w9Jg25vt/6pdqpxUjLvure.VCXRbKgYSIjFXPJjLPDu.6Nps0f31u', NULL, 'user', '', '', '', '', '', '0', '', '2024-10-19 08:17:17'), 197 | (5, 'Golam Mostafa', 'golam@mostofa.com', '$2y$10$y5x6lk.wwlJoEuDU4l3tTOh2ryYTqCnn5VJhT7kPORJz6k9W8tG3e', NULL, 'user', '', '', '', '', '', '0', '', '2024-10-19 08:20:53'), 198 | (6, 'Ayan', 'ayan@gmail.com', '$2y$10$hh36/Vr7kzvXefQO30CP1O.ba9UnhtaumH0MHfY8yfDiYbhAH2Vma', NULL, 'user', '', '', '', '', '', '0', '', '2024-10-19 08:22:57'); 199 | 200 | -- 201 | -- Indexes for dumped tables 202 | -- 203 | 204 | -- 205 | -- Indexes for table `categories` 206 | -- 207 | ALTER TABLE `categories` 208 | ADD PRIMARY KEY (`id`); 209 | 210 | -- 211 | -- Indexes for table `contact_messages` 212 | -- 213 | ALTER TABLE `contact_messages` 214 | ADD PRIMARY KEY (`id`); 215 | 216 | -- 217 | -- Indexes for table `orders` 218 | -- 219 | ALTER TABLE `orders` 220 | ADD PRIMARY KEY (`id`); 221 | 222 | -- 223 | -- Indexes for table `order_items` 224 | -- 225 | ALTER TABLE `order_items` 226 | ADD PRIMARY KEY (`id`), 227 | ADD KEY `order_id` (`order_id`), 228 | ADD KEY `product_id` (`product_id`); 229 | 230 | -- 231 | -- Indexes for table `products` 232 | -- 233 | ALTER TABLE `products` 234 | ADD PRIMARY KEY (`id`), 235 | ADD KEY `category_id` (`category_id`); 236 | 237 | -- 238 | -- Indexes for table `users` 239 | -- 240 | ALTER TABLE `users` 241 | ADD PRIMARY KEY (`id`); 242 | 243 | -- 244 | -- AUTO_INCREMENT for dumped tables 245 | -- 246 | 247 | -- 248 | -- AUTO_INCREMENT for table `categories` 249 | -- 250 | ALTER TABLE `categories` 251 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 252 | 253 | -- 254 | -- AUTO_INCREMENT for table `contact_messages` 255 | -- 256 | ALTER TABLE `contact_messages` 257 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 258 | 259 | -- 260 | -- AUTO_INCREMENT for table `orders` 261 | -- 262 | ALTER TABLE `orders` 263 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; 264 | 265 | -- 266 | -- AUTO_INCREMENT for table `order_items` 267 | -- 268 | ALTER TABLE `order_items` 269 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 270 | 271 | -- 272 | -- AUTO_INCREMENT for table `products` 273 | -- 274 | ALTER TABLE `products` 275 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; 276 | 277 | -- 278 | -- AUTO_INCREMENT for table `users` 279 | -- 280 | ALTER TABLE `users` 281 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; 282 | 283 | -- 284 | -- Constraints for dumped tables 285 | -- 286 | 287 | -- 288 | -- Constraints for table `order_items` 289 | -- 290 | ALTER TABLE `order_items` 291 | ADD CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE, 292 | ADD CONSTRAINT `order_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE; 293 | 294 | -- 295 | -- Constraints for table `products` 296 | -- 297 | ALTER TABLE `products` 298 | ADD CONSTRAINT `products_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`); 299 | COMMIT; 300 | 301 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 302 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 303 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 304 | --------------------------------------------------------------------------------