From 93d9d427d22f6d9d15e7edaaada2d6850686a060 Mon Sep 17 00:00:00 2001 From: robiscool Date: Tue, 10 May 2011 07:50:22 -0700 Subject: snort-dev, add interfaces edit tab, update code --- config/snort-dev/snort_head.inc | 101 +++++++++++++++++++++++++++------------- 1 file changed, 68 insertions(+), 33 deletions(-) (limited to 'config/snort-dev/snort_head.inc') 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 @@ "") +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 ); + ?> - <?=gentitle($pgtitle);?> + <?php echo($config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle); ?> - /apple-touch-icon.png”/> + + - - + - - + + + + + "; ?> - + - - - - - + + + + + \n"; ?> +\n"; + echo "\t\n"; + } + echo "\t\n"; + echo "\t\n"; + echo "\t\n"; + echo "\t\n"; + if(file_exists("{$g['www_path']}/javascript/global.js")) + echo "\t\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".''."\n"; + if (is_dir($file)) + continue; + echo "\t\n"; } closedir($dh); } } - if ($oSajax): -?> - - +if (!isset($closehead)) + echo ""; + +/* 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; + } + } +} - - - +?> -- cgit v1.2.3