summaryrefslogtreecommitdiffstats
path: root/usr/local/www/head.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-04-19 12:23:44 +0545
committerPhil Davis <phil.davis@inf.org>2015-04-19 12:23:44 +0545
commit45b4ffc68fed9e831da10de3b7d2de0c47496d1a (patch)
treeb197e9e651ea5df4f28d33bda408ae8002c38034 /usr/local/www/head.inc
parentabaa7feb680dc6f6f9bc79577075c45b3786a061 (diff)
downloadpfsense-45b4ffc68fed9e831da10de3b7d2de0c47496d1a.zip
pfsense-45b4ffc68fed9e831da10de3b7d2de0c47496d1a.tar.gz
Code style usr-local-www back-end
files that do stuff in mostly in the background.
Diffstat (limited to 'usr/local/www/head.inc')
-rwxr-xr-xusr/local/www/head.inc148
1 files changed, 76 insertions, 72 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index 9535de3..ba02b40 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -5,12 +5,13 @@
$g['theme'] = get_current_theme();
-$pagetitle = gentitle( $pgtitle );
+$pagetitle = gentitle($pgtitle);
-if (isset($config['system']['webgui']['pagenamefirst']))
+if (isset($config['system']['webgui']['pagenamefirst'])) {
$tabtitle = $pagetitle . " - " . $config['system']['hostname'] . "." . $config['system']['domain'];
-else
+} else {
$tabtitle = $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle;
+}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -20,97 +21,100 @@ else
<meta http-equiv="Content-Type" content="text/html; charset=<?=system_get_language_codeset();?>" />
<link rel="apple-touch-icon" href="/themes/<?php echo $g['theme']; ?>/apple-touch-icon.png"/>
<link rel="shortcut icon" href="/themes/<?php echo $g['theme']; ?>/images/icons/favicon.ico"/>
- <?php
- if (file_exists("{$g['www_path']}/themes/{$g['theme']}/table.css")):
- echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/table.css\" />";
- else:
- echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/css/table.css\" media=\"all\" />";
- endif;
- ?>
+ <?php
+ if (file_exists("{$g['www_path']}/themes/{$g['theme']}/table.css")):
+ echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/table.css\" />";
+ else:
+ echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/css/table.css\" media=\"all\" />";
+ endif;
+ ?>
+
+ <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
+ file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
+ <?php echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/wizard.css\" />"; ?>
+ <?php else: ?>
+ <link type="text/css" rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
+ <?php endif; ?>
+ <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" />
+ <link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme']?>/styles/jquery-ui-1.11.1.css" />
+ <script type="text/javascript" src="/javascript/niftyjsCode.js"></script>
+ <script type="text/javascript" src="/javascript/jquery-1.11.1.min.js"></script>
+ <script type="text/javascript" src="/javascript/jquery-migrate-1.2.1.min.js"></script>
+ <script type="text/javascript" src="/javascript/jquery/jquery-ui-1.11.1.min.js"></script>
+ <script type="text/javascript">
+ //<![CDATA[
+ var theme = "<?php echo $g['theme']; ?>";
- <?php if (strpos($_SERVER["SCRIPT_FILENAME"], "wizard.php") !== false &&
- file_exists("{$g['www_path']}/themes/{$g['theme']}/wizard.css")): ?>
- <?php echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/wizard.css\" />"; ?>
- <?php else: ?>
- <link type="text/css" rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" />
- <?php endif; ?>
- <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" />
- <link rel="stylesheet" type="text/css" href="/themes/<?=$g['theme']?>/styles/jquery-ui-1.11.1.css" />
- <script type="text/javascript" src="/javascript/niftyjsCode.js"></script>
- <script type="text/javascript" src="/javascript/jquery-1.11.1.min.js"></script>
- <script type="text/javascript" src="/javascript/jquery-migrate-1.2.1.min.js"></script>
- <script type="text/javascript" src="/javascript/jquery/jquery-ui-1.11.1.min.js"></script>
- <script type="text/javascript">
- //<![CDATA[
- var theme = "<?php echo $g['theme']; ?>";
+ jQuery.noConflict();
+ //]]>
+ </script>
- jQuery.noConflict();
- //]]>
- </script>
-
- <script type="text/javascript" src="/javascript/sorttable.js"></script>
- <script type="text/javascript" src="/javascript/ticker.js"></script>
- <style type="text/css" id="antiClickjack">
- /*<![CDATA[*/
+ <script type="text/javascript" src="/javascript/sorttable.js"></script>
+ <script type="text/javascript" src="/javascript/ticker.js"></script>
+ <style type="text/css" id="antiClickjack">
+ /*<![CDATA[*/
body{display:none}
- /*]]>*/
- </style>
- <script type="text/javascript">
- //<![CDATA[
+ /*]]>*/
+ </style>
+ <script type="text/javascript">
+ //<![CDATA[
if (self === top) {
var antiClickjack = document.getElementById("antiClickjack"); antiClickjack.parentNode.removeChild(antiClickjack);
} else {
top.location = self.location;
}
- //]]>
- </script>
-
- <?php echo "\t<script type=\"text/javascript\" src=\"/themes/{$g['theme']}/loader.js\"></script>\n"; ?>
+ //]]>
+ </script>
+
<?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
- */
+echo "\t<script type=\"text/javascript\" src=\"/themes/{$g['theme']}/loader.js\"></script>\n";
+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 = "{$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}?rev=1\"></script>\n";
+$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;
}
- closedir($dh);
+ echo "\t<script type=\"text/javascript\" src=\"/javascript/{$dir}/{$file}?rev=1\"></script>\n";
}
+ closedir($dh);
}
+}
-if (!isset($closehead))
+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']) {
+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;
}
- }
+ }
}
?>
OpenPOWER on IntegriCloud