diff options
author | robiscool <robrob2626@yahoo.com> | 2011-05-10 07:50:22 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2011-05-10 07:54:02 -0700 |
commit | 93d9d427d22f6d9d15e7edaaada2d6850686a060 (patch) | |
tree | 8566e33b4f5aad185f60e45cdc79baa905087a47 /config/snort-dev/snort_head.inc | |
parent | 1767a26f91ffe441474ea5f2f3676206eacc468b (diff) | |
download | pfsense-packages-93d9d427d22f6d9d15e7edaaada2d6850686a060.tar.gz pfsense-packages-93d9d427d22f6d9d15e7edaaada2d6850686a060.tar.bz2 pfsense-packages-93d9d427d22f6d9d15e7edaaada2d6850686a060.zip |
snort-dev, add interfaces edit tab, update code
Diffstat (limited to 'config/snort-dev/snort_head.inc')
-rw-r--r-- | config/snort-dev/snort_head.inc | 101 |
1 files changed, 68 insertions, 33 deletions
diff --git a/config/snort-dev/snort_head.inc b/config/snort-dev/snort_head.inc index 6e58cc1e..8f9bf9b4 100644 --- a/config/snort-dev/snort_head.inc +++ b/config/snort-dev/snort_head.inc @@ -1,69 +1,104 @@ <?php +/* + pfSense_MODULE: header +*/ + /* * if user has selected a custom template, use it. * otherwise default to pfsense tempalte */ -if($config['theme'] <> "") +if (($g["disablethemeselection"] === true) && !empty($g["default_theme"]) && (is_dir($g["www_path"].'/themes/'.$g["default_theme"]))) + $g['theme'] = $g["default_theme"]; +elseif($config['theme'] <> "" && (is_dir($g["www_path"].'/themes/'.$config['theme']))) $g['theme'] = $config['theme']; else $g['theme'] = "pfsense"; - -$apple_ua = array("iPhone","iPod"); -foreach($apple_ua as $useragent) + +/* + * If this device is an apple ipod/iphone + * switch the theme to one that works with it. + */ +$lowres_ua = array("iPhone","iPod", "iPad", "Android"); +foreach($lowres_ua as $useragent) if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) - $g['theme'] = "pfsense"; + $g['theme'] = empty($g['theme_lowres']) ? "pfsense" : $g['theme_lowres']; + +$pagetitle = gentitle( $pgtitle ); + ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title><?=gentitle($pgtitle);?></title> + <title><?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - <link rel=”apple-touch-icon” href=”/themes/<?php echo $g['theme']; ?>/apple-touch-icon.png”/> + <link rel="apple-touch-icon" href="/themes/<?php echo $g['theme']; ?>/apple-touch-icon.png"/> + <!-- snort custom javascript and css --> -<?php include('/usr/local/pkg/snort/snort_headbase.inc'); ?> -<!-- remove Only used to test conflicts --> +<?php include('/usr/local/pkg/snort/snort_headbase.inc'); ?> - <?php - if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false && - file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): - ?> - <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/wizard.css" media="all" /> +<!-- remove Only used to test conflicts --> + + + <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false && + file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?> + <?php echo "<style type=\"text/css\" src=\"/themes/{$g['theme']}/wizard.css\"></style>"; ?> <?php else: ?> - <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" /> + <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" /> <?php endif; ?> - <link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print" /> - <script type="text/javascript">var theme = "<?php echo $g['theme']; ?>"</script> - <script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script> - -<? + <link rel="stylesheet" type="text/css" href="/niftycssCode.css"> + <link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print"> + <link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme']?>/new_tab_menu.css" media="all"> + <script type="text/javascript" src="/javascript/niftyjsCode.js"></script> + <script type="text/javascript"> + var theme = "<?php echo $g['theme']; ?>"; + </script> + <?php echo "\t<script type=\"text/javascript\" src=\"/themes/{$g['theme']}/loader.js\"></script>\n"; ?> +<?php + if($_GET['enablefirebuglite']) { + echo "\t<script type=\"text/javascript\" src=\"/javascript/pi.js\"></script>\n"; + echo "\t<script type=\"text/javascript\" src=\"/javascript/firebug-lite.js\"></script>\n"; + } + echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/prototype.js\"></script>\n"; + echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/scriptaculous.js\"></script>\n"; + echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/effects.js\"></script>\n"; + echo "\t<script type=\"text/javascript\" src=\"/javascript/scriptaculous/dragdrop.js\"></script>\n"; + if(file_exists("{$g['www_path']}/javascript/global.js")) + echo "\t<script type=\"text/javascript\" src=\"/javascript/global.js\"></script>\n"; /* * Find all javascript files that need to be included * for this page ... from the arrays ... :) * Coded by: Erik Kristensen */ - $dir = trim(basename($_SERVER["SCRIPT_FILENAME"]), '.php'); - $path = "/usr/local/www/javascript/" . $dir . "/"; + $dir = trim(basename($_SERVER["SCRIPT_FILENAME"], '.php')); + $path = "{$g['www_path']}/javascript/" . $dir . "/"; if (is_dir($path)) { if ($dh = opendir($path)) { while (($file = readdir($dh)) !== false) { - if (is_dir($file)) continue; - echo "\t".'<script type="text/javascript" src="/javascript/'.$dir.'/'.$file.'"></script>'."\n"; + if (is_dir($file)) + continue; + echo "\t<script type=\"text/javascript\" src=\"/javascript/{$dir}/{$file}\"></script>\n"; } closedir($dh); } } - if ($oSajax): -?> - <script language="javascript" type="text/javascript"> - <?php $oSajax->sajax_show_javascript(); ?> - </script> -<? endif; ?> +if (!isset($closehead)) + echo "</head>"; + +/* 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']) { + include("fbegin.inc"); + print_info_box_np("This page is currently being managed by a remote machine."); + include("fend.inc"); + exit; + } + } +} -<?php if (!isset($closehead)){ ?> -</head> -<?php } ?> +?> |