oxstart.php

Go to the documentation of this file.
00001 <?php
00002 
00011 class oxStart extends oxUBase
00012 {
00018     public function appInit()
00019     {
00020         $myConfig = $this->getConfig();
00021         $this->pageStart();
00022 
00023         if ( 'oxstart' == oxConfig::getParameter( 'cl' )  || $this->isAdmin() )
00024             return;
00025 
00026 
00027     }
00028 
00034     public function render()
00035     {
00036         parent::render();
00037 
00038         $sErrorNo = oxConfig::getParameter( 'execerror' );
00039         $this->_aViewData[ 'errornr' ] = $this->getErrorNumber();
00040 
00041         $sTemplate = '';
00042 
00043 
00044 
00045         if ( $sErrorNo == 'unknown' ) {
00046             $sTemplate = 'err_unknown.tpl';
00047         }
00048 
00049         if ( $sTemplate ) {
00050             return $sTemplate;
00051         } else {
00052             return 'start.tpl';
00053         }
00054     }
00055 
00056 
00057 
00063     public function pageStart()
00064     {
00065         $myConfig  = $this->getConfig();
00066 
00067         // assign default values
00068         if ( !oxSession::hasVar('currency') )
00069             oxSession::setVar( 'currency', '0' );
00070 
00071 
00072         $myConfig->setConfigParam( 'iMaxMandates', $myConfig->getConfigParam( 'IMS' ) );
00073         $myConfig->setConfigParam( 'iMaxArticles', $myConfig->getConfigParam( 'IMA' ) );
00074     }
00075 
00081     public function pageClose()
00082     {
00083         $mySession = $this->getSession();
00084 
00085         if ( isset( $mySession ) ) {
00086             $mySession->freeze();
00087         }
00088 
00089         //commit file cache
00090         oxUtils::getInstance()->commitFileCache();
00091     }
00092 
00098     public function getVersion()
00099     {
00100         $oActShop = $this->getConfig()->getActiveShop();
00101         oxUtils::getInstance()->showMessageAndExit( 'ver:'.$oActShop->oxshops__oxversion->value );
00102     }
00103 
00109     public function getErrorNumber()
00110     {
00111         return oxConfig::getParameter( 'errornr' );
00112     }
00113 
00114 }

Generated by  doxygen 1.6.2