Projet

Général

Profil

Télécharger (4,51 ko) Statistiques
| Branche: | Tag: | Révision:

univnautes / usr / local / www / head.inc @ fab1cd2f

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
	<link rel="shortcut icon" href="/themes/<?php echo $g['theme']; ?>/images/icons/favicon.ico"/>
19
		<?php 
20
		if (file_exists("{$g['www_path']}/themes/{$g['theme']}/table.css")):
21
			echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/table.css\" />";
22
        else:
23
        	echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/css/table.css\" media=\"all\" />";
24
        endif;
25
		?>
26

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

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

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

    
96
if (!isset($closehead))
97
	echo "</head>";
98

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

    
111
?>
(89-89/255)