-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·57 lines (51 loc) · 1.29 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
<?
$user = $_GET["u"];
?>
<style type="text/css">
#control
{
position:absolute;
top:0px;
right:0px;
}
</style>
<script type="text/javascript" src="jquery-1.5.1.min.js" ></script>
<div id="control"><input type="checkbox" id="auto-update"/>Auto-update every 30s. Next update in <span id="countdown">0</span></div>
<script type="text/javascript">
var id, id2;
var count;
$("#auto-update").click(function(){
if (this.checked)
{
id = setInterval(function(){
<? if ($user) { ?>
$("#target").load("lemans2012_cached.php?user=<?= $user ?>");
<? } else { ?>
$("#target").load("lemans2012_cached.php");
<? } ?>
count = 30;
},30000);
count = 30;
$("#countdown").html("30");
id2 = setInterval(function(){
$("#countdown").html(count);
count--;
},1000);
}
else
{
clearInterval(id);
clearInterval(id2);
count = 0;
$("#countdown").html("0");
}
});
$(document).ready(function(){
<? if ($user) { ?>
$("#target").load("lemans2012_cached.php?user=<?= $user ?>");
<? } else { ?>
$("#target").load("lemans2012_cached.php");
<? } ?>
});
</script>
<div id="target">Loading...</div>