Project

General

Profile

Download (2.53 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php 
2
/* $Id$ */
3
/*
4
	reboot.php
5
	part of m0n0wall (http://m0n0.ch/wall)
6
	
7
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
8
	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
##|+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
require("guiconfig.inc");
41
require("functions.inc");
42
require("captiveportal.inc");
43

    
44
if ($_POST['Submit'] == " " . gettext("No") . " ") {
45
	header("Location: index.php");
46
	exit;
47
}
48

    
49
$pgtitle = array(gettext("Diagnostics"),gettext("Reboot System"));
50
include("head.inc");
51

    
52
?>
53
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
54
<?php include("fbegin.inc"); ?>
55
<?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
	<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> " />
66
	<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> " />
67
	</p>
68
</form>
69
<?php endif; ?>
70
<?php include("fend.inc"); ?>
71
</body>
72
</html>
(136-136/256)