00001 <?php 00002 00006 class oxStart extends oxUBase 00007 { 00013 public function appInit() 00014 { 00015 $this->pageStart(); 00016 00017 if ( 'oxstart' == oxConfig::getParameter( 'cl' ) || $this->isAdmin() ) 00018 return; 00019 00020 00021 } 00022 00028 public function render() 00029 { 00030 parent::render(); 00031 00032 $sErrorNo = oxConfig::getParameter( 'execerror' ); 00033 00034 $sTemplate = ''; 00035 00036 00037 00038 if ( $sErrorNo == 'unknown' ) { 00039 $sTemplate = 'message/err_unknown.tpl'; 00040 } 00041 00042 if ( $sTemplate ) { 00043 return $sTemplate; 00044 } else { 00045 return 'message/err_unknown.tpl'; 00046 } 00047 } 00048 00054 public function pageStart() 00055 { 00056 $myConfig = $this->getConfig(); 00057 00058 00059 $myConfig->setConfigParam( 'iMaxMandates', $myConfig->getConfigParam( 'IMS' ) ); 00060 $myConfig->setConfigParam( 'iMaxArticles', $myConfig->getConfigParam( 'IMA' ) ); 00061 } 00062 00068 public function pageClose() 00069 { 00070 $mySession = $this->getSession(); 00071 00072 if ( isset( $mySession ) ) { 00073 $mySession->freeze(); 00074 } 00075 00076 //commit file cache 00077 oxUtils::getInstance()->commitFileCache(); 00078 } 00079 00085 public function getVersion() 00086 { 00087 $oActShop = $this->getConfig()->getActiveShop(); 00088 oxUtils::getInstance()->showMessageAndExit( 'ver:'.$oActShop->oxshops__oxversion->value ); 00089 } 00090 00096 public function getErrorNumber() 00097 { 00098 return oxConfig::getParameter( 'errornr' ); 00099 } 00100 00101 }