X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=lib%2Flib.php;h=0b5c2213795269a8431f0493bd5d5b36fbccb492;hp=13d5757f7bff6aba9f2cb6bd640ae68575ab6be5;hb=afe6e413d073cd29e366b0642ef0928db712c8e5;hpb=2502c56617641015719878906907e91354aa3fd7
diff --git a/lib/lib.php b/lib/lib.php
index 13d5757..0b5c221 100644
--- a/lib/lib.php
+++ b/lib/lib.php
@@ -20,5 +20,21 @@ if(is_dir("$basedir/plugins")) {
echo "No plugins dir ($basedir/plugins), continuing without\n";
}
-
+function urlInterpretter()
+{
+ global $BASE_URLS;
+
+ if(isset($_REQUEST["q"])) $qry = $_REQUEST["q"];
+ else $qry = "";
+
+ $urlcomps = preg_split("/[,\/]/", $qry);
+ foreach($BASE_URLS as $bases_cd => $bases) {
+ //echo "
checking $bases_cd for ".$bases["base"]." against \"".$urlcomps[0]."\"
";
+ if(strtolower($urlcomps[0]) == strtolower($bases["base"])) {
+ //echo "match
";
+ $func = $bases["function"];
+ return $func();
+ }
+ }
+}
?>
\ No newline at end of file