Project

General

Profile

Download (2.43 KB) Statistics
| Branch: | Tag: | Revision:
1 56977a25 Scott Ullrich
#!/usr/local/bin/php
2 8a3be31a Scott Ullrich
<?php
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
35
require("guiconfig.inc");
36
37
if ($_POST) {
38
	if ($_POST['Submit'] != " No ") {
39 77da5d3e Scott Ullrich
		system_halt();
40 56977a25 Scott Ullrich
		$rebootmsg = "The system is halting now. This may take one minute.";
41
	} else {
42
		header("Location: index.php");
43
		exit;
44
	}
45
}
46
?>
47
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
48
<html>
49
<head>
50 8a3be31a Scott Ullrich
<title><?=gentitle("Halt system");?></title>
51 56977a25 Scott Ullrich
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
52
<link href="gui.css" rel="stylesheet" type="text/css">
53
</head>
54
55
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
56
<?php include("fbegin.inc"); ?>
57
<p class="pgtitle">Halt system</p>
58
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
59 8a3be31a Scott Ullrich
      <form action="halt.php" method="post">
60 56977a25 Scott Ullrich
        <p><strong>Are you sure you want to halt the system?</strong></p>
61 8a3be31a Scott Ullrich
        <p>
62 56977a25 Scott Ullrich
          <input name="Submit" type="submit" class="formbtn" value=" Yes ">
63
          <input name="Submit" type="submit" class="formbtn" value=" No ">
64
        </p>
65
      </form>
66
<?php endif; ?>
67
<?php include("fend.inc"); ?>
68
</body>
69
</html>