summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/reboot.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-11-17 14:35:06 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-11-17 14:35:06 -0500
commit89932a3d79a84616c7b5999f6c27a0db46df1c05 (patch)
treec934db7930af9c2aff5e344bc859ecca66b7a09c /src/usr/local/www/reboot.php
parent738b34bd932ecd13c1247c0ae684ba76f081bdc1 (diff)
downloadpfsense-89932a3d79a84616c7b5999f6c27a0db46df1c05.zip
pfsense-89932a3d79a84616c7b5999f6c27a0db46df1c05.tar.gz
Experimental countdown timer
Diffstat (limited to 'src/usr/local/www/reboot.php')
-rwxr-xr-xsrc/usr/local/www/reboot.php43
1 files changed, 25 insertions, 18 deletions
diff --git a/src/usr/local/www/reboot.php b/src/usr/local/www/reboot.php
index c6521ff..712ab00 100755
--- a/src/usr/local/www/reboot.php
+++ b/src/usr/local/www/reboot.php
@@ -76,12 +76,12 @@ include("head.inc");
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if(DEBUG) {
- print("Not actually rebooting (DEBUG is set true)");
+ print_info_box("Not actually rebooting (DEBUG is set true)", success);
}
else {
- print('<pre>');
+ print('<div><pre>');
system_reboot();
- print('</pre>');
+ print('</pre></div>');
}
?>
@@ -91,7 +91,27 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
<script>
//<![CDATA[
events.push(function(){
- startCountdown(60);
+
+ $('#clock').pietimer({
+ seconds: 90,
+ color: '#404040',
+ height: 75,
+ width: 75
+ },
+ function(){
+ window.location="/index.php";
+ });
+
+ function startCountdown(time) {
+ setInterval(function(){
+ $('#countdown').html('<h4>Rebooting<br />Page will reload in ' +time+ ' seconds.</h4>');
+ time-- != 0 || (window.location="/index.php");
+ },1000);
+ }
+
+ // startCountdown(60);
+ $('#clock').pietimer('start');
+ startCountdown(90);
});
//]]>
</script>
@@ -116,20 +136,7 @@ events.push(function(){
<?php
}
-?>
-<script>
-//<![CDATA[
- function startCountdown(time) {
- $('#clock').html('<img src="/321.gif" />');
- setInterval(function(){
- $('#countdown').html('<h4>Rebooting<br />Page will reload in ' +time+ ' seconds.</h4>');
+include("foot.inc");
- time-- != 0 || (window.location="/index.php");
- },1000);
- }
-//]]>
-</script>
-<?php
-include("foot.inc");
OpenPOWER on IntegriCloud