summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorsbeaver <sbeaver@netgate.com>2015-04-19 10:24:41 -0400
committersbeaver <sbeaver@netgate.com>2015-04-19 10:24:41 -0400
commit6ea2ea997303557ecd54cd64aded6a6e138343b4 (patch)
treebf955bc2065bb62548913744436b53154f0122d3 /usr
parent172191827682a2e01444a9868ecbc8fb44877b11 (diff)
downloadpfsense-6ea2ea997303557ecd54cd64aded6a6e138343b4.zip
pfsense-6ea2ea997303557ecd54cd64aded6a6e138343b4.tar.gz
Supdated per SH
Good suggestions. Thank you.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/reboot.php37
1 files changed, 19 insertions, 18 deletions
diff --git a/usr/local/www/reboot.php b/usr/local/www/reboot.php
index b8d7358..d863a94 100755
--- a/usr/local/www/reboot.php
+++ b/usr/local/www/reboot.php
@@ -44,22 +44,23 @@ require("guiconfig.inc");
require("functions.inc");
require("captiveportal.inc");
-if (stristr($_POST['Submit'], gettext("No"))) {
- header("Location: index.php");
- exit;
-}
-
$pgtitle = array(gettext("Diagnostics"),gettext("Reboot System"));
include("head.inc");
-if (stristr($_POST['Submit'], gettext("Yes"))) {
- ?><meta http-equiv=\"refresh\" content=\"70;url=/\"> <?php
- print('<div class="alert alert-success" role="alert">'.gettext("The system is rebooting now. This may take one minute or so.").'</div>');
+
+if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+?>
+ <meta http-equiv=\"refresh\" content=\"70;url=/\">
+ <div class="alert alert-success" role="alert">
+ <?=gettext("The system is rebooting now. This may take one minute or so.")?>
+ </div>
+<?php
if(DEBUG)
- print("Not actually rebooting (DEBUG is set true)<br>");
+ print("Not actually rebooting (DEBUG is set true)");
else
system_reboot();
+
} else {
@@ -67,18 +68,18 @@ if (stristr($_POST['Submit'], gettext("Yes"))) {
<div class="panel panel-default">
<div class="panel-heading">Are you sure you want to reboot the system?</div>
- <div class="panel-body">Click "Yes" to reboot the system immediately, or "No" to go to the system dashboard without rebooting. (There will be a brief delay before the dashboard appears.)<br /><br />
- <form action="reboot.php" method="post">
- <input type="submit" class="btn btn-danger pull-center" name="Submit" value="Yes">
- <input type="submit" class="btn btn-default" name="Submit" value="No">
- </form>
- </div>
- </div>
+ <div class="panel-body">Click "Yes" to reboot the system immediately, or "No" to go to the system dashboard without rebooting. (There will be a brief delay before the dashboard appears.)<br /><br />
+ <form action="reboot.php" method="post">
+ <input type="submit" class="btn btn-danger pull-center" name="Submit" value="Yes">
+ <a href="/" class="btn btn-default">No</a>
+ </form>
+
+ </div>
+ </div>
</div>
<?php
}
-include("foot.inc"); ?>
-
+include("foot.inc"); ?> \ No newline at end of file
OpenPOWER on IntegriCloud