1
|
#!/usr/local/bin/php
|
2
|
<?php
|
3
|
/* $Id$ */
|
4
|
/*
|
5
|
system_advanced.php
|
6
|
part of pfSense
|
7
|
Copyright (C) 2005 Scott Ullrich
|
8
|
|
9
|
originally part of m0n0wall (http://m0n0.ch/wall)
|
10
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
11
|
All rights reserved.
|
12
|
|
13
|
Redistribution and use in source and binary forms, with or without
|
14
|
modification, are permitted provided that the following conditions are met:
|
15
|
|
16
|
1. Redistributions of source code must retain the above copyright notice,
|
17
|
this list of conditions and the following disclaimer.
|
18
|
|
19
|
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
|
|
23
|
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
|
require("guiconfig.inc");
|
36
|
|
37
|
if ($_POST) {
|
38
|
$config['system']['firmware']['branch'] = $_POST['branch'];
|
39
|
write_config();
|
40
|
}
|
41
|
|
42
|
$curcfg = $config['system']['firmware'];
|
43
|
|
44
|
?>
|
45
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
46
|
<html>
|
47
|
<head>
|
48
|
<title><?=gentitle("System: Firmware Settings");?></title>
|
49
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
50
|
<link href="gui.css" rel="stylesheet" type="text/css">
|
51
|
<script language="JavaScript">
|
52
|
<!--
|
53
|
var systemdescs=new Array(4);
|
54
|
systemdescs[0]="This patch system uses a combination of unified and binary diffs. This system requires the least bandwidth, but is less forgiving of errors.";
|
55
|
systemdescs[1]="This patch system uses tar files to update the system. This requires the most bandwidth, but is more reliable.";
|
56
|
systemdescs[2]="This patch system uses tar files for the kernel and base system, and unified diffs for other components.";
|
57
|
|
58
|
var branchinfo=new Array(4);
|
59
|
branchinfo[0]="The stable branch contains only those updates believed to be stable by the developers.";
|
60
|
branchinfo[1]="This branch contains both stable updates as well as those believed to be fairly stable.";
|
61
|
branchinfo[2]="This branch contains all released updates, regardless of stability.";
|
62
|
|
63
|
function update_description(itemnum) {
|
64
|
document.forms[0].branchinfo.value=branchinfo[itemnum];
|
65
|
}
|
66
|
|
67
|
// -->
|
68
|
</script>
|
69
|
</head>
|
70
|
|
71
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
72
|
<form action="system_firmware_settings.php" method="post" name="iform" id="iform">
|
73
|
<?php
|
74
|
include("fbegin.inc");
|
75
|
?>
|
76
|
<p class="pgtitle">System: Firmware Settings</p>
|
77
|
|
78
|
<?php if ($savemsg) print_info_box($savemsg); ?>
|
79
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
80
|
<tr>
|
81
|
<td>
|
82
|
<?php
|
83
|
$tab_array = array();
|
84
|
$tab_array[0] = array("Manual Update", false, "system_firmware.php");
|
85
|
$tab_array[1] = array("Auto Update", false, "system_firmware_check.php");
|
86
|
$tab_array[2] = array("Updater Settings", true, "system_firmware_settings.php");
|
87
|
display_top_tabs($tab_array);
|
88
|
?>
|
89
|
</td>
|
90
|
</tr>
|
91
|
<tr><td class="tabcont"><table width="100%" border="0" cellpadding="6" cellspacing="0">
|
92
|
<tr>
|
93
|
<td colspan="2" valign="top" class="listtopic">Firmware Branch</td>
|
94
|
</tr>
|
95
|
<tr>
|
96
|
<td width="22%" valign="top" class="vncell">Firmware Branch</td>
|
97
|
<td width="78%" class="vtable">
|
98
|
<select onChange="update_description(this.selectedIndex);" name="branch" id="branch">
|
99
|
<option value="stable"<?php if($curcfg['branch']=="stable") echo " SELECTED"; ?>>Stable</option>
|
100
|
<option value="beta"<?php if($curcfg['branch']=="beta") echo " SELECTED"; ?>>Beta</option>
|
101
|
<option value="alpha"<?php if($config['branch']=="alpha") echo " SELECTED"; ?>>Alpha</option>
|
102
|
</select>
|
103
|
<textarea cols="60" rows="2" id="branchinfo" name="branchinfo"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
|
104
|
</textarea>
|
105
|
<script language="javascript">
|
106
|
update_description(document.forms[0].branch.selectedIndex);
|
107
|
</script>
|
108
|
<br><span class="vexpl"><b>Select the update branch you would like this system to track</b></td>
|
109
|
</tr>
|
110
|
<!--
|
111
|
<tr>
|
112
|
<td width="22%" valign="top" class="vncell">Update Preference</td>
|
113
|
<td width="78%" class="vtable">
|
114
|
<select onChange="update_description(branchinfo, this.selectedIndex);" name="branch" id="branch">
|
115
|
<option value="patches"<?php if($curcfg['updates']=="diffs") echo " SELECTED"; ?>>Patches</option>
|
116
|
<option value="full"<?php if($curcfg['updates']=="full") echo " SELECTED"; ?>>Full Updates</option>
|
117
|
<option value="combination"<?php if($config['updates']=="combination") echo " SELECTED"; ?>>Combination</option>
|
118
|
</select>
|
119
|
<textarea cols="60" rows="2" id="info" name="info"style="border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;">
|
120
|
</textarea>
|
121
|
<script language="javascript">
|
122
|
update_description(branchinfo, document.forms[0].optimization.selectedIndex);
|
123
|
</script>
|
124
|
<br><span class="vexpl"><b>Select the update branch you would like this system to track</b></td>
|
125
|
</tr>
|
126
|
-->
|
127
|
<tr>
|
128
|
<td width="22%" valign="top"> </td>
|
129
|
<td width="78%">
|
130
|
<input name="Submit" type="submit" class="formbtn" value="Save">
|
131
|
</td>
|
132
|
</tr>
|
133
|
<tr>
|
134
|
<td colspan="2" class="list" height="12"></td>
|
135
|
</tr>
|
136
|
</table></td></tr></table>
|
137
|
</form>
|
138
|
<?php include("fend.inc"); ?>
|
139
|
</body>
|
140
|
</html>
|