Project

General

Profile

Download (31.7 KB) Statistics
| Branch: | Tag: | Revision:
1 b2ffe419 Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4 37e2071c Scott Ullrich
	firewall_rules.php
5 e4cabb75 Scott Ullrich
	part of pfSense (http://www.pfsense.com)
6
        Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
7 b2ffe419 Scott Ullrich
8 e4cabb75 Scott Ullrich
	originally part of m0n0wall (http://m0n0.ch/wall)
9
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10 37e2071c Scott Ullrich
	All rights reserved.
11 b2ffe419 Scott Ullrich
12 37e2071c 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 b2ffe419 Scott Ullrich
15 37e2071c Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17 b2ffe419 Scott Ullrich
18 37e2071c 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 b2ffe419 Scott Ullrich
22 37e2071c 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 5b237745 Scott Ullrich
*/
33 7ac5a4cb Scott Ullrich
/*
34
	pfSense_MODULE:	filter
35
*/
36 5b237745 Scott Ullrich
37 6b07c15a Matthew Grooms
##|+PRIV
38
##|*IDENT=page-firewall-rules
39
##|*NAME=Firewall: Rules page
40
##|*DESCR=Allow access to the 'Firewall: Rules' page.
41
##|*MATCH=firewall_rules.php*
42
##|-PRIV
43
44 37e2071c Scott Ullrich
$pgtitle = array("Firewall", "Rules");
45 3cceb5d5 jim-p
$statusurl = "status_filter_reload.php";
46
$logurl = "diag_logs_filter.php";
47
48 5b237745 Scott Ullrich
require("guiconfig.inc");
49 7a927e67 Scott Ullrich
require_once("functions.inc");
50
require_once("filter.inc");
51
require_once("shaper.inc");
52 5b237745 Scott Ullrich
53 f1c49ff4 Scott Ullrich
function check_for_advaned_options(&$item) {
54
	$item_set = "";
55 a56b2fa0 pierrepomes
	if($item['max'])
56
		$item_set .= "max {$item['max']} ";
57 f1c49ff4 Scott Ullrich
	if($item['max-src-nodes'])
58
		$item_set .= "max-src-nodes {$item['max-src-nodes']} ";
59 26dd6a54 pierrepomes
	if($item['max-src-conn'])
60
		$item_set .= "max-src-conn {$item['max-src-conn']} ";
61 f1c49ff4 Scott Ullrich
	if($item['max-src-states'])
62
		$item_set .= "max-src-states {$item['max-src-states']} ";
63
	if($item['statetype'] != "keep state" && $item['statetype'] != "")
64
		$item_set .= "statetype {$item['statetype']} {$item['statetype']}";
65
	if($item['statetimeout'])
66
		$item_set .= "statetimeout {$item['statetimeout']}";
67
	if($item['nosync'])
68
		$item_set .= "nosync ";
69
	if($item['max-src-conn-rate'])
70
		$item_set .= "max-src-conn-rate {$item['max-src-conn-rate']} ";
71
	if($item['max-src-conn-rates'])
72
		$item_set .= "max-src-conn-rates {$item['max-src-conn-rates']} ";
73
	return $item_set;
74
}
75
76 00c82782 Renato Botelho
function delete_nat_association($id) {
77
	global $config;
78
79
	if (!$id || !is_array($config['nat']['rule']))
80 673d29c0 Renato Botelho
		return;
81
82 00c82782 Renato Botelho
	$a_nat = &$config['nat']['rule'];
83
84
	foreach ($a_nat as &$natent)
85
		if ($natent['associated-rule-id'] == $id)
86
			$natent['associated-rule-id'] = '';
87 673d29c0 Renato Botelho
}
88
89 5b237745 Scott Ullrich
if (!is_array($config['filter']['rule'])) {
90
	$config['filter']['rule'] = array();
91
}
92
filter_rules_sort();
93
$a_filter = &$config['filter']['rule'];
94
95 07bd3f83 Scott Ullrich
$if = $_GET['if'];
96
if ($_POST['if'])
97
	$if = $_POST['if'];
98 b2ffe419 Scott Ullrich
99 cbe3ea96 Ermal Luçi
$ifdescs = get_configured_interface_with_descr();
100 07bd3f83 Scott Ullrich
101 90ba56ad Scott Ullrich
/* add group interfaces */
102
if (is_array($config['ifgroups']['ifgroupentry']))
103
	foreach($config['ifgroups']['ifgroupentry'] as $ifgen)
104
		if (have_ruleint_access($ifgen['ifname']))
105
			$iflist[$ifgen['ifname']] = $ifgen['ifname'];
106
107 aef4dc74 Ermal Luçi
foreach ($ifdescs as $ifent => $ifdesc)
108
	if(have_ruleint_access($ifent)) 
109
		$iflist[$ifent] = $ifdesc;
110 88bcd1d2 Scott Dale
111 617f8d25 Ermal Lu?i
if ($config['l2tp']['mode'] == "server")
112
        if(have_ruleint_access("l2tp"))
113
                $iflist['l2tp'] = "L2TP VPN";
114
115 07bd3f83 Scott Ullrich
if ($config['pptpd']['mode'] == "server")
116 d81c2ad1 Scott Ullrich
	if(have_ruleint_access("pptp")) 
117
		$iflist['pptp'] = "PPTP VPN";
118 50e0d2a1 Scott Ullrich
119 0e1e0183 Scott Ullrich
if ($config['pppoe']['mode'] == "server")
120 d81c2ad1 Scott Ullrich
	if(have_ruleint_access("pppoe")) 
121
		$iflist['pppoe'] = "PPPoE VPN";
122 0c554ff6 Scott Ullrich
123 88bcd1d2 Scott Dale
/* add ipsec interfaces */
124 d81c2ad1 Scott Ullrich
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable']))
125
	if(have_ruleint_access("enc0")) 
126 0f266b2e Chris Buechler
		$iflist["enc0"] = "IPsec";
127 07bd3f83 Scott Ullrich
128 bfb60ac8 Ermal Luçi
/* add openvpn/tun interfaces */
129 d799787e Matthew Grooms
if  ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
130
   	$iflist["openvpn"] = "OpenVPN";
131 bfb60ac8 Ermal Luçi
132 92125c97 Ermal Luçi
if (!$if || !isset($iflist[$if])) {
133
	if ("any" == $if)
134 15160475 Ermal Luçi
                $if = "FloatingRules";
135 92125c97 Ermal Luçi
        else if ("FloatingRules" != $if)
136
                $if = "wan";
137
}
138 07bd3f83 Scott Ullrich
139 5b237745 Scott Ullrich
if ($_POST) {
140
141
	$pconfig = $_POST;
142
143
	if ($_POST['apply']) {
144 37e2071c Scott Ullrich
		$retval = 0;
145 9a7e416c Scott Ullrich
		$retval = filter_configure();
146
147 a368a026 Ermal Lu?i
		clear_subsystem_dirty('filter');
148 a985eac2 Scott Ullrich
149 4739bd06 Scott Ullrich
		$savemsg = "The settings have been applied.  The firewall rules are now reloading in the background.  You can also <a href='status_filter_reload.php'>monitor</a> the reload progress.";
150 5b237745 Scott Ullrich
	}
151
}
152
153 d97c50cd Bill Marquette
if ($_GET['act'] == "del") {
154 673d29c0 Renato Botelho
	if ($a_filter[$_GET['id']]) {
155
		if (!empty($a_filter[$_GET['id']]['associated-rule-id'])) {
156 00c82782 Renato Botelho
			delete_nat_association($a_filter[$_GET['id']]['associated-rule-id']);
157 673d29c0 Renato Botelho
		}
158
		unset($a_filter[$_GET['id']]);
159
		write_config();
160 a368a026 Ermal Lu?i
		mark_subsystem_dirty('filter');
161 673d29c0 Renato Botelho
		header("Location: firewall_rules.php?if={$if}");
162
		exit;
163
	}
164 d97c50cd Bill Marquette
}
165
166 07bd3f83 Scott Ullrich
if (isset($_POST['del_x'])) {
167
	/* delete selected rules */
168
	if (is_array($_POST['rule']) && count($_POST['rule'])) {
169
		foreach ($_POST['rule'] as $rulei) {
170 00c82782 Renato Botelho
			delete_nat_association($a_filter[$rulei]['associated-rule-id']);
171 07bd3f83 Scott Ullrich
			unset($a_filter[$rulei]);
172
		}
173 5b237745 Scott Ullrich
		write_config();
174 a368a026 Ermal Lu?i
		mark_subsystem_dirty('filter');
175 07bd3f83 Scott Ullrich
		header("Location: firewall_rules.php?if={$if}");
176 5b237745 Scott Ullrich
		exit;
177
	}
178 07bd3f83 Scott Ullrich
} else if ($_GET['act'] == "toggle") {
179
	if ($a_filter[$_GET['id']]) {
180 f53b85a3 Scott Ullrich
                if(isset($a_filter[$_GET['id']]['disabled']))
181 734edbdf Bill Marquette
                        unset($a_filter[$_GET['id']]['disabled']);
182
                else
183
                        $a_filter[$_GET['id']]['disabled'] = true;
184 5b237745 Scott Ullrich
		write_config();
185 a368a026 Ermal Lu?i
		mark_subsystem_dirty('filter');
186 07bd3f83 Scott Ullrich
		header("Location: firewall_rules.php?if={$if}");
187 5b237745 Scott Ullrich
		exit;
188
	}
189 07bd3f83 Scott Ullrich
} else {
190 b2ffe419 Scott Ullrich
	/* yuck - IE won't send value attributes for image buttons, while Mozilla does -
191 37e2071c Scott Ullrich
	   so we use .x/.y to fine move button clicks instead... */
192 07bd3f83 Scott Ullrich
	unset($movebtn);
193
	foreach ($_POST as $pn => $pd) {
194
		if (preg_match("/move_(\d+)_x/", $pn, $matches)) {
195
			$movebtn = $matches[1];
196
			break;
197
		}
198 5b237745 Scott Ullrich
	}
199 07bd3f83 Scott Ullrich
	/* move selected rules before this rule */
200
	if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) {
201
		$a_filter_new = array();
202 b2ffe419 Scott Ullrich
203 07bd3f83 Scott Ullrich
		/* copy all rules < $movebtn and not selected */
204
		for ($i = 0; $i < $movebtn; $i++) {
205
			if (!in_array($i, $_POST['rule']))
206
				$a_filter_new[] = $a_filter[$i];
207
		}
208 b2ffe419 Scott Ullrich
209 07bd3f83 Scott Ullrich
		/* copy all selected rules */
210
		for ($i = 0; $i < count($a_filter); $i++) {
211
			if ($i == $movebtn)
212
				continue;
213
			if (in_array($i, $_POST['rule']))
214
				$a_filter_new[] = $a_filter[$i];
215
		}
216 b2ffe419 Scott Ullrich
217 07bd3f83 Scott Ullrich
		/* copy $movebtn rule */
218
		if ($movebtn < count($a_filter))
219
			$a_filter_new[] = $a_filter[$movebtn];
220 b2ffe419 Scott Ullrich
221 07bd3f83 Scott Ullrich
		/* copy all rules > $movebtn and not selected */
222
		for ($i = $movebtn+1; $i < count($a_filter); $i++) {
223
			if (!in_array($i, $_POST['rule']))
224
				$a_filter_new[] = $a_filter[$i];
225
		}
226 b2ffe419 Scott Ullrich
227 07bd3f83 Scott Ullrich
		$a_filter = $a_filter_new;
228 5b237745 Scott Ullrich
		write_config();
229 a368a026 Ermal Lu?i
		mark_subsystem_dirty('filter');
230 07bd3f83 Scott Ullrich
		header("Location: firewall_rules.php?if={$if}");
231 5b237745 Scott Ullrich
		exit;
232
	}
233
}
234 3a54b6ca Scott Dale
$closehead = false;
235 5b237745 Scott Ullrich
236 9a25487b Scott Ullrich
include("head.inc");
237
238 3a54b6ca Scott Dale
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
239
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domTT.js\"></script>";
240
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/behaviour.js\"></script>";
241
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/fadomatic.js\"></script>";
242 5b237745 Scott Ullrich
?>
243 3a54b6ca Scott Dale
</head>
244
245 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
246
<?php include("fbegin.inc"); ?>
247
<form action="firewall_rules.php" method="post">
248 625dcc40 Bill Marquette
<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
249 fa65a62b Scott Ullrich
</script>
250 5b237745 Scott Ullrich
<?php if ($savemsg) print_info_box($savemsg); ?>
251 a368a026 Ermal Lu?i
<?php if (is_subsystem_dirty('filter')): ?><p>
252 5b237745 Scott Ullrich
<?php print_info_box_np("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
253
<?php endif; ?>
254 07bd3f83 Scott Ullrich
<table width="100%" border="0" cellpadding="0" cellspacing="0">
255 37e2071c Scott Ullrich
  <tr><td class="tabnavtbl">
256 0366b748 Scott Ullrich
  <?php
257
	/* active tabs */
258
	$tab_array = array();
259 92125c97 Ermal Luçi
       if ("FloatingRules" == $if)
260
                        $active = true;
261
                else
262
                        $active = false;
263 661aed33 Ermal Luçi
        $tab_array[] = array("Floating", $active, "firewall_rules.php?if=FloatingRules");
264 0366b748 Scott Ullrich
	$tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) {
265
		if ($ifent == $if)
266
			$active = true;
267
		else
268
			$active = false;
269
		$tab_array[] = array($ifname, $active, "firewall_rules.php?if={$ifent}");
270
	}
271
	display_top_tabs($tab_array);
272
  ?>
273 07bd3f83 Scott Ullrich
  </td></tr>
274 b2ffe419 Scott Ullrich
  <tr>
275 d732f186 Bill Marquette
    <td>
276
	<div id="mainarea">
277
              <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
278 fa65a62b Scott Ullrich
                <tr id="frheader">
279 37e2071c Scott Ullrich
                  <td width="3%" class="list">&nbsp;</td>
280 5b237745 Scott Ullrich
                  <td width="5%" class="list">&nbsp;</td>
281 b9e28d57 unknown
                  <td width="3%" class="listhdrr">ID</td>
282 197bfe96 Ermal Luçi
                  <td width="6%" class="listhdrr">Proto</td>
283 664742f7 Renato Botelho
                  <td width="12%" class="listhdrr">Source</td>
284
                  <td width="6%" class="listhdrr">Port</td>
285
                  <td width="12%" class="listhdrr">Destination</td>
286
                  <td width="6%" class="listhdrr">Port</td>
287 197bfe96 Ermal Luçi
		  <td width="5%" class="listhdrr">Gateway</td>
288 664742f7 Renato Botelho
		  <td width="8%" class="listhdrr">Queue</td>
289 197bfe96 Ermal Luçi
		  <td width="5%" class="listhdrr">Schedule</td>
290 664742f7 Renato Botelho
                  <td width="19%" class="listhdr">Description</td>
291 d415d821 Seth Mos
                  <td width="10%" class="list">
292
			<table border="0" cellspacing="0" cellpadding="1">
293
			   <tr>
294
				<?php
295
					$nrules = 0;
296
					for ($i = 0; isset($a_filter[$i]); $i++) {
297
						$filterent = $a_filter[$i];
298 92125c97 Ermal Luçi
						if ($filterent['interface'] != $if && !isset($filterent['floating']))
299 f1c49ff4 Scott Ullrich
							continue;
300
						if (isset($filterent['floating']) && "FloatingRules" != $if)
301 d415d821 Seth Mos
							continue;
302
						$nrules++;
303
					}
304
				?>
305
				<td>
306
				<?php if ($nrules == 0): ?>
307
				<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?>
308
				<input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?>
309
				</td>
310
				<td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=$if;?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td>
311
			   </tr>
312
			</table>
313
		  </td>
314
		</tr>
315 f1f60c92 Ermal Luçi
<?php if (isset($config['interfaces'][$if]['blockpriv'])): ?>
316 d9eeccbd Scott Ullrich
                <tr valign="top" id="frrfc1918">
317 664742f7 Renato Botelho
                  <td class="list">&nbsp;</td>
318 f77830b3 Scott Ullrich
                  <td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
319 b9e28d57 unknown
                  <td class="listlr" style="background-color: #e0e0e0"></td>
320
                  <td class="listr" style="background-color: #e0e0e0">*</td>
321 d9eeccbd Scott Ullrich
                  <td class="listr" style="background-color: #e0e0e0">RFC 1918 networks</td>
322
                  <td class="listr" style="background-color: #e0e0e0">*</td>
323
                  <td class="listr" style="background-color: #e0e0e0">*</td>
324
                  <td class="listr" style="background-color: #e0e0e0">*</td>
325 40ad834c Scott Dale
                  <td class="listr" style="background-color: #e0e0e0">*</td>
326 b45dcff4 Scott Ullrich
		<td class="listr" style="background-color: #e0e0e0">*</td>
327 8ff2395b Scott Ullrich
	 		 <td class="listr" style="background-color: #e0e0e0"></td>
328 c3fdc1fd Scott Ullrich
                  <td class="listbg">Block private networks</td>
329 d9eeccbd Scott Ullrich
                  <td valign="middle" nowrap class="list">
330
				    <table border="0" cellspacing="0" cellpadding="1">
331
					<tr>
332
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
333 67d5b508 Chris Buechler
					  <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
334 d9eeccbd Scott Ullrich
					</tr>
335
					<tr>
336
					  <td align="center" valign="middle"></td>
337 83b81db7 Scott Ullrich
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td>
338 d9eeccbd Scott Ullrich
					</tr>
339
					</table>
340
				  </td>
341
				</tr>
342 c20c0f5a Scott Ullrich
<?php endif; ?>
343 f1f60c92 Ermal Luçi
<?php if (isset($config['interfaces'][$if]['blockbogons'])): ?>
344 c20c0f5a Scott Ullrich
                <tr valign="top" id="frrfc1918">
345 664742f7 Renato Botelho
                  <td class="list">&nbsp;</td>
346 c20c0f5a Scott Ullrich
                  <td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
347 b9e28d57 unknown
                  <td class="listlr" style="background-color: #e0e0e0"></td>
348
                  <td class="listr" style="background-color: #e0e0e0">*</td>
349 40ad834c Scott Dale
                  <td class="listr" style="background-color: #e0e0e0">Reserved/not assigned by IANA</td>
350 c20c0f5a Scott Ullrich
                  <td class="listr" style="background-color: #e0e0e0">*</td>
351
                  <td class="listr" style="background-color: #e0e0e0">*</td>
352
                  <td class="listr" style="background-color: #e0e0e0">*</td>
353 40ad834c Scott Dale
				  <td class="listr" style="background-color: #e0e0e0">*</td>
354
				   <td class="listr" style="background-color: #e0e0e0">*</td>
355 f1f60c92 Ermal Luçi
		  <td class="listr" style="background-color: #e0e0e0">*</td>
356 e34ecb20 Chris Buechler
                  <td class="listbg">Block bogon networks</td>
357 c20c0f5a Scott Ullrich
                  <td valign="middle" nowrap class="list">
358
				    <table border="0" cellspacing="0" cellpadding="1">
359
					<tr>
360
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules before this rule"></td>
361 67d5b508 Chris Buechler
					  <td><a href="interfaces.php?if=<?=$if?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
362 c20c0f5a Scott Ullrich
					</tr>
363
					<tr>
364
					  <td align="center" valign="middle"></td>
365
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="add a new rule based on this one" width="17" height="17" border="0"></td>
366
					</tr>
367
					</table>
368
				  </td>
369
				</tr>
370
<?php endif; ?>
371 07bd3f83 Scott Ullrich
				<?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++):
372
					$filterent = $a_filter[$i];
373 92125c97 Ermal Luçi
					if ($filterent['interface'] != $if && !isset($filterent['floating']))
374 f1c49ff4 Scott Ullrich
						continue;
375
					if (isset($filterent['floating']) && "FloatingRules" != $if)
376
						continue;
377
					$isadvset = check_for_advaned_options($filterent);
378
					if($isadvset)
379 9c347273 Scott Ullrich
						$advanced_set = "<img src=\"./themes/{$g['theme']}/images/icons/icon_advanced.gif\" title=\"advanced settings set: $isadvset\" border=\"0\">";
380 f1c49ff4 Scott Ullrich
					else 
381
						$advanced_set = ""
382 07bd3f83 Scott Ullrich
				?>
383 37e2071c Scott Ullrich
                <tr valign="top" id="fr<?=$nrules;?>">
384 f1c49ff4 Scott Ullrich
                  <td class="listt">
385
					<input type="checkbox" id="frc<?=$nrules;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nrules;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;">
386
					<?php echo $advanced_set; ?>
387
				  </td>
388 37e2071c Scott Ullrich
                  <td class="listt" align="center">
389 5b237745 Scott Ullrich
				  <?php if ($filterent['type'] == "block")
390
				  			$iconfn = "block";
391
						else if ($filterent['type'] == "reject") {
392 e91baab8 Chris Buechler
							$iconfn = "reject";
393 5b237745 Scott Ullrich
						} else
394
							$iconfn = "pass";
395
						if (isset($filterent['disabled'])) {
396
							$textss = "<span class=\"gray\">";
397
							$textse = "</span>";
398
							$iconfn .= "_d";
399
						} else {
400
							$textss = $textse = "";
401
						}
402
				  ?>
403 677c0869 Erik Kristensen
				  <a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="click to toggle enabled/disabled status"></a>
404 5b237745 Scott Ullrich
				  <?php if (isset($filterent['log'])):
405 6fecc73b Scott Dale
							$iconfnlog = "log_s";
406 5b237745 Scott Ullrich
						if (isset($filterent['disabled']))
407 6fecc73b Scott Dale
							$iconfnlog .= "_d";
408 5b237745 Scott Ullrich
				  	?>
409 6fecc73b Scott Dale
				  <br><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfnlog;?>.gif" width="11" height="15" border="0">
410 5b237745 Scott Ullrich
				  <?php endif; ?>
411
				  </td>
412 3a54b6ca Scott Dale
				<?php
413 2a9db752 Scott Dale
				
414 2a113ca9 Scott Dale
				//build Alias popup box
415 3a54b6ca Scott Dale
				$span_end = "";
416
				$alias_src_span_begin = "";
417
				$alias_src_port_span_begin = "";
418
				$alias_dst_span_begin = "";
419
				$alias_dst_port_span_begin = "";
420
				
421 2a9db752 Scott Dale
				$alias_popup = rule_popup($filterent['source']['address'],pprint_port($filterent['source']['port']),$filterent['destination']['address'],pprint_port($filterent['destination']['port']));
422
				$span_end = "</U></span>";
423 3a54b6ca Scott Dale
					
424 2a9db752 Scott Dale
				$alias_src_span_begin = $alias_popup["src"];
425
				 									
426
				$alias_src_port_span_begin = $alias_popup["srcport"];
427
													
428
				$alias_dst_span_begin = $alias_popup["dst"];
429
														
430
				$alias_dst_port_span_begin = $alias_popup["dstport"];
431 3a54b6ca Scott Dale
					
432 2a113ca9 Scott Dale
				//build Schedule popup box
433
				$a_schedules = &$config['schedules']['schedule'];
434
				$schedule_span_begin = "";
435
				$schedule_span_end = "";
436 d2aa8cd6 sullrich
				$sched_caption_escaped = "";
437 eace1363 Scott Dale
				$sched_content = "";
438 3b907eb1 Scott Dale
				$schedstatus = false;
439 2a113ca9 Scott Dale
				$dayArray = array ('Mon','Tues','Wed','Thur','Fri','Sat','Sun');
440
				$monthArray = array ('January','February','March','April','May','June','July','August','September','October','November','December');
441 8ce97a08 Scott Dale
				if($config['schedules']['schedule'] <> "" and is_array($config['schedules']['schedule'])){
442
					foreach ($a_schedules as $schedule)
443
					{
444
						if ($schedule['name'] == $filterent['sched'] ){
445 60120e37 Ermal Lu?i
							$schedstatus = filter_get_time_based_rule_status($schedule);
446 8ce97a08 Scott Dale
							
447
							foreach($schedule['timerange'] as $timerange) {
448
								$tempFriendlyTime = "";
449
								$tempID = "";
450
								$firstprint = false;
451
								if ($timerange){
452
									$dayFriendly = "";
453
									$tempFriendlyTime = "";							
454
										
455
									//get hours
456
									$temptimerange = $timerange['hour'];
457
									$temptimeseparator = strrpos($temptimerange, "-");
458 2a113ca9 Scott Dale
									
459 8ce97a08 Scott Dale
									$starttime = substr ($temptimerange, 0, $temptimeseparator); 
460
									$stoptime = substr ($temptimerange, $temptimeseparator+1); 
461 2a113ca9 Scott Dale
										
462 8ce97a08 Scott Dale
									if ($timerange['month']){
463
										$tempmontharray = explode(",", $timerange['month']);
464
										$tempdayarray = explode(",",$timerange['day']);
465
										$arraycounter = 0;
466
										$firstDayFound = false;
467
										$firstPrint = false;
468
										foreach ($tempmontharray as $monthtmp){
469
											$month = $tempmontharray[$arraycounter];
470
											$day = $tempdayarray[$arraycounter];
471 2a113ca9 Scott Dale
											
472
											if (!$firstDayFound)
473
											{
474 8ce97a08 Scott Dale
												$firstDay = $day;
475
												$firstmonth = $month;
476 2a113ca9 Scott Dale
												$firstDayFound = true;
477
											}
478 8ce97a08 Scott Dale
												
479
											$currentDay = $day;
480
											$nextDay = $tempdayarray[$arraycounter+1];
481
											$currentDay++;
482
											if (($currentDay != $nextDay) || ($tempmontharray[$arraycounter] != $tempmontharray[$arraycounter+1])){
483
												if ($firstPrint)
484 2a113ca9 Scott Dale
													$dayFriendly .= ", ";
485
												$currentDay--;
486
												if ($currentDay != $firstDay)
487 8ce97a08 Scott Dale
													$dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ;
488 2a113ca9 Scott Dale
												else
489 8ce97a08 Scott Dale
													$dayFriendly .=  $monthArray[$month-1] . " " . $day;
490 2a113ca9 Scott Dale
												$firstDayFound = false;	
491 8ce97a08 Scott Dale
												$firstPrint = true;
492
											}													
493
											$arraycounter++;	
494 2a113ca9 Scott Dale
										}
495
									}
496 8ce97a08 Scott Dale
									else
497
									{
498
										$tempdayFriendly = $timerange['position'];
499
										$firstDayFound = false;
500
										$tempFriendlyDayArray = explode(",", $tempdayFriendly);								
501
										$currentDay = "";
502
										$firstDay = "";
503
										$nextDay = "";
504
										$counter = 0;													
505
										foreach ($tempFriendlyDayArray as $day){
506
											if ($day != ""){
507
												if (!$firstDayFound)
508
												{
509
													$firstDay = $tempFriendlyDayArray[$counter];
510
													$firstDayFound = true;
511
												}
512
												$currentDay =$tempFriendlyDayArray[$counter];
513
												//get next day
514
												$nextDay = $tempFriendlyDayArray[$counter+1];
515
												$currentDay++;					
516
												if ($currentDay != $nextDay){
517
													if ($firstprint)
518
														$dayFriendly .= ", ";
519
													$currentDay--;
520
													if ($currentDay != $firstDay)
521
														$dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
522
													else
523
														$dayFriendly .= $dayArray[$firstDay-1];
524
													$firstDayFound = false;	
525
													$firstprint = true;			
526
												}
527
												$counter++;
528
											}
529
										}
530
									}		
531
									$timeFriendly = $starttime . " - " . $stoptime;
532
									$description = $timerange['rangedescr'];
533
									$sched_content .= $dayFriendly . "; " . $timeFriendly . "<br>";
534
								}
535 2a113ca9 Scott Dale
							}
536 d2aa8cd6 sullrich
							$sched_caption_escaped = str_replace("'", "\'", $schedule['descr']);
537
							$schedule_span_begin = "<span style=\"cursor: help;\" onmouseover=\"domTT_activate(this, event, 'content', '<h1>{$sched_caption_escaped}</h1><p>{$sched_content}</p>', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\" onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\"><U>";
538 8ce97a08 Scott Dale
							$schedule_span_end = "</U></span>";
539 2a113ca9 Scott Dale
						}
540
					}
541
				}
542 6fecc73b Scott Dale
				$printicon = false;
543 616dd997 Scott Dale
				$alttext = "";
544
				$image = "";
545
				if (!isset($filterent['disabled'])){
546
					 if ($schedstatus) 
547
					 { 
548
					 	if ($iconfn == "block" || $iconfn == "reject")
549
					 	{
550 5b552ac7 Scott Dale
					 		$image = "icon_block";
551 616dd997 Scott Dale
					 		$alttext = "Traffic matching this rule is currently being denied";
552
					 	}
553
					 	else
554
					 	{
555 5b552ac7 Scott Dale
					 		$image = "icon_pass";
556 616dd997 Scott Dale
					 		$alttext = "Traffic matching this rule is currently being allowed";
557
					 	}
558
					 	$printicon = true;
559
					  }
560
					  else if ($filterent['sched'])
561
					  { 
562
					 	if ($iconfn == "block" || $iconfn == "reject")
563 5b552ac7 Scott Dale
					 		$image = "icon_block_d";
564 616dd997 Scott Dale
					 	else
565 5b552ac7 Scott Dale
					 		$image = "icon_block";
566 eb01fcec Ermal
					 	$alttext = "This rule is not currently active because its period has expired";
567 616dd997 Scott Dale
					 	$printicon = true;				  	
568
					  }
569
				}
570 3a54b6ca Scott Dale
				?>
571 98e29097 Bill Marquette
                  <td class="listlr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
572 b9e28d57 unknown
                    <?=$textss;?><?php if (isset($filterent['id'])) echo $filterent['id']; else echo ""; ?><?=$textse;?>
573
                  </td>
574
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
575 5b237745 Scott Ullrich
                    <?=$textss;?><?php if (isset($filterent['protocol'])) echo strtoupper($filterent['protocol']); else echo "*"; ?><?=$textse;?>
576
                  </td>
577 98e29097 Bill Marquette
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
578 3a54b6ca Scott Dale
				    <?=$textss;?><?php echo $alias_src_span_begin;?><?php echo htmlspecialchars(pprint_address($filterent['source']));?><?php echo $alias_src_span_end;?><?=$textse;?>
579 5b237745 Scott Ullrich
                  </td>
580 98e29097 Bill Marquette
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
581 3a54b6ca Scott Dale
                    <?=$textss;?><?php echo $alias_src_port_span_begin;?><?php echo htmlspecialchars(pprint_port($filterent['source']['port'])); ?><?php echo $alias_src_port_span_end;?><?=$textse;?>
582 5b237745 Scott Ullrich
                  </td>
583 98e29097 Bill Marquette
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
584 3a54b6ca Scott Dale
				    <?=$textss;?><?php echo $alias_dst_span_begin;?><?php echo htmlspecialchars(pprint_address($filterent['destination'])); ?><?php echo $alias_dst_span_end;?><?=$textse;?>
585 5b237745 Scott Ullrich
                  </td>
586 3a54b6ca Scott Dale
	              <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
587
                    <?=$textss;?><?php echo $alias_dst_port_span_begin;?><?php echo htmlspecialchars(pprint_port($filterent['destination']['port'])); ?><?php echo $alias_dst_port_span_end;?><?=$textse;?>
588 5b237745 Scott Ullrich
                  </td>
589 b504c2f8 Scott Ullrich
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
590 e9832b41 Bill Marquette
                    <?=$textss;?><?php if (isset($config['interfaces'][$filterent['gateway']]['descr'])) echo htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']); else  echo htmlspecialchars(pprint_port($filterent['gateway'])); ?><?=$textse;?>
591 b504c2f8 Scott Ullrich
                  </td>
592 197bfe96 Ermal Luçi
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><?=$textss;?>
593
                          <?php
594
							if (isset($filterent['ackqueue']) && isset($filterent['defaultqueue'])) {
595
								$desc = $filterent['ackqueue'] ;
596
							    echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['ackqueue']}&action=show\">{$desc}</a>";
597
								$desc = $filterent['defaultqueue'];
598
							    echo "/<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>";
599
							} else if (isset($filterent['defaultqueue'])) {
600
								$desc = $filterent['defaultqueue'];
601
							    echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>"; }
602
							else echo "none";
603
						  ?><?=$textse;?>
604
                        </td>
605 3595b631 Scott Dale
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><font color="black">
606 d3bcf522 Scott Dale
                    <?php if ($printicon) { ?><img src="./themes/<?= $g['theme']; ?>/images/icons/<?php echo $image; ?>.gif" title="<?php echo $alttext;?>" border="0"><?php } ?>&nbsp;<?=$textss;?><?php echo $schedule_span_begin;?><?=htmlspecialchars($filterent['sched']);?><?php echo $schedule_span_end; ?><?=$textse;?>
607 7738faa8 Scott Ullrich
                  </td>
608 c2a6f323 Scott Ullrich
                  <td class="listbg" onClick="fr_toggle(<?=$nrules;?>)" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';" class="descr">
609 07bd3f83 Scott Ullrich
                    <?=$textss;?><?=htmlspecialchars($filterent['descr']);?>&nbsp;<?=$textse;?>
610 5b237745 Scott Ullrich
                  </td>
611
                  <td valign="middle" nowrap class="list">
612 07bd3f83 Scott Ullrich
				    <table border="0" cellspacing="0" cellpadding="1">
613
					<tr>
614 677c0869 Erik Kristensen
					  <td><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules before this rule" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"></td>
615
					  <td><a href="firewall_rules_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit rule" width="17" height="17" border="0"></a></td>
616 07bd3f83 Scott Ullrich
					</tr>
617
					<tr>
618 1cfed9db Scott Ullrich
					  <td align="center" valign="middle"><a href="firewall_rules.php?act=del&if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="delete rule" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
619 677c0869 Erik Kristensen
					  <td><a href="firewall_rules_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add a new rule based on this one" width="17" height="17" border="0"></a></td>
620 07bd3f83 Scott Ullrich
					</tr>
621
					</table>
622 5b237745 Scott Ullrich
				  </td>
623
				</tr>
624 07bd3f83 Scott Ullrich
			  <?php $nrules++; endfor; ?>
625
			  <?php if ($nrules == 0): ?>
626 37e2071c Scott Ullrich
              <td class="listt"></td>
627 07bd3f83 Scott Ullrich
			  <td class="listt"></td>
628 d5a1008d Scott Ullrich
			  <td class="listlr" colspan="10" align="center" valign="middle">
629 07bd3f83 Scott Ullrich
			  <span class="gray">
630
			  No rules are currently defined for this interface.<br>
631
			  All incoming connections on this interface will be blocked until you add pass rules.<br><br>
632 677c0869 Erik Kristensen
			  Click the <a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" border="0" width="17" height="17" align="absmiddle"></a> button to add a new rule.</span>
633 07bd3f83 Scott Ullrich
			  </td>
634
			  <?php endif; ?>
635 37e2071c Scott Ullrich
                <tr id="fr<?=$nrules;?>">
636
                  <td class="list"></td>
637
                  <td class="list"></td>
638
                  <td class="list">&nbsp;</td>
639
                  <td class="list">&nbsp;</td>
640
                  <td class="list">&nbsp;</td>
641 b9e28d57 unknown
                  <td class="list">&nbsp;</td>
642 1c7e3ec6 Bill Marquette
		  <td class="list">&nbsp;</td>
643
		  <td class="list">&nbsp;</td>
644
                  <td class="list">&nbsp;</td>
645 37e2071c Scott Ullrich
                  <td class="list">&nbsp;</td>
646
                  <td class="list">&nbsp;</td>
647
                  <td class="list">&nbsp;</td>
648 07bd3f83 Scott Ullrich
                  <td class="list">
649
				    <table border="0" cellspacing="0" cellpadding="1">
650
					<tr>
651
				      <td>
652 677c0869 Erik Kristensen
					  <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="move selected rules to end" border="0"><?php else: ?><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="move selected rules to end" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td>
653 37e2071c Scott Ullrich
					  <td></td>
654 07bd3f83 Scott Ullrich
				    </tr>
655
					<tr>
656 3086d0f8 Scott Ullrich
					  <td>
657
					  <?php if ($nrules == 0): ?>
658
					  <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="delete selected rules" border="0"><?php else: ?>
659
					  <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="delete selected rules" onclick="return confirm('Do you really want to delete the selected rules?')"><?php endif; ?>
660
					  </td>
661 d415d821 Seth Mos
			                  <td><a href="firewall_rules_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="add new rule" width="17" height="17" border="0"></a></td>
662 07bd3f83 Scott Ullrich
					</tr>
663
				    </table>
664
				  </td>
665 5b237745 Scott Ullrich
				</tr>
666
              </table>
667 d732f186 Bill Marquette
	      <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
668 b2ffe419 Scott Ullrich
                <tr>
669 677c0869 Erik Kristensen
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td>
670 5b237745 Scott Ullrich
                  <td>pass</td>
671
                  <td width="14"></td>
672 677c0869 Erik Kristensen
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11"></td>
673 5b237745 Scott Ullrich
                  <td>block</td>
674
                  <td width="14"></td>
675 677c0869 Erik Kristensen
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject.gif" width="11" height="11"></td>
676 5b237745 Scott Ullrich
                  <td>reject</td>
677
                  <td width="14"></td>
678 677c0869 Erik Kristensen
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" width="11" height="11"></td>
679 5b237745 Scott Ullrich
                  <td>log</td>
680
                </tr>
681 b2ffe419 Scott Ullrich
                <tr>
682 677c0869 Erik Kristensen
                  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass_d.gif" width="11" height="11"></td>
683 d732f186 Bill Marquette
                  <td nowrap>pass (disabled)</td>
684
                  <td>&nbsp;</td>
685 677c0869 Erik Kristensen
                  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block_d.gif" width="11" height="11"></td>
686 d732f186 Bill Marquette
                  <td nowrap>block (disabled)</td>
687
                  <td>&nbsp;</td>
688 677c0869 Erik Kristensen
                  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject_d.gif" width="11" height="11"></td>
689 d732f186 Bill Marquette
                  <td nowrap>reject (disabled)</td>
690
                  <td>&nbsp;</td>
691 677c0869 Erik Kristensen
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif" width="11" height="11"></td>
692 d732f186 Bill Marquette
                  <td nowrap>log (disabled)</td>
693 5b237745 Scott Ullrich
                </tr>
694 d732f186 Bill Marquette
		<tr>
695 05860c07 Scott Ullrich
		  <td colspan="10">
696 07bd3f83 Scott Ullrich
  <p>
697
  <strong><span class="red">Hint:<br>
698 37e2071c Scott Ullrich
  </span></strong>Rules are evaluated on a first-match basis (i.e.
699 b2ffe419 Scott Ullrich
  the action of the first rule to match a packet will be executed).
700
  This means that if you use block rules, you'll have to pay attention
701
  to the rule order. Everything that isn't explicitly passed is blocked
702 07bd3f83 Scott Ullrich
  by default.</p>
703 d732f186 Bill Marquette
		 </td>
704
	        </tr>
705
              </table>
706
	</div>
707
    </td>
708
  </tr>
709
</table>
710 37e2071c Scott Ullrich
  <input type="hidden" name="if" value="<?=$if;?>">
711 07bd3f83 Scott Ullrich
</form>
712 5b237745 Scott Ullrich
<?php include("fend.inc"); ?>
713 af4aa061 Scott Ullrich
</body>
714
</html>