Project

General

Profile

Download (3.6 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
	pfSense_MODULE:	header
4
*/
5

    
6
$g['theme'] = get_current_theme();
7

    
8
$pagetitle = gentitle( $pgtitle );
9

    
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><?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?></title>
16
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
17
	<link rel="apple-touch-icon" href="/themes/<?php echo $g['theme']; ?>/apple-touch-icon.png"/>
18
		<?php 
19
		if (file_exists("{$g['www_path']}/themes/{$g['theme']}/table.css")):
20
			echo "<link rel=\"stylesheet\" href=\"/themes/{$g['theme']}/table.css\" />";
21
        else:
22
        	echo "<link rel=\"stylesheet\" href=\"/css/table.css\" media=\"all\" />";
23
        endif;
24
		?>
25
		
26
		<?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
27
                  file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
28
					<?php echo "<style type=\"text/css\" src=\"/themes/{$g['theme']}/wizard.css\"></style>"; ?>
29
        <?php else: ?>
30
        	<link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
31
        <?php endif; ?>
32
		<link rel="stylesheet" type="text/css" href="/niftycssCode.css">
33
		<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print">
34
		<link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme']?>/new_tab_menu.css" media="all">
35
		<script type="text/javascript" src="/javascript/niftyjsCode.js"></script>
36
		<script type="text/javascript" src="/javascript/jquery.js"></script>
37
		<script type="text/javascript" src="/javascript/jquery/jquery-ui.custom.min.js"></script>
38
		<script type="text/javascript">
39
			var theme = "<?php echo $g['theme']; ?>";
40

    
41
			jQuery.noConflict();
42
		</script>
43
		<?php echo "\t<script type=\"text/javascript\" src=\"/themes/{$g['theme']}/loader.js\"></script>\n"; ?>
44
<?php
45
		if($_GET['enablefirebuglite']) {
46
			echo "\t<script type=\"text/javascript\" src=\"/javascript/pi.js\"></script>\n";
47
			echo "\t<script type=\"text/javascript\" src=\"/javascript/firebug-lite.js\"></script>\n";
48
		}
49
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/prototype.js\"></script>\n";
50
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/scriptaculous.js\"></script>\n";
51
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/effects.js\"></script>\n";
52
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/dragdrop.js\"></script>\n";
53
		if(file_exists("{$g['www_path']}/javascript/global.js"))
54
			echo "\t<script type=\"text/javascript\" src=\"/javascript/global.js\"></script>\n";
55
	/*
56
	 *	Find all javascript files that need to be included
57
	 *	for this page ... from the arrays ... :)
58
	 *	Coded by: Erik Kristensen
59
	 */
60

    
61
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"], '.php'));
62
	$path = "{$g['www_path']}/javascript/" . $dir . "/";
63
	if (is_dir($path)) {
64
		if ($dh = opendir($path)) {
65
			while (($file = readdir($dh)) !== false) {
66
		   		if (is_dir($file)) 
67
					continue;
68
				echo "\t<script type=\"text/javascript\" src=\"/javascript/{$dir}/{$file}\"></script>\n";
69
			}
70
			closedir($dh);
71
		}
72
	}
73

    
74
if (!isset($closehead))
75
	echo "</head>";
76

    
77
/*  If this page is being remotely managed then do not allow the loading of the contents. */
78
if($config['remote_managed_pages']['item']) {
79
	foreach($config['remote_managed_pages']['item'] as $rmp) {
80
		if($rmp == $_SERVER['SCRIPT_NAME']) {
81
			include("fbegin.inc");
82
			print_info_box_np("This page is currently being managed by a remote machine.");
83
			include("fend.inc");
84
			exit;
85
		}
86
	}	
87
}
88

    
89
?>
(88-88/249)