Project

General

Profile

Download (2.2 KB) Statistics
| Branch: | Tag: | Revision:
1 a980eec1 Scott Ullrich
<?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 45ee90ed Matthew Grooms
11 bdd55010 Matthew Grooms
$pagetitle = gentitle( $pgtitle );
12
13 a980eec1 Scott Ullrich
?>
14 75b1adc0 Bill Marquette
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
15
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
16 329b5bb7 Scott Ullrich
<html>
17 7f1f5492 Scott Ullrich
<head>
18 bdd55010 Matthew Grooms
	<title><?=$pagetitle;?></title>
19 d772ac32 Erik Kristensen
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
20 719b7f09 Scott Ullrich
        <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
21
                  file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
22 a2a3b97a Scott Ullrich
					<?php outputCSSFileInline("themes/{$g['theme']}/wizard.css"); ?>
23 719b7f09 Scott Ullrich
        <?php else: ?>
24 a2a3b97a Scott Ullrich
        	<link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
25 719b7f09 Scott Ullrich
        <?php endif; ?>
26 8d236bfb Scott Ullrich
		<?php 
27
			if(file_exists("niftycssCode.css")) 
28
				outputCSSFileInline("niftycssCode.css"); 
29
			if(file_exists("niftycssprintCode.css")) 
30 621084b5 Scott Ullrich
				outputCSSPrintFileInline("niftycssprintCode.css");
31 8d236bfb Scott Ullrich
			if(file_exists("niftyjsCode.js")) 
32
				outputJavaScriptFileInline("niftyjsCode.js"); 
33
		?>
34 76cd0d89 Scott Ullrich
		<script type="text/javascript">
35
			var theme = "<?php echo $g['theme']; ?>";
36
		</script>
37
		<?php outputJavaScriptFileInline("themes/{$g['theme']}/loader.js"); ?>
38 cb144a6d Scott Ullrich
<?php
39
		if($_GET['enablefirebuglite']) {
40
			outputJavaScriptFileInline("javascript/pi.js");
41
			outputJavaScriptFileInline("javascript/firebug-lite.js");
42
		}
43 45ee90ed Matthew Grooms
44 8ab3e9ed Erik Kristensen
	/*
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 7dd44f7d Bill Marquette
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
51 4ce8ac00 Erik Kristensen
	$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 9e622280 Scott Ullrich
				//echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n";
57
				outputJavaScriptFileInline("javascript/{$dir}/{$file}"); 
58 4ce8ac00 Erik Kristensen
			}
59
			closedir($dh);
60
		}
61
	}
62 d772ac32 Erik Kristensen
63 1df0159c Erik Kristensen
	if ($oSajax):
64 8ab3e9ed Erik Kristensen
?>
65 1df0159c Erik Kristensen
	<script language="javascript" type="text/javascript">
66
		<?php $oSajax->sajax_show_javascript(); ?>
67
	</script>
68 a2a3b97a Scott Ullrich
69 1df0159c Erik Kristensen
<?	endif; ?>
70 d772ac32 Erik Kristensen
71 a2a3b97a Scott Ullrich
<?php if (!isset($closehead))
72
	echo "</head>";
73
?>