the start of the auto-update code
[glcas.git] / lib / lib.php
index 0b5c221..dde9335 100644 (file)
@@ -2,9 +2,18 @@
 
 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");
 
 // 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 +32,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 +49,7 @@ function urlInterpretter()
                }
        }
 }
+
+$db = db_getDB();
+db_createTable("options", "option_name", "option_value");
 ?>
\ No newline at end of file