OXID eShop CE  4.8.10
 All Classes Files Functions Variables Pages
statistic_service.php
Go to the documentation of this file.
1 <?php
2 
9 {
16  public function render()
17  {
19  $this->_aViewData['iLogCount'] = oxDb::getDb()->getOne( "select count(*) from oxlogs where oxshopid = '".$this->getConfig()->getShopId()."'", false, false);
20 
21  return "statistic_service.tpl";
22  }
23 
29  public function cleanup()
30  {
31  $iTimeFrame = oxConfig::getParameter( "timeframe");
32  $dNow = time();
33  $sDeleteFrom = date( "Y-m-d H:i:s", mktime( date( "H", $dNow), date( "i", $dNow), date( "s", $dNow), date( "m", $dNow), date( "d", $dNow) - $iTimeFrame, date( "Y", $dNow)));
34 
35  $oDb = oxDb::getDb();
36  $oDb->Execute( "delete from oxlogs where oxtime < ".$oDb->quote( $sDeleteFrom ) );
37  }
38 }