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         if ( $sErrorNo == 'unlicensed' ) {
00044             $sTemplate = 'err_unlicensed.tpl';
00045         }
00046 
00047         if ( $sErrorNo == 'expireddemo' ) {
00048             $sTemplate = 'err_expired_days.tpl';
00049         }
00050 
00051         if ( $sErrorNo == 'pro_exceeded' ) {
00052             $sTemplate = 'err_overloaded_articles.tpl';
00053         }
00054 
00055 
00056         if ( $sErrorNo == 'unknown' ) {
00057             $sTemplate = 'err_unknown.tpl';
00058         }
00059 
00060         if ( $sTemplate ) {
00061             return $sTemplate;
00062         } else {
00063             return 'start.tpl';
00064         }
00065     }
00066 
00067 
00068 
00074     public function pageStart()
00075     {
00076         $myConfig  = $this->getConfig();
00077 
00078         // assign default values
00079         if ( !oxSession::hasVar( 'language') )
00080             oxSession::setVar( 'language', $myConfig->getConfigParam( 'sDefaultLang' ) );
00081         if ( !oxSession::hasVar('currency') )
00082             oxSession::setVar( 'currency', '0' );
00083 
00084 
00085         $myConfig->setConfigParam( 'iMaxMandates', $myConfig->getConfigParam( 'IMS' ) );
00086         $myConfig->setConfigParam( 'iMaxArticles', $myConfig->getConfigParam( 'IMA' ) );
00087     }
00088 
00094     public function pageClose()
00095     {
00096         $mySession = $this->getSession();
00097 
00098         if ( isset( $mySession ) ) {
00099             $mySession->freeze();
00100         }
00101     }
00102 
00108     public function getVersion()
00109     {
00110         $oActShop = $this->getConfig()->getActiveShop();
00111         oxUtils::getInstance()->showMessageAndExit( 'ver:'.$oActShop->oxshops__oxversion->value );
00112     }
00113 
00119     public function getErrorNumber()
00120     {
00121         return oxConfig::getParameter( 'errornr' );
00122     }
00123 
00124 }

Generated on Wed May 13 13:25:55 2009 for OXID eShop CE by  doxygen 1.5.5