X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=www%2Findex.php;h=621c61d1326445a321290343a909b35a363b7fa9;hp=d42091a16760944c0a7b801d83d0cbcfaa70dc96;hb=HEAD;hpb=afe6e413d073cd29e366b0642ef0928db712c8e5 diff --git a/www/index.php b/www/index.php index d42091a..621c61d 100644 --- a/www/index.php +++ b/www/index.php @@ -1,17 +1,67 @@ - - -
-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 +$configpath = glcas_getWebConfigPath(); +header("Accept-Ranges: bytes"); + +if($configpath == false) { + glcas_startInstaller(); + return; +} + +$glconfig = new GLCASConfig(); +global $glconfig; +$glconfig->loadConfig($configpath); + +// the global action handler +if(isset($_REQUEST["glcasbasesendmsg"])) { + GLCASAddMessage($_REQUEST["msglev"], $_REQUEST["message"]); + header("Location: ".$_SERVER["HTTP_REFERER"]); + return; +} + +// step up to the web responder +$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