Project

General

Profile

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