gsRun($sClass,$asParams); echo $x; flush(); //@session_write_close(); } } } break; case "titel": TitelControl::event($event); break; case "ausleihe": AusleiheControl::event($event); break; case "nutzer": NutzerControl::event($event); break; default: throw new Exception("invalid component $component", UNEXP_VAL); } } static function writeHeader() { if(isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { die("[ Error processing request ]"); } header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); mt_srand(microtime()*1000000); define("CURRDIR",str_replace("\\","/",dirname(__FILE__)."/")); define("CURRAPP",basename(__FILE__)); define("CURRLANGUAGE","de"); require_once(CURRDIR."fwreplace/classes.php"); $asNaviPath=explode("/",$_SERVER["REQUEST_URI"]); $isMSHash=$asNaviPath[sizeof($asNaviPath)-1]; $lMaxNP=sizeof($asNaviPath); if($asNaviPath[$lMaxNP-1]=="") { $sCurrentPage=$asNaviPath[$lMaxNP-2]; } else { $sCurrentPage=$asNaviPath[$lMaxNP-2]; } if(CStringType::isNumber($sCurrentPage)) { define("MYCURRENTPAGE",$sCurrentPage); } if(is_array($asNaviPath)&&$asNaviPath[0]=="") array_shift($asNaviPath); if(is_array($asNaviPath)&&$asNaviPath[0]!="") DEFINE("CURRENT_CLIENT_KEY",array_shift($asNaviPath)); require_once(CURRDIR."resource.php"); require_once(PATHFW."class.system2.php"); $oSystem=new CSystem($sMyDB); $oSystem->oException=new CErrorX($oSystem); $oDBStore=new CDataStore($oSystem); $oSystem->oDBStore=&$oDBStore; unset($oSystem->oUser); unset($oSystem->oSession); $oSystem->oUser=new CUserD($oSystem); return $oSystem; /* $oNavi=new CNavigation(CURRENT_CLIENT_KEY,$oSystem); $oSystem->oSiteNavi=&$oNavi; $oSession=new CSimpleSession(); $oSystem->oSession=&$oSession; $oUI=new CUI($oSystem); $oSystem->oUI=&$oUI; if($oSystem->oSiteNavi->gbSetCurrentScript(basename(__FILE__),isset($asNaviPath[0]))) { array_shift($asNaviPath); } else { header("Location: ".$oSystem->oSiteNavi->goToCurrentAPP(basename(__FILE__))); } if(!CStringType::hexOnly($asNaviPath[0],32)) { // sessionid ist nicht gesetzt: sessionid erzeugen. $sSessionID=$oSystem->oSession->gsGetSessionID(); $oSystem->oSession->gsIniSession($sSessionID); $sURL=$oSystem->oSiteNavi->gsGetURL($asNaviPath[0],array()); header("Location: ".$sURL); } $sSessionID=array_shift($asNaviPath); $sRandomKey=array_shift($asNaviPath); if($sSessionID=CStringType::hexOnly($sSessionID,32)) { setcookie("CURRENTSESSIONID",$sSessionID,time()+7200,"/".CLIENTNAME."/"); $oSystem->oSession->gsStartSession($sSessionID); $appliFile=CURRDIR."apps/main/class.index.php"; if(file_exists($appliFile)) { require_once($appliFile); $sCN="CIndex"; if(class_exists($sCN)) { $o=new $sCN($oSystem); if(method_exists($o,"gsrun")) { $sClass=array_shift($asNaviPath); $asParams=$asNaviPath; $x=$o->gsRun($sClass,$asParams); echo $x; flush(); @session_write_close(); } } } } else { die("[ Error processing request ]"); } */ } } ?>