implemented authentication levels of anon,user,admin and setup the
[gwvp.git] / gwvplib / gwvpconfig.php
1 <?php
2
3 // setup the call me function for useradmin - matches on url of admin/users
4
5 // crap, this wont work
6 //if(isset($_SESSION["usertype"])) if($_SESSION["usertype"] == "admin") {
7         $CALL_ME_FUNCTIONS["config"] = "gwvp_ConfigCallMe";
8         $MENU_ITEMS["40config"]["text"] = "Configuration";
9         $MENU_ITEMS["40config"]["link"] = "$BASE_URL/admin/config";
10         $MENU_ITEMS["40config"]["userlevel"] = "admin";
11 //}
12
13
14 function gwvp_ConfigCallMe()
15 {
16         if(isset($_REQUEST["q"])) {
17                 $query = $_REQUEST["q"];
18                 if($query == "admin/config") return "gwvp_ConfigPage";
19                 else return false;
20         }
21         
22         return false;
23 }
24
25 function gwvp_ConfigPage()
26 {
27         gwvp_goMainPage("gwvp_ConfigPageBody");
28 }
29
30
31 function gwvp_ConfigPageBody()
32 {
33 ?>
34 <h1>Global Configuration</h1>
35 <form method="post">
36 <table>
37 <tr><td>Allow User Registration</td><td><input type="checkbox" name="allowreg"></td></tr>
38 <tr><td>Allow User Created Groups</td><td><input type="checkbox" name="allowusercreatedgroup"></td></tr>
39
40 </table>
41 </form>
42 <?php
43 }
44
45 ?>