more repo admin gui, added a component for controlling cmd line git
[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 global $repo_base, $data_directory; 
14
15 function gwvp_ConfigCallMe()
16 {
17         if(isset($_REQUEST["q"])) {
18                 $query = $_REQUEST["q"];
19                 if($query == "admin/config") return "gwvp_ConfigPage";
20                 else return false;
21         }
22         
23         return false;
24 }
25
26 function gwvp_ConfigPage()
27 {
28         gwvp_goMainPage("gwvp_ConfigPageBody");
29 }
30
31
32 function gwvp_ConfigPageBody()
33 {
34 ?>
35 <h1>Global Configuration</h1>
36 <form method="post">
37 <table>
38 <tr><td>Allow User Registration</td><td><input type="checkbox" name="allowreg"></td></tr>
39 <tr><td>Allow User Created Groups</td><td><input type="checkbox" name="allowusercreatedgroup"></td></tr>
40
41 </table>
42 </form>
43 <?php
44 }
45
46 ?>