Project

General

Profile

« Previous | Next » 

Revision bef0adce

Added by sbeaver over 10 years ago

Updated for consistency with reboot.php

View differences:

usr/local/www/halt.php
58 58
$pgtitle = array(gettext("Diagnostics"),gettext("Halt system"));
59 59
include('head.inc');
60 60

  
61
if ($_POST['save'] == 'Yes') {
62
	print('<meta http-equiv="refresh" content="70;url=/">');
63
	print('<div class="alert alert-success" role="alert">'.gettext("The system is halting now. This may take one minute or so.").'</div>');
61
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
62
?>
63
	<meta http-equiv="refresh" content="70;url=/">
64
	<div class="alert alert-success" role="alert">
65
		<?=gettext("The system is halting now. This may take one minute or so.")?>
66
	</div>
64 67

  
68
<?php
65 69
	if(DEBUG)
66 70
	   print("Not actually halting (DEBUG is set true)<br>");
67 71
	else
68 72
		system_halt();
69 73
} else {
70

  
71 74
?>
72 75

  
73
<!-- Simple HTML version -->
74 76
<div class="panel panel-default">
75 77
	<div class="panel-heading">
76 78
		<h2 class="panel-title">Are you sure you want to halt the system?</h2>
......
79 81
		<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>
80 82
		<form action="halt.php" method="post">
81 83
			<input type="submit" class="btn btn-danger pull-center" name="save" value="Yes">
82
			<input type="submit" class="btn btn-default" name="save" value="No">
84
			<a href="/" class="btn btn-default">No</a>
83 85
		</form>
84 86
	</div>
85 87
</div>
......
87 89
<?php
88 90
}
89 91

  
90
include("foot.inc");
92
include("foot.inc");

Also available in: Unified diff