Project

General

Profile

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

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

    
50
		jQuery.noConflict();
51
	//]]>
52
	</script>
53

    
54
	<script type="text/javascript" src="/javascript/sorttable.js"></script>
55
	<script type="text/javascript" src="/javascript/ticker.js"></script>
56
	<style type="text/css" id="antiClickjack">
57
	/*<![CDATA[*/
58
		body{display:none}
59
	/*]]>*/
60
	</style>
61
	<script type="text/javascript">
62
	//<![CDATA[
63
		if (self === top) {
64
			var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack);
65
		} else {
66
			top.location = self.location;
67
		}
68
	//]]>
69
	</script>
70

    
71
<?php
72
echo "\t<script type=\"text/javascript\" src=\"/themes/{$g['theme']}/loader.js\"></script>\n";
73
if ($_GET['enablefirebuglite']) {
74
	echo "\t<script type=\"text/javascript\" src=\"/javascript/pi.js\"></script>\n";
75
	echo "\t<script type=\"text/javascript\" src=\"/javascript/firebug-lite.js\"></script>\n";
76
}
77
echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/prototype.js\"></script>\n";
78
echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/scriptaculous.js\"></script>\n";
79
echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/effects.js\"></script>\n";
80
echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/dragdrop.js\"></script>\n";
81
if (file_exists("{$g['www_path']}/javascript/global.js")) {
82
	echo "\t<script type=\"text/javascript\" src=\"/javascript/global.js\"></script>\n";
83
}
84
/*
85
 *	Find all javascript files that need to be included
86
 *	for this page ... from the arrays ... :)
87
 *	Coded by: Erik Kristensen
88
 */
89

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

    
104
if (!isset($closehead)) {
105
	echo "</head>";
106
}
107

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

    
120
?>
(90-90/256)