1 |
8a3be31a
|
Scott Ullrich
|
<?php
|
2 |
b46bfcf5
|
Bill Marquette
|
/* $Id$ */
|
3 |
56977a25
|
Scott Ullrich
|
/*
|
4 |
7dc767fe
|
Scott Ullrich
|
halt.php
|
5 |
|
|
part of pfSense
|
6 |
|
|
Copyright (C) 2004 Scott Ullrich
|
7 |
|
|
All rights reserved.
|
8 |
8a3be31a
|
Scott Ullrich
|
|
9 |
7dc767fe
|
Scott Ullrich
|
part of m0n0wall as reboot.php (http://m0n0.ch/wall)
|
10 |
56977a25
|
Scott Ullrich
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
11 |
|
|
All rights reserved.
|
12 |
8a3be31a
|
Scott Ullrich
|
|
13 |
56977a25
|
Scott Ullrich
|
Redistribution and use in source and binary forms, with or without
|
14 |
|
|
modification, are permitted provided that the following conditions are met:
|
15 |
8a3be31a
|
Scott Ullrich
|
|
16 |
56977a25
|
Scott Ullrich
|
1. Redistributions of source code must retain the above copyright notice,
|
17 |
|
|
this list of conditions and the following disclaimer.
|
18 |
8a3be31a
|
Scott Ullrich
|
|
19 |
56977a25
|
Scott Ullrich
|
2. Redistributions in binary form must reproduce the above copyright
|
20 |
|
|
notice, this list of conditions and the following disclaimer in the
|
21 |
|
|
documentation and/or other materials provided with the distribution.
|
22 |
8a3be31a
|
Scott Ullrich
|
|
23 |
56977a25
|
Scott Ullrich
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
24 |
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
25 |
|
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
26 |
|
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
27 |
|
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28 |
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29 |
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30 |
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31 |
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32 |
|
|
POSSIBILITY OF SUCH DAMAGE.
|
33 |
|
|
*/
|
34 |
7ac5a4cb
|
Scott Ullrich
|
/*
|
35 |
|
|
pfSense_MODULE: header
|
36 |
|
|
*/
|
37 |
56977a25
|
Scott Ullrich
|
|
38 |
6b07c15a
|
Matthew Grooms
|
##|+PRIV
|
39 |
|
|
##|*IDENT=page-diagnostics-haltsystem
|
40 |
|
|
##|*NAME=Diagnostics: Halt system page
|
41 |
|
|
##|*DESCR=Allow access to the 'Diagnostics: Halt system' page.
|
42 |
|
|
##|*MATCH=halt.php*
|
43 |
|
|
##|-PRIV
|
44 |
|
|
|
45 |
56977a25
|
Scott Ullrich
|
require("guiconfig.inc");
|
46 |
c44417f8
|
Scott Ullrich
|
require("functions.inc");
|
47 |
|
|
require("captiveportal.inc");
|
48 |
56977a25
|
Scott Ullrich
|
|
49 |
|
|
if ($_POST) {
|
50 |
|
|
if ($_POST['Submit'] != " No ") {
|
51 |
77da5d3e
|
Scott Ullrich
|
system_halt();
|
52 |
50c306a9
|
Carlos Eduardo Ramos
|
$rebootmsg = gettext("The system is halting now. This may take one minute.");
|
53 |
56977a25
|
Scott Ullrich
|
} else {
|
54 |
a4f3afb3
|
Carlos Eduardo Ramos
|
header("Location: index.php");
|
55 |
56977a25
|
Scott Ullrich
|
exit;
|
56 |
|
|
}
|
57 |
|
|
}
|
58 |
f726d710
|
Bill Marquette
|
|
59 |
2dafb24c
|
heitor.lessa
|
$pgtitle = array(gettext("Diagnostics"),gettext("Halt system"));
|
60 |
f726d710
|
Bill Marquette
|
include('head.inc');
|
61 |
56977a25
|
Scott Ullrich
|
?>
|
62 |
|
|
|
63 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
64 |
|
|
<?php include("fbegin.inc"); ?>
|
65 |
|
|
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
|
66 |
8a3be31a
|
Scott Ullrich
|
<form action="halt.php" method="post">
|
67 |
2dafb24c
|
heitor.lessa
|
<p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p>
|
68 |
8a3be31a
|
Scott Ullrich
|
<p>
|
69 |
50c306a9
|
Carlos Eduardo Ramos
|
<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> ">
|
70 |
|
|
<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> ">
|
71 |
56977a25
|
Scott Ullrich
|
</p>
|
72 |
|
|
</form>
|
73 |
|
|
<?php endif; ?>
|
74 |
|
|
<?php include("fend.inc"); ?>
|
75 |
|
|
</body>
|
76 |
|
|
</html>
|