implemented a plugin loader so i can add things like
[gwvp.git] / www / index.php
1 <?php
2
3 // get config
4 require_once("config.php");
5
6 // initial http file
7 $WEB_ROOT_FS = realpath(dirname(__FILE__));
8 $BASE_URL = dirname($_SERVER["PHP_SELF"]);
9
10 global $WEB_ROOT_FS, $BASE_URL, $repo_base, $data_directory, $db_type, $db_name, $db_username, $db_password;
11
12 // add gwvplib as if it were a path in ../gwvplib
13 if(file_exists($lib_base)) {
14         $path = realpath($lib_base);
15         set_include_path(get_include_path().PATH_SEPARATOR.$path);
16 }
17
18 require_once("gwvplib.php");
19
20 /* first determine the url, it will be something that does either or the following:
21  * 
22  * 
23  * 1. admin functions (create/delete repo)
24  * 2. user functions (patch pushes, pull requests)
25  * 3. gitweb functions (to display git web output)
26  * 4. git-http-backend functions (to interact with command line functions)
27  * 5. do we auth?
28  */
29
30 gwvp_goWebBegin();
31 //goWebGitBackEnd();
32
33
34 if(function_exists("gwvp_DebugEnabled")) {
35         gwvp_DebugEnabled();
36 }
37
38
39 ?>