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 
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         if ( $sErrorNo == 'expireddemo' )
00046             $sTemplate = 'err_expired_days.tpl';
00047         if ( $sErrorNo == 'pro_exceeded' )
00048             $sTemplate = 'err_overloaded_articles.tpl';
00049         if ( $sErrorNo == 'unknown' )
00050             $sTemplate = 'err_unknown.tpl';
00051         if ( $sTemplate )
00052           return $sTemplate;
00053         else
00054           return 'start.tpl';
00055     }
00056 
00057 
00058 
00064     public function pageStart()
00065     {
00066         $myConfig  = $this->getConfig();
00067 
00068         // assign default values
00069         if ( !oxSession::hasVar( 'language') )
00070             oxSession::setVar( 'language', $myConfig->getConfigParam( 'sDefaultLang' ) );
00071         if ( !oxSession::hasVar('currency') )
00072             oxSession::setVar( 'currency', '0' );
00073 
00074 
00075         $myConfig->setConfigParam( 'iMaxMandates', $myConfig->getConfigParam( 'IMS' ) );
00076         $myConfig->setConfigParam( 'iMaxArticles', $myConfig->getConfigParam( 'IMA' ) );
00077     }
00078 
00084     public function pageClose()
00085     {
00086         $mySession = $this->getSession();
00087 
00088         if ( isset( $mySession ) )
00089             $mySession->freeze();
00090     }
00091 
00097     public function getVersion()
00098     {
00099         $oActShop = $this->getConfig()->getActiveShop();
00100         oxUtils::getInstance()->showMessageAndExit( 'ver:'.$oActShop->oxshops__oxversion->value );
00101     }
00102 
00108     public function getErrorNumber()
00109     {
00110         return oxConfig::getParameter( 'errornr' );
00111     }
00112 
00113 }

Generated on Thu Dec 4 12:04:57 2008 for OXID eShop CE by  doxygen 1.5.5