-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
120 lines (100 loc) · 2.81 KB
/
example.php
File metadata and controls
120 lines (100 loc) · 2.81 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
<?php
session_start();
?>
<html>
<head>
<title>Do not Exit /Refresh </title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
</head>
<style>
#clockdiv{
font-family: sans-serif;
color: #fff;
display: inline-block;
font-weight: 100;
text-align: center;
font-size: 30px;
position: absolute;
left: 30px;
top:30px;
}
#clockdiv > div{
padding: 10px;
border-radius: 3px;
background: #57c9ad;
display: inline-block;
}
#clockdiv div > span{
padding: 15px;
border-radius: 3px;
background: #d1ebe4;
display: inline-block;
}
.smalltext{
padding-top: 5px;
font-size: 16px;
}
</style>
<body>
<div id="clockdiv" >
<div>
<span class="countdown"></span>
<div class="smalltext">Time Left</div>
<div class="smalltext"></div>
</div>
</div>
<div class="container">
<form method = "POST" autocomplete="off" >
<div class="items">
<div style="padding:10px 0 20px 0;">
<div id="ae_captcha_api"></div>
</div>
<input type="text" placeholder = "Enter Captcha" name="user_input"/>
<input id="button" type="submit" formaction="./validate.php" value = "SUBMIT"/>
<input id="button" type="submit" onclick="newcaptcha()" value = "SKIP"/>
<div id="sign">
<label>Current Score</label>
<?php
echo $_SESSION['score'];
?>
</div>
<div id="sign">
<label>Negative Score</label>
<?php
echo $_SESSION['n-score'];
?>
</div>
</div>
</form>
<script src="./captcha-generator/asset/main.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
var timer2 = localStorage.getItem('timer');
if(timer2 === null) timer2 = "1:10";
$('.countdown').html(timer2);
var interval = setInterval(function() {
var timer = timer2.split(':');
var minutes = parseInt(timer[0], 10);
var seconds = parseInt(timer[1], 10);
--seconds;
minutes = (seconds < 0) ? --minutes : minutes;
if (minutes < 0){
clearInterval(interval);
localStorage.removeItem('timer');
window.location.href = "result.php";
}else{
seconds = (seconds < 0) ? 59 : seconds;
seconds = (seconds < 10) ? '0' + seconds : seconds;
$('.countdown').html(minutes + ':' + seconds);
timer2 = minutes + ':' + seconds;
localStorage.setItem('timer',timer2);
}
}, 1000);
});
</script>
</body>
</html>