Project

General

Profile

Download (19.9 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
 * index.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
 * originally based on m0n0wall (http://m0n0.ch/wall)
10
 * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>.
11
 * All rights reserved.
12
 *
13
 * Licensed under the Apache License, Version 2.0 (the "License");
14
 * you may not use this file except in compliance with the License.
15
 * You may obtain a copy of the License at
16
 *
17
 * http://www.apache.org/licenses/LICENSE-2.0
18
 *
19
 * Unless required by applicable law or agreed to in writing, software
20
 * distributed under the License is distributed on an "AS IS" BASIS,
21
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
 * See the License for the specific language governing permissions and
23
 * limitations under the License.
24
 */
25

    
26
##|+PRIV
27
##|*IDENT=page-system-login-logout
28
##|*NAME=System: Login / Logout / Dashboard
29
##|*DESCR=Allow access to the 'System: Login / Logout' page and Dashboard.
30
##|*MATCH=index.php*
31
##|-PRIV
32

    
33
// Turn on buffering to speed up rendering
34
ini_set('output_buffering', 'true');
35

    
36
// Start buffering with a cache size of 100000
37
ob_start(null, "1000");
38

    
39
## Load Essential Includes
40
require_once('guiconfig.inc');
41
require_once('functions.inc');
42
require_once('notices.inc');
43
require_once("pkg-utils.inc");
44

    
45
if (isset($_POST['closenotice'])) {
46
	close_notice($_POST['closenotice']);
47
	sleep(1);
48
	exit;
49
}
50

    
51
if (isset($_REQUEST['closenotice'])) {
52
	close_notice($_REQUEST['closenotice']);
53
	sleep(1);
54
}
55

    
56
if ($g['disablecrashreporter'] != true) {
57
	// Check to see if we have a crash report
58
	$x = 0;
59
	if (file_exists("/tmp/PHP_errors.log")) {
60
		$total = `/bin/cat /tmp/PHP_errors.log | /usr/bin/wc -l | /usr/bin/awk '{ print $1 }'`;
61
		if ($total > 0) {
62
			$x++;
63
		}
64
	}
65

    
66
	$crash = glob("/var/crash/*");
67
	$skip_files = array(".", "..", "minfree", "");
68

    
69
	if (is_array($crash)) {
70
		foreach ($crash as $c) {
71
			if (!in_array(basename($c), $skip_files)) {
72
				$x++;
73
			}
74
		}
75

    
76
		if ($x > 0) {
77
			$savemsg = sprintf(gettext("%s has detected a crash report or programming bug."), $g['product_name']) . " ";
78
			if (isAllowedPage("/crash_reporter.php")) {
79
				$savemsg .= sprintf(gettext('Click %1$shere%2$s for more information.'), '<a href="crash_reporter.php">', '</a>');
80
			} else {
81
				$savemsg .= sprintf(gettext("Contact a firewall administrator for more information."));
82
			}
83
			$class = "warning";
84
		}
85
	}
86
}
87

    
88
##build list of php include files
89
$phpincludefiles = array();
90
$directory = "/usr/local/www/widgets/include/";
91
$dirhandle = opendir($directory);
92
$filename = "";
93

    
94
while (false !== ($filename = readdir($dirhandle))) {
95
	if (!stristr($filename, ".inc")) {
96
		continue;
97
	}
98
	$phpincludefiles[] = $filename;
99
}
100

    
101
## Include each widget include file.
102
## These define vars that specify the widget title and title link.
103
foreach ($phpincludefiles as $includename) {
104
	if (file_exists($directory . $includename)) {
105
		include_once($directory . $includename);
106
	}
107
}
108

    
109
##build list of widgets
110
foreach (glob("/usr/local/www/widgets/widgets/*.widget.php") as $file) {
111
	$basename = basename($file, '.widget.php');
112
	// Get the widget title that should be in a var defined in the widget's inc file.
113
	$widgettitle = ${$basename . '_title'};
114

    
115
	if (empty(trim($widgettitle))) {
116
		// Fall back to constructing a title from the file name of the widget.
117
		$widgettitle = ucwords(str_replace('_', ' ', $basename));
118
	}
119

    
120
	$known_widgets[$basename . '-0'] = array('basename' => $basename, 'title' => $widgettitle, 'display' => 'none');
121
}
122

    
123
##if no config entry found, initialize config entry
124
if (!is_array($config['widgets'])) {
125
	$config['widgets'] = array();
126
}
127
if (!is_array($user_settings['widgets'])) {
128
	$user_settings['widgets'] = array();
129
}
130

    
131
if ($_POST && $_POST['sequence']) {
132

    
133
	// Start with the user's widget settings.
134
	$widget_settings = $user_settings['widgets'];
135

    
136
	$widget_sep = ',';
137
	$widget_seq_array = explode($widget_sep, rtrim($_POST['sequence'], $widget_sep));
138
	$widget_counter_array = array();
139
	$widget_sep = '';
140

    
141
	// Make a record of the counter of each widget that is in use.
142
	foreach ($widget_seq_array as $widget_seq_data) {
143
		list($basename, $col, $display, $widget_counter) = explode(':', $widget_seq_data);
144

    
145
		if ($widget_counter != 'next') {
146
			$widget_counter_array[$basename][$widget_counter] = true;
147
			$widget_sequence .= $widget_sep . $widget_seq_data;
148
			$widget_sep = ',';
149
		}
150
	}
151

    
152
	// Find any new entry (and do not assume there is only 1 new entry)
153
	foreach ($widget_seq_array as $widget_seq_data) {
154
		list($basename, $col, $display, $widget_counter) = explode(':', $widget_seq_data);
155

    
156
		if ($widget_counter == 'next') {
157
			// Construct the widget counter of the new widget instance by finding
158
			// the first non-negative integer that is not in use.
159
			// The reasoning here is that if you just deleted a widget instance,
160
			// e.g. had System Information 0,1,2 and deleted 1,
161
			// then when you add System Information again it will become instance 1,
162
			// which will bring back whatever filter selections happened to be on
163
			// the previous instance 1.
164
			$instance_num = 0;
165

    
166
			while (isset($widget_counter_array[$basename][$instance_num])) {
167
				$instance_num++;
168
			}
169

    
170
			$widget_sequence .= $widget_sep . $basename . ':' . $col . ':' . $display . ':' . $instance_num;
171
			$widget_counter_array[$basename][$instance_num] = true;
172
			$widget_sep = ',';
173
		}
174
	}
175

    
176
	$widget_settings['sequence'] = $widget_sequence;
177

    
178
	foreach ($widget_counter_array as $basename => $instances) {
179
		foreach ($instances as $instance => $value) {
180
			$widgetconfigname = $basename . '-' . $instance . '-config';
181
			if ($_POST[$widgetconfigname]) {
182
				$widget_settings[$widgetconfigname] = $_POST[$widgetconfigname];
183
			}
184
		}
185
	}
186

    
187
	save_widget_settings($_SESSION['Username'], $widget_settings);
188
	header("Location: /");
189
	exit;
190
}
191

    
192
## Load Functions Files
193
require_once('includes/functions.inc.php');
194

    
195
## Check to see if we have a swap space,
196
## if true, display, if false, hide it ...
197
if (file_exists("/usr/sbin/swapinfo")) {
198
	$swapinfo = `/usr/sbin/swapinfo`;
199
	if (stristr($swapinfo, '%') == true) $showswap=true;
200
}
201

    
202
## User recently restored his config.
203
## If packages are installed lets resync
204
if (file_exists('/conf/needs_package_sync')) {
205
	if ($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) {
206
		## If the user has logged into webGUI quickly while the system is booting then do not redirect them to
207
		## the package reinstall page. That is about to be done by the boot script anyway.
208
		## The code in head.inc will put up a notice to the user.
209
		if (!platform_booting()) {
210
			header('Location: pkg_mgr_install.php?mode=reinstallall');
211
			exit;
212
		}
213
	} else {
214
		@unlink('/conf/needs_package_sync');
215
	}
216
}
217

    
218
## If it is the first time webConfigurator has been
219
## accessed since initial install show this stuff.
220
if (file_exists('/conf/trigger_initial_wizard')) {
221
?>
222
<!DOCTYPE html>
223
<html lang="en">
224
<head>
225
	<link rel="stylesheet" href="/css/pfSense.css" />
226
	<title><?=$g['product_name']?>.localdomain - <?=$g['product_name']?> first time setup</title>
227
	<meta http-equiv="refresh" content="1;url=wizard.php?xml=setup_wizard.xml" />
228
</head>
229
<body id="loading-wizard" class="no-menu">
230
	<div id="jumbotron">
231
		<div class="container">
232
			<div class="col-sm-offset-3 col-sm-6 col-xs-12">
233
				<font color="white">
234
				<p><h3><?=sprintf(gettext("Welcome to %s!") . "\n", $g['product_name'])?></h3></p>
235
				<p><?=gettext("One moment while the initial setup wizard starts.")?></p>
236
				<p><?=gettext("Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.")?></p>
237
				<p><?=sprintf(gettext("To bypass the wizard, click on the %s logo on the initial page."), $g['product_name'])?></p>
238
				</font>
239
			</div>
240
		</div>
241
	</div>
242
</body>
243
</html>
244
<?php
245
	exit;
246
}
247

    
248
## Find out whether there's hardware encryption or not
249
unset($hwcrypto);
250
$fd = @fopen("{$g['varlog_path']}/dmesg.boot", "r");
251
if ($fd) {
252
	while (!feof($fd)) {
253
		$dmesgl = fgets($fd);
254
		if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches)
255
			or preg_match("/.*(VIA Padlock)/", $dmesgl, $matches)
256
			or preg_match("/^safe.: (\w.*)/", $dmesgl, $matches)
257
			or preg_match("/^ubsec.: (.*?),/", $dmesgl, $matches)
258
			or preg_match("/^padlock.: <(.*?)>,/", $dmesgl, $matches)) {
259
			$hwcrypto = $matches[1];
260
			break;
261
		}
262
	}
263
	fclose($fd);
264
	if (!isset($hwcrypto) && get_single_sysctl("dev.aesni.0.%desc")) {
265
		$hwcrypto = get_single_sysctl("dev.aesni.0.%desc");
266
	}
267
}
268

    
269
##build widget saved list information
270
if ($user_settings['widgets']['sequence'] != "") {
271
	$dashboardcolumns = isset($user_settings['webgui']['dashboardcolumns']) ? $user_settings['webgui']['dashboardcolumns'] : 2;
272
	$pconfig['sequence'] = $user_settings['widgets']['sequence'];
273
	$widgetsfromconfig = array();
274

    
275
	foreach (explode(',', $pconfig['sequence']) as $line) {
276
		$line_items = explode(':', $line);
277
		if (count($line_items) == 3) {
278
			// There can be multiple copies of a widget on the dashboard.
279
			// Default the copy number if it is not present (e.g. from old configs)
280
			$line_items[] = 0;
281
		}
282

    
283
		list($basename, $col, $display, $copynum) = $line_items;
284

    
285
		// be backwards compatible
286
		// If the display column information is missing, we will assign a temporary
287
		// column here. Next time the user saves the dashboard it will fix itself
288
		if ($col == "") {
289
			if ($basename == "system_information") {
290
				$col = "col1";
291
			} else {
292
				$col = "col2";
293
			}
294
		}
295

    
296
		// Limit the column to the current dashboard columns.
297
		if (substr($col, 3) > $dashboardcolumns) {
298
			$col = "col" . $dashboardcolumns;
299
		}
300

    
301
		$offset = strpos($basename, '-container');
302
		if (false !== $offset) {
303
			$basename = substr($basename, 0, $offset);
304
		}
305

    
306
		// Get the widget title that should be in a var defined in the widget's inc file.
307
		$widgettitle = ${$basename . '_title'};
308

    
309
		if (empty(trim($widgettitle))) {
310
			// Fall back to constructing a title from the file name of the widget.
311
			$widgettitle = ucwords(str_replace('_', ' ', $basename));
312
		}
313

    
314
		$widgetkey = $basename . '-' . $copynum;
315

    
316
		$widgetsfromconfig[$widgetkey] = array(
317
			'basename' => $basename,
318
			'title' => $widgettitle,
319
			'col' => $col,
320
			'display' => $display,
321
			'copynum' => $copynum,
322
		);
323
	}
324

    
325
	// add widgets that may not be in the saved configuration, in case they are to be displayed later
326
	$widgets = $widgetsfromconfig + $known_widgets;
327

    
328
	##find custom configurations of a particular widget and load its info to $pconfig
329
	foreach ($widgets as $widgetname => $widgetconfig) {
330
		if ($config['widgets'][$widgetname . '-config']) {
331
			$pconfig[$widgetname . '-config'] = $config['widgets'][$widgetname . '-config'];
332
		}
333
	}
334
}
335

    
336
## Get the configured options for Show/Hide available widgets panel.
337
$dashboard_available_widgets_hidden = !$user_settings['webgui']['dashboardavailablewidgetspanel'];
338

    
339
if ($dashboard_available_widgets_hidden) {
340
	$panel_state = 'out';
341
	$panel_body_state = 'in';
342
} else {
343
	$panel_state = 'in';
344
	$panel_body_state = 'out';
345
}
346

    
347
## Set Page Title and Include Header
348
$pgtitle = array(gettext("Status"), gettext("Dashboard"));
349
include("head.inc");
350

    
351
if ($savemsg) {
352
	print_info_box($savemsg, $class);
353
}
354

    
355
pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
356

    
357
?>
358

    
359
<div class="panel panel-default collapse <?=$panel_state?>" id="widget-available">
360
	<div class="panel-heading">
361
		<h2 class="panel-title"><?=gettext("Available Widgets"); ?>
362
			<span class="widget-heading-icon">
363
				<a data-toggle="collapse" href="#widget-available_panel-body" id="widgets-available">
364
					<i class="fa fa-plus-circle"></i>
365
				</a>
366
			</span>
367
		</h2>
368
	</div>
369
	<div id="widget-available_panel-body" class="panel-body collapse <?=$panel_body_state?>">
370
		<div class="content">
371
			<div class="row">
372
<?php
373

    
374
// Build the Available Widgets table using a sorted copy of the $known_widgets array
375
$available = $known_widgets;
376
uasort($available, function($a, $b){ return strcasecmp($a['title'], $b['title']); });
377

    
378
foreach ($available as $widgetkey => $widgetconfig):
379
?>
380
		<div class="col-sm-3"><a href="#" id="btnadd-<?=$widgetconfig['basename']?>"><i class="fa fa-plus"></i> <?=$widgetconfig['title']?></a></div>
381
<?php endforeach; ?>
382
			</div>
383
		</div>
384
	</div>
385
</div>
386

    
387
<div class="hidden" id="widgetSequence">
388
	<form action="/" method="post" id="widgetSequence_form" name="widgetForm">
389
		<input type="hidden" name="sequence" value="" />
390
	</form>
391
</div>
392

    
393
<?php
394
$widgetColumns = array();
395
foreach ($widgets as $widgetkey => $widgetconfig) {
396
	if ($widgetconfig['display'] == 'none') {
397
		continue;
398
	}
399

    
400
	if (!file_exists('/usr/local/www/widgets/widgets/'. $widgetconfig['basename'].'.widget.php')) {
401
		continue;
402
	}
403

    
404
	if (!isset($widgetColumns[$widgetconfig['col']])) {
405
		$widgetColumns[$widgetconfig['col']] = array();
406
	}
407

    
408
	$widgetColumns[$widgetconfig['col']][$widgetkey] = $widgetconfig;
409
}
410
?>
411

    
412
<div class="row">
413
<?php
414
	$columnWidth = (int) (12 / $numColumns);
415

    
416
	for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) {
417

    
418

    
419
		//if col$currentColumnNumber exists
420
		if (isset($widgetColumns['col'.$currentColumnNumber])) {
421
			echo '<div class="col-md-' . $columnWidth . '" id="widgets-col' . $currentColumnNumber . '">';
422
			$columnWidgets = $widgetColumns['col'.$currentColumnNumber];
423

    
424
			foreach ($columnWidgets as $widgetkey => $widgetconfig) {
425
				// Construct some standard names for the ids this widget will use for its commonly-used elements.
426
				// Included widget.php code can rely on and use these, so the format does not have to be repeated in every widget.php
427
				$widget_panel_body_id = 'widget-' . $widgetkey . '_panel-body';
428
				$widget_panel_footer_id = 'widget-' . $widgetkey . '_panel-footer';
429
				$widget_showallnone_id = 'widget-' . $widgetkey . '_showallnone';
430

    
431
				// Compose the widget title and include the title link if available
432
				$widgetlink = ${$widgetconfig['basename'] . '_title_link'};
433

    
434
				if ((strlen($widgetlink) > 0)) {
435
					$wtitle = '<a href="' . $widgetlink . '"> ' . $widgetconfig['title'] . '</a>';
436
				} else {
437
					$wtitle = $widgetconfig['title'];
438
				}
439
				?>
440
				<div class="panel panel-default" id="widget-<?=$widgetkey?>">
441
					<div class="panel-heading">
442
						<h2 class="panel-title">
443
							<?=$wtitle?>
444
							<span class="widget-heading-icon">
445
								<a data-toggle="collapse" href="#<?=$widget_panel_footer_id?>" class="config hidden">
446
									<i class="fa fa-wrench"></i>
447
								</a>
448
								<a data-toggle="collapse" href="#<?=$widget_panel_body_id?>">
449
									<!--  actual icon is determined in css based on state of body -->
450
									<i class="fa fa-plus-circle"></i>
451
								</a>
452
								<a data-toggle="close" href="#widget-<?=$widgetkey?>">
453
									<i class="fa fa-times-circle"></i>
454
								</a>
455
							</span>
456
						</h2>
457
					</div>
458
					<div id="<?=$widget_panel_body_id?>" class="panel-body collapse<?=($widgetconfig['display'] == 'close' ? '' : ' in')?>">
459
						<?php
460
							// For backward compatibility, included *.widget.php code needs the var $widgetname
461
							$widgetname = $widgetkey;
462
							// Determine if this is the first instance of this particular widget.
463
							// Provide the $widget_first_instance var, to make it easy for the included widget code
464
							// to be able to know if it is being included for the first time.
465
							if ($widgets_found[$widgetconfig['basename']]) {
466
								$widget_first_instance = false;
467
							} else {
468
								$widget_first_instance = true;
469
								$widgets_found[$widgetconfig['basename']] = true;
470
							}
471
							include('/usr/local/www/widgets/widgets/' . $widgetconfig['basename'] . '.widget.php');
472
						?>
473
					</div>
474
				</div>
475
				<?php
476
			}
477
			echo "</div>";
478
		} else {
479
			echo '<div class="col-md-' . $columnWidth . '" id="widgets-col' . $currentColumnNumber . '"></div>';
480
		}
481

    
482
	}
483
?>
484

    
485
</div>
486

    
487
<script type="text/javascript">
488
//<![CDATA[
489

    
490
dirty = false;
491
function updateWidgets(newWidget) {
492
	var sequence = '';
493

    
494
	$('.container .col-md-<?=$columnWidth?>').each(function(idx, col) {
495
		$('.panel', col).each(function(idx, widget) {
496
			var isOpen = $('.panel-body', widget).hasClass('in');
497
			var widget_basename = widget.id.split('-')[1];
498

    
499
			// Only save details for panels that have id's like'widget-*'
500
			// Some widgets create other panels, so ignore any of those.
501
			if ((widget.id.split('-')[0] == 'widget') && (typeof widget_basename !== 'undefined')) {
502
				sequence += widget_basename + ':' + col.id.split('-')[1] + ':' + (isOpen ? 'open' : 'close') + ':' + widget.id.split('-')[2] + ',';
503
			}
504
		});
505
	});
506

    
507
	if (typeof newWidget !== 'undefined') {
508
		// The system_information widget is always added to column one. Others go in column two
509
		if (newWidget == "system_information") {
510
			sequence += newWidget.split('-')[0] + ':' + 'col1:open:next';
511
		} else {
512
			sequence += newWidget.split('-')[0] + ':' + 'col2:open:next';
513
		}
514
	}
515

    
516
	$('input[name=sequence]', $('#widgetSequence_form')).val(sequence);
517
}
518

    
519
// Determine if all the checkboxes are checked
520
function are_all_checked(checkbox_panel_ref) {
521
	var allBoxesChecked = true;
522
	$(checkbox_panel_ref).each(function() {
523
		if ((this.type == 'checkbox') && !this.checked) {
524
			allBoxesChecked = false;
525
		}
526
	});
527
	return allBoxesChecked;
528
}
529

    
530
// If the checkboxes are all checked, then clear them all.
531
// Otherwise set them all.
532
function set_clear_checkboxes(checkbox_panel_ref) {
533
	checkTheBoxes = !are_all_checked(checkbox_panel_ref);
534

    
535
	$(checkbox_panel_ref).each(function() {
536
		$(this).prop("checked", checkTheBoxes);
537
	});
538
}
539

    
540
// Set the given id to All or None button depending if the checkboxes are all checked.
541
function set_all_none_button(checkbox_panel_ref, all_none_button_id) {
542
	if (are_all_checked(checkbox_panel_ref)) {
543
		text = "<?=gettext('None')?>";
544
	} else {
545
		text = "<?=gettext('All')?>";
546
	}
547

    
548
	$("#" + all_none_button_id).html('<i class="fa fa-undo icon-embed-btn"></i>' + text);
549
}
550

    
551
// Setup the necessary events to manage the All/None button and included checkboxes
552
// used for selecting the items to show on a widget.
553
function set_widget_checkbox_events(checkbox_panel_ref, all_none_button_id) {
554
		set_all_none_button(checkbox_panel_ref, all_none_button_id);
555

    
556
		$(checkbox_panel_ref).change(function() {
557
			set_all_none_button(checkbox_panel_ref, all_none_button_id);
558
		});
559

    
560
		$("#" + all_none_button_id).click(function() {
561
			set_clear_checkboxes(checkbox_panel_ref);
562
			set_all_none_button(checkbox_panel_ref, all_none_button_id);
563
		});
564
}
565

    
566
events.push(function() {
567

    
568
	// Make panels destroyable
569
	$('.container .panel-heading a[data-toggle="close"]').each(function (idx, el) {
570
		$(el).on('click', function(e) {
571
			$(el).parents('.panel').remove();
572
			updateWidgets();
573
			// Submit the form save/display all selected widgets
574
			$('[name=widgetForm]').submit();
575
		})
576
	});
577

    
578
	// Make panels sortable
579
	$('.container .col-md-<?=$columnWidth?>').sortable({
580
		handle: '.panel-heading',
581
		cursor: 'grabbing',
582
		connectWith: '.container .col-md-<?=$columnWidth?>',
583
		update: function(){
584
			dirty = true;
585
			$('#btnstore').removeClass('invisible');
586
		}
587
	});
588

    
589
	// On clicking a widget to install . .
590
	$('[id^=btnadd-]').click(function(event) {
591
		// Add the widget name to the list of displayed widgets
592
		updateWidgets(this.id.replace('btnadd-', ''));
593

    
594
		// Submit the form save/display all selected widgets
595
		$('[name=widgetForm]').submit();
596
	});
597

    
598

    
599
	$('#btnstore').click(function() {
600
		updateWidgets();
601
		dirty = false;
602
		$(this).addClass('invisible');
603
		$('[name=widgetForm]').submit();
604
	});
605

    
606
	// provide a warning message if the user tries to change page before saving
607
	$(window).bind('beforeunload', function(){
608
		if (dirty) {
609
			return ("<?=gettext('One or more widgets have been moved but have not yet been saved')?>");
610
		} else {
611
			return undefined;
612
		}
613
	});
614

    
615
	// Show the fa-save icon in the breadcrumb bar if the user opens or closes a panel (In case he/she wants to save the new state)
616
	// (Sometimes this will cause us to see the icon when we don't need it, but better that than the other way round)
617
	$('.panel').on('hidden.bs.collapse shown.bs.collapse', function (e) {
618
	    if (e.currentTarget.id != 'widget-available') {
619
			$('#btnstore').removeClass("invisible");
620
		}
621
	});
622
});
623
//]]>
624
</script>
625
<?php
626
//build list of javascript include files
627
foreach (glob('widgets/javascript/*.js') as $file) {
628
	echo '<script src="'.$file.'"></script>';
629
}
630

    
631
include("foot.inc");
(64-64/223)