forked from jkleiber/BBQ-FIRST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdowntime.php
108 lines (91 loc) · 2.1 KB
/
downtime.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
<?php
include('connect.php');
$query="SELECT * FROM `maintenance` LIMIT 1";
$sqli=$mysqli->query($query);
$row=mysqli_fetch_assoc($sqli);
$tim=$row['duration'];
$fleg=$row['flag'];
$start=$row['start'];
$mess=$row['message'];
?>
<html>
<head profile="http://www.w3.org/2005/10/profile">
<link rel="icon"
type="image/png"
href="http://bbqfrc.x10host.com/favicon.png">
<link rel="stylesheet" type="text/css" href="styler.css">
</head>
<script>
var myVar=setInterval(function () {myTimer()}, 1000);
function myTimer()
{
var d = new Date();
var dd = new Date('<?php echo $start;?>');
var t=d.getTime();
var tt=dd.getTime();
var diff = t-tt;
var k_min = 1000*60;
var mins=Math.round(diff/k_min);
var secs=((diff%k_min)/1000).toFixed(0);
//document.getElementById("timer").innerHTML = d + "...................." + dd;
if(secs<10)
{
document.getElementById("times").innerHTML = mins +":0"+secs;
}
else
{
document.getElementById("times").innerHTML = mins +":"+secs;
}
}
</script>
<body>
<div id="container">
<?php
if($fleg=="off")
{
?>
<div class="nav">
<a href="index.php" class="nav">
</a>
<a href="help.php" class="nav_txt">
Help
</a>
</div>
<?php
}
?>
<br>
<?php
if($fleg!="off")
{
?>
<div><p><?php echo $mess;?></p></div>
<br>
<div><h1>The codes are currently being barbecued.</h1></div>
<?php
}else{
?>
<div><h1>Congratulations! There is no maintenance!</h1></div>
<?php
}
if($fleg!="off")
{
?>
<div><h3><?php echo "These codes usually cook in about ". $tim." ".$fleg. ". Thanks for your patience.";?></h3></div>
<?php
}else{
?>
<div><h3><?php echo "Nothing to see here, except an exceptional GIF of our logo";?></h3></div>
<?php
}?>
<h3 id="times"> </h3>
<div><img src="bbqcode.gif"></img></div>
<br>
</div>
<h6>Maintenance began at</h6><h6> <?php echo $start;?></h6>
<!--<h6 id="timer"> </h6>!-->
<footer class="nav" class="site-footer">
<a href="admin/" class="fstd">Admin</a> - <a href="contact.php" class="fstd">Contact Us</a>
</footer>
</body>
</html>