Skip to content

Commit a1177b5

Browse files
authored
Add files via upload
1 parent 41c2a5c commit a1177b5

25 files changed

+2039
-0
lines changed

about.php

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<?php
2+
3+
include 'config.php';
4+
5+
session_start();
6+
7+
$user_id = $_SESSION['user_id'];
8+
9+
if(!isset($user_id)){
10+
header('location:login.php');
11+
}
12+
13+
?>
14+
15+
<!DOCTYPE html>
16+
<html lang="en">
17+
<head>
18+
<meta charset="UTF-8">
19+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
20+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
21+
<title>about</title>
22+
23+
<!-- font awesome cdn link -->
24+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
25+
26+
<!-- custom css file link -->
27+
<link rel="stylesheet" href="css/style.css">
28+
29+
</head>
30+
<body>
31+
32+
<?php include 'header.php'; ?>
33+
34+
<div class="heading">
35+
<h3>about us</h3>
36+
<p> <a href="home.php">home</a> / about </p>
37+
</div>
38+
39+
<section class="about">
40+
41+
<div class="flex">
42+
43+
<div class="image">
44+
<img src="images/grocery-items.jpeg" alt="">
45+
</div>
46+
47+
<div class="content">
48+
<h3>Why Kanhaiya E-commerce?</h3>
49+
<p>1. Quality Assurance: At Kanhaiya Grocery Store, we prioritize quality above all else, ensuring that our products meet the highest standards to satisfy our customers' needs.<br>
50+
2. Wide Variety: We offer an extensive range of fresh produce, pantry essentials, spices, and specialty items, providing a one-stop-shop experience for all your grocery needs.<br>
51+
3. Competitive Prices: Our commitment to offering competitive prices ensures that you get the best value for your money without compromising on quality.<br>
52+
</p>
53+
<a href="contact.php" class="btn">contact us</a>
54+
</div>
55+
56+
</div>
57+
58+
</section>
59+
60+
<section class="reviews">
61+
62+
<h1 class="title">customers's reviews</h1>
63+
64+
<div class="box-container">
65+
66+
<div class="box">
67+
<img src="images/my2.jpg" alt="">
68+
<p>"I stumbled upon Kanhaiya Grocery Store online and was pleasantly surprised by their wide variety of products. The website is user-friendly, making my shopping experience a breeze. The delivery was prompt, and the items were fresh. Definitely my go-to for groceries now!".</p>
69+
<div class="stars">
70+
<i class="fas fa-star"></i>
71+
<i class="fas fa-star"></i>
72+
<i class="fas fa-star"></i>
73+
<i class="fas fa-star"></i>
74+
<i class="fas fa-star"></i>
75+
</div>
76+
<h3>Rajesh Chaudhary</h3>
77+
</div>
78+
79+
<div class="box">
80+
<img src="images/my5.png" alt="">
81+
<p>"Decent selection, but the website could use some improvement. It's a bit clunky to navigate, especially on mobile devices. Nonetheless, the quality of the groceries is top-notch, and the prices are competitive. Just needs a smoother online experience."</p>
82+
<div class="stars">
83+
<i class="fas fa-star"></i>
84+
<i class="fas fa-star"></i>
85+
<i class="fas fa-star"></i>
86+
<i class="fas fa-star-half-alt"></i>
87+
</div>
88+
<h3>Vatsal Bhavsar</h3>
89+
</div>
90+
91+
<div class="box">
92+
<img src="images/my3.avif" alt="">
93+
<p>"Kanhaiya Grocery Store is fantastic! I love the convenience of ordering online, and the website is so easy to use. They have everything I need, and the delivery is always on time. Fresh produce and great customer service keep me coming back."</p>
94+
<div class="stars">
95+
<i class="fas fa-star"></i>
96+
<i class="fas fa-star"></i>
97+
<i class="fas fa-star"></i>
98+
<i class="fas fa-star"></i>
99+
<i class="fas fa-star-half-alt"></i>
100+
</div>
101+
<h3>Vishvendra Pratap Singh</h3>
102+
</div>
103+
104+
<div class="box">
105+
<img src="images/my.webp" alt="">
106+
<p>"Disappointing experience. The website promised a lot, but the actual products didn't match the descriptions. Some items were close to expiration, and the packaging was subpar. Improvement in quality control and accuracy on the site is much needed."</p>
107+
<div class="stars">
108+
<i class="fas fa-star"></i>
109+
<i class="fas fa-star"></i>
110+
<i class="fas fa-star-half-alt"></i>
111+
</div>
112+
<h3>Ravnit Singh</h3>
113+
</div>
114+
115+
<div class="box">
116+
<img src="images/my4.avif" alt="">
117+
<p>"Great variety and quality of products. The website layout is clean and simple to navigate. My orders have always been accurate, and the delivery service is reliable. If they add more organic options, it'd be perfect!"</p>
118+
<div class="stars">
119+
<i class="fas fa-star"></i>
120+
<i class="fas fa-star"></i>
121+
<i class="fas fa-star"></i>
122+
<i class="fas fa-star"></i>
123+
<i class="fas fa-star-half-alt"></i>
124+
</div>
125+
<h3>Aashish MIshra</h3>
126+
</div>
127+
128+
<div class="box">
129+
<img src="images/nigga.jpg" alt="">
130+
<p>"I can't recommend Kanhaiya Grocery Store enough! The website is intuitive, and the range of international products is impressive. Freshness is never compromised, and the delivery is lightning-fast. A gem for foodies!"</p>
131+
<div class="stars">
132+
<i class="fas fa-star"></i>
133+
<i class="fas fa-star"></i>
134+
<i class="fas fa-star"></i>
135+
<i class="fas fa-star"></i>
136+
</div>
137+
<h3>Sudhanshu Ranjan</h3>
138+
</div>
139+
140+
</div>
141+
142+
143+
144+
<?php include 'footer.php'; ?>
145+
146+
<!-- custom js file link -->
147+
<script src="js/script.js"></script>
148+
149+
</body>
150+
</html>

add_to_cart.php

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
include 'config.php'
4+
5+
?>

admin_contacts.php

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?php
2+
3+
include 'config.php';
4+
5+
session_start();
6+
7+
$admin_id = $_SESSION['admin_id'];
8+
9+
if(!isset($admin_id)){
10+
header('location:login.php');
11+
};
12+
13+
if(isset($_GET['delete'])){
14+
$delete_id = $_GET['delete'];
15+
mysqli_query($conn, "DELETE FROM `message` WHERE id = '$delete_id'") or die('query failed');
16+
header('location:admin_contacts.php');
17+
}
18+
19+
?>
20+
21+
<!DOCTYPE html>
22+
<html lang="en">
23+
<head>
24+
<meta charset="UTF-8">
25+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
26+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
27+
<title>messages</title>
28+
29+
<!-- font awesome cdn link -->
30+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
31+
32+
<!-- custom admin css file link -->
33+
<link rel="stylesheet" href="css/admin_style.css">
34+
35+
</head>
36+
<body>
37+
38+
<?php include 'admin_header.php'; ?>
39+
40+
<section class="messages">
41+
42+
<h1 class="title"> messages </h1>
43+
44+
<div class="box-container">
45+
<?php
46+
$select_message = mysqli_query($conn, "SELECT * FROM `message`") or die('query failed');
47+
if(mysqli_num_rows($select_message) > 0){
48+
while($fetch_message = mysqli_fetch_assoc($select_message)){
49+
50+
?>
51+
<div class="box">
52+
<p> user id : <span><?php echo $fetch_message['user_id']; ?></span> </p>
53+
<p> name : <span><?php echo $fetch_message['name']; ?></span> </p>
54+
<p> number : <span><?php echo $fetch_message['number']; ?></span> </p>
55+
<p> email : <span><?php echo $fetch_message['email']; ?></span> </p>
56+
<p> message : <span><?php echo $fetch_message['message']; ?></span> </p>
57+
<a href="admin_contacts.php?delete=<?php echo $fetch_message['id']; ?>" onclick="return confirm('delete this message?');" class="delete-btn">delete message</a>
58+
</div>
59+
<?php
60+
};
61+
}else{
62+
echo '<p class="empty">you have no messages!</p>';
63+
}
64+
?>
65+
</div>
66+
67+
</section>
68+
69+
70+
71+
72+
73+
74+
75+
76+
77+
<!-- custom admin js file link -->
78+
<script src="js/admin_script.js"></script>
79+
80+
</body>
81+
</html>

admin_header.php

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
if(isset($message)){
3+
foreach($message as $message){
4+
echo '
5+
<div class="message">
6+
<span>'.$message.'</span>
7+
<i class="fas fa-times" onclick="this.parentElement.remove();"></i>
8+
</div>
9+
';
10+
}
11+
}
12+
?>
13+
14+
<header class="header">
15+
16+
<div class="flex">
17+
18+
<a href="admin_page.php" class="logo">Admin<span>Panel</span></a>
19+
20+
<nav class="navbar">
21+
<a href="admin_page.php">home</a>
22+
<a href="admin_products.php">products</a>
23+
<a href="admin_orders.php">orders</a>
24+
<a href="admin_users.php">users</a>
25+
<a href="admin_contacts.php">messages</a>
26+
</nav>
27+
28+
<div class="icons">
29+
<div id="menu-btn" class="fas fa-bars"></div>
30+
<div id="user-btn" class="fas fa-user"></div>
31+
</div>
32+
33+
<div class="account-box">
34+
<p>username : <span><?php echo $_SESSION['admin_name']; ?></span></p>
35+
<p>email : <span><?php echo $_SESSION['admin_email']; ?></span></p>
36+
<a href="logout.php" class="delete-btn">logout</a>
37+
<div>new <a href="login.php">login</a> | <a href="register.php">register</a></div>
38+
</div>
39+
40+
</div>
41+
42+
</header>

admin_orders.php

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
3+
include 'config.php';
4+
5+
session_start();
6+
7+
$admin_id = $_SESSION['admin_id'];
8+
9+
if(!isset($admin_id)){
10+
header('location:login.php');
11+
}
12+
13+
if(isset($_POST['update_order'])){
14+
15+
$order_update_id = $_POST['order_id'];
16+
$update_payment = $_POST['update_payment'];
17+
mysqli_query($conn, "UPDATE `orders` SET payment_status = '$update_payment' WHERE id = '$order_update_id'") or die('query failed');
18+
$message[] = 'payment status has been updated!';
19+
20+
}
21+
22+
if(isset($_GET['delete'])){
23+
$delete_id = $_GET['delete'];
24+
mysqli_query($conn, "DELETE FROM `orders` WHERE id = '$delete_id'") or die('query failed');
25+
header('location:admin_orders.php');
26+
}
27+
28+
?>
29+
30+
<!DOCTYPE html>
31+
<html lang="en">
32+
<head>
33+
<meta charset="UTF-8">
34+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
35+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
36+
<title>orders</title>
37+
38+
<!-- font awesome cdn link -->
39+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
40+
41+
<!-- custom admin css file link -->
42+
<link rel="stylesheet" href="css/admin_style.css">
43+
44+
</head>
45+
<body>
46+
47+
<?php include 'admin_header.php'; ?>
48+
49+
<section class="orders">
50+
51+
<h1 class="title">placed orders</h1>
52+
53+
<div class="box-container">
54+
<?php
55+
$select_orders = mysqli_query($conn, "SELECT * FROM `orders`") or die('query failed');
56+
if(mysqli_num_rows($select_orders) > 0){
57+
while($fetch_orders = mysqli_fetch_assoc($select_orders)){
58+
?>
59+
<div class="box">
60+
<p> user id : <span><?php echo $fetch_orders['user_id']; ?></span> </p>
61+
<p> placed on : <span><?php echo $fetch_orders['placed_on']; ?></span> </p>
62+
<p> name : <span><?php echo $fetch_orders['name']; ?></span> </p>
63+
<p> number : <span><?php echo $fetch_orders['number']; ?></span> </p>
64+
<p> email : <span><?php echo $fetch_orders['email']; ?></span> </p>
65+
<p> address : <span><?php echo $fetch_orders['address']; ?></span> </p>
66+
<p> total products : <span><?php echo $fetch_orders['total_products']; ?></span> </p>
67+
<p> total price : <span>$<?php echo $fetch_orders['total_price']; ?>/-</span> </p>
68+
<p> payment method : <span><?php echo $fetch_orders['method']; ?></span> </p>
69+
<form action="" method="post">
70+
<input type="hidden" name="order_id" value="<?php echo $fetch_orders['id']; ?>">
71+
<select name="update_payment">
72+
<option value="" selected disabled><?php echo $fetch_orders['payment_status']; ?></option>
73+
<option value="pending">pending</option>
74+
<option value="completed">completed</option>
75+
</select>
76+
<input type="submit" value="update" name="update_order" class="option-btn">
77+
<a href="admin_orders.php?delete=<?php echo $fetch_orders['id']; ?>" onclick="return confirm('delete this order?');" class="delete-btn">delete</a>
78+
</form>
79+
</div>
80+
<?php
81+
}
82+
}else{
83+
echo '<p class="empty">no orders placed yet!</p>';
84+
}
85+
?>
86+
</div>
87+
88+
</section>
89+
90+
91+
92+
93+
94+
95+
96+
97+
98+
99+
<!-- custom admin js file link -->
100+
<script src="js/admin_script.js"></script>
101+
102+
</body>
103+
</html>

0 commit comments

Comments
 (0)