report_base.php

Go to the documentation of this file.
00001 <?php
00002 
00006 $myConfig = oxConfig::getInstance();
00007 
00011 $sIncPath = $myConfig->getConfigParam( 'sShopDir' ).'/'.$myConfig->getConfigParam( 'sAdminDir' );
00012 
00016 DEFINE( 'USE_CACHE', false );
00017 DEFINE( 'CACHE_DIR', $myConfig->getConfigParam( 'sCompileDir' ) );
00018 
00022 require_once "$sIncPath/reports/jpgraph/jpgraph.php";
00023 require_once "$sIncPath/reports/jpgraph/jpgraph_bar.php";
00024 require_once "$sIncPath/reports/jpgraph/jpgraph_line.php";
00025 require_once "$sIncPath/reports/jpgraph/jpgraph_pie.php";
00026 require_once "$sIncPath/reports/jpgraph/jpgraph_pie3d.php";
00027 
00028 if ( !class_exists( 'report_base' ) ) {
00032     class Report_base extends oxAdminView
00033     {
00038         protected $_oSmarty = null;
00039 
00045         public function render()
00046         {
00047             return $this->_sThisTemplate;
00048         }
00049 
00057         public function setSmarty( $oSmarty )
00058         {
00059             $this->_oSmarty = $oSmarty;
00060         }
00061 
00067         public function getSmarty()
00068         {
00069             return $this->_oSmarty;
00070         }
00071 
00077         public function getWeekRange()
00078         {
00079             $myConfig = $this->getConfig();
00080 
00081             // initializing one week before current..
00082             $iFrom = oxUtilsDate::getInstance()->getWeekNumber($myConfig->getConfigParam( 'iFirstWeekDay' ), strtotime( oxConfig::getParameter( "time_from") ) );
00083             $iTo   = oxUtilsDate::getInstance()->getWeekNumber($myConfig->getConfigParam( 'iFirstWeekDay' ), strtotime( oxConfig::getParameter( "time_to") ) );
00084 
00085             return array( $iFrom - 1, $iTo + 1 );
00086         }
00087     }
00088 }

Generated on Mon Oct 26 20:07:16 2009 for OXID eShop CE by  doxygen 1.5.5