Project

General

Profile

Download (3.18 KB) Statistics
| Branch: | Tag: | Revision:
1 4d875b4f Scott Ullrich
<?php
2 5b237745 Scott Ullrich
/*
3 c5d81585 Renato Botelho
 * diag_defaults.php
4 9da2cf1c Stephen Beaver
 *
5 c5d81585 Renato Botelho
 * part of pfSense (https://www.pfsense.org)
6 81299b5c Renato Botelho
 * Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
7 c5d81585 Renato Botelho
 * All rights reserved.
8 fd9ebcd5 Stephen Beaver
 *
9 c5d81585 Renato Botelho
 * originally based on m0n0wall (http://m0n0.ch/wall)
10
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
 * All rights reserved.
12 fd9ebcd5 Stephen Beaver
 *
13 b12ea3fb Renato Botelho
 * Licensed under the Apache License, Version 2.0 (the "License");
14
 * you may not use this file except in compliance with the License.
15
 * You may obtain a copy of the License at
16 fd9ebcd5 Stephen Beaver
 *
17 b12ea3fb Renato Botelho
 * http://www.apache.org/licenses/LICENSE-2.0
18 fd9ebcd5 Stephen Beaver
 *
19 b12ea3fb Renato Botelho
 * Unless required by applicable law or agreed to in writing, software
20
 * distributed under the License is distributed on an "AS IS" BASIS,
21
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 * See the License for the specific language governing permissions and
23
 * limitations under the License.
24 fd9ebcd5 Stephen Beaver
 */
25 5b237745 Scott Ullrich
26 6b07c15a Matthew Grooms
##|+PRIV
27
##|*IDENT=page-diagnostics-factorydefaults
28 5230f468 jim-p
##|*NAME=Diagnostics: Factory defaults
29 6b07c15a Matthew Grooms
##|*DESCR=Allow access to the 'Diagnostics: Factory defaults' page.
30
##|*MATCH=diag_defaults.php*
31
##|-PRIV
32
33 c81ef6e2 Phil Davis
require_once("guiconfig.inc");
34 5b237745 Scott Ullrich
35 0acd271b jim-p
if ($_POST['Submit'] == " " . gettext("No") . " ") {
36
	header("Location: index.php");
37
	exit;
38 5b237745 Scott Ullrich
}
39 b63695db Scott Ullrich
40 a6a6ee00 k-paulius
$pgtitle = array(gettext("Diagnostics"), gettext("Factory Defaults"));
41 b63695db Scott Ullrich
include("head.inc");
42 5b237745 Scott Ullrich
?>
43
44 0acd271b jim-p
<?php if ($_POST['Submit'] == " " . gettext("Yes") . " "):
45 b6078bed NOYB
	print_info_box(gettext("The system has been reset to factory defaults and is now rebooting. This may take a few minutes, depending on the hardware."))?>
46 0acd271b jim-p
<pre>
47
<?php
48
	reset_factory_defaults();
49
	system_reboot();
50
?>
51
</pre>
52 31f03b6c Sjon Hortensius
<?php else:?>
53 7e3c57cd Colin Fleming
<div class="panel panel-default">
54
	<div class="panel-heading">
55 b6078bed NOYB
		<h2 class="panel-title"><?=gettext("Factory Defaults Reset")?></h2>
56 7e3c57cd Colin Fleming
	</div>
57
	<div class="panel-body">
58
		<div class="content">
59
			<form action="diag_defaults.php" method="post">
60 89854d71 NewEraCracker
				<p><strong><?=gettext('Resetting the system to factory defaults will remove all user configuration and apply the following settings:')?></strong></p>
61 7e3c57cd Colin Fleming
				<ul>
62
					<li><?=gettext("Reset to factory defaults")?></li>
63
					<li><?=gettext("LAN IP address will be reset to 192.168.1.1")?></li>
64
					<li><?=gettext("System will be configured as a DHCP server on the default LAN interface")?></li>
65
					<li><?=gettext("Reboot after changes are installed")?></li>
66
					<li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server")?></li>
67
					<li><?=gettext("webConfigurator admin username will be reset to 'admin'")?></li>
68 3eaa57a2 Phil Davis
					<li><?=sprintf(gettext("webConfigurator admin password will be reset to '%s'"), $g['factory_shipped_password'])?></li>
69 7e3c57cd Colin Fleming
				</ul>
70
				<p><strong><?=gettext("Are you sure you want to proceed?")?></strong></p>
71
				<p>
72 37676f4e jim-p
					<button name="Submit" type="submit" class="btn btn-sm btn-danger" value=" <?=gettext("Yes")?> " title="<?=gettext("Perform a factory reset")?>">
73
						<i class="fa fa-undo"></i>
74 6400975d jim-p
						<?=gettext("Factory Reset")?>
75 37676f4e jim-p
					</button>
76
					<button name="Submit" type="submit" class="btn btn-sm btn-success" value=" <?=gettext("No")?> " title="<?=gettext("Return to the dashboard")?>">
77
						<i class="fa fa-save"></i>
78 6400975d jim-p
						<?=gettext("Keep Configuration")?>
79 37676f4e jim-p
					</button>
80 7e3c57cd Colin Fleming
				</p>
81
			</form>
82
		</div>
83
	</div>
84
</div>
85 31f03b6c Sjon Hortensius
<?php endif?>
86 c10cb196 Stephen Beaver
<?php include("foot.inc")?>