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
|
<link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
|
18
|
<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
|
19
|
<script type="text/javascript">var theme = "<?php echo $g['theme']; ?>"</script>
|
20
|
<script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script>
|
21
|
|
22
|
|
23
|
<?
|
24
|
/*
|
25
|
* Find all javascript files that need to be included
|
26
|
* for this page ... from the arrays ... :)
|
27
|
* Coded by: Erik Kristensen
|
28
|
*/
|
29
|
|
30
|
$dir = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php');
|
31
|
$path = "/usr/local/www/javascript/" . $dir . "/";
|
32
|
if (is_dir($path)) {
|
33
|
if ($dh = opendir($path)) {
|
34
|
while (($file = readdir($dh)) !== false) {
|
35
|
if (is_dir($file)) continue;
|
36
|
echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n";
|
37
|
}
|
38
|
closedir($dh);
|
39
|
}
|
40
|
}
|
41
|
|
42
|
if ($oSajax):
|
43
|
?>
|
44
|
<script language="javascript" type="text/javascript">
|
45
|
<?php $oSajax->sajax_show_javascript(); ?>
|
46
|
</script>
|
47
|
<? endif; ?>
|
48
|
|
49
|
<?php if (!isset($closehead)){ ?>
|
50
|
</head>
|
51
|
<?php } ?>
|