Project

General

Profile

Download (2.2 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
$pagetitle = gentitle( $pgtitle );
12

    
13
?>
14
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
15
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
16
<html>
17
<head>
18
	<title><?=$pagetitle;?></title>
19
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
20
        <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
21
                  file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
22
					<?php outputCSSFileInline("themes/{$g['theme']}/wizard.css"); ?>
23
        <?php else: ?>
24
        	<link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
25
        <?php endif; ?>
26
		<?php 
27
			if(file_exists("niftycssCode.css")) 
28
				outputCSSFileInline("niftycssCode.css"); 
29
			if(file_exists("niftycssprintCode.css")) 
30
				outputCSSPrintFileInline("niftycssprintCode.css");
31
			if(file_exists("niftyjsCode.js")) 
32
				outputJavaScriptFileInline("niftyjsCode.js"); 
33
		?>
34
		<script type="text/javascript">
35
			var theme = "<?php echo $g['theme']; ?>";
36
		</script>
37
		<?php outputJavaScriptFileInline("themes/{$g['theme']}/loader.js"); ?>
38
<?php
39
		if($_GET['enablefirebuglite']) {
40
			outputJavaScriptFileInline("javascript/pi.js");
41
			outputJavaScriptFileInline("javascript/firebug-lite.js");
42
		}
43

    
44
	/*
45
	 *	Find all javascript files that need to be included
46
	 *	for this page ... from the arrays ... :)
47
	 *	Coded by: Erik Kristensen
48
	 */
49

    
50
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
51
	$path = "/usr/local/www/javascript/" . $dir . "/";
52
	if (is_dir($path)) {
53
		if ($dh = opendir($path)) {
54
			while (($file = readdir($dh)) !== false) {
55
		   		if (is_dir($file)) continue;
56
				//echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n";
57
				outputJavaScriptFileInline("javascript/{$dir}/{$file}"); 
58
			}
59
			closedir($dh);
60
		}
61
	}
62

    
63
	if ($oSajax):
64
?>
65
	<script language="javascript" type="text/javascript">
66
		<?php $oSajax->sajax_show_javascript(); ?>
67
	</script>
68

    
69
<?	endif; ?>
70

    
71
<?php if (!isset($closehead))
72
	echo "</head>";
73
?>
(70-70/214)