From 847fb6b2a99a46440a50f702c950d6d720f693f9 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 25 Oct 2009 15:03:13 +0100 Subject: make dynamic title more detailed Include information in the title about the host, plugin, plugin instance, type and type instance. --- inc/html.inc.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'inc/html.inc.php') diff --git a/inc/html.inc.php b/inc/html.inc.php index 51e8b37..cbe3ad2 100644 --- a/inc/html.inc.php +++ b/inc/html.inc.php @@ -6,10 +6,7 @@ require_once 'inc/rrdtool.class.php'; function html_start() { global $CONFIG; - if (isset($_GET['h'])) - $path = ' - '.htmlentities(ucfirst($_GET['h'])); - if (isset($_GET['p'])) - $path .= ' - '.htmlentities(ucfirst($_GET['p'])); + $path = htmlentities(breadcrumbs()); echo << @@ -60,4 +57,20 @@ function host_summary($hosts) { echo "\n"; } + +function breadcrumbs() { + if (isset($_GET['h'])) + $path = ' - '.ucfirst($_GET['h']); + if (isset($_GET['p'])) + $path .= ' - '.ucfirst($_GET['p']); + if (isset($_GET['pi'])) + $path .= ' - '.$_GET['pi']; + if (isset($_GET['t']) && isset($_GET['p']) && $_GET['t'] != $_GET['p']) + $path .= ' - '.$_GET['t']; + if (isset($_GET['ti'])) + $path .= ' - '.$_GET['ti']; + + return $path; +} + ?> -- cgit v1.1