Project

General

Profile

Download (3.05 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 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
		$rebootmsg = "The system has been reset to factory defaults and is now rebooting. This may take one minute.";
52
	} else {
53
		header("Location: index.php");
54
		exit;
55
	}
56
}
57 b63695db Scott Ullrich
58 d88c6a9f Scott Ullrich
$pgtitle = array("Diagnostics","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 0799d0ff Scott Ullrich
              <p><strong>If you click &quot;Yes&quot;, the firewall will: 
68
	      
69
		<ul>
70
		  <li>Reset to factory defaults</li>
71
		  <li>LAN IP address will be reset to 192.168.1.1</li>
72
		  <li>System will be configured as a DHCP server on the default LAN interface</li>
73
		  <li>Reboot after changes are installed</li>
74
		  <li>WAN interface will be set to obtain an address automatically from a DHCP server</li>
75 cb19ff01 Bill Marquette
		  <li>webConfigurator admin username will be reset to 'admin'</li>
76
		  <li>webConfigurator admin password will be reset to '<?=$g['product_name']?>'</li>
77 0799d0ff Scott Ullrich
		</ul>
78 5b237745 Scott Ullrich
                Are you sure you want to proceed?</strong></p>
79 4d875b4f Scott Ullrich
        <p>
80 5b237745 Scott Ullrich
          <input name="Submit" type="submit" class="formbtn" value=" Yes ">
81
          <input name="Submit" type="submit" class="formbtn" value=" No ">
82
        </p>
83
      </form>
84
<?php endif; ?>
85
<?php include("fend.inc"); ?>
86
</body>
87
</html>