-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaderboard.php
136 lines (118 loc) · 4.57 KB
/
leaderboard.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
<?php
include 'Database.php';
include 'config.php';
?>
<?php
$db = new Database();
$q = "SELECT declamation_score.team_id, registration.school_name, SUM(declamation_score.total) AS total FROM declamation_score INNER JOIN registration ON declamation_score.team_id = registration.team_id GROUP BY declamation_score.team_id ORDER BY total DESC";
$dc = $db->select($q);
$q1 = "SELECT dance_score.team_id, registration.school_name, SUM(dance_score.total) AS total FROM dance_score INNER JOIN registration ON dance_score.team_id = registration.team_id GROUP BY dance_score.team_id ORDER BY total DESC";
$d = $db->select($q1);
$q2 = "SELECT singing_score.team_id, registration.school_name, SUM(singing_score.total) AS total FROM singing_score INNER JOIN registration ON singing_score.team_id = registration.team_id GROUP BY singing_score.team_id ORDER BY total DESC";
$s = $db->select($q2);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Interschool - Leaderboard</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="shortcut icon" href="./assets/images/clipboard.svg" type="image/x-icon">
<style>
h1{
font-size: 30px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* @media screen and (max-width = 600px) {
.dcLeaderboard {
width: 100%;
}
.dLeaderboard {
width: 100%;
}
.sLeaderboard {
width: 100%;
}
center{
width: 100%;
}
} */
</style>
</head>
<body>
<div class="container">
<div class="row">
<center><img src="https://geetauniversity.edu.in/wp-content/uploads/2022/07/GU-Logo-768x349-1-removebg-preview.png" style="height:130px; width:150px" class="img-fluid pt-4 pb-3"></center>
<h4 class="text-center">16th InterSchool Group Dance, Singing and Declamation Competition</h4>
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h1 class="text-center card-title">SCORE TABLE</h1>
</div>
<div class="card-body">
<table class="table table-striped table-hover table-bordered shadow bg-light p-5 mb-5" border="1" cellspacing="0" cellpadding="10" >
<tr>
<th colspan="3" class="active bg-dark text-center text-white">Dancing Leaderboard</th>
</tr>
<tr>
<th>Team Id</th>
<th>School Name</th>
<th>Total Score</th>
</tr>
<tr>
<?php
while($row = $d->fetch_assoc()) { ?>
<td>D<?php echo $row['team_id']; ?></td>
<td><?php echo $row['school_name']; ?></td>
<td><?php echo $row['total']; ?></td>
</tr>
<?php } ?>
</table>
<table class="table table-striped table-hover table-bordered shadow bg-light p-5 mb-5" border="1" cellspacing="0" cellpadding="10" >
<tr>
<th colspan="3" class="active bg-dark text-center text-white">Singing Leaderboard</th>
</tr>
<tr>
<th>Team Id </th>
<th>School Name</th>
<th>Total Score</th>
</tr>
<tr>
<?php
while($row = $s->fetch_assoc()) { ?>
<td>S<?php echo $row['team_id']; ?></td>
<td><?php echo $row['school_name']; ?></td>
<td><?php echo $row['total']; ?></td>
</tr>
<?php } ?>
</table>
<table class="table table-striped table-hover table-bordered shadow bg-light p-5 mb-5" border="1" cellspacing="0" cellpadding="10" >
<tr>
<th colspan="3" class="active bg-dark text-center text-white">Declamation Leaderboard</th>
</tr>
<tr>
<th>Team Id </th>
<th>School Name</th>
<th>Total Score</th>
</tr>
<tr>
<?php
while($row = $dc->fetch_assoc()) { ?>
<td>DC<?php echo $row['team_id']; ?></td>
<td><?php echo $row['school_name']; ?></td>
<td><?php echo $row['total']; ?></td>
</tr>
<?php } ?>
</table>
</div>
<div class="card-footer">
<h6 class="card-title text-center">Made by Geeta Technical Hub</h6>
</div>
</div>
</div>
</div>
</div>
</body>
</html>