made my star image a bit nicer
[gwvp.git] / gwvplib / gwvpweb.php
index 474cdff..9c08a3c 100644 (file)
@@ -89,12 +89,12 @@ function gwvp_goMainPage($bodyFunction = null)
        echo "<table width=\"100%\">";
 
        if(isset($_SESSION["message"])) {
-               echo "<tr width=\"100%\"><td>";
+               echo "<tr width=\"100%\"><td colspan=\"2\">";
                gwvp_MessageBuilder();
                echo "</td></tr>";
        }
        
-       echo "<tr width=\"100%\"><td>";
+       echo "<tr width=\"100%\" bgcolor=\"#fff0f0\"><td>";
        gwvp_MenuBuilder();
        echo "</td><td align=\"right\">";
        gwvp_LoginBuilder();
@@ -109,7 +109,7 @@ function gwvp_goMainPage($bodyFunction = null)
                if(function_exists($bodyFunction)) {
                        $bodyFunction();
                } else {
-                       error_log("Got called with non-existant body function");
+                       error_log("Got called with non-existant body function, $bodyFunction");
                        gwvp_BodyBuilder();
                }
        }
@@ -151,11 +151,18 @@ function gwvp_MenuBuilder()
        
        ksort($MENU_ITEMS);
        
-       echo "<table border=\"1\"><tr><td>Menu</td>";
+       echo "<table border=\"1\"><tr><td><b><i>Menu</i></b></td>";
        foreach($MENU_ITEMS as $key => $val) {
                $link = $val["link"];
                $text = $val["text"];
-               echo "<td><a href=\"$link\">$text</a></td>";
+               if(isset($val["userlevel"])) {
+                       if(gwvp_CheckAuthLevel($val["userlevel"])) {
+                               echo "<td><a href=\"$link\">$text</a></td>";
+                       }
+                       
+               } else {
+                       echo "<td><a href=\"$link\">$text</a></td>";
+               }
        }
        echo "</tr></table>";
        
@@ -169,7 +176,7 @@ function gwvp_LoginBuilder()
        if($login === false) {
                gwvp_SingleLineLoginForm();
        } else {
-               echo "Hello, ".gwvp_GetFullName($login);
+               echo "Hello, ".gwvp_GetFullName($login)." <a href=\"$BASE_URL/logout\">logout</a>";
        }
 }