Projet

Général

Profil

Télécharger (3,3 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / diag_defaults.php @ ed80f8e5

1
<?php
2
/* $Id$ */
3
/*
4
	diag_defaults.php
5
	Copyright (C) 2004-2009 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
/*
35
	pfSense_MODULE:	config
36
*/
37

    
38
##|+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
require("guiconfig.inc");
46

    
47
if ($_POST['Submit'] == " " . gettext("No") . " ") {
48
	header("Location: index.php");
49
	exit;
50
}
51

    
52
$pgtitle = array(gettext("Diagnostics"),gettext("Factory defaults"));
53
include("head.inc");
54

    
55
?>
56

    
57
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
58
<?php include("fbegin.inc"); ?>
59

    
60
<?php if ($_POST['Submit'] == " " . gettext("Yes") . " "):
61
	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.")); ?>
62
<pre>
63
<?php
64
	reset_factory_defaults();
65
	system_reboot();
66
?>
67
</pre>
68
<?php else: ?>
69
<form action="diag_defaults.php" method="post">
70
	<p><strong> <?=gettext("If you click") . " &quot;" . gettext("Yes") . "&quot;, " . gettext("the firewall will:")?></strong></p>
71
	<ul>
72
		<li><?=gettext("Reset to factory defaults");?></li>
73
		<li><?=gettext("LAN IP address will be reset to 192.168.1.1");?></li>
74
		<li><?=gettext("System will be configured as a DHCP server on the default LAN interface");?></li>
75
		<li><?=gettext("Reboot after changes are installed");?></li>
76
		<li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server");?></li>
77
		<li><?=gettext("webConfigurator admin username will be reset to 'admin'");?></li>
78
		<li><?=gettext("webConfigurator admin password will be reset to");?> '<?=$g['factory_shipped_password']?>'</li>
79
	</ul>
80
	<p><strong><?=gettext("Are you sure you want to proceed?");?></strong></p>
81
	<p>
82
		<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("Yes");?> " />
83
		<input name="Submit" type="submit" class="formbtn" value=" <?=gettext("No");?> " />
84
	</p>
85
</form>
86
<?php endif; ?>
87
<?php include("fend.inc"); ?>
88
</body>
89
</html>
(9-9/254)