Project

General

Profile

Download (4.33 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 xmlns="http://www.w3.org/1999/xhtml" lang="<?=system_get_language_code();?>" xml:lang="<?=system_get_language_code();?>">
14
<head>
15
	<title><?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?></title>
16
	<meta http-equiv="Content-Type" content="text/html; charset=<?=system_get_language_codeset();?>" />
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 type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/table.css\" />";
21
        else:
22
        	echo "<link type=\"text/css\" 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 "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/wizard.css\" />"; ?>
29
        <?php else: ?>
30
        	<link type="text/css" 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
		//<![CDATA[
40
			var theme = "<?php echo $g['theme']; ?>";
41

    
42
			jQuery.noConflict();
43
		//]]>
44
		</script>
45
		
46
		<script type="text/javascript" src="/javascript/sorttable.js"></script>
47
		<script type="text/javascript" src="/javascript/ticker.js"></script>
48
		<style type="text/css" id="antiClickjack">
49
		/*<![CDATA[*/
50
		body{display:none}
51
		/*]]>*/
52
		</style>
53
		<script type="text/javascript">
54
		//<![CDATA[
55
		if (self === top) {
56
			var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack);
57
		} else {
58
			top.location = self.location;
59
		}
60
		//]]>
61
		</script>
62
		
63
		<?php echo "\t<script type=\"text/javascript\" src=\"/themes/{$g['theme']}/loader.js\"></script>\n"; ?>
64
<?php
65
		if($_GET['enablefirebuglite']) {
66
			echo "\t<script type=\"text/javascript\" src=\"/javascript/pi.js\"></script>\n";
67
			echo "\t<script type=\"text/javascript\" src=\"/javascript/firebug-lite.js\"></script>\n";
68
		}
69
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/prototype.js\"></script>\n";
70
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/scriptaculous.js\"></script>\n";
71
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/effects.js\"></script>\n";
72
		echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/dragdrop.js\"></script>\n";
73
		if(file_exists("{$g['www_path']}/javascript/global.js"))
74
			echo "\t<script type=\"text/javascript\" src=\"/javascript/global.js\"></script>\n";
75
	/*
76
	 *	Find all javascript files that need to be included
77
	 *	for this page ... from the arrays ... :)
78
	 *	Coded by: Erik Kristensen
79
	 */
80

    
81
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"], '.php'));
82
	$path = "{$g['www_path']}/javascript/" . $dir . "/";
83
	if (is_dir($path)) {
84
		if ($dh = opendir($path)) {
85
			while (($file = readdir($dh)) !== false) {
86
		   		if (is_dir($file)) 
87
					continue;
88
				echo "\t<script type=\"text/javascript\" src=\"/javascript/{$dir}/{$file}\"></script>\n";
89
			}
90
			closedir($dh);
91
		}
92
	}
93

    
94
if (!isset($closehead))
95
	echo "</head>";
96

    
97
/*  If this page is being remotely managed then do not allow the loading of the contents. */
98
if($config['remote_managed_pages']['item']) {
99
	foreach($config['remote_managed_pages']['item'] as $rmp) {
100
		if($rmp == $_SERVER['SCRIPT_NAME']) {
101
			include("fbegin.inc");
102
			print_info_box_np("This page is currently being managed by a remote machine.");
103
			include("fend.inc");
104
			exit;
105
		}
106
	}	
107
}
108

    
109
?>
(88-88/246)