-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
321 lines (231 loc) · 9.45 KB
/
index.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
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<?php
include("backend/functions.php");
$data = "";
$t=time();
$s="";
$e="";
$ar = get_s_e();
$s = $ar['s'];
$e = $ar['e'];
if($t>=$s && $t<=$e){
if(isset($_SESSION['email'])){
$completed = get_completed();
if($completed==1){
header("Location:lb.php");
}
else{
$status = get_status();
if($status==1){
$data = get_q();
}
else{
header("Location:begin.php");
}
}
}
else {
header("Location:login.php");
}
}
else if($t>$e){
header("Location:lb.php");
}
else{
if(isset($_SESSION['email'])){
header("Location:begin.php");
}
else {
header("Location:login.php");
}
}
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link href="https://fonts.googleapis.com/css?family=Eczar" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infox | Cryptx</title>
<?php include("frontend/seo.php");?>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="frontend/js/jquery.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<link rel="stylesheet" href="frontend/css/index.css">
<script src="frontend/js/index.js"></script>
</head>
<body id="xyz">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<div class="border:20px;"><span>
<div class="circle topleft">
<span class="float-left pt-5 pl-5 mt-5"><span></span>
<h4 id="cqn" class="float-left pl-5">
<?php echo $data['qno'];?>
</h4>
</span></div>
</span>
<span>
<h4 class="float-right " id="rank"></h4>
</span>
</div>
<div id="rect">
<!--<div class ="circle topright"></div>-->
</div>
<div class="container">
<div class=" col-md-8 col-sm-4 h-50 d-flex align-items-center ">
<h1 style="display:none " class="small display-4 pt-5 mt-5 text-center"><strong></strong>Let play solve to image are you ready !!!!!! !!!!!!! !!!!!</strong> </h1>
</div>
<div class="row justify-content-center align-items-center d-flex text-center h-100">
<div class="col-12 col-md-8 h-50 ">
<h1 class="display-4 mt-4 pt-4 text-center mb-2 mt-5" id="cqt">
<?php echo $data['qtext'];?>
</h1>
<div id="image" <?php if($data['qtype']!="image" ) echo 'style = "display:none;"' ?>>
<img <?php if($data['qtype']=="image" ) echo 'src = "' .$data['qcontent'].'"'?> id="qimage" style = "height:300px; width:300px;">
</div>
<div id="audio" <?php if($data['qtype']!="audio" ) echo 'style = "display:none;"' ?>>
<audio <?php if($data['qtype']=="audio" ) echo 'src = "' .$data['qcontent'].'"'?> id="qaudio" controls>
<source type="audio/mpeg">
Your browser does not support the audio element Please try running from different browser.
</audio>
</div>
</div>
</div>
<br /><br><br>
<div class="row justify-content-center">
<div class="col-12 col-md-10 col-lg-8">
<form class="card card-sm" method="post">
<div class="card-body row no-gutters align-items-center">
<div class="col-auto">
<!-- <i class="fas fa-link h4 text-body"></i> -->
</div>
<!--end of col-->
<div class="col">
<input id="ans" value="" class="form-control form-control-lg form-control-borderless" type="search" placeholder="Enter answer here!" name="url">
</div>
<div id="image" style="display:none;">
<img id="qimage" style="height:300px; width:300px;">
</div>
<!--end of col-->
<div class="col-auto">
<!-- <button name = "submit" type="submit">Submit</button> -->
<h5 id="button1" onclick="atmpt()" class="btn btn-lg " style=" color:green; font-size:20px;">SUBMIT</h5>
<img style="display:none; height:45px; width:45px;" src="http://preloaders.net/preloaders/290/preview.gif" id="ajax-loader" />
<div id="preload"></div>
</div>
<!--end of col-->
</div>
</form>
</div>
<!--end of col-->
</div>
<br>
<br>
<div class ="text-center fixed-top mt-2"><h4><a href="lb.php" target="_blank" style="color:#fff;">LeaderBoard</a></h4></div>
<div class="fixed-bottom text-center ">
<?php
$cd=get_candy();
if(!get_candy())
{ echo '
<style type="text/css">#candy{
display:none;
}</style>';
}
?>
<i data-toggle="modal" id="candy" data-target="#exampleModalCenter" class="mb-3 fas fa-lemon text-center" style="">candy</i>
<div id="abc" class="progress " style="height:40px;background:#000;">
<div id="pbar" style="<?php $wd = 10*($data['qno']-1); echo 'width:'.$wd.'%; color:#000; background-color:#fff;' ?>" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="" aria-valuemin="0"
aria-valuemax="100"><h6><bold><strong>
<?php echo 10-$data['qno'];?> left</strong></bold></h6></div>
</div>
</div>
</div>
<!----candy modal><!---->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="text-warning modal-title" id="exampleModalLongTitle">Use Candy!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="h3 modal-body" style="color:#000000;">
you can use candy to skip any one question!
<br><br>
</div>
<div class="modal-footer">
<!--<button type="button" class="btn btn-primary">Cancel</button>-->
<button onclick="usecandy()" type="button" class="btn btn-primary">Use Candy!</button>
</div>
</div>
</div>
</div>
<!--correct answr modal-->
<div class="modal fade" id="nqs" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header bg-success">
<h2 class="modal-title pl-4 pt-2" id="exampleModalCenterTitle" style="width:100px;height:100px;position:relative; color:#eee;"><i class="fas fa-check pl-4 pt-2 display-4"></i></h2>
<h2 class="pt-4 pl-3" style="position:relative;color:#fff">Success !</h2>
<h1 type="" >
</h1>
</div>
<div class="modal-body">
<h4 class="text-center" style="color:#000;">
Correct Answer!
</h4>
</div>
<div class="modal-footer">
// <button onclick="show_next_q()" type="button" class="btn btn-success">Continue</button>
</div>
</div>
</div>
</div>
<!--end-->
<!--modal for wa-->
<div class="modal fade" id="ankit" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header bg-danger">
<h2 class="modal-title pl-4 pt-2" id="exampleModalCenterTitle" style="width:100px;height:100px;position:relative; color:#eee;"><i class="fas fa-times pl-4 pt-2 display-4"></i></h2>
<h2 class="pt-4 pl-3" style="position:relative;color:#fff">Wrong !</h2>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span style="color:#fff;" aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<h4 class="text-center" style="color:#000;">
Try Again!
</h4>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!--end -->
<!--congo modal-->
<div class="modal fade" id="win" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header ">
<img class="modal-title text-center" id="exampleModalCenterTitle" src="congo.png" style="width:140px;height:100px; ">
<h2 style="position:relative;color:black; padding-top:30px;">Congralutions !</h2>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<h5 style="color:#000;">Your test is over now Check the Leaderboard'</h5>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
<!--end-->
<?php
include("frontend/js/index.php");
?>
</body>
</html>