Project

General

Profile

Download (16.3 KB) Statistics
| Branch: | Tag: | Revision:
1 04ad7c7c Scott Ullrich
<?php
2 62d01225 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	system.php
5
	part of m0n0wall (http://m0n0.ch/wall)
6 04ad7c7c Scott Ullrich
7 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9 04ad7c7c Scott Ullrich
10 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12 04ad7c7c Scott Ullrich
13 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15 04ad7c7c Scott Ullrich
16 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19 04ad7c7c Scott Ullrich
20 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31
32
require("guiconfig.inc");
33
34
$pconfig['hostname'] = $config['system']['hostname'];
35
$pconfig['domain'] = $config['system']['domain'];
36 93e0800d Scott Ullrich
list($pconfig['dns1'],$pconfig['dns2'],$pconfig['dns3'],$pconfig['dns4']) = $config['system']['dnsserver'];
37 0d8a219e Scott Ullrich
38 e151909a Scott Dale
39 e180a6e3 Scott Ullrich
$pconfig['dns1gwint'] = $config['system']['dns1gwint'];
40
$pconfig['dns2gwint'] = $config['system']['dns2gwint'];
41 93e0800d Scott Ullrich
$pconfig['dns3gwint'] = $config['system']['dns3gwint'];
42
$pconfig['dns4gwint'] = $config['system']['dns4gwint'];
43 e180a6e3 Scott Ullrich
44 5b237745 Scott Ullrich
$pconfig['dnsallowoverride'] = isset($config['system']['dnsallowoverride']);
45
$pconfig['webguiproto'] = $config['system']['webgui']['protocol'];
46
if (!$pconfig['webguiproto'])
47
	$pconfig['webguiproto'] = "http";
48
$pconfig['webguiport'] = $config['system']['webgui']['port'];
49
$pconfig['timezone'] = $config['system']['timezone'];
50
$pconfig['timeupdateinterval'] = $config['system']['time-update-interval'];
51
$pconfig['timeservers'] = $config['system']['timeservers'];
52 f0f7a3eb Scott Ullrich
$pconfig['theme'] = $config['system']['theme'];
53 5b237745 Scott Ullrich
54
if (!isset($pconfig['timeupdateinterval']))
55
	$pconfig['timeupdateinterval'] = 300;
56
if (!$pconfig['timezone'])
57
	$pconfig['timezone'] = "Etc/UTC";
58
if (!$pconfig['timeservers'])
59
	$pconfig['timeservers'] = "pool.ntp.org";
60 04ad7c7c Scott Ullrich
61 417c6042 Bill Marquette
$changedesc = "System: ";
62 62d01225 Bill Marquette
$changecount = 0;
63 417c6042 Bill Marquette
64 5b237745 Scott Ullrich
function is_timezone($elt) {
65
	return !preg_match("/\/$/", $elt);
66
}
67
68 aa1ab1da Scott Ullrich
if($pconfig['timezone'] <> $_POST['timezone']) {
69
	/* restart firewall log dumper helper */
70
	require_once("functions.inc");
71 87c20eb5 Bill Marquette
	$pid = `ps awwwux | grep -v "grep" | grep "tcpdump -v -l -n -e -ttt -i pflog0"  | awk '{ print $2 }'`;
72 aa1ab1da Scott Ullrich
	if($pid) {
73
		mwexec("kill $pid");
74
		usleep(1000);
75
	}		
76
	filter_pflog_start();
77
}
78
79 5b237745 Scott Ullrich
exec('/usr/bin/tar -tzf /usr/share/zoneinfo.tgz', $timezonelist);
80
$timezonelist = array_filter($timezonelist, 'is_timezone');
81
sort($timezonelist);
82
83
if ($_POST) {
84
85 c668c964 Scott Ullrich
	$changecount++;
86 e180a6e3 Scott Ullrich
	
87 5b237745 Scott Ullrich
	unset($input_errors);
88
	$pconfig = $_POST;
89
90
	/* input validation */
91 ec5a5d65 Scott Dale
	$reqdfields = split(" ", "hostname domain");
92
	$reqdfieldsn = split(",", "Hostname,Domain");
93 04ad7c7c Scott Ullrich
94 5b237745 Scott Ullrich
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
95 04ad7c7c Scott Ullrich
96 5b237745 Scott Ullrich
	if ($_POST['hostname'] && !is_hostname($_POST['hostname'])) {
97
		$input_errors[] = "The hostname may only contain the characters a-z, 0-9 and '-'.";
98
	}
99
	if ($_POST['domain'] && !is_domain($_POST['domain'])) {
100
		$input_errors[] = "The domain may only contain the characters a-z, 0-9, '-' and '.'.";
101
	}
102
	if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2']))) {
103
		$input_errors[] = "A valid IP address must be specified for the primary/secondary DNS server.";
104
	}
105 93e0800d Scott Ullrich
	if (($_POST['dns3'] && !is_ipaddr($_POST['dns3'])) || ($_POST['dns4'] && !is_ipaddr($_POST['dns4']))) {
106
		$input_errors[] = "A valid IP address must be specified for the primary/secondary DNS server.";
107
	}	
108 04ad7c7c Scott Ullrich
	if ($_POST['webguiport'] && (!is_numericint($_POST['webguiport']) ||
109 5b237745 Scott Ullrich
			($_POST['webguiport'] < 1) || ($_POST['webguiport'] > 65535))) {
110 709cc6e0 Bill Marquette
		$input_errors[] = "A valid TCP/IP port must be specified for the webConfigurator port.";
111 5b237745 Scott Ullrich
	}
112
	if (($_POST['password']) && ($_POST['password'] != $_POST['password2'])) {
113
		$input_errors[] = "The passwords do not match.";
114
	}
115 04ad7c7c Scott Ullrich
116 5b237745 Scott Ullrich
	$t = (int)$_POST['timeupdateinterval'];
117
	if (($t < 0) || (($t > 0) && ($t < 6)) || ($t > 1440)) {
118
		$input_errors[] = "The time update interval must be either 0 (disabled) or between 6 and 1440.";
119
	}
120
	foreach (explode(' ', $_POST['timeservers']) as $ts) {
121
		if (!is_domain($ts)) {
122
			$input_errors[] = "A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.";
123
		}
124
	}
125
126
	if (!$input_errors) {
127 9eab73da Bill Marquette
		update_if_changed("hostname", $config['system']['hostname'], strtolower($_POST['hostname']));
128
		update_if_changed("domain", $config['system']['domain'], strtolower($_POST['domain']));
129 79f8694f Bill Marquette
130 a6b0fbf7 Bill Marquette
		if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto']))
131
			$restart_webgui = true;
132
		if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport']))
133 37d160c2 Bill Marquette
			$restart_webgui = true;
134
135 9eab73da Bill Marquette
		update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
136
		update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
137
		update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
138 04ad7c7c Scott Ullrich
139 f0f7a3eb Scott Ullrich
		/* pfSense themes */
140 20b90e0a Scott Ullrich
		update_if_changed("System Theme", $config['theme'], $_POST['theme']);
141 f0f7a3eb Scott Ullrich
142 4fbf63aa Bill Marquette
		/* XXX - billm: these still need updating after figuring out how to check if they actually changed */
143 5b237745 Scott Ullrich
		unset($config['system']['dnsserver']);
144
		if ($_POST['dns1'])
145
			$config['system']['dnsserver'][] = $_POST['dns1'];
146
		if ($_POST['dns2'])
147
			$config['system']['dnsserver'][] = $_POST['dns2'];
148 93e0800d Scott Ullrich
		if ($_POST['dns3'])
149
			$config['system']['dnsserver'][] = $_POST['dns3'];
150
		if ($_POST['dns4'])
151
			$config['system']['dnsserver'][] = $_POST['dns4'];
152 04ad7c7c Scott Ullrich
153 07bd3f83 Scott Ullrich
		$olddnsallowoverride = $config['system']['dnsallowoverride'];
154 20b90e0a Scott Ullrich
155 0d8a219e Scott Ullrich
		unset($config['system']['dnsallowoverride']);
156 5b237745 Scott Ullrich
		$config['system']['dnsallowoverride'] = $_POST['dnsallowoverride'] ? true : false;
157 e180a6e3 Scott Ullrich
158
		if ($_POST['password']) {
159
			$config['system']['password'] = crypt($_POST['password']);
160 62d489e7 Scott Ullrich
			update_changedesc("password changed via webConfigurator");
161 20b90e0a Scott Ullrich
			sync_webgui_passwords();
162 e180a6e3 Scott Ullrich
		}
163
164
		/* which interface should the dns servers resolve through? */
165
		if($_POST['dns1gwint']) 
166
			$config['system']['dns1gwint'] = $pconfig['dns1gwint'];
167
		else 
168
			unset($config['system']['dns1gwint']);
169
		if($_POST['dns2gwint']) 
170
			$config['system']['dns2gwint'] = $pconfig['dns2gwint'];
171
		else
172
			unset($config['system']['dns2gwint']);
173 93e0800d Scott Ullrich
		if($_POST['dns3gwint']) 
174
			$config['system']['dns1gwint'] = $pconfig['dns3gwint'];
175
		else 
176
			unset($config['system']['dns3gwint']);
177
		if($_POST['dns4gwint']) 
178
			$config['system']['dns4gwint'] = $pconfig['dns4gwint'];
179
		else
180
			unset($config['system']['dns4gwint']);
181 04ad7c7c Scott Ullrich
182 62d01225 Bill Marquette
		if ($changecount > 0)
183
			write_config($changedesc);
184 04ad7c7c Scott Ullrich
185 6485deb5 Bill Marquette
		if ($restart_webgui) {
186
			global $_SERVER;
187 a6b0fbf7 Bill Marquette
			list($host) = explode(":", $_SERVER['HTTP_HOST']);
188
			if ($config['system']['webgui']['port']) {
189
				$url="{$config['system']['webgui']['protocol']}://{$host}:{$config['system']['webgui']['port']}/system.php";
190 6485deb5 Bill Marquette
			} else {
191 a6b0fbf7 Bill Marquette
				$url = "{$config['system']['webgui']['protocol']}://{$host}/system.php";
192 6485deb5 Bill Marquette
			}
193
		}
194
195 5b237745 Scott Ullrich
		$retval = 0;
196 3cfdba5f Scott Ullrich
		config_lock();
197
		$retval = system_hostname_configure();
198
		$retval |= system_hosts_generate();
199
		$retval |= system_resolvconf_generate();
200
		$retval |= system_password_configure();
201
		$retval |= services_dnsmasq_configure();
202
		$retval |= system_timezone_configure();
203
		$retval |= system_ntp_configure();
204
205
		if ($olddnsallowoverride != $config['system']['dnsallowoverride'])
206
			$retval |= interfaces_wan_configure();
207
208
		config_unlock();
209 04ad7c7c Scott Ullrich
210 5b237745 Scott Ullrich
		$savemsg = get_std_save_message($retval);
211 6485deb5 Bill Marquette
		if ($restart_webgui)
212 991f7f37 Scott Ullrich
			$savemsg .= "<br />One moment...redirecting to {$url} in 10 seconds.";
213 5b237745 Scott Ullrich
	}
214
}
215 4df96eff Scott Ullrich
216 d88c6a9f Scott Ullrich
$pgtitle = array("System","General Setup");
217 4df96eff Scott Ullrich
include("head.inc");
218
219 5b237745 Scott Ullrich
?>
220 4df96eff Scott Ullrich
221 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
222
<?php include("fbegin.inc"); ?>
223
<?php if ($input_errors) print_input_errors($input_errors); ?>
224
<?php if ($savemsg) print_info_box($savemsg); ?>
225
<form action="system.php" method="post">
226
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
227 04ad7c7c Scott Ullrich
                <tr>
228 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncellreq">Hostname</td>
229 b5c78501 Seth Mos
                  <td width="78%" class="vtable"> <input name="hostname" type="text" class="formfld unknown" id="hostname" size="40" value="<?=htmlspecialchars($pconfig['hostname']);?>">
230 04ad7c7c Scott Ullrich
                    <br> <span class="vexpl">name of the firewall host, without
231 5b237745 Scott Ullrich
                    domain part<br>
232
                    e.g. <em>firewall</em></span></td>
233
                </tr>
234 04ad7c7c Scott Ullrich
                <tr>
235 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncellreq">Domain</td>
236 b5c78501 Seth Mos
                  <td width="78%" class="vtable"> <input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
237 5b237745 Scott Ullrich
                    <br> <span class="vexpl">e.g. <em>mycorp.com</em> </span></td>
238
                </tr>
239 04ad7c7c Scott Ullrich
                <tr>
240 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">DNS servers</td>
241 04ad7c7c Scott Ullrich
                  <td width="78%" class="vtable"> <p>
242 b8cfc022 Scott Ullrich
                  <table>
243
                  	  <tr><td><b>DNS Server</td>
244 e180a6e3 Scott Ullrich
                      <?php
245
                      	$multiwan = false;
246
                      	foreach($config['interfaces'] as $int) 
247 b875f306 Scott Ullrich
                      		if($int['gateway']) 
248 e180a6e3 Scott Ullrich
                      			$multiwan = true;
249 961d69fc Scott Ullrich
                      	$ints = get_interface_list();
250 b8cfc022 Scott Ullrich
                      	if($multiwan) 
251
                      		echo "<td><b>Use gateway</td>";
252
                      ?>
253
                      </tr>
254 b875f306 Scott Ullrich
<?php for($dnscounter=1; $dnscounter<5; $dnscounter++): ?>
255 b8cfc022 Scott Ullrich
                      <tr>
256 b875f306 Scott Ullrich
                      <td>
257 e151909a Scott Dale
                      <input name="dns<?php echo $dnscounter;?>" type="text" class="formfld unknown" id="dns<?php echo $dnscounter;?>" size="20" value="<?php echo $pconfig['dns'.$dnscounter];?>">
258 b8cfc022 Scott Ullrich
                      </td>
259 e180a6e3 Scott Ullrich
                      <?php
260
                      	if($multiwan) {
261 b875f306 Scott Ullrich
                      		echo "<td><select name='dns{$dnscounter}gwint'>\n";
262
                      		echo "<option value=''>wan</option>";
263 e180a6e3 Scott Ullrich
                      		foreach($ints as $int) {
264 b8cfc022 Scott Ullrich
	                      		$friendly = $int['friendly'];
265 b875f306 Scott Ullrich
                      			if($config['interfaces'][$friendly]['gateway']) {
266 b8cfc022 Scott Ullrich
	                   				$selected = "";
267 b875f306 Scott Ullrich
	                   				if($pconfig['dns{$dnscounter}gwint'] == $int) 
268 b8cfc022 Scott Ullrich
	                   					$selected = " SELECTED";
269
	                   				echo "<option value='{$friendly}'{$selected}>{$friendly}</option>";
270 e180a6e3 Scott Ullrich
                      			}
271
                      		}
272
                      		echo "</select>";
273
                      	}
274
                      ?>
275 b875f306 Scott Ullrich
                      </td>
276 b8cfc022 Scott Ullrich
                      </tr>
277 b875f306 Scott Ullrich
<?php endfor; ?>
278 b8cfc022 Scott Ullrich
                      </table>
279 5b237745 Scott Ullrich
                      <br>
280 04ad7c7c Scott Ullrich
                      <span class="vexpl">IP addresses; these are also used for
281 b8cfc022 Scott Ullrich
                      the DHCP service, DNS forwarder and for PPTP VPN clients.
282
                      <br>
283
                      <?php
284
                      	if($multiwan) 
285
                      		echo "<br/>In addition, select the gateway for each DNS server.  You should have a unique DNS server per gateway.<br/>";
286
                      ?>
287 5b237745 Scott Ullrich
                      <br>
288 07bd3f83 Scott Ullrich
                      <input name="dnsallowoverride" type="checkbox" id="dnsallowoverride" value="yes" <?php if ($pconfig['dnsallowoverride']) echo "checked"; ?>>
289 04ad7c7c Scott Ullrich
                      <strong>Allow DNS server list to be overridden by DHCP/PPP
290 5b237745 Scott Ullrich
                      on WAN</strong><br>
291 1cc00e4d Bill Marquette
                      If this option is set, <?php echo $g['product_name']; ?> will use DNS servers assigned
292 04ad7c7c Scott Ullrich
                      by a DHCP/PPP server on WAN for its own purposes (including
293
                      the DNS forwarder). They will not be assigned to DHCP and
294 5b237745 Scott Ullrich
                      PPTP VPN clients, though.</span></p></td>
295
                </tr>
296 04ad7c7c Scott Ullrich
                <tr>
297 709cc6e0 Bill Marquette
                  <td width="22%" valign="top" class="vncell">webConfigurator protocol</td>
298 2ecd3a0d Colin Smith
                  <td width="78%" class="vtable"> <input name="webguiproto" type="radio" value="http" <?php if ($pconfig['webguiproto'] == "http") echo "checked"; ?>>
299
                    HTTP &nbsp;&nbsp;&nbsp; <input type="radio" name="webguiproto" value="https" <?php if ($pconfig['webguiproto'] == "https") echo "checked"; ?>>
300 5b237745 Scott Ullrich
                    HTTPS</td>
301
                </tr>
302 04ad7c7c Scott Ullrich
                <tr>
303 709cc6e0 Bill Marquette
                  <td valign="top" class="vncell">webConfigurator port</td>
304 b5c78501 Seth Mos
                  <td class="vtable"> <input name="webguiport" type="text" class="formfld unknown" id="webguiport" "size="5" value="<?=htmlspecialchars($config['system']['webgui']['port']);?>">
305 5b237745 Scott Ullrich
                    <br>
306 709cc6e0 Bill Marquette
                    <span class="vexpl">Enter a custom port number for the webConfigurator
307 04ad7c7c Scott Ullrich
                    above if you want to override the default (80 for HTTP, 443
308 63c2f169 Colin Smith
                    for HTTPS). Changes will take effect immediately after save.</span></td>
309 5b237745 Scott Ullrich
                </tr>
310 04ad7c7c Scott Ullrich
                <tr>
311 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">Time zone</td>
312
                  <td width="78%" class="vtable"> <select name="timezone" id="timezone">
313
                      <?php foreach ($timezonelist as $value): ?>
314 04ad7c7c Scott Ullrich
                      <option value="<?=htmlspecialchars($value);?>" <?php if ($value == $pconfig['timezone']) echo "selected"; ?>>
315 5b237745 Scott Ullrich
                      <?=htmlspecialchars($value);?>
316
                      </option>
317
                      <?php endforeach; ?>
318 04ad7c7c Scott Ullrich
                    </select> <br> <span class="vexpl">Select the location closest
319 5b237745 Scott Ullrich
                    to you</span></td>
320
                </tr>
321 20b90e0a Scott Ullrich
                <!--
322 04ad7c7c Scott Ullrich
                <tr>
323 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">Time update interval</td>
324 b5c78501 Seth Mos
                  <td width="78%" class="vtable"> <input name="timeupdateinterval" type="text" class="formfld unknown" id="timeupdateinterval" size="4" value="<?=htmlspecialchars($pconfig['timeupdateinterval']);?>">
325 04ad7c7c Scott Ullrich
                    <br> <span class="vexpl">Minutes between network time sync.;
326 5b237745 Scott Ullrich
                    300 recommended, or 0 to disable </span></td>
327
                </tr>
328 20b90e0a Scott Ullrich
                -->
329 04ad7c7c Scott Ullrich
                <tr>
330 5b237745 Scott Ullrich
                  <td width="22%" valign="top" class="vncell">NTP time server</td>
331 b5c78501 Seth Mos
                  <td width="78%" class="vtable"> <input name="timeservers" type="text" class="formfld unknown" id="timeservers" size="40" value="<?=htmlspecialchars($pconfig['timeservers']);?>">
332 04ad7c7c Scott Ullrich
                    <br> <span class="vexpl">Use a space to separate multiple
333
                    hosts (only one required). Remember to set up at least one
334 5b237745 Scott Ullrich
                    DNS server if you enter a host name here!</span></td>
335
                </tr>
336 f0f7a3eb Scott Ullrich
				<tr>
337
					<td colspan="2" class="list" height="12">&nbsp;</td>
338 20b90e0a Scott Ullrich
				</tr>
339 f0f7a3eb Scott Ullrich
				<tr>
340
					<td colspan="2" valign="top" class="listtopic">Theme</td>
341
				</tr>
342
				<tr>
343
				<td width="22%" valign="top" class="vncell">&nbsp;</td>
344
				<td width="78%" class="vtable">
345
				    <select name="theme">
346
<?php
347
				$files = return_dir_as_array("/usr/local/www/themes/");
348
				foreach($files as $f) {
349
					if ( (substr($f, 0, 1) == "_") && !isset($config['system']['developer']) ) continue;
350
					if($f == "CVS") continue;
351
					$selected = "";
352
					if($f == $config['theme'])
353
						$selected = " SELECTED";
354
					if($config['theme'] == "" and $f == "pfsense")
355
						$selceted = " SELECTED";
356
					echo "\t\t\t\t\t"."<option{$selected}>{$f}</option>\n";
357
				}
358
?>
359
					</select>
360 1cc00e4d Bill Marquette
					<strong>This will change the look and feel of <?php echo $g['product_name']; ?>.</strong>
361 f0f7a3eb Scott Ullrich
				</td>
362 20b90e0a Scott Ullrich
				</tr>
363 f0f7a3eb Scott Ullrich
				<tr>
364 5b237745 Scott Ullrich
                  <td width="22%" valign="top">&nbsp;</td>
365 04ad7c7c Scott Ullrich
                  <td width="78%"> <input name="Submit" type="submit" class="formbtn" value="Save">
366 5b237745 Scott Ullrich
                  </td>
367
                </tr>
368
              </table>
369
</form>
370
<?php include("fend.inc"); ?>
371 cfa6fa1a Scott Ullrich
<?php
372
	// restart webgui if proto or port changed
373
	if ($restart_webgui) {
374 991f7f37 Scott Ullrich
		echo "<meta http-equiv=\"refresh\" content=\"10;url={$url}\">";
375 cfa6fa1a Scott Ullrich
	}
376 2f3f316c Scott Ullrich
?>
377
</body>
378
</html>
379
<?php
380 70b5a4e1 Scott Ullrich
if ($restart_webgui) {
381
	touch("/tmp/restart_webgui");
382
}
383 b5c78501 Seth Mos
?>