-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathViewSummaryPoints.php
161 lines (150 loc) · 3.78 KB
/
ViewSummaryPoints.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
<?php
if (session_status() !== PHP_SESSION_ACTIVE) {
session_start();
}
?>
<style>
.welcome{
margin-top: 8px;
margin-bottom: 2px;
font-size: 12px;
}
.scrollit {
overflow:scroll;
height:450px;
/* overflow-x: hidden; */
}
th{
background-color: #e0ebeb;
}
.cust{
font-family: 'helvetica neue',helvetica,arial,'lucida grande',sans-serif;
border-collapse: collapse;
}
.cust td{
border: solid 1px #000000;
padding: 3px;
font-size: 12px;
text-align: center;
}
.cust tr:nth-child(even){
background-color: #ffffff;
color: #D9E9FF;
}
.cust tr:nth-child(odd){
background-color: #ffffff;
color: #0060C7;
}
.cust tr{
background-color:#ffffff;
color: #D9E9FF;
}
.cust tr:hover{
background-color: #ffffcc;
color: #000000;
}
.cust th{
border: solid 1px #000000;
padding: 10px;
color: #000000;
background-color: #e0ebeb;
text-align: center;
font-size: 12px;
}
@media screen and (max-width: 800px) {
.cust td{
border: solid 1px #63b8ee;
padding: 1px;
font-size: 8px;
text-align: center;
}
.cust tr:nth-child(even){
background-color: #ffffff;
color: #D9E9FF;
}
.cust tr:nth-child(odd){
background-color: #ffffff;
color: #0060C7;
}
.cust tr{
background-color: #468ccf;
color: #D9E9FF;
}
.cust tr:hover{
background-color: #ffffcc;
color: #000000;
}
.cust th{
border: solid 1px #3866a3;
padding: 4px;
color: #0039e6;
background-color: #ffa31a;
text-align: center;
font-size: 8px;
}
.scrollit {
overflow:scroll;
height:450px;
/* overflow-x: hidden; */
}
.welcome{
margin-top: 8px;
margin-bottom: 2px;
font-size: 12px;
}
}
</style>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- <link rel="stylesheet" href="ViewEvents.css" /> -->
<title>Files Submitted</title>
</head>
<center>
<div class="scrollit">
<table id="customers" class="cust" border=1>
<tr>
<th>ID Number</th>
<th>Name</th>
<th>Overall Total Points</th>
<!-- <th>View</th> -->
</tr>
<body class="parent-cont">
<div class="sidebar">
<p>
<?php
include("DBConnection.php");
$userType=$_SESSION['userType'];
$user_id=$_SESSION['user_id'];
if(mysqli_connect_errno()){
echo mysqli_connect_error();
exit();
}else{
$selectQuery = "SELECT S.uid,U.firstName,U.lastName,SUM(S.Points) as pnts,S.date_posted FROM tblsubmission S LEFT JOIN tblusers U ON S.uid=U.user_id GROUP BY S.uid,U.firstName,U.lastName ORDER BY SUM(S.Points) DESC";
$result = mysqli_query($conn,$selectQuery);
if(!$result){
die(mysqli_error($conn));
}
if(mysqli_num_rows($result) > 0){
}else{
$msg = "No Record found";
}
}
?>
<?php
while($row = mysqli_fetch_assoc($result)){
echo '<tbody><tr>';
// echo '<td>'.$row['file_desc'].'</td>';
echo '<td><a href="ViewSubDetails.php?user_id='. $row["uid"].'">'.$row["uid"].'</a></td>';
// echo '<td><font color="black">'.$row['uid'].'</font></td>';
echo '<td><font color="black">'.$row['firstName']." ".$row['lastName'].'</font></td>';
// echo '<td><font color="blue">'.$row['uid'].'</font></td>';
echo '<td><font color="#e62e00">'.$row['pnts'].'</font></td>';
echo '</tr></tbody>';
}?>
</html>
</div>
</center>