summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-15 23:17:36 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-15 23:17:36 +0000
commite93441e07a75d63204881c33f3781e05015b9e5d (patch)
tree5f3cfc0868173b727d9231284b31229241d975db
parent8a9caa98e17e364962e97edd6d0b540821d54844 (diff)
downloadpfsense-e93441e07a75d63204881c33f3781e05015b9e5d.zip
pfsense-e93441e07a75d63204881c33f3781e05015b9e5d.tar.gz
Add genhtmltitle() from m0n0wall.
-rwxr-xr-xusr/local/www/fbegin.inc71
1 files changed, 40 insertions, 31 deletions
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index a0f2a18..8f96a08 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -2,43 +2,52 @@
require_once("notices.inc");
/* $Id$ */
- function return_ext_menu($section) {
- global $config;
- $htmltext = "";
- if($config['installedpackages']['menu'] <> "") {
- foreach($config['installedpackages']['menu'] as $menuitem) {
- if($menuitem['section'] != $section) continue;
- if($menuitem['url'] <> "") {
- $addresswithport = getenv("HTTP_HOST");
- $colonpos = strpos($addresswithport, ":");
- if ($colonpos !== False){
- //my url is actually just the IP address of the pfsense box
- $myurl = substr($addresswithport, 0, $colonpos);
- }
- else
- {
- $myurl = $addresswithport;
- }
- $description = str_replace('$myurl', $myurl, $menuitem['url']);
- } else {
- $description = '/pkg.php?xml=' . $menuitem['configfile'];
+function gentitle($title) {
+ global $navlevelsep;
+ return join($navlevelsep, $title);
+}
+
+function genhtmltitle($title) {
+ global $config;
+ return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . gentitle($title);
+}
+
+function return_ext_menu($section) {
+ global $config;
+ $htmltext = "";
+ if($config['installedpackages']['menu'] <> "") {
+ foreach($config['installedpackages']['menu'] as $menuitem) {
+ if($menuitem['section'] != $section) continue;
+ if($menuitem['url'] <> "") {
+ $addresswithport = getenv("HTTP_HOST");
+ $colonpos = strpos($addresswithport, ":");
+ if ($colonpos !== False){
+ //my url is actually just the IP address of the pfsense box
+ $myurl = substr($addresswithport, 0, $colonpos);
+ }
+ else
+ {
+ $myurl = $addresswithport;
}
- $htmltext .= '<li><a href="' . $description . ' "class="navlnk">' . $menuitem['name'] . '</a></li>' . "\n";
+
+ $description = str_replace('$myurl', $myurl, $menuitem['url']);
+ } else {
+ $description = '/pkg.php?xml=' . $menuitem['configfile'];
}
+ $htmltext .= '<li><a href="' . $description . ' "class="navlnk">' . $menuitem['name'] . '</a></li>' . "\n";
}
- return $htmltext;
}
+ return $htmltext;
+}
+/* NOTICE ACKNOWLEDGE CODE by Erik Kristensen */
+if ($_REQUEST['noticeaction'] == 'acknowledge') {
+ $notice_id = $_REQUEST['noticeid'];
+ close_notice($notice_id);
+}
+/**********************************************/
-
-
- /* NOTICE ACKNOWLEDGE CODE by Erik Kristensen */
- if ($_REQUEST['noticeaction'] == 'acknowledge') {
- $notice_id = $_REQUEST['noticeid'];
- close_notice($notice_id);
- }
- /**********************************************/
?>
<div id="wrapper">
@@ -284,4 +293,4 @@ require_once("notices.inc");
echo "</div>";
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud