Go to the documentation of this file.00001 <?php
00002
00008 class Statistic_Service extends oxAdminDetails
00009 {
00016 public function render()
00017 {
00018 parent::render();
00019 $this->_aViewData['iLogCount'] = oxDb::getDb()->getOne( "select count(*) from oxlogs where oxshopid = '".$this->getConfig()->getShopId()."'");
00020
00021 return "statistic_service.tpl";
00022 }
00023
00029 public function cleanup()
00030 {
00031 $iTimeFrame = oxConfig::getParameter( "timeframe");
00032 $dNow = time();
00033 $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)));
00034
00035 $oDb = oxDb::getDb();
00036 $oDb->Execute( "delete from oxlogs where oxtime < ".$oDb->quote( $sDeleteFrom ) );
00037 }
00038 }