echo "</td></tr>";
}
- echo "<tr width=\"100%\" bgcolor=\"#fff0f0\"><td>";
+ echo "<tr width=\"100%\" bgcolor=\"#ddffdd\"><td>";
gwvp_MenuBuilder();
echo "</td><td align=\"right\">";
gwvp_LoginBuilder();
// 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"];
+
+ // TODO: redo this bit with stristr to find urls - special case for home
+ $menucolor = "";
+ if(isset($_REQUEST["q"])) {
+ $extlink = str_replace("$BASE_URL/", "", $link);
+ error_log("trying to do replace of $BASE_URL in $link, got $extlink for ".$_REQUEST["q"]);
+ if(stristr($_REQUEST["q"], $extlink)!==false) {
+ $menucolor = " bgcolor=\"#ffdddd\"";
+
+ }
+ } else {
+ // special case for home
+ if($link == $BASE_URL) $menucolor = " bgcolor=\"#ffdddd\"";
+ }
+
+
+
+
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>";