3 require_once("config.php");
4 require_once("wsdl.php");
5 require_once("www.php");
6 require_once("db.php");
7 require_once("messages.php");
8 require_once("datastore.php");
9 require_once("updates.php");
13 $VERSION["main"]["major"] = "0";
14 $VERSION["main"]["minor"] = "0";
15 $VERSION["main"]["release"] = "0";
16 $VERSION["updateurl"]["main"] = "http://localhost/src/eclipse-workspace/glcas/release.txt";
18 // first and foremost, load the plugins
19 $basedir = dirname(__FILE__);
22 if(file_exists("$basedir/plugins/www.php")) require_once("$basedir/plugins/www.php");
24 if(is_dir("$basedir/plugins")) {
25 $dh = opendir("$basedir/plugins");
27 while(($file = readdir($dh))!==false) {
28 $mt = preg_match("/.*\.php$/", $file);
30 require_once("$basedir/plugins/$file");
31 //echo "required $basedir/plugins/$file\n";
36 echo "No plugins dir ($basedir/plugins), continuing without\n";
39 function urlInterpretter()
42 global $URL_COMPONENTS;
44 if(isset($_REQUEST["q"])) $qry = $_REQUEST["q"];
47 $urlcomps = preg_split("/[,\/]/", $qry);
48 $URL_COMPONENTS = $urlcomps;
50 foreach($BASE_URLS as $bases_cd => $bases) {
51 //echo "<br>checking $bases_cd for ".$bases["base"]." against \"".$urlcomps[0]."\"<br>";
52 if(strtolower($urlcomps[0]) == strtolower($bases["base"])) {
54 $func = $bases["function"];
61 db_createTable("options", "option_name", "option_value");