Projet

Général

Profil

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

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

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-1.11.1.css" />
37
		<script type="text/javascript" src="/javascript/niftyjsCode.js"></script>
38
		<script type="text/javascript" src="/javascript/jquery-1.11.1.min.js"></script>
39
		<script type="text/javascript" src="/javascript/jquery-migrate-1.2.1.min.js"></script>
40
		<script type="text/javascript" src="/javascript/jquery/jquery-ui-1.11.1.min.js"></script>
41
		<script type="text/javascript">
42
		//<![CDATA[
43
			var theme = "<?php echo $g['theme']; ?>";
44

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

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

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

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

    
112
?>
(90-90/256)