Project

General

Profile

Download (2.51 KB) Statistics
| Branch: | Tag: | Revision:

univnautes / usr / local / www / halt.php @ a1b66bec

1
<?php
2
/* $Id$ */
3
/*
4
	halt.php
5
	part of pfSense
6
	Copyright (C) 2004 Scott Ullrich
7
	All rights reserved.
8

    
9
	part of m0n0wall as reboot.php (http://m0n0.ch/wall)
10
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
	All rights reserved.
12

    
13
	Redistribution and use in source and binary forms, with or without
14
	modification, are permitted provided that the following conditions are met:
15

    
16
	1. Redistributions of source code must retain the above copyright notice,
17
	   this list of conditions and the following disclaimer.
18

    
19
	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

    
23
	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
/*
35
	pfSense_MODULE:	header
36
*/
37

    
38
##|+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
require("guiconfig.inc");
46
require("functions.inc");
47
require("captiveportal.inc");
48

    
49
if ($_POST['Submit'] == " " . gettext("No") . " ") {
50
	header("Location: index.php");
51
	exit;
52
}
53

    
54
$pgtitle = array(gettext("Diagnostics"),gettext("Halt system"));
55
include('head.inc');
56
?>
57

    
58
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
59
<?php include("fbegin.inc"); ?>
60
<?php if ($_POST['Submit'] == " " . gettext("Yes") . " "):
61
	print_info_box(gettext("The system is halting now. This may take one minute.")); ?>
62
<pre>
63
<?php 	system_halt(); ?>
64
</pre>
65
<?php else: ?>
66
<form action="halt.php" method="post">
67
	<p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p>
68
	<p>
69
	<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes"); ?> " />
70
	<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No"); ?> " />
71
	</p>
72
</form>
73
<?php endif; ?>
74
<?php include("fend.inc"); ?>
75
</body>
76
</html>
(89-89/256)