Project

General

Profile

Download (19 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * pkg.php
4
 *
5
 * part of pfSense (https://www.pfsense.org)
6
 * Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
7
 * All rights reserved.
8
 *
9
 * Licensed under the Apache License, Version 2.0 (the "License");
10
 * you may not use this file except in compliance with the License.
11
 * You may obtain a copy of the License at
12
 *
13
 * http://www.apache.org/licenses/LICENSE-2.0
14
 *
15
 * Unless required by applicable law or agreed to in writing, software
16
 * distributed under the License is distributed on an "AS IS" BASIS,
17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
 * See the License for the specific language governing permissions and
19
 * limitations under the License.
20
 */
21

    
22
##|+PRIV
23
##|*IDENT=page-package-settings
24
##|*NAME=Package: Settings
25
##|*DESCR=Allow access to the 'Package: Settings' page.
26
##|*MATCH=pkg.php*
27
##|-PRIV
28

    
29
require_once("guiconfig.inc");
30
require_once("pkg-utils.inc");
31

    
32
function domTT_title($title_msg) {
33
	print "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '".gettext($title_msg)."', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\"";
34
}
35

    
36
$xml = $_REQUEST['xml'];
37

    
38
if ($xml == "") {
39
	$pgtitle = array(gettext("Package"), gettext("Editor"));
40
	$pglinks = array("", "@self");
41
	include("head.inc");
42
	print_info_box(gettext("No valid package defined."), 'danger', false);
43
	include("foot.inc");
44
	exit;
45
} else {
46
	$pkg_xml_prefix = "/usr/local/pkg/";
47
	$pkg_full_path = "{$pkg_xml_prefix}/{$xml}";
48
	$pkg_realpath = realpath($pkg_full_path);
49
	if (empty($pkg_realpath)) {
50
		$path_error = sprintf(gettext("Package path %s not found."), htmlspecialchars($pkg_full_path));
51
	} else if (substr_compare($pkg_realpath, $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) {
52
		$path_error = sprintf(gettext("Invalid path %s specified."), htmlspecialchars($pkg_full_path));
53
	}
54

    
55
	if (!empty($path_error)) {
56
		include("head.inc");
57
		print_info_box($path_error . "<br />" . gettext("Try reinstalling the package."), 'danger', false);
58
		include("foot.inc");
59
		die;
60
	}
61

    
62
	if (file_exists($pkg_full_path)) {
63
		$pkg = parse_xml_config_pkg($pkg_full_path, "packagegui");
64
	} else {
65
		include("head.inc");
66
		print_info_box(sprintf(gettext("File not found %s."), htmlspecialchars($xml)), 'danger', false);
67
		include("foot.inc");
68
		exit;
69
	}
70
}
71

    
72
if ($pkg['donotsave'] != "") {
73
	header("Location: pkg_edit.php?xml=" . $xml);
74
	exit;
75
}
76

    
77
if ($pkg['include_file'] != "") {
78
	require_once($pkg['include_file']);
79
}
80

    
81
if ($_REQUEST['startdisplayingat']) {
82
	$startdisplayingat = $_REQUEST['startdisplayingat'];
83
}
84

    
85
if ($_REQUEST['display_maximum_rows']) {
86
	if ($_REQUEST['display_maximum_rows']) {
87
		$display_maximum_rows = $_REQUEST['display_maximum_rows'];
88
	}
89
}
90

    
91
$evaledvar = $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'];
92

    
93
if ($_GET['act'] == "update") {
94

    
95
	if (is_array($config['installedpackages'][$pkg['name']]) && $pkg['name'] != "" && $_REQUEST['ids'] !="") {
96
		#get current values
97
		$current_values=$config['installedpackages'][$pkg['name']]['config'];
98
		#get updated ids
99
		parse_str($_REQUEST['ids'], $update_list);
100
		#sort ids to know what to change
101
		#useful to do not lose data when using sorting and paging
102
		$sort_list=$update_list['ids'];
103
		sort($sort_list);
104
		#apply updates
105
		foreach ($update_list['ids'] as $key=> $value) {
106
			$config['installedpackages'][$pkg['name']]['config'][$sort_list[$key]]=$current_values[$update_list['ids'][$key]];
107
		}
108
		#save current config
109
		write_config();
110
		#sync package
111
		eval ("{$pkg['custom_php_resync_config_command']}");
112
	}
113
	#function called via jquery, no need to continue after save changes.
114
	exit;
115
}
116
if ($_GET['act'] == "del") {
117
	// loop through our fieldnames and automatically setup the fieldnames
118
	// in the environment.	ie: a fieldname of username with a value of
119
	// testuser would automatically eval $username = "testuser";
120
	foreach ($evaledvar as $ip) {
121
		if ($pkg['adddeleteeditpagefields']['columnitem']) {
122
			foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
123
				${xml_safe_fieldname($column['fielddescr'])} = $ip[xml_safe_fieldname($column['fieldname'])];
124
			}
125
		}
126
	}
127

    
128
	$a_pkg = &$config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'];
129

    
130
	if ($a_pkg[$_GET['id']]) {
131
		unset($a_pkg[$_GET['id']]);
132
		write_config();
133
		if ($pkg['custom_delete_php_command'] != "") {
134
			if ($pkg['custom_php_command_before_form'] != "") {
135
				eval($pkg['custom_php_command_before_form']);
136
			}
137
			eval($pkg['custom_delete_php_command']);
138
		}
139
		header("Location:  pkg.php?xml=" . $xml);
140
		exit;
141
	}
142
}
143

    
144
ob_start();
145

    
146
$iflist = get_configured_interface_with_descr(false, true);
147
$evaledvar = $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'];
148

    
149
if ($pkg['custom_php_global_functions'] != "") {
150
	eval($pkg['custom_php_global_functions']);
151
}
152

    
153
if ($pkg['custom_php_command_before_form'] != "") {
154
	eval($pkg['custom_php_command_before_form']);
155
}
156

    
157
// Breadcrumb
158
if ($pkg['title'] != "") {
159
	/*if (!$only_edit) {						// Is any package still making use of this?? Is this something that is still wanted, considering the breadcrumb policy https://redmine.pfsense.org/issues/5527
160
 		$pkg['title'] = $pkg['title'] . '/Edit';		// If this needs to live on, then it has to be moved to run AFTER "foreach ($pkg['tabs']['tab'] as $tab)"-loop. This due to $pgtitle[] = $tab['text']; 
161
	}*/
162
	if (strpos($pkg['title'], '/')) {
163
		$title = explode('/', $pkg['title']);
164

    
165
		foreach ($title as $subtitle) {
166
			$pgtitle[] = gettext($subtitle);
167
			$pglinks[] = "@self";
168
		}
169
	} else {
170
		$pgtitle = array(gettext("Package"), gettext($pkg['title']));
171
		$pglinks = array("", "@self");
172
	}
173
} else {
174
	$pgtitle = array(gettext("Package"), gettext("Editor"));
175
	$pglinks = array("", "@self");
176
}
177

    
178
if ($pkg['tabs'] != "") {
179
	$tab_array = array();
180
	foreach ($pkg['tabs']['tab'] as $tab) {
181
		if ($tab['tab_level']) {
182
			$tab_level = $tab['tab_level'];
183
		} else {
184
			$tab_level = 1;
185
		}
186
		if (isset($tab['active'])) {
187
			$active = true;
188
			$pgtitle[] = $tab['text'];
189
			$pglinks[] = "@self";
190
		} else {
191
			$active = false;
192
		}
193
		if (isset($tab['no_drop_down'])) {
194
			$no_drop_down = true;
195
		}
196
		$urltmp = "";
197
		if ($tab['url'] != "") {
198
			$urltmp = $tab['url'];
199
		}
200
		if ($tab['xml'] != "") {
201
			$urltmp = "pkg_edit.php?xml=" . $tab['xml'];
202
		}
203

    
204
		$addresswithport = getenv("HTTP_HOST");
205
		$colonpos = strpos($addresswithport, ":");
206
		if ($colonpos !== False) {
207
			//my url is actually just the IP address of the pfsense box
208
			$myurl = substr($addresswithport, 0, $colonpos);
209
		} else {
210
			$myurl = $addresswithport;
211
		}
212
		// eval url so that above $myurl item can be processed if need be.
213
		$url = str_replace('$myurl', $myurl, $urltmp);
214

    
215
		$tab_array[$tab_level][] = array(
216
			$tab['text'],
217
			$active,
218
			$url
219
		);
220
	}
221

    
222
	ksort($tab_array);
223
}
224

    
225
include("head.inc");
226
if (isset($tab_array)) {
227
	foreach ($tab_array as $tabid => $tab) {
228
		display_top_tabs($tab); //, $no_drop_down, $tabid);
229
	}
230
}
231

    
232
?>
233

    
234
<script type="text/javascript">
235
//<![CDATA[
236
events.push(function() {
237

    
238
	function setFilter(filtertext) {
239
		$('#pkg_filter').val(filtertext);
240
		document.pkgform.submit();
241
	}
242

    
243
<?php
244
	if ($pkg['adddeleteeditpagefields']['movable']) {
245
?>
246
		$('#mainarea table tbody').sortable({
247
		items: 'tr.sortable',
248
			cursor: 'move',
249
			distance: 10,
250
			opacity: 0.8,
251
			helper: function(e, ui) {
252
				ui.children().each(function() {
253
					$(this).width($(this).width());
254
				});
255
			return ui;
256
			},
257
		});
258
<?php
259
	}
260
?>
261
});
262

    
263
function save_changes_to_xml(xml) {
264
	var ids = $('#mainarea table tbody').sortable('serialize', {key:"ids[]"});
265
	var strloading="<?=gettext('Saving changes...')?>";
266
	if (confirm("<?=gettext("Confirmation Required to save changes.")?>")) {
267
		$.ajax({
268
			type: 'get',
269
			cache: false,
270
			url: "<?=$_SERVER['SCRIPT_NAME']?>",
271
			data: {xml:'<?=$xml?>', act:'update', ids: ids},
272
			beforeSend: function() {
273
				$('#savemsg').empty().html(strloading);
274
			},
275
			error: function(data) {
276
				$('#savemsg').empty().html('Error:' + data);
277
			},
278
			success: function(data) {
279
				$('#savemsg').empty().html(data);
280
			}
281
		});
282
	}
283
}
284

    
285
//]]>
286
</script>
287

    
288
<?php
289
if ($_GET['savemsg'] != "") {
290
	$savemsg = htmlspecialchars($_GET['savemsg']);
291
}
292

    
293
if ($savemsg) {
294
	print_info_box($savemsg, 'success');
295
}
296
?>
297

    
298
<form action="pkg.php" name="pkgform" method="get">
299
	<input type='hidden' name='xml' value='<?=$_REQUEST['xml']?>' />
300
		<div id="mainarea" class="panel panel-default">
301
			<table id="mainarea" class="table table-striped table-hover table-condensed">
302
				<thead>
303
<?php
304
	/* Handle filtering bar A-Z */
305
	$include_filtering_inputbox = false;
306
	$colspan = 0;
307
	if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
308
		foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
309
			$colspan++;
310
		}
311
	}
312
	if ($pkg['fields']['field']) {
313
		// First find the sorting type field if it exists
314
		foreach ($pkg['fields']['field'] as $field) {
315
			if ($field['type'] == "sorting") {
316
				if (isset($field['include_filtering_inputbox'])) {
317
					$include_filtering_inputbox = true;
318
				}
319
				if ($display_maximum_rows < 1) {
320
					if ($field['display_maximum_rows']) {
321
						$display_maximum_rows = $field['display_maximum_rows'];
322
					}
323
				}
324
				echo "<tr><td colspan='$colspan' class='text-center'>";
325
				echo gettext("Filter by: ");
326
				$isfirst = true;
327
				for ($char = 65; $char < 91; $char++) {
328
					if (!$isfirst) {
329
						echo " | ";
330
					}
331
					echo "<a href=\"#\" onclick=\"setFilter('" . chr($char) . "');\">" . chr($char) . "</a>";
332
					$isfirst = false;
333
				}
334
				echo "</td></tr>";
335
				echo "<tr><td colspan='$colspan' class='text-center'>";
336
				if ($field['sortablefields']) {
337
					echo gettext("Filter field: ") . "<select name='pkg_filter_type'>";
338
					foreach ($field['sortablefields']['item'] as $si) {
339
						if ($si['name'] == $_REQUEST['pkg_filter_type']) {
340
							$SELECTED = "selected";
341
						} else {
342
							$SELECTED = "";
343
						}
344
						echo "<option value='{$si['name']}' {$SELECTED}>{$si['name']}</option>";
345
					}
346
					echo "</select>";
347
				}
348
				if ($include_filtering_inputbox) {
349
					echo '&nbsp;&nbsp;' . gettext("Filter text: ") . '<input id="pkg_filter" name="pkg_filter" value="' . $_REQUEST['pkg_filter'] . '" />';
350
					echo '&nbsp;<button type="submit" value="Filter" class="btn btn-primary btn-xs">';
351
					echo '<i class="fa fa-filter icon-embed-btn"></i>';
352
					echo gettext("Filter");
353
					echo "</button>";
354
				}
355
				echo "</td></tr><tr><td><font size='-3'>&nbsp;</font></td></tr>";
356
			}
357
		}
358
	}
359
?>
360
				<tr>
361

    
362
<?php
363
	if ($display_maximum_rows) {
364
		$totalpages = ceil(round((count($evaledvar) / $display_maximum_rows), 9));
365
		$page = 1;
366
		$tmpcount = 0;
367
		$tmppp = 0;
368
		if (is_array($evaledvar)) {
369
			foreach ($evaledvar as $ipa) {
370
				if ($tmpcount == $display_maximum_rows) {
371
					$page++;
372
					$tmpcount = 0;
373
				}
374
				if ($tmppp == $startdisplayingat) {
375
					break;
376
				}
377
				$tmpcount++;
378
				$tmppp++;
379
			}
380
		}
381
		echo "<tr><th colspan='" . count($pkg['adddeleteeditpagefields']['columnitem']) . "'>";
382
		echo "<table width='100%' summary=''>";
383
		echo "<tr>";
384
		echo "<td class='text-left'>" . sprintf(gettext('Displaying page %1$s of %2$s'), $page, $totalpages) . "</b></td>";
385
		echo "<td class='text-right'>" . gettext("Rows per page: ") . "<select onchange='document.pkgform.submit();' name='display_maximum_rows'>";
386
		for ($x = 0; $x < 250; $x++) {
387
			if ($x == $display_maximum_rows) {
388
				$SELECTED = "selected";
389
			} else {
390
				$SELECTED = "";
391
			}
392
			echo "<option value='$x' $SELECTED>$x</option>\n";
393
			$x = $x + 4;
394
		}
395
		echo "</select></td></tr>";
396
		echo "</table>";
397
		echo "</th></tr>";
398
	}
399

    
400
	$cols = 0;
401
	if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
402
		foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
403
			echo "<th class=\"listhdrr\">" . $column['fielddescr'] . "</th>";
404
			$cols++;
405
		}
406
	}
407
?>
408
				</tr>
409
				</thead>
410
				<tbody>
411
<?php
412
	$i = 0;
413
	$pagination_counter = 0;
414
	if ($evaledvar) {
415
		foreach ($evaledvar as $ip) {
416
			if ($startdisplayingat) {
417
				if ($i < $startdisplayingat) {
418
					$i++;
419
					continue;
420
				}
421
			}
422
			if ($_REQUEST['pkg_filter']) {
423
				// Handle filtered items
424
				if ($pkg['fields']['field'] && !$filter_regex) {
425
					// First find the sorting type field if it exists
426
					foreach ($pkg['fields']['field'] as $field) {
427
						if ($field['type'] == "sorting") {
428
							if ($field['sortablefields']['item']) {
429
								foreach ($field['sortablefields']['item'] as $sf) {
430
									if ($sf['name'] == $_REQUEST['pkg_filter_type']) {
431
										$filter_fieldname = $sf['fieldname'];
432
										#Use a default regex on sortable fields when none is declared
433
										if ($sf['regex']) {
434
											$filter_regex = str_replace("%FILTERTEXT%", $_REQUEST['pkg_filter'], trim($sf['regex']));
435
										} else {
436
											$filter_regex = "/{$_REQUEST['pkg_filter']}/i";
437
										}
438
									}
439
								}
440
							}
441
						}
442
					}
443
				}
444
				// Do we have something to filter on?
445
				unset($filter_matches);
446
				if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
447
					foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
448
						$fieldname = $ip[xml_safe_fieldname($column['fieldname'])];
449
						if ($column['fieldname'] == $filter_fieldname) {
450
							if ($filter_regex) {
451
								//echo "$filter_regex - $fieldname<p/>";
452
								preg_match($filter_regex, $fieldname, $filter_matches);
453
								break;
454
							}
455
						}
456
					}
457
				}
458
				if (!$filter_matches) {
459
					$i++;
460
					continue;
461
				}
462
			}
463
			if ($pkg['adddeleteeditpagefields']['movable']) {
464
				echo "<tr style=\"vertical-align: top\" class=\"sortable\" id=\"id_{$i}\">\n";
465
			} else {
466
				echo "<tr style=\"vertical-align: top\">\n";
467
			}
468
			if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
469
				foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
470
					if ($column['fieldname'] == "description") {
471
						$class = "listbg";
472
					} else {
473
						$class = "listlr";
474
					}
475
?>
476
					<td class="<?=$class?>" ondblclick="document.location='pkg_edit.php?xml=<?=$xml?>&amp;act=edit&amp;id=<?=$i?>';">
477
<?php
478
					$fieldname = $ip[xml_safe_fieldname($column['fieldname'])];
479
					#Check if columnitem has a type field declared
480
					if ($column['type'] == "checkbox") {
481
						if ($fieldname == "") {
482
							echo gettext("No");
483
						} else {
484
							echo gettext("Yes");
485
						}
486
					} else if ($column['type'] == "interface") {
487
						echo $column['prefix'] . $iflist[$fieldname] . $column['suffix'];
488
					} else {
489
						$display_text = "";
490
						#Check if columnitem has an encoding field declared
491
						if ($column['encoding'] == "base64") {
492
							$display_text = $column['prefix'] . base64_decode($fieldname) . $column['suffix'];
493
						#Check if there is a custom info to show when $fieldname is not empty
494
						} else if ($column['listmodeon'] && $fieldname != "") {
495
							$display_text = $column['prefix'] . gettext($column['listmodeon']). $column['suffix'];
496
						#Check if there is a custom info to show when $fieldname is empty
497
						} else if ($column['listmodeoff'] && $fieldname == "") {
498
							$display_text = $column['prefix'] .gettext($column['listmodeoff']). $column['suffix'];
499
						} else {
500
							$display_text = $column['prefix'] . $fieldname ." ". $column['suffix'];
501
						}
502
						if (!isset($column['allow_html'])) {
503
							$display_text = htmlspecialchars($display_text);
504
						}
505
						echo $display_text;
506
					}
507
?>
508
					</td>
509
<?php
510
				} // foreach columnitem
511
			} // if columnitem
512
?>
513
					<td style="vertical-align: middle" class="list text-nowrap">
514
						<table border="0" cellspacing="0" cellpadding="1" summary="icons">
515
							<tr>
516
<?php
517
			#Show custom description to edit button if defined
518
			$edit_msg=($pkg['adddeleteeditpagefields']['edittext']?$pkg['adddeleteeditpagefields']['edittext']:gettext("Edit this item"));
519
?>
520
								<td><a class="fa fa-pencil" href="pkg_edit.php?xml=<?=$xml?>&amp;act=edit&amp;id=<?=$i?>" title="<?=$edit_msg?>"></a></td>
521
<?php
522
			#Show custom description to delete button if defined
523
			$delete_msg=($pkg['adddeleteeditpagefields']['deletetext']?$pkg['adddeleteeditpagefields']['deletetext']:gettext("Delete this item"));
524
?>
525
								<td>&nbsp;<a class="fa fa-trash" href="pkg.php?xml=<?=$xml?>&amp;act=del&amp;id=<?=$i?>" title="<?=$delete_msg?>"></a></td>
526
							</tr>
527
						</tbody>
528
					</table>
529
				</td>
530
<?php
531
			echo "</tr>\n"; // Pairs with an echo tr some way above
532
			// Handle pagination and display_maximum_rows
533
			if ($display_maximum_rows) {
534
				if ($pagination_counter == ($display_maximum_rows-1) or
535
					$i == (count($evaledvar)-1)) {
536
					$colcount = count($pkg['adddeleteeditpagefields']['columnitem']);
537
					$final_footer = "";
538
					$final_footer .= "<tr><td colspan='$colcount'>";
539
					$final_footer .= "<table width='100%' summary=''><tr>";
540
					$final_footer .= "<td class='text-left'>";
541
					$startingat = $startdisplayingat - $display_maximum_rows;
542
					if ($startingat > -1) {
543
						$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat={$startingat}&amp;display_maximum_rows={$display_maximum_rows}'>";
544
					} else if ($startdisplayingat > 1) {
545
						$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat=0&amp;display_maximum_rows={$display_maximum_rows}'>";
546
					}
547
					$final_footer .= "<font size='2'><< " . gettext("Previous page") . "</font></a>";
548
					if ($tmppp + $display_maximum_rows > count($evaledvar)) {
549
						$endingrecord = count($evaledvar);
550
					} else {
551
						$endingrecord = $tmppp + $display_maximum_rows;
552
					}
553
					$final_footer .= "</td><td class='text-center'>";
554
					$tmppp++;
555
					$final_footer .= "<font size='2'>Displaying {$tmppp} - {$endingrecord} / " . count($evaledvar) . " records";
556
					$final_footer .= "</font></td><td class='text-right'>&nbsp;";
557
					if (($i+1) < count($evaledvar)) {
558
						$final_footer .= "<a href='pkg.php?xml=" . $_REQUEST['xml'] . "&amp;startdisplayingat=" . ($startdisplayingat + $display_maximum_rows) . "&amp;display_maximum_rows={$display_maximum_rows}'>";
559
					}
560
					$final_footer .= "<font size='2'>" . gettext("Next page") . " >></font></a>";
561
					$final_footer .= "</td></tr></table></td></tr>";
562
					$i = count($evaledvar);
563
					break;
564
				}
565
			}
566
			$i++;
567
			$pagination_counter++;
568
		} // foreach evaledvar
569
	} // if evaledvar
570
?>
571
				<tr>
572
					<td colspan="<?=$cols?>"></td>
573
					<td>
574
						<table border="0" cellspacing="0" cellpadding="1" summary="icons">
575
							<tr>
576
<?php
577
	#Show custom description to add button if defined
578
	$add_msg=($pkg['adddeleteeditpagefields']['addtext']?$pkg['adddeleteeditpagefields']['addtext']:gettext("Add a new item"));
579
?>
580
								<td><a href="pkg_edit.php?xml=<?=$xml?>&amp;id=<?=$i?>" class="btn btn-sm btn-success" title="<?=$add_msg?>"><i class="fa fa-plus icon-embed-btn"></i><?=gettext('Add')?></a></td>
581
<?php
582
	#Show description button and info if defined
583
	if ($pkg['adddeleteeditpagefields']['description']) {
584
?>
585
								<td>
586
									<i class="fa fa-info-circle"><?=$pkg['adddeleteeditpagefields']['description']?></i>
587
								</td>
588
<?php
589
	}
590
?>
591
							</tr>
592
						</table>
593
					</td>
594
				</tr>
595
				<?=$final_footer?>
596
			</table>
597
			</div>
598
		<button class="btn btn-primary" type="button" value="Save" name="Submit" onclick="save_changes_to_xml('<?=$xml?>')"><i class="fa fa-save icon-embed-btn"></i><?=gettext("Save")?></button>
599

    
600
</form>
601
<?php
602
echo "<!-- filter_fieldname: {$filter_fieldname} -->";
603
echo "<!-- filter_regex: {$filter_regex} -->";
604

    
605
include("foot.inc"); ?>
(98-98/225)