head.inc 3.44 KB
Newer Older
Ad Schellevis's avatar
Ad Schellevis committed
1 2 3 4 5 6
<?php

$g['theme'] = get_current_theme();

$pagetitle = gentitle( $pgtitle );

7
?><!doctype html>
8 9 10 11
<!--[if IE 8 ]><html lang="<?=system_get_language_code();?>" class="ie ie8 lte9 lte8 no-js"><![endif]-->
<!--[if IE 9 ]><html lang="<?=system_get_language_code();?>" class="ie ie9 lte9 no-js"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="<?=system_get_language_code();?>" class="no-js"><!--<![endif]-->
	<head>
Ad Schellevis's avatar
Ad Schellevis committed
12

13 14
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
15

16 17 18 19 20
		<meta name="robots" content="index, follow, noodp, noydir" />
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<meta name="copyright" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
21

22
		<title><?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?></title>
23

Ad Schellevis's avatar
Ad Schellevis committed
24
		<link href="/themes/<?=$g['theme'];?>/build/css/main.css" media="screen, projection" rel="stylesheet">
25
		<!-- Stylesheet for fancy select/dropdown -->
26
		<link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme'];?>/build/css/bootstrap-select.css">
27
		<!-- Favicon -->
Ad Schellevis's avatar
Ad Schellevis committed
28
		<link href="/themes/<?=$g['theme'];?>/assets/images/favicon.png" rel="shortcut icon">
29

30
		<!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script><![endif]-->
31

Ad Schellevis's avatar
Ad Schellevis committed
32
		<script>var theme = '<?=$g['theme'];?>'; </script>
33

Ad Schellevis's avatar
Ad Schellevis committed
34
		<script src="/themes/<?=$g['theme'];?>/build/js/main.min.js" type="text/javascript"></script>
35 36 37
		<!-- Fancy select with search options -->
		<script src="/themes/<?=$g['theme'];?>/build/js/bootstrap-select.min.js" type="text/javascript"></script>
		<!-- Ticker used for notices-->
38
		<script type="text/javascript" src="/javascript/ticker.js"></script>
39

40
		<?php if($_GET['enablefirebuglite']): ?>
Ad Schellevis's avatar
Ad Schellevis committed
41 42
			<script type=\"text/javascript" src=\"/javascript/pi.js\"></script>
			<script type=\"text/javascript" src=\"/javascript/firebug-lite.js\"></script>
43
		<?php endif; ?>
Ad Schellevis's avatar
Ad Schellevis committed
44

45 46


47
		<?php if (file_exists('/usr/local/www/javascript/global.js')):?>
48 49
		<script type="text/javascript" src="/javascript/global.js"></script>
		<?php endif; ?>
50

51 52 53 54 55 56
		<?php
		/*
		 *	Find all javascript files that need to be included
		 *	for this page ... from the arrays ... :)
		 *	Coded by: Erik Kristensen
		 */
57

58 59
		$dir  = trim(basename($_SERVER['SCRIPT_FILENAME'], '.php'));
		$path = '/usr/local/www/javascript/' . $dir . '/';
60 61 62
		if (is_dir($path)) {
			if ($dh = opendir($path)) {
				while (($file = readdir($dh)) !== false) {
63
					if (is_dir($file))
64 65 66 67 68 69
						continue;
					echo "\t<script type=\"text/javascript\" src=\"/javascript/{$dir}/{$file}\"></script>\n";
				}
				closedir($dh);
			}
		}
70

71
		?>
72

73
		<?php if (basename($_SERVER["SCRIPT_FILENAME"] != "index.php") && !$allowautocomplete): ?>
Ad Schellevis's avatar
Ad Schellevis committed
74 75
		<script type="text/javascript">
		//<![CDATA[
76 77 78
		(function ($) {
			$("input").attr("autocomplete","off");
		})(jQuery);
79 80 81


		jQuery(function () {
82
			jQuery('[data-toggle="tooltip"]').tooltip()
83
		})
Ad Schellevis's avatar
Ad Schellevis committed
84 85
		//]]>
		</script>
86
		<? endif; ?>
Ad Schellevis's avatar
Ad Schellevis committed
87 88


89
		<?php if (!$closehead):?></head><? endif;?>
90

91
<?php
92

Ad Schellevis's avatar
Ad Schellevis committed
93 94 95 96
/*  If this page is being remotely managed then do not allow the loading of the contents. */
if($config['remote_managed_pages']['item']) {
	foreach($config['remote_managed_pages']['item'] as $rmp) {
		if($rmp == $_SERVER['SCRIPT_NAME']) {
97
			//include("fbegin.inc");
Ad Schellevis's avatar
Ad Schellevis committed
98
			print_info_box_np("This page is currently being managed by a remote machine.");
99
			//include("fend.inc");
Ad Schellevis's avatar
Ad Schellevis committed
100 101
			exit;
		}
102
	}
Ad Schellevis's avatar
Ad Schellevis committed
103
}
104
?>