-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsecondround.php
More file actions
261 lines (225 loc) · 10.8 KB
/
secondround.php
File metadata and controls
261 lines (225 loc) · 10.8 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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<?php
include 'connect.php';
?>
<!DOCTYPE html>
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Leaderboard SRKR SPELLBEE</title>
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="Metronic Shop UI description" name="description">
<meta content="Metronic Shop UI keywords" name="keywords">
<meta content="keenthemes" name="author">
<meta property="og:site_name" content="-CUSTOMER VALUE-">
<meta property="og:title" content="-CUSTOMER VALUE-">
<meta property="og:description" content="-CUSTOMER VALUE-">
<meta property="og:type" content="website">
<meta property="og:image" content="-CUSTOMER VALUE-"><!-- link to image for socio -->
<meta property="og:url" content="-CUSTOMER VALUE-">
<link rel="shortcut icon" href="favicon.ico">
<!-- Fonts START -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Pathway+Gothic+One|PT+Sans+Narrow:400+700|Source+Sans+Pro:200,300,400,600,700,900&subset=all" rel="stylesheet" type="text/css">
<!-- Fonts END -->
<!-- Global styles BEGIN -->
<link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- Global styles END -->
<!-- Page level plugin styles BEGIN -->
<link href="assets/pages/css/animate.css" rel="stylesheet">
<link href="assets/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet">
<!-- Page level plugin styles END -->
<!-- Theme styles BEGIN -->
<link href="assets/pages/css/components.css" rel="stylesheet">
<link href="assets/pages/css/slider.css" rel="stylesheet">
<link href="assets/onepage/css/style.css" rel="stylesheet">
<link href="assets/onepage/css/style-responsive.css" rel="stylesheet">
<link href="assets/onepage/css/themes/red.css" rel="stylesheet" id="style-color">
<link href="assets/onepage/css/custom.css" rel="stylesheet">
<!-- Theme styles END -->
<style type='text/css'>
.blink {
animation: blink-animation 3s steps(5, start) infinite;
-webkit-animation: blink-animation 3s steps(5, start) infinite;
}
@keyframes blink-animation {
to {
visibility: hidden;
}
}
@-webkit-keyframes blink-animation {
to {
visibility: hidden;
}
}
td,
th {
padding: 5px;
font-size: 13px;
}
/* Change the color of visited links */
a:visited {
color: #FFFFFF;
/* Change to your desired color */
}
/* Change the color of links when hovered over */
a:hover {
color: rgb(201, 30, 62);
/* Change to your desired color */
}
/* Change the color of active links (when clicked) */
a:active {
color: #FFFFFF;
/* Change to your desired color */
}
/* Change the default link color */
a {
color: #FFFFFF;
/* Change to your desired color */
}
</style>
</head>
<!--DOC: menu-always-on-top class to the body element to set menu on top -->
<body class="menu-always-on-top">
<!-- Header BEGIN -->
<?php include "header.php"; ?>
<!-- Header END -->
<br><br>
<!-- Services block BEGIN -->
<div class="services-block content content-center" id="services">
<h2><strong><b>SRKR SPELLBEE PRIZES</b></strong></h2>
<div class="container">
<div class="ab-trio">
<img src="assets/onepage/img/trio.png" alt="" class="img-responsive">
</div>
<br>
<h2 style='font-size:24px;'><strong>TOP TEN </strong>PRIZES</h2>
</div>
</div>
<!-- Services block END -->
<!-- Facts block BEGIN -->
<div class="facts-block content content-center" id="a">
<?php
$depr = mysqli_query($conn, "SELECT * FROM `users` WHERE `place` = '2027'");
$one = mysqli_num_rows($depr);
$depr = mysqli_query($conn, "SELECT * FROM `users` WHERE `place` = '2026' ");
$two = mysqli_num_rows($depr);
$depr = mysqli_query($conn, "SELECT * FROM `users` WHERE `place` = '2025'");
$three = mysqli_num_rows($depr);
$depr = mysqli_query($conn, "SELECT * FROM `users` WHERE `place` = '2024' ");
$four = mysqli_num_rows($depr);
$total = $one + $two + $three + $four;
$leaderboard = mysqli_query($conn, "SELECT * FROM `users` ORDER BY `points` DESC limit 183");
?>
<h2>TOTAL REGISTRATIONS : <?php echo $total; ?></h2>
<div class="container">
<div class="row">
<a href="year_wise_leaderboard.php?year=2027">
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="item">
<strong><?php echo $one; ?></strong>
FIRST YEAR <br> REGISTRATIONS
</div>
</div>
</a>
<a href="year_wise_leaderboard.php?year=2026">
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="item">
<strong><?php echo $two; ?></strong>
SECOND YEAR <br> REGISTRATIONS
</div>
</div>
</a>
<a href="year_wise_leaderboard.php?year=2025">
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="item">
<strong><?php echo $three; ?></strong>
THIRD YEAR <br> REGISTRATIONS
</div>
</div>
</a>
<a href="year_wise_leaderboard.php?year=2024">
<div class="col-md-3 col-sm-3 col-xs-6">
<div class="item">
<strong><?php echo $four; ?></strong>
FOURTH YEAR <br> REGISTRATIONS
</div>
</div>
</a>
</div>
</div>
</div>
<!-- Facts block END -->
<!-- Team block BEGIN -->
<div class="team-block content content-center margin-bottom-40" id="team">
<div class="container">
<h2>SRKR SPELLBEE <strong>SECOND ROUND SELECTED</strong></h2>
<h4>These are the students selected for Second Round of<strong>SRKR SPELLBEE</strong> .<br></h4>
<div class="col-md-12">
<center>
<table style='background-color:#FFFFFF;text-align:center;' border='1' cellspacing='1' cellpadding='3'>
<tr bgcolor='#DC143C' style='color:#FFFFFF;text-align:center;text-align:center;'>
<th>S.NO</th>
<th>ROLL NUMBER</th>
<th>STUDENT NAME</th>
<th>YEAR</th>
<th>SCORE</th>
<th>SECTION. RANK</th>
<th>DEPT. RANK</th>
<th>YEAR RANK</th>
<th>OVERALL RANK</th>
</tr>
<?php
$sino = 1;
while ($lbord = mysqli_fetch_assoc($leaderboard)) {
$deptrank = 1;
$sectionrank = 1;
$yearrank = 1;
$sectionranks = mysqli_query($conn, "SELECT `pid` FROM `users` where `department` = '{$lbord['department']}' and `place` = '{$lbord['place']}' and `section` = '{$lbord['section']}' ORDER BY `points` DESC , `lastseen` DESC");
$deptranks = mysqli_query($conn, "SELECT `pid` FROM `users` where `department` = '{$lbord['department']}' ORDER BY `points` DESC , `lastseen` DESC");
$yearranks = mysqli_query($conn, "SELECT `pid` FROM `users` where `place` = '{$lbord['place']}' ORDER BY `points` DESC , `lastseen` DESC");
while ($orank = mysqli_fetch_assoc($deptranks)) {
if ($orank['pid'] == "{$lbord['pid']}") break;
else $deptrank++;
}
while ($orank = mysqli_fetch_assoc($yearranks)) {
if ($orank['pid'] == "{$lbord['pid']}") break;
else $yearrank++;
}
while ($orank = mysqli_fetch_assoc($sectionranks)) {
if ($orank['pid'] == "{$lbord['pid']}") break;
else $sectionrank++;
}
if ($lbord['place'] == '2027') {
$year = "FIRST YEAR";
} elseif ($lbord['place'] == '2026') {
$year = "SECOND YEAR";
} elseif ($lbord['place'] == '2025') {
$year = "THIRD YEAR";
} elseif ($lbord['place'] == '2024') {
$year = "FOURTH YEAR";
}
$deprank = $sino;
if($lbord['points'] == NULL){
$lbord['points'] = "YET TO PLAY";
$sectionrank = "YET TO PLAY";
$deptrank = "YET TO PLAY";
$yearrank = "YET TO PLAY";
$deprank = "YET TO PLAY";
}
print "<tr><td align='center'>" . $sino . "</td><td align='center'><font color='#DC143C'> " . strtoupper($lbord['regno']) . "</font></td><td style='text-align: left;'><b>" . strtoupper($lbord['player_name']) . "</b></td><td style='text-align: left;'>" . $year . "</td><td align='center'>" . $lbord['points'] . "</td><td align='center'>" . $sectionrank . "</td><td align='center'>" . $deptrank . "</td><td align='center'>" . $yearrank . "</td><td align='center'><strong>" . $deprank . "</strong></td></tr>";
$sino++;
}
echo "</table></center><br><br>";
?>
</div>
<h4>The Remaing registred Students haven't take you exam <br>
You are requested to take your exam at any stall in our Campus</h4>
</div>
</div>
<!-- Team block END -->
<?php include "footer.php"; ?>
</body>
</html>