-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
185 lines (167 loc) · 7.45 KB
/
index.php
File metadata and controls
185 lines (167 loc) · 7.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<?php
session_start();
include 'include/db.php'; // Assuming this file sets up the PDO connection
// Fetch the username if user is logged in
$username = '';
if (isset($_SESSION['user_id'])) {
$stmt = $pdo->prepare("SELECT username FROM users WHERE id = ?");
$stmt->execute([$_SESSION['user_id']]);
$user = $stmt->fetch();
$username = $user ? htmlspecialchars($user['username']) : '';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>5025231274</title>
<link rel="stylesheet" href="styles/styles.css">
</head>
<body>
<nav class="navbar">
<div class="logo">
<a href="index.php"><img src="resources/EasyLek.png"></a>
</div>
<div class="navbar-container">
<ul class="nav-links" id="nav-links">
<li><a href="store.php">Store</a></li>
<li><a href="mobile.php">Mobile</a></li>
<li><a href="tv.php">TV</a></li>
<li><a href="computing.php">Computing</a></li>
<li><a href="#contact">Contact Us</a></li>
</ul>
</div>
<div class="nav-right">
<div class="nav-icons">
<div class="search-container">
<div class="search-icon" id="search-icon"></div>
<input type="text" class="search-bar" id="search-bar" placeholder="Search...">
</div>
<a href="cart.php"><img src="resources/shoppingcart.png"></a>
<?php if (isset($_SESSION['user_id'])): ?>
<!-- Show profile picture if logged in -->
<a href="#" id="user-icon">
<img src="<?php echo isset($_SESSION['image']) ? 'uploads/users/' . htmlspecialchars($_SESSION['image']) : 'resources/user.png'; ?>"
alt="Profile Picture" class="profile-pic">
</a>
<div class="user-dropdown" id="user-dropdown">
<ul>
<li><a href="profile.php"><?php echo $username; ?></a></li>
<li><a href="include/logout.php">Logout</a></li>
</ul>
</div>
<?php else: ?>
<!-- Show Register and Login links if not logged in -->
<a href="#" id="user-icon"><img src="resources/user.png"></a>
<div class="user-dropdown" id="user-dropdown">
<ul>
<li><a href="register.php">Register</a></li>
<li><a href="login.php">Login</a></li>
</ul>
</div>
<?php endif; ?>
</div>
<div class="hamburger" id="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</div>
</nav>
<div class="content">
<section id="home" class="home-section">
<div class="home-content">
<div class="home-text">
<h1>Power Meets Precision</h1>
<p>Experience top-tier gaming and performance with the Victus 16, featuring an NVIDIA RTX 4060 and Intel Core i7 for seamless multitasking.</p>
<form action="store.php" method="get">
<button type="submit" class="buy-now-btn">Buy now</button>
</form>
</div>
<div class="home-image">
<img src="uploads/products/victus16.png">
</div>
</div>
<div class="home-content">
<div class="home-text">
<h1>Crystal Clear Display</h1>
<p>Explore the beauty of high-definition displays with our newest line of Crystal UHD TVs. Now available with incredible savings.</p>
<form action="store.php" method="get">
<button type="submit" class="buy-now-btn">Shop now</button>
</form>
</div>
<div class="home-image">
<img src="uploads/products/samsungtv.png">
</div>
</div>
<div class="home-content">
<div class="home-text">
<h1>Power in Your Hands</h1>
<p>Featuring lightning-fast 5G connectivity, the Redmi Note 13 Pro offers a stunning display and top-notch performance with its Snapdragon processor.</p>
<form action="store.php" method="get">
<button type="submit" class="buy-now-btn">Buy now</button>
</form>
</div>
<div class="home-image">
<img src="uploads/products/redminote13pro5g.png">
</div>
</div>
<button class="carousel-control prev" id="prev">❮</button>
<button class="carousel-control next" id="next">❯</button>
</section>
</div>
<footer class="footer" id="contact">
<div class="footer-top">
<div class="footer-logo">
<a href="#">
<img src="resources/EasyLek.png" alt="Logo">
</a>
<p style="margin-left: 10px;"><b>The heart of tech</b></p>
<div class="footer-social" style="margin-left: 10px;">
<a href="https://www.instagram.com/arianzareihan/" target="_blank">
<img src="resources/instagram.png" alt="Instagram">
</a>
<a href="mailto:arianza429@gmail.com">
<img src="resources/email.png" alt="Email">
</a>
<a href="https://www.linkedin.com/in/reihan-arianza-970413261/?trk=public_profile_browsemap&originalSubdomain=id" target="_blank">
<img src="resources/linkedin.png" alt="LinkedIn">
</a>
<a href="https://x.com/Reihan00420665" target="_blank">
<img src="resources/twitter.png" alt="Twitter">
</a>
</div>
</div>
<div class="footer-links">
<div class="link-section">
<h4>More EasyLek</h4>
<ul>
<li><a href="#">Media</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">Programs</a></li>
<li><a href="#">Jobs in tech</a></li>
</ul>
</div>
<div class="link-section">
<h4>About EasyLek</h4>
<ul>
<li><a href="#">Partner with us</a></li>
<li><a href="#">Jobs</a></li>
<li><a href="#">Terms & Conditions</a></li>
<li><a href="#">Editorial Policy</a></li>
</ul>
</div>
</div>
</div>
<div class="footer-bottom">
<p>A Tech company</p>
<p>© 2024-2024</p>
</div>
</footer>
<script src="scripts/search.js"></script>
<script src="scripts/carousel.js"></script>
<script src="scripts/hamburger.js"></script>
<script src="scripts/user.js"></script>
</body>
</html>