Project

General

Profile

Download (4.81 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
if (isset($config['system']['webgui']['pagenamefirst']))
11
	$tabtitle = $pagetitle . " - " . $config['system']['hostname'] . "." . $config['system']['domain'];
12
else
13
	$tabtitle = $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle;
14
?>
15
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
16
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
17
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?=system_get_language_code();?>" xml:lang="<?=system_get_language_code();?>">
18
<head>
19
	<title><?php echo($tabtitle); ?></title>
20
	<meta http-equiv="Content-Type" content="text/html; charset=<?=system_get_language_codeset();?>" />
21
	<link rel="apple-touch-icon" href="/themes/<?php echo $g['theme']; ?>/apple-touch-icon.png"/>
22
	<link rel="shortcut icon" href="/themes/<?php echo $g['theme']; ?>/images/icons/favicon.ico"/>
23
		<?php 
24
		if (file_exists("{$g['www_path']}/themes/{$g['theme']}/table.css")):
25
			echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/table.css\" />";
26
        else:
27
        	echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/css/table.css\" media=\"all\" />";
28
        endif;
29
		?>
30

    
31
		<?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
32
                  file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
33
					<?php echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/wizard.css\" />"; ?>
34
        <?php else: ?>
35
        	<link type="text/css" rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
36
        <?php endif; ?>
37
		<link rel="stylesheet" type="text/css" href="/niftycssCode.css" />
38
		<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" />
39
		<link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme']?>/new_tab_menu.css" media="all" />
40
		<link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme']?>/styles/jquery-ui-1.11.1.css" />
41
		<script type="text/javascript" src="/javascript/niftyjsCode.js"></script>
42
		<script type="text/javascript" src="/javascript/jquery-1.11.1.min.js"></script>
43
		<script type="text/javascript" src="/javascript/jquery-migrate-1.2.1.min.js"></script>
44
		<script type="text/javascript" src="/javascript/jquery/jquery-ui-1.11.1.min.js"></script>
45
		<script type="text/javascript">
46
		//<![CDATA[
47
			var theme = "<?php echo $g['theme']; ?>";
48

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

    
88
	$dir  = trim(basename($_SERVER["SCRIPT_FILENAME"], '.php'));
89
	$path = "{$g['www_path']}/javascript/" . $dir . "/";
90
	if (is_dir($path)) {
91
		if ($dh = opendir($path)) {
92
			while (($file = readdir($dh)) !== false) {
93
		   		if (is_dir($file)) 
94
					continue;
95
				echo "\t<script type=\"text/javascript\" src=\"/javascript/{$dir}/{$file}?rev=1\"></script>\n";
96
			}
97
			closedir($dh);
98
		}
99
	}
100

    
101
if (!isset($closehead))
102
	echo "</head>";
103

    
104
/*  If this page is being remotely managed then do not allow the loading of the contents. */
105
if($config['remote_managed_pages']['item']) {
106
	foreach($config['remote_managed_pages']['item'] as $rmp) {
107
		if($rmp == $_SERVER['SCRIPT_NAME']) {
108
			include("fbegin.inc");
109
			print_info_box_np("This page is currently being managed by a remote machine.");
110
			include("fend.inc");
111
			exit;
112
		}
113
	}	
114
}
115

    
116
?>
(90-90/256)