X-Git-Url: http://git.pjr.cc/?a=blobdiff_plain;f=www%2Findex.php;h=47a19a4e9524499915f61112e207bcb79fcdea81;hb=d180d75c38719089d9ecbb98f6c03a97af0199af;hp=4a873a47729cb0e5165de50350ac8229fa0df105;hpb=793f4946912d9cca18b8a8ef3d6d961fb1ff0462;p=glcas.git diff --git a/www/index.php b/www/index.php index 4a873a4..47a19a4 100644 --- a/www/index.php +++ b/www/index.php @@ -1,15 +1,65 @@ - - - -No Web Component Installed - - +// include the based library +require_once("libglcas/lib.php"); + +// load plugins +glcas_pluginLoader(); + +// find our config +$configpath = ""; + +// TODO: do this better +if(file_exists($WEB_ROOT_FS."/../var")) { + + // is it there? + if(file_exists($WEB_ROOT_FS."/../var/glcas/webconfig")) { + $configpath = realpath("$WEB_ROOT_FS/../var/glcas/webconfig"); + } else { + // if not, attempt to create + if(!file_exists($WEB_ROOT_FS."/../var/glcas")) { + mkdir($WEB_ROOT_FS."/../var/glcas"); + } + // success! + touch("$WEB_ROOT_FS/../var/glcas/webconfig"); + $configpath = realpath("$WEB_ROOT_FS/../var/glcas/webconfig"); + } +} + +header("Accept-Ranges: none"); + +$glconfig = new GLCASConfig(); +$glconfig->loadConfig($configpath); +$webResponder = new GLCASWeb($glconfig); +$webResponder->go($URL_HANDLERS); + + +/* +echo "
";
+echo "BASEURL: $BASE_URL\n";
+echo "CUSTOM\n";
+print_r($_SERVER);
+
+$vars = get_defined_vars();
+foreach($vars as $var => $vkey) {
+	echo "VAR $var is:\n";
+	var_dump($$var);
+	echo "\n\n";
+}
+
+echo "
"; +/**/ + +?> \ No newline at end of file