From 5d5e0ef454ba3bb0ce2eafd5612ab5f91c4e0d99 Mon Sep 17 00:00:00 2001 From: paulr Date: Mon, 7 Nov 2011 22:18:20 +1100 Subject: [PATCH] I really should just focus on something and finish that one thing before moving onto some other bits of code. added some menu colours added some config dialog added some repo config dialog --- gwvplib/gwvpweb.php | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gwvplib/gwvpweb.php b/gwvplib/gwvpweb.php index 476a850..c88e302 100644 --- a/gwvplib/gwvpweb.php +++ b/gwvplib/gwvpweb.php @@ -147,7 +147,7 @@ function gwvp_MessageBuilder() // builds the menu structure function gwvp_MenuBuilder() { - global $MENU_ITEMS; + global $MENU_ITEMS, $BASE_URL; ksort($MENU_ITEMS); @@ -155,13 +155,21 @@ function gwvp_MenuBuilder() foreach($MENU_ITEMS as $key => $val) { $link = $val["link"]; $text = $val["text"]; + $q = ""; + if(isset($_REQUEST["q"])) $q = $BASE_URL."/".$_REQUEST["q"]; + else $q = $BASE_URL; + if($q == $link) $menucolor = " bgcolor=\"#ffdddd\""; + else $menucolor = ""; + + error_log("checking $q against $link now $menucolor"); + if(isset($val["userlevel"])) { if(gwvp_CheckAuthLevel($val["userlevel"])) { - echo "$text"; + echo "$text"; } } else { - echo "$text"; + echo "$text"; } } echo ""; -- 1.7.0.4