Project

General

Profile

Download (1.96 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
$apple_ua = array("iPhone","iPod");
12
foreach($apple_ua as $useragent)
13
	if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent))
14
		$g['theme'] = "pfsense";	
15
?>
16
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
17
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
18
<html>
19
<head>
20
	<title><?=gentitle($pgtitle);?></title>
21
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
22
        <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
23
                  file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
24
        <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/wizard.css" media="all" />
25
        <?php else: ?>
26
        <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
27
        <?php endif; ?>
28
	<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
29
	<script type="text/javascript">var theme = "<?php echo $g['theme']; ?>"</script>
30
	<script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script>
31

    
32

    
33
<?
34
	/*
35
	 *	Find all javascript files that need to be included
36
	 *	for this page ... from the arrays ... :)
37
	 *	Coded by: Erik Kristensen
38
	 */
39

    
40
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
41
	$path = "/usr/local/www/javascript/" . $dir . "/";
42
	if (is_dir($path)) {
43
		if ($dh = opendir($path)) {
44
			while (($file = readdir($dh)) !== false) {
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
	if ($oSajax):
53
?>
54
	<script language="javascript" type="text/javascript">
55
		<?php $oSajax->sajax_show_javascript(); ?>
56
	</script>
57
<?	endif; ?>
58

    
59
<?php if (!isset($closehead)){ ?>
60
</head>
61
<?php } ?>
(65-65/173)