Project

General

Profile

Download (3.23 KB) Statistics
| Branch: | Tag: | Revision:
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 ce77a9c4 Phil Davis
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
7 4d875b4f Scott Ullrich
	All rights reserved.
8
9 47e1f0d4 Phil Davis
	originally part of m0n0wall (http://m0n0.ch/wall)
10 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
	All rights reserved.
12 4d875b4f Scott Ullrich
13 5b237745 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 4d875b4f Scott Ullrich
16 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
17
	   this list of conditions and the following disclaimer.
18 4d875b4f Scott Ullrich
19 5b237745 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 4d875b4f Scott Ullrich
23 5b237745 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 13d193c2 Scott Ullrich
/*
36
	pfSense_MODULE:	config
37
*/
38
39 6b07c15a Matthew Grooms
##|+PRIV
40
##|*IDENT=page-diagnostics-factorydefaults
41
##|*NAME=Diagnostics: Factory defaults page
42
##|*DESCR=Allow access to the 'Diagnostics: Factory defaults' page.
43
##|*MATCH=diag_defaults.php*
44
##|-PRIV
45
46 5b237745 Scott Ullrich
require("guiconfig.inc");
47
48 0acd271b jim-p
if ($_POST['Submit'] == " " . gettext("No") . " ") {
49
	header("Location: index.php");
50
	exit;
51 5b237745 Scott Ullrich
}
52 b63695db Scott Ullrich
53 f8ec8de4 Renato Botelho
$pgtitle = array(gettext("Diagnostics"),gettext("Factory defaults"));
54 b63695db Scott Ullrich
include("head.inc");
55 5b237745 Scott Ullrich
?>
56
57 0acd271b jim-p
<?php if ($_POST['Submit'] == " " . gettext("Yes") . " "):
58 31f03b6c Sjon Hortensius
	print_info_box(gettext("The system has been reset to factory defaults and is now rebooting. This may take a few minutes, depending on your hardware."))?>
59 0acd271b jim-p
<pre>
60
<?php
61
	reset_factory_defaults();
62
	system_reboot();
63
?>
64
</pre>
65 31f03b6c Sjon Hortensius
<?php else:?>
66 5b237745 Scott Ullrich
<form action="diag_defaults.php" method="post">
67 31f03b6c Sjon Hortensius
	<p><strong><?=gettext("If you click") . " &quot;" . gettext("Yes") . "&quot;, " . gettext("the firewall will:")?></strong></p>
68 23e3b2ad jim-p
	<ul>
69 31f03b6c Sjon Hortensius
		<li><?=gettext("Reset to factory defaults")?></li>
70
		<li><?=gettext("LAN IP address will be reset to 192.168.1.1")?></li>
71
		<li><?=gettext("System will be configured as a DHCP server on the default LAN interface")?></li>
72
		<li><?=gettext("Reboot after changes are installed")?></li>
73
		<li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server")?></li>
74
		<li><?=gettext("webConfigurator admin username will be reset to 'admin'")?></li>
75
		<li><?=gettext("webConfigurator admin password will be reset to")?> '<?=$g['factory_shipped_password']?>'</li>
76 23e3b2ad jim-p
	</ul>
77 31f03b6c Sjon Hortensius
	<p><strong><?=gettext("Are you sure you want to proceed?")?></strong></p>
78 23e3b2ad jim-p
	<p>
79 31f03b6c Sjon Hortensius
		<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes")?> " />
80
		<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No")?> " />
81 23e3b2ad jim-p
	</p>
82
</form>
83 31f03b6c Sjon Hortensius
<?php endif?>
84
<?php include("foot.inc")?>