-
Notifications
You must be signed in to change notification settings - Fork 0
/
score.php
190 lines (167 loc) · 6.12 KB
/
score.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
<?php
include 'connDB.php' ;
session_start();
error_reporting(0);
$score1=$_COOKIE["score_user"];
$time=$_COOKIE["timeStore"];
$name=$_SESSION["uname"];
$email=$_SESSION["email"];
$college=$_SESSION["college"];
$uid=$_SESSION["uid"];
$sql_insert="INSERT INTO leaderboard (`uid`, `name`, `email`,`college`,`score`,`time`)
VALUES ('$uid','$name','$email','$college','$score1','$time')";
$result=mysqli_query($conn,$sql_insert);
if(!$result){
echo "Data not added Successfully";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
</head>
<body>
<div class="header container-fluid" style="display:flex;justify-content:center">
<div class="imageHolder" style="height:15vmin;">
<img src="images/celeb.png" alt="" style="max-width:100%;max-height:100%; object-fit:contain">
</div>
<p style="margin-top:5vmin; margin-left:3vmin; font-size:5vmin; font-weight:bolder;letter-spacing: 0.15vmin;">It's Results Time</p>
</div>
<div class="container-fluid ">
<p style="text-align:center" style="font-weight:bold">( Don't get infleuenced by the results over self understanding )</p>
</div>
<div class="container-fluid codeMapLogo">
<div class="imageHolderLogo">
<img src="images/codemap.jpeg" style="max-width:100%; max-height:100%; object-fit:contain">
</div>
</div>
<div class="container-fluid main" style="display:flex;justify-content:center;">
<div class="container-fluid" style="overflow:hidden;display:flex;flex-wrap:wrap;justify-content:center;margin-top:4.5vmin">
<div class="imageContainerDiv" style="width:70vmin; display:flex; justify-content:center; align-tems:center">
<div class="imageDiv" style="height:37vmin;width:37vmin;margin-top:0.5vmin;overflow:hidden"><?php if($score1>=40 && $score1<=50) echo '<img src="images/average.png" style="max-width:100%; max-height:100%; object-fit:contain;">' ;
elseif($score1>50) echo '<img src="images/good.png" style="max-width:100%; max-height:100%; object-fit:contain;">';
else echo '<img src="images/sad.png" style="max-width:100%; max-height:100%; object-fit:contain;">';?>
</div>
</div>
<div class="scoreText" style="width:80vmin;margin-left:3.5vmin">
<p class="appText" style="font-size:5.15vmin">
"<?php if($score1>=40 && $score1<=50) echo 'Hmmm...' ;
elseif($score1>50) echo 'Wow!...';
else echo 'oops!';?>"
<span id="category" style="font-weight:bold;font-size:5.25vmin"><?php echo $_SESSION["uname"] ?></span> <br>you scored <span id="category" style="font-weight:bold;font-size:5.25vmin">
"<?php if($score1>=40 && $score1<=50) echo 'Average' ;
elseif($score1>50) echo 'Excellent';
else echo 'Poor'; ?>" </span> <br>your score is <?php echo $score1."/"."100";"" ?></p>
<div class="btnHolder" style="display:flex;justify-content:center;align-items:center">
<button class="btn btn-primary"><a href="waiting.php" style="color:white;text-decoration:none">Leaderboard</a></button>
</div>
<p style="margin-top:3vmin">( Please check the the Leaderboard to checkout the topper list )</p>
</div>
</div>
</div>
</body>
</html>
<style>
*{
margin:0;
padding: 0;
box-sizing:border-box;
overflow-x:hidden;
}
body{
background-color: rgb(71, 161, 217);
color:white;
}
.main{
background-color: #343438;
}
@media(max-width:800px){
.scoreText{
padding-left:4.5vmin;
}
.btn{
font-size:3.75vmin;
}
.main{
width: 95vmin;
margin-top:4.5vmin;
border-radius:3vmin;
padding: 2vmin;
}
.codeMapLogo{
height:20vmin;
margin-top:3vmin;
display:flex;
justify-content:center;
align-items:center;
}
.imageHolderLogo{
height:20vmin;
width:20vmin;
border:1px solid white;
border-radius:10vmin;
}
}
@media (min-width:801px) and (max-width:1281px){
.scoreText{
padding-left:4.5vmin;
border:1px solid #343438;
}
.main{
width: 95vw;
border:1px solid #343438;
border-radius:3vmin;
margin-top:3.5vmin;
padding-left:3vmin;
}
.codeMapLogo{
height:15vmin;
margin-top:1vmin;
display:flex;
justify-content:center;
align-items:center;
overflow:hidden;
}
.imageHolderLogo{
height:15vmin;
width:15vmin;
border:1px solid white;
border-radius:7.5vmin;
}
}
@media(min-width:1282px){
.scoreText{
padding-left:4.5vmin;
border:1px solid #343438;
}
.main{
width: 74vw;
border:1px solid #343438;
border-radius:3vmin;
margin-top:3.5vmin;
}
.btn{
font-size:3vmin;
}
.codeMapLogo{
height:15vmin;
margin-top:1vmin;
display:flex;
justify-content:center;
align-items:center;
overflow:hidden;
}
.imageHolderLogo{
height:15vmin;
width:15vmin;
border:1px solid white;
border-radius:7.5vmin;
}
}
</style>