diff options
Diffstat (limited to 'usr/local/www/halt.php')
-rwxr-xr-x | usr/local/www/halt.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/usr/local/www/halt.php b/usr/local/www/halt.php index 322fbd4..49e99c5 100755 --- a/usr/local/www/halt.php +++ b/usr/local/www/halt.php @@ -50,7 +50,7 @@ require("guiconfig.inc"); require("functions.inc"); require("captiveportal.inc"); -if (stristr($_POST['Submit'], gettext("No"))) { +if ($_POST['save'] == 'No') { header("Location: index.php"); exit; } @@ -58,28 +58,28 @@ if (stristr($_POST['Submit'], gettext("No"))) { $pgtitle = array(gettext("Diagnostics"),gettext("Halt system")); include('head.inc'); -if ($_SERVER['REQUEST_METHOD'] == 'POST') { -?> - <meta http-equiv="refresh" content="70;url=/"> - <div class="alert alert-success" role="alert"> - <?=gettext("The system is halting now. This may take one minute or so.")?> - </div> +if ($_POST['save'] == 'Yes') { + print('<meta http-equiv="refresh" content="70;url=/">'); + print('<div class="alert alert-success" role="alert">'.gettext("The system is halting now. This may take one minute or so.").'</div>'); -<?php if(DEBUG) print("Not actually halting (DEBUG is set true)<br>"); else system_halt(); } else { -?> +?> +<!-- Simple HTML version --> <div class="panel panel-default"> - <div class="panel-heading">Are you sure you want to halt the system?</div> - <div class="panel-body">Click "Yes" to halt the system immediately, or "No" to go to the system dashboard. (There will be a brief delay before the dashboard appears.)<br /><br /> + <div class="panel-heading"> + <h2 class="panel-title">Are you sure you want to halt the system?</h2> + </div> + <div class="panel-body"> + <p>Click "Yes" to halt the system immediately, or "No" to go to the system dashboard. (There will be a brief delay before the dashboard appears.)</p> <form action="halt.php" method="post"> - <input type="submit" class="btn btn-danger pull-center" name="Submit" value="Yes"> - <a href="/" class="btn btn-default">No</a> + <input type="submit" class="btn btn-danger pull-center" name="save" value="Yes"> + <input type="submit" class="btn btn-default" name="save" value="No"> </form> </div> </div> |