Project

General

Profile

Download (18.9 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 Electric Sheep Fencing, LLC
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
	include("head.inc");
41
	print_info_box(gettext("No valid package defined."), 'danger', false);
42
	include("foot.inc");
43
	exit;
44
} else {
45
	$pkg_xml_prefix = "/usr/local/pkg/";
46
	$pkg_full_path = "{$pkg_xml_prefix}/{$xml}";
47
	$pkg_realpath = realpath($pkg_full_path);
48
	if (empty($pkg_realpath)) {
49
		$path_error = sprintf(gettext("Package path %s not found."), htmlspecialchars($pkg_full_path));
50
	} else if (substr_compare($pkg_realpath, $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) {
51
		$path_error = sprintf(gettext("Invalid path %s specified."), htmlspecialchars($pkg_full_path));
52
	}
53

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

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

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

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

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

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

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

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

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

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

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

    
143
ob_start();
144

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

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

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

    
156
// Breadcrumb
157
if ($pkg['title'] != "") {
158
	/*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
159
 		$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']; 
160
	}*/
161
	if (strpos($pkg['title'], '/')) {
162
		$title = explode('/', $pkg['title']);
163

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

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

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

    
210
		$tab_array[$tab_level][] = array(
211
			$tab['text'],
212
			$active,
213
			$url
214
		);
215
	}
216

    
217
	ksort($tab_array);
218
}
219

    
220
include("head.inc");
221
if (isset($tab_array)) {
222
	foreach ($tab_array as $tabid => $tab) {
223
		display_top_tabs($tab); //, $no_drop_down, $tabid);
224
	}
225
}
226

    
227
?>
228

    
229
<script type="text/javascript">
230
//<![CDATA[
231
events.push(function() {
232

    
233
	function setFilter(filtertext) {
234
		$('#pkg_filter').val(filtertext);
235
		document.pkgform.submit();
236
	}
237

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

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

    
280
//]]>
281
</script>
282

    
283
<?php
284
if ($_GET['savemsg'] != "") {
285
	$savemsg = htmlspecialchars($_GET['savemsg']);
286
}
287

    
288
if ($savemsg) {
289
	print_info_box($savemsg, 'success');
290
}
291
?>
292

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

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

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

    
595
</form>
596
<?php
597
echo "<!-- filter_fieldname: {$filter_fieldname} -->";
598
echo "<!-- filter_regex: {$filter_regex} -->";
599

    
600
include("foot.inc"); ?>
(99-99/227)