1 |
4d875b4f
|
Scott Ullrich
|
<?php
|
2 |
b46bfcf5
|
Bill Marquette
|
/* $Id$ */
|
3 |
5b237745
|
Scott Ullrich
|
/*
|
4 |
|
|
diag_defaults.php
|
5 |
13d193c2
|
Scott Ullrich
|
Copyright (C) 2004-2009 Scott Ullrich
|
6 |
4d875b4f
|
Scott Ullrich
|
All rights reserved.
|
7 |
|
|
|
8 |
|
|
originially part of m0n0wall (http://m0n0.ch/wall)
|
9 |
5b237745
|
Scott Ullrich
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
10 |
|
|
All rights reserved.
|
11 |
4d875b4f
|
Scott Ullrich
|
|
12 |
5b237745
|
Scott Ullrich
|
Redistribution and use in source and binary forms, with or without
|
13 |
|
|
modification, are permitted provided that the following conditions are met:
|
14 |
4d875b4f
|
Scott Ullrich
|
|
15 |
5b237745
|
Scott Ullrich
|
1. Redistributions of source code must retain the above copyright notice,
|
16 |
|
|
this list of conditions and the following disclaimer.
|
17 |
4d875b4f
|
Scott Ullrich
|
|
18 |
5b237745
|
Scott Ullrich
|
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 |
4d875b4f
|
Scott Ullrich
|
|
22 |
5b237745
|
Scott Ullrich
|
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 |
13d193c2
|
Scott Ullrich
|
/*
|
35 |
|
|
pfSense_MODULE: config
|
36 |
|
|
*/
|
37 |
|
|
|
38 |
6b07c15a
|
Matthew Grooms
|
##|+PRIV
|
39 |
|
|
##|*IDENT=page-diagnostics-factorydefaults
|
40 |
|
|
##|*NAME=Diagnostics: Factory defaults page
|
41 |
|
|
##|*DESCR=Allow access to the 'Diagnostics: Factory defaults' page.
|
42 |
|
|
##|*MATCH=diag_defaults.php*
|
43 |
|
|
##|-PRIV
|
44 |
|
|
|
45 |
5b237745
|
Scott Ullrich
|
require("guiconfig.inc");
|
46 |
|
|
|
47 |
|
|
if ($_POST) {
|
48 |
|
|
if ($_POST['Submit'] != " No ") {
|
49 |
|
|
reset_factory_defaults();
|
50 |
|
|
system_reboot();
|
51 |
a86c158d
|
jim-p
|
$rebootmsg = gettext("The system has been reset to factory defaults and is now rebooting. This may take a few minutes, depending on your hardware.");
|
52 |
5b237745
|
Scott Ullrich
|
} else {
|
53 |
|
|
header("Location: index.php");
|
54 |
|
|
exit;
|
55 |
|
|
}
|
56 |
|
|
}
|
57 |
b63695db
|
Scott Ullrich
|
|
58 |
f8ec8de4
|
Renato Botelho
|
$pgtitle = array(gettext("Diagnostics"),gettext("Factory defaults"));
|
59 |
b63695db
|
Scott Ullrich
|
include("head.inc");
|
60 |
|
|
|
61 |
5b237745
|
Scott Ullrich
|
?>
|
62 |
|
|
|
63 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
64 |
|
|
<?php include("fbegin.inc"); ?>
|
65 |
|
|
<?php if ($rebootmsg): echo print_info_box($rebootmsg); else: ?>
|
66 |
|
|
<form action="diag_defaults.php" method="post">
|
67 |
ad3bca61
|
Carlos Eduardo Ramos
|
<p><strong> <?=gettext("If you click") . " "" . gettext("Yes") . "", " . gettext("the firewall will:")?>
|
68 |
f8ec8de4
|
Renato Botelho
|
|
69 |
0799d0ff
|
Scott Ullrich
|
<ul>
|
70 |
f8ec8de4
|
Renato Botelho
|
<li><?=gettext("Reset to factory defaults");?></li>
|
71 |
|
|
<li><?=gettext("LAN IP address will be reset to 192.168.1.1");?></li>
|
72 |
|
|
<li><?=gettext("System will be configured as a DHCP server on the default LAN interface");?></li>
|
73 |
|
|
<li><?=gettext("Reboot after changes are installed");?></li>
|
74 |
|
|
<li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server");?></li>
|
75 |
|
|
<li><?=gettext("webConfigurator admin username will be reset to 'admin'");?></li>
|
76 |
75bf4f14
|
Chris Buechler
|
<li><?=gettext("webConfigurator admin password will be reset to");?> '<?=$g['factory_shipped_password']?>'</li>
|
77 |
f8ec8de4
|
Renato Botelho
|
|
78 |
0799d0ff
|
Scott Ullrich
|
</ul>
|
79 |
f8ec8de4
|
Renato Botelho
|
<?=gettext("Are you sure you want to proceed?");?></strong></p>
|
80 |
4d875b4f
|
Scott Ullrich
|
<p>
|
81 |
f8ec8de4
|
Renato Botelho
|
<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> ">
|
82 |
|
|
<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> ">
|
83 |
5b237745
|
Scott Ullrich
|
</p>
|
84 |
|
|
</form>
|
85 |
|
|
<?php endif; ?>
|
86 |
|
|
<?php include("fend.inc"); ?>
|
87 |
|
|
</body>
|
88 |
|
|
</html>
|