updates and such
[glcas.git] / lib / lib.php
index 0b5c221..6c48c4c 100644 (file)
@@ -2,9 +2,25 @@
 
 require_once("config.php");
 require_once("wsdl.php");
+require_once("www.php");
+require_once("db.php");
+require_once("messages.php");
+require_once("datastore.php");
+require_once("updates.php");
+
+global $VERSION;
+
+$VERSION["main"]["major"] = "0";
+$VERSION["main"]["minor"] = "0";
+$VERSION["main"]["release"] = "0";
+$VERSION["updateurl"]["main"] = "http://localhost/src/eclipse-workspace/glcas/release.txt";
 
 // first and foremost, load the plugins
 $basedir = dirname(__FILE__);
+
+// we load this first
+if(file_exists("$basedir/plugins/www.php")) require_once("$basedir/plugins/www.php");
+
 if(is_dir("$basedir/plugins")) {
        $dh = opendir("$basedir/plugins");
        if($dh) {
@@ -23,11 +39,14 @@ if(is_dir("$basedir/plugins")) {
 function urlInterpretter()
 {
        global $BASE_URLS;
+       global $URL_COMPONENTS;
        
        if(isset($_REQUEST["q"])) $qry = $_REQUEST["q"];
        else $qry = "";
        
        $urlcomps = preg_split("/[,\/]/", $qry);
+       $URL_COMPONENTS = $urlcomps;
+       
        foreach($BASE_URLS as $bases_cd => $bases) {
                //echo "<br>checking $bases_cd for ".$bases["base"]." against \"".$urlcomps[0]."\"<br>";
                if(strtolower($urlcomps[0]) == strtolower($bases["base"])) {
@@ -37,4 +56,7 @@ function urlInterpretter()
                }
        }
 }
+
+$db = db_getDB();
+db_createTable("options", "option_name", "option_value");
 ?>
\ No newline at end of file