27         if ($soxId != 
"-1" && isset($soxId)) {
 
   29             $oStat = 
oxNew(
"oxstatistic");
 
   32             $aReports = $oStat->getReports();
 
   33             $this->_aViewData[
"edit"] = $oStat;
 
   37         $sPath = getShopBasePath() . 
"application/controllers/admin/reports";
 
   39         $aAllreports = array();
 
   41         $aReportFiles = glob($sPath . 
"/*.php");
 
   42         foreach ($aReportFiles as $sFile) {
 
   43             if (is_file($sFile) && !is_dir($sFile)) {
 
   45                 $sConst = strtoupper(str_replace(
'.php', 
'', basename($sFile)));
 
   48                 if ($sConst == 
'REPORT_BASE') {
 
   54                 $oItem = 
new stdClass();
 
   55                 $oItem->filename = basename($sFile);
 
   56                 $oItem->name = $oLang->translateString($sConst, $iLanguage);
 
   57                 $aAllreports[] = $oItem;
 
   66         if (is_array($aReports)) {
 
   67             $this->_aViewData[
'ireports'] = count($aReports);
 
   71             $oStatisticMainAjax = 
oxNew(
'statistic_main_ajax');
 
   72             $this->_aViewData[
'oxajax'] = $oStatisticMainAjax->getColumns();
 
   74             return "popups/statistic_main.tpl";
 
   77         return "statistic_main.tpl";
 
   90         $oStat = 
oxNew(
"oxstatistic");
 
   94             $aParams[
'oxstatistics__oxid'] = null;
 
   97         $aParams[
'oxstatistics__oxshopid'] = $sShopID;
 
   98         $oStat->assign($aParams);
 
  115         $oStat = 
oxNew(
"oxstatistic");
 
  116         $oStat->load($soxId);
 
  118         $aAllreports = $oStat->getReports();
 
  120         $oShop = 
oxNew(
"oxshop");
 
  126         if ($sTimeFrom && $sTimeTo) {
 
  127             $sTimeFrom = 
oxRegistry::get(
"oxUtilsDate")->formatDBDate($sTimeFrom, 
true);
 
  128             $sTimeFrom = date(
"Y-m-d", strtotime($sTimeFrom));
 
  129             $sTimeTo = 
oxRegistry::get(
"oxUtilsDate")->formatDBDate($sTimeTo, 
true);
 
  130             $sTimeTo = date(
"Y-m-d", strtotime($sTimeTo));
 
  134             $sTimeFrom = date(
"Y-m-d", mktime(0, 0, 0, date(
"m", $dNow), date(
"d", $dNow) - $dDays, date(
"Y", $dNow)));
 
  135             $sTimeTo = date(
"Y-m-d", time());
 
  139         $oSmarty->assign(
"time_from", $sTimeFrom . 
" 23:59:59");
 
  140         $oSmarty->assign(
"time_to", $sTimeTo . 
" 23:59:59");
 
  141         $oSmarty->assign(
"oViewConf", $this->_aViewData[
"oViewConf"]);
 
  143         echo($oSmarty->fetch(
"report_pagehead.tpl"));
 
  144         foreach ($aAllreports as $file) {
 
  145             if (($file = trim($file))) {
 
  146                 $sClassName = str_replace(
".php", 
"", strtolower($file));
 
  148                 $oReport = 
oxNew($sClassName);
 
  149                 $oReport->setSmarty($oSmarty);
 
  151                 $oSmarty->assign(
"oView", $oReport);
 
  152                 echo($oSmarty->fetch($oReport->render()));