Project

General

Profile

Download (1.81 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
        <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
18
                  file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
19
        <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/wizard.css" media="all" />
20
        <?php else: ?>
21
        <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
22
        <?php endif; ?>
23
	<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
24
	<script type="text/javascript">var theme = "<?php echo $g['theme']; ?>"</script>
25
	<script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script>
26

    
27

    
28
<?
29
	/*
30
	 *	Find all javascript files that need to be included
31
	 *	for this page ... from the arrays ... :)
32
	 *	Coded by: Erik Kristensen
33
	 */
34

    
35
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
36
	$path = "/usr/local/www/javascript/" . $dir . "/";
37
	if (is_dir($path)) {
38
		if ($dh = opendir($path)) {
39
			while (($file = readdir($dh)) !== false) {
40
		   		if (is_dir($file)) continue;
41
				echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n";
42
			}
43
			closedir($dh);
44
		}
45
	}
46

    
47
	if ($oSajax):
48
?>
49
	<script language="javascript" type="text/javascript">
50
		<?php $oSajax->sajax_show_javascript(); ?>
51
	</script>
52
<?	endif; ?>
53

    
54
<?php if (!isset($closehead)){ ?>
55
</head>
56
<?php } ?>
(70-70/200)