Projet

Général

Profil

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

univnautes / usr / local / www / head.inc @ 7e736f38

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="en" xml:lang="en">
14
<head>
15
	<title><?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?></title>
16
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
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
		<script type="text/javascript" src="/javascript/niftyjsCode.js"></script>
37
		<script type="text/javascript" src="/javascript/jquery.js"></script>
38
		<script type="text/javascript" src="/javascript/jquery/jquery-ui.custom.min.js"></script>
39
		<script type="text/javascript">
40
		//<![CDATA[
41
			var theme = "<?php echo $g['theme']; ?>";
42

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

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

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

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

    
110
?>
(88-88/246)