Project

General

Profile

Download (1.96 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 434f070c Scott Ullrich
	
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 a980eec1 Scott Ullrich
?>
16 75b1adc0 Bill Marquette
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
17
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
18 329b5bb7 Scott Ullrich
<html>
19 7f1f5492 Scott Ullrich
<head>
20 4ce8ac00 Erik Kristensen
	<title><?=gentitle($pgtitle);?></title>
21 d772ac32 Erik Kristensen
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
22 719b7f09 Scott Ullrich
        <?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 d772ac32 Erik Kristensen
	<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
29 7067dae5 Bill Marquette
	<script type="text/javascript">var theme = "<?php echo $g['theme']; ?>"</script>
30 1df0159c Erik Kristensen
	<script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script>
31
32 0f5a136d Erik Kristensen
33 8ab3e9ed Erik Kristensen
<?
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 7dd44f7d Bill Marquette
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
41 4ce8ac00 Erik Kristensen
	$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 d772ac32 Erik Kristensen
52 1df0159c Erik Kristensen
	if ($oSajax):
53 8ab3e9ed Erik Kristensen
?>
54 1df0159c Erik Kristensen
	<script language="javascript" type="text/javascript">
55
		<?php $oSajax->sajax_show_javascript(); ?>
56
	</script>
57
<?	endif; ?>
58 d772ac32 Erik Kristensen
59 6f4a312a Bill Marquette
<?php if (!isset($closehead)){ ?>
60 329b5bb7 Scott Ullrich
</head>
61 6f4a312a Bill Marquette
<?php } ?>