Project

General

Profile

Download (2.01 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

    
27
	<?php outputCSSFileInline("niftycssCode.css"); ?>
28
	<?php outputCSSFileInline("niftycssprintCode.css"); ?>
29
		<link rel="stylesheet" type="text/css" href="niftycssprintCode.css" media="print">
30
	<?php outputJavaScriptFileInline("niftyjsCode.js"); ?>
31
	<script type="text/javascript">
32
		var theme = "<?php echo $g['theme']; ?>";
33
	</script>
34
	<?php outputJavaScriptFileInline("themes/{$g['theme']}/loader.js"); ?>
35

    
36
<?
37

    
38
	/*
39
	 *	Find all javascript files that need to be included
40
	 *	for this page ... from the arrays ... :)
41
	 *	Coded by: Erik Kristensen
42
	 */
43

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

    
57
	if ($oSajax):
58
?>
59
	<script language="javascript" type="text/javascript">
60
		<?php $oSajax->sajax_show_javascript(); ?>
61
	</script>
62

    
63
<?	endif; ?>
64

    
65
<?php if (!isset($closehead))
66
	echo "</head>";
67
?>
(70-70/208)