1
|
<?php
|
2
|
/* $Id$ */
|
3
|
/*
|
4
|
diag_defaults.php
|
5
|
Copyright (C) 2004 Scott Ullrich
|
6
|
All rights reserved.
|
7
|
|
8
|
originially part of m0n0wall (http://m0n0.ch/wall)
|
9
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
10
|
All rights reserved.
|
11
|
|
12
|
Redistribution and use in source and binary forms, with or without
|
13
|
modification, are permitted provided that the following conditions are met:
|
14
|
|
15
|
1. Redistributions of source code must retain the above copyright notice,
|
16
|
this list of conditions and the following disclaimer.
|
17
|
|
18
|
2. Redistributions in binary form must reproduce the above copyright
|
19
|
notice, this list of conditions and the following disclaimer in the
|
20
|
documentation and/or other materials provided with the distribution.
|
21
|
|
22
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
23
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
24
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
25
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
26
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
27
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
29
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
30
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
31
|
POSSIBILITY OF SUCH DAMAGE.
|
32
|
*/
|
33
|
|
34
|
##|+PRIV
|
35
|
##|*IDENT=page-diagnostics-factorydefaults
|
36
|
##|*NAME=Diagnostics: Factory defaults page
|
37
|
##|*DESCR=Allow access to the 'Diagnostics: Factory defaults' page.
|
38
|
##|*MATCH=diag_defaults.php*
|
39
|
##|-PRIV
|
40
|
|
41
|
|
42
|
require("guiconfig.inc");
|
43
|
|
44
|
if ($_POST) {
|
45
|
if ($_POST['Submit'] != " No ") {
|
46
|
reset_factory_defaults();
|
47
|
system_reboot();
|
48
|
$rebootmsg = "The system has been reset to factory defaults and is now rebooting. This may take one minute.";
|
49
|
} else {
|
50
|
header("Location: index.php");
|
51
|
exit;
|
52
|
}
|
53
|
}
|
54
|
|
55
|
$pgtitle = array("Diagnostics","Factory defaults");
|
56
|
include("head.inc");
|
57
|
|
58
|
?>
|
59
|
|
60
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
61
|
<?php include("fbegin.inc"); ?>
|
62
|
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
|
63
|
<form action="diag_defaults.php" method="post">
|
64
|
<p><strong>If you click "Yes", the firewall will:
|
65
|
|
66
|
<ul>
|
67
|
<li>Reset to factory defaults</li>
|
68
|
<li>LAN IP address will be reset to 192.168.1.1</li>
|
69
|
<li>System will be configured as a DHCP server on the default LAN interface</li>
|
70
|
<li>Reboot after changes are installed</li>
|
71
|
<li>WAN interface will be set to obtain an address automatically from a DHCP server</li>
|
72
|
<li>webConfigurator admin username will be reset to 'admin'</li>
|
73
|
<li>webConfigurator admin password will be reset to '<?=$g['product_name']?>'</li>
|
74
|
</ul>
|
75
|
Are you sure you want to proceed?</strong></p>
|
76
|
<p>
|
77
|
<input name="Submit" type="submit" class="formbtn" value=" Yes ">
|
78
|
<input name="Submit" type="submit" class="formbtn" value=" No ">
|
79
|
</p>
|
80
|
</form>
|
81
|
<?php endif; ?>
|
82
|
<?php include("fend.inc"); ?>
|
83
|
</body>
|
84
|
</html>
|