From: paulr Date: Mon, 7 Nov 2011 11:18:20 +0000 (+1100) Subject: I really should just focus on something and finish that one thing X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=5d5e0ef454ba3bb0ce2eafd5612ab5f91c4e0d99;p=gwvp.git 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 --- 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 "";