Project

General

Profile

Download (39.9 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* $Id$ */
3
/*
4
	firewall_rules.php
5
	part of pfSense (http://www.pfsense.com)
6
        Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
7

    
8
	originally 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
	pfSense_MODULE:	filter
35
*/
36

    
37
##|+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
$statusurl = "status_filter_reload.php";
45
$logurl = "diag_logs_filter.php";
46

    
47
require("guiconfig.inc");
48
require_once("functions.inc");
49
require_once("filter.inc");
50
require_once("shaper.inc");
51

    
52
$pgtitle = array(gettext("Firewall"),gettext("Rules"));
53

    
54
function delete_nat_association($id) {
55
	global $config;
56

    
57
	if (!$id || !is_array($config['nat']['rule']))
58
		return;
59

    
60
	$a_nat = &$config['nat']['rule'];
61

    
62
	foreach ($a_nat as &$natent)
63
		if ($natent['associated-rule-id'] == $id)
64
			$natent['associated-rule-id'] = '';
65
}
66

    
67
if (!is_array($config['filter']['rule'])) {
68
	$config['filter']['rule'] = array();
69
}
70
filter_rules_sort();
71
$a_filter = &$config['filter']['rule'];
72

    
73
$if = $_GET['if'];
74
if ($_POST['if'])
75
	$if = $_POST['if'];
76

    
77
$ifdescs = get_configured_interface_with_descr();
78

    
79
// Drag and drop reordering
80
if($_REQUEST['dragdroporder']) {
81
	// First create a new ruleset array and tmp arrays
82
	$a_filter_before = array();
83
	$a_filter_order = array();
84
	$a_filter_order_tmp = array();
85
	$a_filter_after = array();
86
	$found = false;
87
	$drag_order = $_REQUEST['dragtable'];
88
	// Next traverse through rules building a new order for interface
89
	for ($i = 0; isset($a_filter[$i]); $i++) {
90
		if(( $_REQUEST['if'] == "FloatingRules" && isset($a_filter[$i]['floating']) ) || ( $a_filter[$i]['interface'] == $_REQUEST['if'] && !isset($a_filter[$i]['floating']) )) {
91
			$a_filter_order_tmp[] = $a_filter[$i];
92
			$found = true;
93
		} else if (!$found)
94
			$a_filter_before[] = $a_filter[$i];
95
		else
96
			$a_filter_after[] = $a_filter[$i];
97
	}
98
	// Reorder rules with the posted order
99
	for ($i = 0; $i<count($drag_order); $i++)
100
		$a_filter_order[] = $a_filter_order_tmp[$drag_order[$i]];
101
	// In case $drag_order didn't account for some rules, make sure we don't lose them
102
	if(count($a_filter_order) < count($a_filter_order_tmp)) {
103
		for ($i = 0; $i<count($a_filter_order_tmp); $i++)
104
			if(!in_array($i, $drag_order))
105
				$a_filter_order[] = $a_filter_order_tmp[$i];
106
	}
107
	// Overwrite filter rules with newly created items
108
	$config['filter']['rule'] = array_merge($a_filter_before, $a_filter_order, $a_filter_after);
109
	// Write configuration
110
	$config = write_config("Drag and drop firewall rules ordering update.");
111
	// Redirect back to page
112
	mark_subsystem_dirty('filter');
113
	$undo = array();
114
	foreach($_REQUEST['dragtable'] as $dt) 
115
		$undo[] = "";
116
	$counter = 0;
117
	foreach($_REQUEST['dragtable'] as $dt) {
118
		$undo[$dt] = $counter;
119
		$counter++;
120
	}
121
	foreach($undo as $dt) 
122
		$undotxt .= "&dragtable[]={$dt}";
123
	Header("Location: firewall_rules.php?if=" . $_REQUEST['if'] . "&undodrag=true" . $undotxt);
124
	exit;
125
}
126

    
127
$icmptypes = array(
128
	"" => gettext("any"),
129
	"echoreq" => gettext("Echo request"),
130
	"echorep" => gettext("Echo reply"),
131
	"unreach" => gettext("Destination unreachable"),
132
	"squench" => gettext("Source quench"),
133
	"redir" => gettext("Redirect"),
134
	"althost" => gettext("Alternate Host"),
135
	"routeradv" => gettext("Router advertisement"),
136
	"routersol" => gettext("Router solicitation"),
137
	"timex" => gettext("Time exceeded"),
138
	"paramprob" => gettext("Invalid IP header"),
139
	"timereq" => gettext("Timestamp"),
140
	"timerep" => gettext("Timestamp reply"),
141
	"inforeq" => gettext("Information request"),
142
	"inforep" => gettext("Information reply"),
143
	"maskreq" => gettext("Address mask request"),
144
	"maskrep" => gettext("Address mask reply")
145
);
146

    
147
/* add group interfaces */
148
if (is_array($config['ifgroups']['ifgroupentry']))
149
	foreach($config['ifgroups']['ifgroupentry'] as $ifgen)
150
		if (have_ruleint_access($ifgen['ifname']))
151
			$iflist[$ifgen['ifname']] = $ifgen['ifname'];
152

    
153
foreach ($ifdescs as $ifent => $ifdesc)
154
	if(have_ruleint_access($ifent)) 
155
		$iflist[$ifent] = $ifdesc;
156

    
157
if ($config['l2tp']['mode'] == "server")
158
        if(have_ruleint_access("l2tp"))
159
                $iflist['l2tp'] = "L2TP VPN";
160

    
161
if ($config['pptpd']['mode'] == "server")
162
	if(have_ruleint_access("pptp")) 
163
		$iflist['pptp'] = "PPTP VPN";
164

    
165
if (is_array($config['pppoes']['pppoe'])) {
166
	foreach ($config['pppoes']['pppoe'] as $pppoes)
167
		if (($pppoes['mode'] == 'server') && have_ruleint_access("pppoe"))
168
			$iflist['pppoe'] = "PPPoE Server";
169
}
170

    
171
/* add ipsec interfaces */
172
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
173
	if(have_ruleint_access("enc0")) 
174
		$iflist["enc0"] = "IPsec";
175

    
176
/* add openvpn/tun interfaces */
177
if  ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
178
   	$iflist["openvpn"] = "OpenVPN";
179

    
180
pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/interfaces_override");
181

    
182
if (!$if || !isset($iflist[$if])) {
183
	if ("any" == $if)
184
                $if = "FloatingRules";
185
        else if ("FloatingRules" != $if)
186
                $if = "wan";
187
}
188

    
189
if ($_POST) {
190

    
191
	$pconfig = $_POST;
192

    
193
	if ($_POST['apply']) {
194
		$retval = 0;
195
		$retval = filter_configure();
196

    
197
		clear_subsystem_dirty('filter');
198

    
199
		pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/apply");
200

    
201
		$savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background.<br/>You can also %s monitor %s the reload progress"),"<a href='status_filter_reload.php'>","</a>");
202
	}
203
}
204

    
205
if ($_GET['act'] == "del") {
206
	if ($a_filter[$_GET['id']]) {
207
		if (!empty($a_filter[$_GET['id']]['associated-rule-id'])) {
208
			delete_nat_association($a_filter[$_GET['id']]['associated-rule-id']);
209
		}
210
		unset($a_filter[$_GET['id']]);
211
		write_config();
212
		mark_subsystem_dirty('filter');
213
		header("Location: firewall_rules.php?if={$if}");
214
		exit;
215
	}
216
}
217

    
218
// Handle save msg if defined
219
if($_REQUEST['savemsg']) 
220
	$savemsg = htmlentities($_REQUEST['savemsg']);
221

    
222
if (isset($_POST['del_x'])) {
223
	/* delete selected rules */
224
	if (is_array($_POST['rule']) && count($_POST['rule'])) {
225
		foreach ($_POST['rule'] as $rulei) {
226
			delete_nat_association($a_filter[$rulei]['associated-rule-id']);
227
			unset($a_filter[$rulei]);
228
		}
229
		write_config();
230
		mark_subsystem_dirty('filter');
231
		header("Location: firewall_rules.php?if={$if}");
232
		exit;
233
	}
234
} else if ($_GET['act'] == "toggle") {
235
	if ($a_filter[$_GET['id']]) {
236
                if(isset($a_filter[$_GET['id']]['disabled']))
237
                        unset($a_filter[$_GET['id']]['disabled']);
238
                else
239
                        $a_filter[$_GET['id']]['disabled'] = true;
240
		write_config();
241
		mark_subsystem_dirty('filter');
242
		header("Location: firewall_rules.php?if={$if}");
243
		exit;
244
	}
245
} else {
246
	/* yuck - IE won't send value attributes for image buttons, while Mozilla does -
247
	   so we use .x/.y to fine move button clicks instead... */
248
	unset($movebtn);
249
	foreach ($_POST as $pn => $pd) {
250
		if (preg_match("/move_(\d+)_x/", $pn, $matches)) {
251
			$movebtn = $matches[1];
252
			break;
253
		}
254
	}
255
	/* move selected rules before this rule */
256
	if (isset($movebtn) && is_array($_POST['rule']) && count($_POST['rule'])) {
257
		$a_filter_new = array();
258

    
259
		/* copy all rules < $movebtn and not selected */
260
		for ($i = 0; $i < $movebtn; $i++) {
261
			if (!in_array($i, $_POST['rule']))
262
				$a_filter_new[] = $a_filter[$i];
263
		}
264

    
265
		/* copy all selected rules */
266
		for ($i = 0; $i < count($a_filter); $i++) {
267
			if ($i == $movebtn)
268
				continue;
269
			if (in_array($i, $_POST['rule']))
270
				$a_filter_new[] = $a_filter[$i];
271
		}
272

    
273
		/* copy $movebtn rule */
274
		if ($movebtn < count($a_filter))
275
			$a_filter_new[] = $a_filter[$movebtn];
276

    
277
		/* copy all rules > $movebtn and not selected */
278
		for ($i = $movebtn+1; $i < count($a_filter); $i++) {
279
			if (!in_array($i, $_POST['rule']))
280
				$a_filter_new[] = $a_filter[$i];
281
		}
282

    
283
		$a_filter = $a_filter_new;
284
		write_config();
285
		mark_subsystem_dirty('filter');
286
		header("Location: firewall_rules.php?if={$if}");
287
		exit;
288
	}
289
}
290
$closehead = false;
291

    
292
include("head.inc");
293

    
294
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domLib.js\"></script>";
295
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/domTT.js\"></script>";
296
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/behaviour.js\"></script>";
297
echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript/domTT/fadomatic.js\"></script>";
298
?>
299
<link rel="stylesheet" href="/javascript/chosen/chosen.css" />
300
</head>
301

    
302
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
303
<script src="/javascript/chosen/chosen.proto.js" type="text/javascript"></script>
304
<?php include("fbegin.inc"); ?>
305
<form action="firewall_rules.php" method="post">
306

    
307
<script type="text/javascript" language="javascript" src="/javascript/row_toggle.js">
308
</script>
309
<?php if ($savemsg) print_info_box($savemsg); ?>
310
<?php if (is_subsystem_dirty('filter')): ?><p>
311
<?php
312
if($_REQUEST['undodrag']) {
313
	foreach($_REQUEST['dragtable'] as $dt) 
314
		$dragtable .= "&dragtable[]={$dt}";
315
	print_info_box_np_undo(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."), "apply" , gettext("Apply changes") , "firewall_rules.php?if={$_REQUEST['if']}&dragdroporder=true&{$dragtable}");
316
} else {
317
	print_info_box_np(gettext("The firewall rule configuration has been changed.<br>You must apply the changes in order for them to take effect."));
318
}
319
?>
320
<br>
321
<?php endif; ?>
322
<div id="loading" style="visibity:hidden">
323
	<img src="/themes/<?=$g['theme']?>/images/misc/loader.gif"> Loading, please wait...
324
	<p/>&nbsp;
325
</div>
326
<?php
327
	pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/before_table");
328
?>
329
<table width="100%" border="0" cellpadding="0" cellspacing="0">
330
  <tr><td class="tabnavtbl">
331
  <?php
332
	/* active tabs */
333
	$tab_array = array();
334
       if ("FloatingRules" == $if)
335
                        $active = true;
336
                else
337
                        $active = false;
338
        $tab_array[] = array(gettext("Floating"), $active, "firewall_rules.php?if=FloatingRules");
339
	$tabscounter = 0; $i = 0; foreach ($iflist as $ifent => $ifname) {
340
		if ($ifent == $if)
341
			$active = true;
342
		else
343
			$active = false;
344
		$tab_array[] = array($ifname, $active, "firewall_rules.php?if={$ifent}");
345
	}
346
	display_top_tabs($tab_array);
347
  ?>
348
  </td></tr>
349
  <tr>
350
    <td>
351
	<div id="mainarea">
352
		<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
353
			<tr id="frheader">
354
			<td width="3%" class="list">&nbsp;</td>
355
			<td width="5%" class="list">&nbsp;</td>
356
			<td width="3%" class="listhdrr"><?=gettext("ID");?></td>
357
<?php
358
				pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_id_tablehead");
359
?>
360
			<td width="6%" class="listhdrr"><?=gettext("Proto");?></td>
361
			<td width="12%" class="listhdrr"><?=gettext("Source");?></td>
362
			<td width="6%" class="listhdrr"><?=gettext("Port");?></td>
363
			<td width="12%" class="listhdrr"><?=gettext("Destination");?></td>
364
			<td width="6%" class="listhdrr"><?=gettext("Port");?></td>
365
			<td width="5%" class="listhdrr"><?=gettext("Gateway");?></td>
366
			<td width="8%" class="listhdrr"><?=gettext("Queue");?></td>
367
			<td width="5%" class="listhdrr"><?=gettext("Schedule");?></td>
368
<?php
369
				pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_desc_tablehead");
370
?>
371
			<td width="19%" class="listhdr"><?=gettext("Description");?></td>
372
			<td width="10%" class="list">
373
			<table border="0" cellspacing="0" cellpadding="1">
374
			   <tr>
375
				<?php
376
					$nrules = 0;
377
					for ($i = 0; isset($a_filter[$i]); $i++) {
378
						$filterent = $a_filter[$i];
379
						if ($filterent['interface'] != $if && !isset($filterent['floating']))
380
							continue;
381
						if (isset($filterent['floating']) && "FloatingRules" != $if)
382
							continue;
383
						$nrules++;
384
					}
385
				?>
386
				<td>
387
				<?php if ($nrules == 0): ?>
388
				<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?gettext("delete selected rules"); ?>" border="0"><?php else: ?>
389
				<input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm('<?=gettext('Do you really want to delete the selected rules?');?>')"><?php endif; ?>
390
				</td>
391
				<td align="center" valign="middle"><a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>&after=-1"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td>
392
			   </tr>
393
			</table>
394
		  </td>
395
		</tr>
396
<?php   // Show the anti-lockout rule if it's enabled, and we are on LAN with an if count > 1, or WAN with an if count of 1.
397
	if (!isset($config['system']['webgui']['noantilockout']) &&
398
		(((count($config['interfaces']) > 1) && ($if == 'lan'))
399
		|| ((count($config['interfaces']) == 1) && ($if == 'wan')))):
400

    
401
		$guiport = "80";
402
		if (isset($config['system']['webgui']['port']) && $config['system']['webgui']['port'] <> "")
403
			$guiport = "{$config['system']['webgui']['port']}";
404
		if ($config['system']['webgui']['protocol'] == "https")
405
			$guiport .= "<br/>443";
406

    
407
		$sshport = "";
408
		if (isset($config['system']['enablesshd'])) {
409
			$sshport = 22;
410
		if($config['system']['ssh']['port'] <> "")
411
			$sshport = $config['system']['ssh']['port'];
412
		}
413
		$sshport = "22<br/>";
414
?>
415
		<tr valign="top" id="antilockout">
416
			<td class="list">&nbsp;</td>
417
			<td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11" border="0"></td>
418
			<td class="listlr" style="background-color: #E0E0E0"></td>
419
<?php
420
				pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_id_tr_antilockout");
421
?>
422
			<td class="listr" style="background-color: #E0E0E0">*</td>
423
			<td class="listr" style="background-color: #E0E0E0">*</td>
424
			<td class="listr" style="background-color: #E0E0E0">*</td>
425
			<td class="listr" style="background-color: #E0E0E0"><?=$iflist[$if];?> Address</td>
426
			<td class="listr" style="background-color: #E0E0E0"><?= $sshport . $guiport ?></td>
427
			<td class="listr" style="background-color: #E0E0E0">*</td>
428
			<td class="listr" style="background-color: #E0E0E0">*</td>
429
			<td class="listr" style="background-color: #E0E0E0"></td>
430
			<td class="listbg"><?=gettext("Anti-Lockout Rule");?></td>
431
			<td valign="middle" nowrap class="list">
432
			<table border="0" cellspacing="0" cellpadding="1">
433
				<tr>
434
					<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
435
					<td><a href="system_advanced_admin.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
436
				</tr>
437
				<tr>
438
					<td align="center" valign="middle"></td>
439
					<td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
440
				</tr>
441
				</table>
442
			</td>
443
			</tr>
444
<?php endif; ?>
445

    
446
<?php if (isset($config['interfaces'][$if]['blockpriv'])): ?>
447
                <tr valign="top" id="frrfc1918">
448
                  <td class="list">&nbsp;</td>
449
                  <td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
450
                  <td class="listlr" style="background-color: #E0E0E0"></td>
451
                  <td class="listr" style="background-color: #E0E0E0">*</td>
452
                  <td class="listr" style="background-color: #E0E0E0"><?=gettext("RFC 1918 networks");?></td>
453
                  <td class="listr" style="background-color: #E0E0E0">*</td>
454
                  <td class="listr" style="background-color: #E0E0E0">*</td>
455
                  <td class="listr" style="background-color: #E0E0E0">*</td>
456
                  <td class="listr" style="background-color: #E0E0E0">*</td>
457
		<td class="listr" style="background-color: #E0E0E0">*</td>
458
	 		 <td class="listr" style="background-color: #E0E0E0"></td>
459
                  <td class="listbg"><?=gettext("Block private networks");?></td>
460
                  <td valign="middle" nowrap class="list">
461
				    <table border="0" cellspacing="0" cellpadding="1">
462
					<tr>
463
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
464
					  <td><a href="interfaces.php?if=<?=htmlspecialchars($if)?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
465
					</tr>
466
					<tr>
467
					  <td align="center" valign="middle"></td>
468
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
469
					</tr>
470
					</table>
471
				  </td>
472
				</tr>
473
<?php endif; ?>
474
<?php if (isset($config['interfaces'][$if]['blockbogons'])): ?>
475
                <tr valign="top" id="frrfc1918">
476
                  <td class="list">&nbsp;</td>
477
                  <td class="listt" align="center"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11" border="0"></td>
478
                  <td class="listlr" style="background-color: #E0E0E0"></td>
479
                  <td class="listr" style="background-color: #E0E0E0">*</td>
480
                  <td class="listr" style="background-color: #E0E0E0"><?=gettext("Reserved/not assigned by IANA");?></td>
481
                  <td class="listr" style="background-color: #E0E0E0">*</td>
482
                  <td class="listr" style="background-color: #E0E0E0">*</td>
483
                  <td class="listr" style="background-color: #E0E0E0">*</td>
484
				  <td class="listr" style="background-color: #E0E0E0">*</td>
485
				   <td class="listr" style="background-color: #E0E0E0">*</td>
486
		  <td class="listr" style="background-color: #E0E0E0">*</td>
487
                  <td class="listbg"><?=gettext("Block bogon networks");?></td>
488
                  <td valign="middle" nowrap class="list">
489
				    <table border="0" cellspacing="0" cellpadding="1">
490
					<tr>
491
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule");?>"></td>
492
					  <td><a href="interfaces.php?if=<?=htmlspecialchars($if)?>#rfc1918"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule");?>" width="17" height="17" border="0"></a></td>
493
					</tr>
494
					<tr>
495
					  <td align="center" valign="middle"></td>
496
					  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus_d.gif" title="<?=gettext("add a new rule based on this one");?>" width="17" height="17" border="0"></td>
497
					</tr>
498
					</table>
499
				  </td>
500
				</tr>
501
<?php endif; ?>
502
				<tbody id="dragtable" width="100%">
503
				<?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++):
504
					pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/row_start");
505
					$filterent = $a_filter[$i];
506
					if ($filterent['interface'] != $if && !isset($filterent['floating']))
507
						continue;
508
					if (isset($filterent['floating']) && "FloatingRules" != $if)
509
						continue;
510
					$isadvset = firewall_check_for_advanced_options($filterent);
511
					if($isadvset)
512
						$advanced_set = "<img src=\"./themes/{$g['theme']}/images/icons/icon_advanced.gif\" title=\"" . gettext("advanced settings set") . ": {$isadvset}\" border=\"0\">";
513
					else 
514
						$advanced_set = "";
515
				?>
516
                <tr valign="top" id="fr<?=$nrules;?>">
517
                  <td class="listt">
518
					<input type="checkbox" id="frc<?=$nrules;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nrules;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;">
519
					<?php echo $advanced_set; ?>
520
				  </td>
521
                  <td class="listt" align="center">
522
				  <?php if ($filterent['type'] == "block")
523
				  			$iconfn = "block";
524
						else if ($filterent['type'] == "reject") {
525
							$iconfn = "reject";
526
						} else
527
							$iconfn = "pass";
528
						if (isset($filterent['disabled'])) {
529
							$textss = "<span class=\"gray\">";
530
							$textse = "</span>";
531
							$iconfn .= "_d";
532
						} else {
533
							$textss = $textse = "";
534
						}
535
				  ?>
536
				  <a href="?if=<?=htmlspecialchars($if);?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="<?=gettext("click to toggle enabled/disabled status");?>"></a>
537
				  <?php if (isset($filterent['log'])):
538
							$iconfnlog = "log_s";
539
						if (isset($filterent['disabled']))
540
							$iconfnlog .= "_d";
541
				  	?>
542
				  <br><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfnlog;?>.gif" width="11" height="15" border="0">
543
				  <?php endif; ?>
544
				  </td>
545
				<?php
546
				
547
				//build Alias popup box
548
				$span_end = "";
549
				$alias_src_span_begin = "";
550
				$alias_src_port_span_begin = "";
551
				$alias_dst_span_begin = "";
552
				$alias_dst_port_span_begin = "";
553
				
554
				$alias_popup = rule_popup($filterent['source']['address'],pprint_port($filterent['source']['port']),$filterent['destination']['address'],pprint_port($filterent['destination']['port']));
555
				$span_end = "</U></span>";
556
					
557
				$alias_src_span_begin = $alias_popup["src"];
558
				 									
559
				$alias_src_port_span_begin = $alias_popup["srcport"];
560
													
561
				$alias_dst_span_begin = $alias_popup["dst"];
562
														
563
				$alias_dst_port_span_begin = $alias_popup["dstport"];
564
					
565
				//build Schedule popup box
566
				$a_schedules = &$config['schedules']['schedule'];
567
				$schedule_span_begin = "";
568
				$schedule_span_end = "";
569
				$sched_caption_escaped = "";
570
				$sched_content = "";
571
				$schedstatus = false;
572
				$dayArray = array (gettext('Mon'),gettext('Tues'),gettext('Wed'),gettext('Thur'),gettext('Fri'),gettext('Sat'),gettext('Sun'));
573
				$monthArray = array (gettext('January'),gettext('February'),gettext('March'),gettext('April'),gettext('May'),gettext('June'),gettext('July'),gettext('August'),gettext('September'),gettext('October'),gettext('November'),gettext('December'));
574
				if($config['schedules']['schedule'] <> "" and is_array($config['schedules']['schedule'])) {
575
					foreach ($a_schedules as $schedule)
576
					{
577
						if ($schedule['name'] == $filterent['sched'] ){
578
							$schedstatus = filter_get_time_based_rule_status($schedule);
579
							
580
							foreach($schedule['timerange'] as $timerange) {
581
								$tempFriendlyTime = "";
582
								$tempID = "";
583
								$firstprint = false;
584
								if ($timerange){
585
									$dayFriendly = "";
586
									$tempFriendlyTime = "";							
587
										
588
									//get hours
589
									$temptimerange = $timerange['hour'];
590
									$temptimeseparator = strrpos($temptimerange, "-");
591
									
592
									$starttime = substr ($temptimerange, 0, $temptimeseparator); 
593
									$stoptime = substr ($temptimerange, $temptimeseparator+1); 
594
										
595
									if ($timerange['month']){
596
										$tempmontharray = explode(",", $timerange['month']);
597
										$tempdayarray = explode(",",$timerange['day']);
598
										$arraycounter = 0;
599
										$firstDayFound = false;
600
										$firstPrint = false;
601
										foreach ($tempmontharray as $monthtmp){
602
											$month = $tempmontharray[$arraycounter];
603
											$day = $tempdayarray[$arraycounter];
604
											
605
											if (!$firstDayFound)
606
											{
607
												$firstDay = $day;
608
												$firstmonth = $month;
609
												$firstDayFound = true;
610
											}
611
												
612
											$currentDay = $day;
613
											$nextDay = $tempdayarray[$arraycounter+1];
614
											$currentDay++;
615
											if (($currentDay != $nextDay) || ($tempmontharray[$arraycounter] != $tempmontharray[$arraycounter+1])){
616
												if ($firstPrint)
617
													$dayFriendly .= ", ";
618
												$currentDay--;
619
												if ($currentDay != $firstDay)
620
													$dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ;
621
												else
622
													$dayFriendly .=  $monthArray[$month-1] . " " . $day;
623
												$firstDayFound = false;	
624
												$firstPrint = true;
625
											}													
626
											$arraycounter++;	
627
										}
628
									}
629
									else
630
									{
631
										$tempdayFriendly = $timerange['position'];
632
										$firstDayFound = false;
633
										$tempFriendlyDayArray = explode(",", $tempdayFriendly);								
634
										$currentDay = "";
635
										$firstDay = "";
636
										$nextDay = "";
637
										$counter = 0;													
638
										foreach ($tempFriendlyDayArray as $day){
639
											if ($day != ""){
640
												if (!$firstDayFound)
641
												{
642
													$firstDay = $tempFriendlyDayArray[$counter];
643
													$firstDayFound = true;
644
												}
645
												$currentDay =$tempFriendlyDayArray[$counter];
646
												//get next day
647
												$nextDay = $tempFriendlyDayArray[$counter+1];
648
												$currentDay++;					
649
												if ($currentDay != $nextDay){
650
													if ($firstprint)
651
														$dayFriendly .= ", ";
652
													$currentDay--;
653
													if ($currentDay != $firstDay)
654
														$dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
655
													else
656
														$dayFriendly .= $dayArray[$firstDay-1];
657
													$firstDayFound = false;	
658
													$firstprint = true;			
659
												}
660
												$counter++;
661
											}
662
										}
663
									}		
664
									$timeFriendly = $starttime . " - " . $stoptime;
665
									$description = $timerange['rangedescr'];
666
									$sched_content .= $dayFriendly . "; " . $timeFriendly . "<br>";
667
								}
668
							}
669
							$sched_caption_escaped = str_replace("'", "\'", $schedule['descr']);
670
							$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>";
671
							$schedule_span_end = "</U></span>";
672
						}
673
					}
674
				}
675
				$printicon = false;
676
				$alttext = "";
677
				$image = "";
678
				if (!isset($filterent['disabled'])){
679
					 if ($schedstatus) 
680
					 { 
681
					 	if ($iconfn == "block" || $iconfn == "reject")
682
					 	{
683
					 		$image = "icon_block";
684
					 		$alttext = gettext("Traffic matching this rule is currently being denied");
685
					 	}
686
					 	else
687
					 	{
688
					 		$image = "icon_pass";
689
					 		$alttext = gettext("Traffic matching this rule is currently being allowed");
690
					 	}
691
					 	$printicon = true;
692
					  }
693
					  else if ($filterent['sched'])
694
					  { 
695
					 	if ($iconfn == "block" || $iconfn == "reject")
696
					 		$image = "icon_block_d";
697
					 	else
698
					 		$image = "icon_block";
699
					 	$alttext = gettext("This rule is not currently active because its period has expired");
700
					 	$printicon = true;				  	
701
					  }
702
				}
703
				?>
704
                  <td class="listlr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
705
                    <?=$textss;?><?php if (isset($filterent['id'])) echo $filterent['id']; else echo ""; ?><?=$textse;?>
706
                  </td>
707
<?php
708
				pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_id_tr");
709
?>
710
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
711
                    <?=$textss;?><?php
712
			if (isset($filterent['ipprotocol'])) {
713
				switch($filterent['ipprotocol']) {
714
					case "inet":
715
						echo "IPv4 ";
716
						break;
717
					case "inet6":
718
						echo "IPv6 ";
719
						break;
720
				}
721
			} else {
722
				echo "IPv4 ";
723
			}
724
			if (isset($filterent['protocol'])) {
725
				echo strtoupper($filterent['protocol']);
726
				if (strtoupper($filterent['protocol']) == "ICMP" && !empty($filterent['icmptype'])) {
727
					echo ' <span style="cursor: help;" title="ICMP type: ' . $icmptypes[$filterent['icmptype']] . '"><u>';
728
					echo $filterent['icmptype'];
729
					echo '</u></span>';
730
				}
731
			} else echo "*";
732
                    ?><?=$textse;?>
733
                  </td>
734
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
735
				    <?=$textss;?><?php echo $alias_src_span_begin;?><?php echo htmlspecialchars(pprint_address($filterent['source']));?><?php echo $alias_src_span_end;?><?=$textse;?>
736
                  </td>
737
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
738
                    <?=$textss;?><?php echo $alias_src_port_span_begin;?><?php echo htmlspecialchars(pprint_port($filterent['source']['port'])); ?><?php echo $alias_src_port_span_end;?><?=$textse;?>
739
                  </td>
740
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
741
				    <?=$textss;?><?php echo $alias_dst_span_begin;?><?php echo htmlspecialchars(pprint_address($filterent['destination'])); ?><?php echo $alias_dst_span_end;?><?=$textse;?>
742
                  </td>
743
	              <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
744
                    <?=$textss;?><?php echo $alias_dst_port_span_begin;?><?php echo htmlspecialchars(pprint_port($filterent['destination']['port'])); ?><?php echo $alias_dst_port_span_end;?><?=$textse;?>
745
                  </td>
746
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
747
                    <?=$textss;?><?php if (isset($config['interfaces'][$filterent['gateway']]['descr'])) echo htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']); else  echo htmlspecialchars(pprint_port($filterent['gateway'])); ?><?=$textse;?>
748
                  </td>
749
				  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><?=$textss;?>
750
                          <?php
751
							if (isset($filterent['ackqueue']) && isset($filterent['defaultqueue'])) {
752
								$desc = $filterent['ackqueue'] ;
753
							    echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['ackqueue']}&action=show\">{$desc}</a>";
754
								$desc = $filterent['defaultqueue'];
755
							    echo "/<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>";
756
							} else if (isset($filterent['defaultqueue'])) {
757
								$desc = $filterent['defaultqueue'];
758
							    echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>"; }
759
							else echo gettext("none");
760
						  ?><?=$textse;?>
761
                        </td>
762
                  <td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><font color="black">
763
                    <?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;?>
764
                  </td>
765
<?php
766
				pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_descr_tr");
767
?>
768
                  <td class="listbg" onClick="fr_toggle(<?=$nrules;?>)" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';" class="descr">
769
                    <?=$textss;?><?=htmlspecialchars($filterent['descr']);?>&nbsp;<?=$textse;?>
770
                  </td>
771
                  <td valign="middle" nowrap class="list">
772
				    <table border="0" cellspacing="0" cellpadding="1">
773
					<tr>
774
					  <td><input name="move_<?=$i;?>" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" width="17" height="17" title="<?=gettext("move selected rules before this rule"); ?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"></td>
775
					  <td><a href="firewall_rules_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit rule"); ?>" width="17" height="17" border="0"></a></td>
776
					</tr>
777
					<tr>
778
					  <td align="center" valign="middle"><a href="firewall_rules.php?act=del&if=<?=htmlspecialchars($if);?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule"); ?>" onclick="return confirm('Do you really want to delete this rule?')"></a></td>
779
					  <td><a href="firewall_rules_edit.php?dup=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new rule based on this one"); ?>" width="17" height="17" border="0"></a></td>
780
					</tr>
781
					</table>
782
				  </td>
783
				</tr>
784
			  <?php $nrules++; endfor; ?>
785
			  </tbody>
786
			  <?php if ($nrules == 0): ?>
787
              <td class="listt"></td>
788
			  <td class="listt"></td>
789
			  <td class="listlr" colspan="10" align="center" valign="middle">
790
			  <span class="gray">
791
			  <?=gettext("No rules are currently defined for this interface"); ?><br>
792
			  <?=gettext("All incoming connections on this interface will be blocked until you add pass rules."); ?><br><br>
793
			  <?=gettext("Click the"); ?> <a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" border="0" width="17" height="17" align="absmiddle"></a><?=gettext(" button to add a new rule.");?></span>
794
			  </td>
795
			  <?php endif; ?>
796
                <tr id="fr<?=$nrules;?>">
797
                  <td class="list"></td>
798
                  <td class="list"></td>
799
<?php
800
				pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_id_tr_belowtable");
801
?>
802
                  <td class="list">&nbsp;</td>
803
                  <td class="list">&nbsp;</td>
804
                  <td class="list">&nbsp;</td>
805
                  <td class="list">&nbsp;</td>
806
		  <td class="list">&nbsp;</td>
807
		  <td class="list">&nbsp;</td>
808
                  <td class="list">&nbsp;</td>
809
                  <td class="list">&nbsp;</td>
810
                  <td class="list">&nbsp;</td>
811
                  <td class="list">&nbsp;</td>
812
                  <td class="list">
813
				    <table border="0" cellspacing="0" cellpadding="1">
814
					<tr>
815
				      <td>
816
					  <?php if ($nrules == 0): ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_left_d.gif" width="17" height="17" title="<?=gettext("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="<?=gettext("move selected rules to end");?>" onMouseOver="fr_insline(<?=$nrules;?>, true)" onMouseOut="fr_insline(<?=$nrules;?>, false)"><?php endif; ?></td>
817
					  <td></td>
818
				    </tr>
819
					<tr>
820
					  <td>
821
					  <?php if ($nrules == 0): ?>
822
					  <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x_d.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" border="0"><?php else: ?>
823
					  <input name="del" type="image" src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" title="<?=gettext("delete selected rules");?>" onclick="return confirm('<?=gettext('Do you really want to delete the selected rules?');?>')"><?php endif; ?>
824
					  </td>
825
			                  <td><a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add new rule");?>" width="17" height="17" border="0"></a></td>
826
					</tr>
827
				    </table>
828
				  </td>
829
				</tr>
830
              </table>
831
	      <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
832
                <tr>
833
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass.gif" width="11" height="11"></td>
834
                  <td><?=gettext("pass");?></td>
835
                  <td width="14"></td>
836
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block.gif" width="11" height="11"></td>
837
                  <td><?=gettext("block");?></td>
838
                  <td width="14"></td>
839
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject.gif" width="11" height="11"></td>
840
                  <td><?=gettext("reject");?></td>
841
                  <td width="14"></td>
842
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log.gif" width="11" height="11"></td>
843
                  <td><?=gettext("log");?></td>
844
                </tr>
845
                <tr>
846
                  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_pass_d.gif" width="11" height="11"></td>
847
                  <td nowrap><?=gettext("pass (disabled)");?></td>
848
                  <td>&nbsp;</td>
849
                  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_block_d.gif" width="11" height="11"></td>
850
                  <td nowrap><?=gettext("block (disabled)");?></td>
851
                  <td>&nbsp;</td>
852
                  <td><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_reject_d.gif" width="11" height="11"></td>
853
                  <td nowrap><?=gettext("reject (disabled)");?></td>
854
                  <td>&nbsp;</td>
855
                  <td width="16"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif" width="11" height="11"></td>
856
                  <td nowrap><?=gettext("log (disabled)");?></td>
857
                </tr>
858
		<tr>
859
		  <td colspan="10">
860
  &nbsp;<p/>
861
  <strong>
862
	<span class="red"><?=gettext("Hint:");?></span>
863
  </strong><br>
864
	<ul>
865
  <li><?=gettext("Rules are evaluated on a first-match basis (i.e. " .
866
  "the action of the first rule to match a packet will be executed). " .
867
  "This means that if you use block rules, you'll have to pay attention " .
868
  "to the rule order. Everything that isn't explicitly passed is blocked " .
869
  "by default. ");?>
870
</li>
871
</ul>
872
		 </td>
873
	        </tr>
874
              </table>
875
	</div>
876
    </td>
877
  </tr>
878
</table>
879
  <input type="hidden" name="if" value="<?=htmlspecialchars($if);?>">
880
  <script type="text/javascript">
881
	var number_of_rules = <?=$nrules?>;
882
<?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++): ?>
883
/*
884
	Sortable.create("dragtable", { 
885
		tag:"tr", 
886
		format:"fr([0-9999999])",
887
		containment:["dragtable"], 
888
		onChange:function(affected) {
889
			document.body.style.cursor = 'move';
890
		},
891
		onUpdate:function(container) { 
892
			document.body.style.cursor = 'move';
893
			updateOrder(Sortable.serialize('dragtable', 'tr'));
894
		} 
895
	});
896
*/
897
<?php endfor; ?>
898
	function updateOrder(order) {
899
		if(document.getElementById("redboxtable"))
900
			$('redboxtable').hide();
901
		$('loading').show();
902
		document.body.style.cursor = 'wait';
903
		document.location = 'firewall_rules.php?if=<?=htmlspecialchars($if);?>&dragdroporder=true&' + Sortable.serialize('dragtable', 'tr');
904
		return;
905
	}
906
	$('loading').hide();
907
  </script>
908
</form>
909
<?php include("fend.inc"); ?>
910
</body>
911
</html>
(63-63/232)