-
Notifications
You must be signed in to change notification settings - Fork 0
/
winner.php
216 lines (182 loc) · 8.18 KB
/
winner.php
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?php
include "config.php";
session_start();
$user_email = $_SESSION['user_email']; // Get the user_id from the session
// Query to retrieve the data columns
$sql = "SELECT user_name, user_img FROM reg_user WHERE user_email = '$user_email'";
// Execute the query
$result = mysqli_query($connection, $sql);
if (mysqli_num_rows($result) > 0) {
// Fetch the result as an associative array
$row = mysqli_fetch_assoc($result);
}
$user_name = $row['user_name'];
$user_img = $row['user_img'];
?>
<html>
<head>
<title>BallotBox23</title>
<!--CSS-->
<link rel="stylesheet" href="css/winner.css">
<!--JS-->
<script>
// Calculate countdown time
function countdown() {
var now = new Date();
var endTime = new Date("2023-06-30"); // Set the end date and time of the voting period
var remainingTime = endTime - now;
// Calculate days, hours, minutes, and seconds
var days = Math.floor(remainingTime / (1000 * 60 * 60 * 24));
var hours = Math.floor((remainingTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((remainingTime % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((remainingTime % (1000 * 60)) / 1000);
// Display the countdown on the page
document.getElementById("countdown").innerHTML = days + "d " + hours + "h " + minutes + "m " + seconds + "s";
// Update the countdown every second
setTimeout(countdown, 1000);
}
window.addEventListener('load', countdown);
</script>
<!--Boxicons CSS-->
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
</head>
<body>
<!--Top Navigation bar -->
<div class="topnav">
<div class="topnav-bar">
<div class="logo">
<img src="img/logo2.png" class="img-logo">
</div>
<span class="name">BALLOTBOX 2023</span>
<div class="username-search">
<div class="username">
<ul class="username-links">
<li><a href="user_profile.php"><?php echo $user_name; ?></a></li>
<li>
<a href="user_profile.php">
<img src="data:image/jpg;charset=utf8;base64,<?php echo base64_encode($user_img); ?>" class="profile-img">
</a>
</li>
</ul>
</div>
<div class="searchbox">
<div class="search-field">
<input type="search" placeholder="Search...">
</div>
</div>
</div>
</div>
</div>
<!--Navigation-->
<div class="navigation">
<ul class="navbar-links">
<li><a href="home.php">Home</a></li>
<li><a href="winner.php" class="active">Winner</a></li>
<li><a href="nominee.php">Nominee</a></li>
<li><a href="category.php">Category</a></li>
</ul>
</div>
<!--Noname-->
<div class="noname">
<div class="winner-list">
<div class="winner-category">
<div class="winner">
<!-- Countdown -->
<div class="countdown">
<span id="countdown"></span> until winners are announced
</div>
</div>
</div>
<!--
<div class="winner">
<h2>Category Name Winner</h2>
<div class="display-winner">
<img src="img/profile.jpg" class="nominee-image">
<p><a href="#">Nominee Name</a></p>
</div>
</div>
<div class="winner">
<h2>Category Name Winner</h2>
<div class="display-winner">
<img src="img/profile.jpg" class="nominee-image">
<p><a href="#">Nominee Name</a></p>
</div>
</div>
<div class="winner">
<h2>Category Name Winner</h2>
<div class="display-winner">
<img src="img/profile.jpg" class="nominee-image">
<p><a href="#">Nominee Name</a></p>
</div>
</div>
<div class="winner">
<h2>Category Name Winner</h2>
<div class="display-winner">
<img src="img/profile.jpg" class="nominee-image">
<p><a href="#">Nominee Name</a></p>
</div>
</div>
<div class="winner">
<h2>Category Name Winner</h2>
<div class="display-winner">
<img src="img/profile.jpg" class="nominee-image">
<p><a href="#">Nominee Name</a></p>
</div>
</div> -->
</div>
</div>
</div>
<!--Footer-->
<footer class="footer-distributed">
<div class="footer-left">
<h3>BALLOTBOX2023</h3>
<p class="footer-links">
<a href="Home.php">Home</a>
|
<a href="about.html">About</a>
|
<a href="about.html">Contact</a>
|
<a href="#">Blog</a>
</p>
</div>
<div class="footer-center">
<div>
<i class="fa fa-address"></i>
<p>Ballotbox2023,Colombo 07,Sri Lanka</p>
</div>
<div>
<i class="fa fa-phone"></i>
<p>+91 2*9 6**7</p>
</div>
<div>
<i class="fa fa-envelope"></i>
<p><a>[email protected]</a></p>
</div>
</div>
<div class="footer-right">
<p class="footer-company-about">
<h4 class="text-light mb-4">Informations</h4>
<a class="btn btn-link" href="Terms and Conditions.html">Terms and Conditions</a><br>
<a class="btn btn-link" href="FAQ.html">FAQ</a><br>
<a class="btn btn-link" href="Privacy.html">Privacy</a>
</p>
<div class="footer-icons">
<img src="img\facebook.svg" width="10%" height="10%"><i class="fa-brands fa-facebook"></i></a>
<img src="img\instagram.svg" width="10%" height="10%"><i class="fa-brands fa-square-instagram"></i></a>
<img src="img\youtube.svg" width="10%" height="10%"><i class="fa-brands fa-youtube"></i></a>
<img src="img\twitter.svg" width="10%" height="10%"><i class="fa-brands fa-twitter"></i></a>
<img src="img\linkedin.svg" width="10%" height="10%"><i class="fa-brands fa-linkedin"></i></a>
</div>
</div>
</footer>
<div class="copyright">
<div class="row">
<div class="text-center mb-3 mb-md-0">
<B> © All Right Reserved.
Designed By <a class="border-bottom" href="index.html">BALLOTBOX 2023</B></a>
</div>
</div>
</div>
</body>
</html>