// builds the menu structure
function gwvp_MenuBuilder()
{
- global $MENU_ITEMS;
+ global $MENU_ITEMS, $BASE_URL;
ksort($MENU_ITEMS);
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 "<td><a href=\"$link\">$text</a></td>";
+ echo "<td$menucolor><a href=\"$link\">$text</a></td>";
}
} else {
- echo "<td><a href=\"$link\">$text</a></td>";
+ echo "<td$menucolor><a href=\"$link\">$text</a></td>";
}
}
echo "</tr></table>";