oxstart.php

Go to the documentation of this file.
00001 <?php
00002 
00011 class oxStart extends oxView
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     }
00029 
00035     public function render()
00036     {
00037         parent::render();
00038 
00039         $sErrorNo = oxConfig::getParameter( 'execerror' );
00040         $this->_aViewData[ 'errornr' ] = $this->getErrorNumber();
00041 
00042         $sTemplate = '';
00043 
00044         if ( $sErrorNo == 'unlicensed' )
00045             $sTemplate = 'err_unlicensed.tpl';
00046         if ( $sErrorNo == 'expireddemo' )
00047             $sTemplate = 'err_expired_days.tpl';
00048         if ( $sErrorNo == 'pro_exceeded' )
00049             $sTemplate = 'err_overloaded_articles.tpl';
00050         if ( $sErrorNo == 'unknown' )
00051             $sTemplate = 'err_unknown.tpl';
00052         if ( $sTemplate )
00053           return $sTemplate;
00054         else
00055           return 'start.tpl';
00056     }
00057 
00058 
00059 
00065     public function pageStart()
00066     {
00067         $myConfig  = $this->getConfig();
00068 
00069         // assign default values
00070         if ( !oxSession::hasVar( 'language') )
00071             oxSession::setVar( 'language', $myConfig->getConfigParam( 'sDefaultLang' ) );
00072         if ( !oxSession::hasVar('currency') )
00073             oxSession::setVar( 'currency', '0' );
00074 
00075 
00076         $myConfig->setConfigParam( 'iMaxMandates', $myConfig->getConfigParam( 'IMS' ) );
00077         $myConfig->setConfigParam( 'iMaxArticles', $myConfig->getConfigParam( 'IMA' ) );
00078     }
00079 
00085     public function pageClose()
00086     {
00087         $mySession = $this->getSession();
00088 
00089         if ( isset( $mySession ) )
00090             $mySession->freeze();
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 on Fri Dec 19 14:20:29 2008 for OXID eShop CE by  doxygen 1.5.5