adding a config page, added some user admin page fluff
authorpaulr <me@pjr.cc>
Wed, 2 Nov 2011 15:03:40 +0000 (02:03 +1100)
committerpaulr <me@pjr.cc>
Wed, 2 Nov 2011 15:03:40 +0000 (02:03 +1100)
gwvplib/gwvpconfig.php [new file with mode: 0644]
gwvplib/gwvplib.php
gwvplib/gwvpuseradmin.php

diff --git a/gwvplib/gwvpconfig.php b/gwvplib/gwvpconfig.php
new file mode 100644 (file)
index 0000000..cc0bafd
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+// setup the call me function for useradmin - matches on url of admin/users
+$CALL_ME_FUNCTIONS["config"] = "gwvp_ConfigCallMe";
+
+$MENU_ITEMS["40config"]["text"] = "Configuration";
+$MENU_ITEMS["40config"]["link"] = "$BASE_URL/admin/config";
+
+
+function gwvp_ConfigCallMe()
+{
+       if(isset($_REQUEST["q"])) {
+               $query = $_REQUEST["q"];
+               if($query == "admin/config") return "gwvp_ConfigPage";
+               else return false;
+       }
+       
+       return false;
+}
+
+function gwvp_ConfigPage()
+{
+       gwvp_goMainPage("gwvp_ConfigPageBody");
+}
+
+
+function gwvp_ConfigPageBody()
+{
+       
+}
+
+?>
\ No newline at end of file
index e23ece7..e0654bc 100644 (file)
@@ -7,6 +7,7 @@ require_once("gwvprepoadmin.php");
 require_once("gwvpauth.php");
 require_once("gwvpsetup.php");
 require_once("gwvpdatabase.php");
+require_once("gwvpconfig.php");
 
 // only enable this if you need it:
 require_once("gwvpdebug.php");
index 63b3cd8..cb5f997 100644 (file)
@@ -93,7 +93,7 @@ function gwvp_UserAdminPageBody()
        // user list
        echo "<tr><td>";
        echo "<table border=\"1\">";
-       echo "<tr><th>EMail</th><th>Nick Name</th><th>Full Name</th><th>In Groups</th><th>Owns Groups</th><th>Description</th><th>Is Global Admin?</th><th>Status</th></tr>";
+       echo "<tr><th>EMail</th><th>Nick Name</th><th>Full Name</th><th>In Groups</th><th>Owns Groups</th><th>Description</th><th>Admin?</th><th>Status</th></tr>";
        /*
         *              $returns[$rn]["id"] = $u_res["users_id"];
                $returns[$rn]["fullname"] = $u_res["user_full_name"];
@@ -119,7 +119,7 @@ function gwvp_UserAdminPageBody()
                $ingroups = gwvp_getGroupsForUser($email);
                $ugroups = "";
                foreach($ingroups as $grname) {
-                       $ugroups .= "$grname ";
+                       $ugroups .= "$grname<br>";
                }
                trim($ugroups);