gbLoadDB($sAccessKey)) { $this->oLog=&new CLog($this); $this->oError=&new CErrorMSG($this); $this->oServerEnv=&new CServerEnv(); $this->oClientData=&new CClientData($this); $this->oSession=&new CSession($this); $this->oUser=&new CUser($this); $this->oControl=&new CControl($this); $this->oActionHandler=&new CActionHandler($this); $this->oCDB=&new CCriticalDB($this); $this->oRights=new CDisallowed($this); $this->oDuranceLog=&new CDuranceLog($this); } else { echo "Datenbank fehler"; exit; } } function getMWSTNormal() { return 0.16; } function goGetMail() { $sFile=PATHFW."mail/htmlMimeMail.php"; if(file_exists($sFile)) { require_once($sFile); if(class_exists("htmlMimeMail")) return new htmlMimeMail(); } return false; } function goGetSystemObject($sName) { $sClassName="C".$sName; $sFile=PATHFW."class.".strtolower($sName).".php"; if(!class_exists($sClassName)) { if(file_exists($sFile)) require_once($sFile); else return false; } if(class_exists($sClassName)) return new $sClassName($this); return false; } function goGetWDDX() { if(!class_exists("CSysWDDX")) { require_once(PATHFW."class.sys.wddx.php"); } return new CSysWDDX($this); } function goGetDT() { if(class_exists("CDateTime")) { return new CDateTime(); } } function gSendNewPageHeader($sURL) { sleep(1); $this->oDB->gbClose(); header("Location: ".$sURL); exit; } function goGetDBView($sView,$sDBAKey=false,$viewSource=false,$asSearchInFields=false,$lTabI=1,$lTabCount=0) { return new CDBListView($this,$sDBAKey,$viewSource,$asSearchInFields,$lTabI,$lTabCount); } function goGetDBViewSimple($sView,$sDBAKey=false,$viewSource=false,$asSearchInFields=false,$lTabI=1,$lTabCount=0) { return new CDBListViewSimple($this,$sDBAKey,$viewSource,$asSearchInFields,$lTabI,$lTabCount); } function goGetRemoteDB($sKey) { if(!class_exists("CRemoteDatabase")) require_once(PATHFW."class.db.remote.php"); $oRemote=&new CRemoteDatabase($sKey); if($oRemote->gbDBConnected===true) return $oRemote; return false; } function goGetRDBView($sView) { return new CDBListView($this); } function gasGetAdditinalTPLData() { return $this->masTPLData; } function gbSetAdditionalTPLData($sName,$sValue=false) { if(is_array($sName)&&$sValue===false) { $this->masTPLData=$this->masTPLData+$sName; } else $this->masTPLData[$sName]=$sValue; } function gbAddAdditionalJS($sJS) { if(trim($sJS)!="") { if(strtolower(substr($sJS,0,7))!="msJSContainer.=""; else $this->msJSContainer.=$sJS; } } function gbGetJS() { return $this->msJSContainer; } function goGetForm($sFormKey,$sMethod,$oHelper=false) { if($oForm=new CFormHandler($this,$oHelper)) { if($oForm->gbLoadForm($sFormKey,$sMethod)) { return $oForm; } else { return false; } } return false; } function goGetMenu() { return new CMenu($this); } function goGetDB($sAccessKey) { $oDB=new CDatabase($sAccessKey); if($oDB->gbIsConnected()) { return $oDB; } return false; } function gasGetDHTMLPresets() { $sFile=PATHQS."presets/ie.php"; if(file_exists($sFile)) { require_once($sFile); return $asData; } } function goGetTPLParser($sFile,$isFile=true,$tabStart=0,$TAB_PER_LINE=0,$TEST=false) { if($isFile===true) { $sData=join("",file($sFile)); $oTPL=new CTemplateParser($sData,false,$tabStart,$TAB_PER_LINE,$TEST); } else $oTPL=new CTemplateParser($sFile,false,$tabStart,$TAB_PER_LINE,$TEST); return $oTPL; } function goLoadAppClass($sClassName,$sType="apps") { $sFC=strtolower($sClassName); $sFile=PATHQS.$sType."/".$sFC."/class.".$sFC.".php"; if(file_exists($sFile)) { require_once($sFile); $sClass="C".$sClassName; if(class_exists($sClass)) { return new $sClass($this); } } } function goLoadExpanderClass($oExpander) { $sClassName=$oExpander->ExpanderClass; $sFile=PATHFW."expander/".strtolower($oExpander->ExpanderClass)."/class.fw.exp.".strtolower($oExpander->ExpanderClass).".php"; $sClass="CFWExp".$sClassName; if(!class_exists($sClass)) if(file_exists($sFile)) { require_once($sFile); } if(class_exists($sClass)) { $o=new $sClass($this,$oExpander); return $o; } return false; } function goLoadClass($sClassName,$sAppname,$sType="apps",$bQuiet=false,$sClass=false) { $sFC = strtolower($sClassName); $sAppName = strtolower($sAppname); $sFile=PATHQS.$sType."/".$sAppName."/class.".$sFC.".php"; $sClass=$sClass===false?"C".$sClassName:$sClass; if(!class_exists($sClass)) { if(file_exists($sFile)) { require_once($sFile); } else { } } if(class_exists($sClass)) { $o=new $sClass($this); return $o; } else echo $sClass; if($bQuiet===true) return false; $this->oError->gsGenerateFinalError("no.app"); } function gbIsError(&$oObject) { return get_class($oObject)=="cerror"; } function goLoadDBClass($sClassName) { $sFC=strtolower($sClassName); $sFile=PATHQS."db/class.db.".$sFC.".php"; $sClass="CDB".$sClassName; if(!class_exists($sClass)) { if(file_exists($sFile)) { require_once($sFile); } } if(class_exists($sClass)) return new $sClass(&$this); $this->oError->gsGenerateFinalError("no.app"); } function goLoadObject($sFile,$sClass) { if(file_exists($sFile)) { require_once($sFile); if(class_exists($sClass)) { return new $sClass($this); } } return false; } function gbLoadDB($sAccessKey) { $oDB=new CDatabase($sAccessKey); if($oDB->gbIsConnected()) { $this->oDB=$oDB; return true; } return false; } } class CDuranceLog { function CDuranceLog(&$oSystem) { $this->oSystem=&$oSystem; } function gbWriteLog($sStart) { global $oSystem; $oDT=$this->oSystem->goGetDT(); $dblDurance=$oDT->gsGetMicroDifference($sStart,microtime()); $asData["UserPK"]=$this->oSystem->oUser->oUserData->UserPK; $asData["ClientPK"]=$this->oSystem->oUser->oUserData->ClientPK; $asData["ALLDurance"]=round($dblDurance,5); $asData["DBDurance"]=$oSystem->mdblDurance; $asData["App"]=$this->oSystem->oControl->gsGetCurrentApp(); $asData["Class"]=$this->oSystem->oControl->gsGetCurrentClass(); $asData["Action"]=@join("/",$this->oSystem->oControl->gasGetParams()); //echo "
";
		//var_dump($asData);
		}
	}