Project

General

Profile

Download (1.59 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/* 
3
 *   if user has selected a custom template, use it.
4
 *   otherwise default to pfsense tempalte
5
 */
6
if($config['theme'] <> "")
7
	$g['theme'] = $config['theme'];
8
else
9
	$g['theme'] = "pfsense";
10
?>
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
12
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
13
<html>
14
<head>
15
	<title><?=gentitle($pgtitle);?></title>
16
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
17
	<link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
18
	<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print">
19
	<script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script>
20

    
21
<?
22
	/*
23
	 *	Find all javascript files that need to be included
24
	 *	for this page ... from the arrays ... :)
25
	 *	Coded by: Erik Kristensen
26
	 */
27

    
28
	## Make Sure $page_filename has been set ##
29
	## if it hasn't been don't bother ... :P ##
30
	/*
31
	if ($page_filename) {
32
		include('includes/javascript.inc.php');
33

    
34
		foreach ($top_javascript_files["$page_filename"] as $file) {
35
		 	echo '<script type="text/javascript" src="/javascript/'.$file.'"></script>';
36
		}
37
	}
38
	*/
39
	$dir  = trim(basename($_SERVER["PHP_SELF"]), '.php');
40
	$path = "/usr/local/www/javascript/" . $dir . "/";
41
	if (is_dir($path)) {
42
		if ($dh = opendir($path)) {
43
			while (($file = readdir($dh)) !== false) {
44
				"here<br>";
45
		   		if (is_dir($file)) continue;
46
				echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n";
47
			}
48
			closedir($dh);
49
		}
50
	}
51
?>
52

    
53
<?php if (!isset($closehead)){ ?>
54
</head>
55
<?php } ?>
(54-54/144)