OXID eShop CE
4.9.5
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Pages
statistic_service.php
Go to the documentation of this file.
1
<?php
2
8
class
Statistic_Service
extends
oxAdminDetails
9
{
10
17
public
function
render
()
18
{
19
parent::render
();
20
$sSql =
"select count(*) from oxlogs where oxshopid = '"
. $this->
getConfig
()->getShopId() .
"'"
;
21
$this->_aViewData[
'iLogCount'
] =
oxDb::getDb
()->getOne($sSql,
false
,
false
);
22
23
return
"statistic_service.tpl"
;
24
}
25
29
public
function
cleanup
()
30
{
31
$iTimeFrame =
oxRegistry::getConfig
()->getRequestParameter(
"timeframe"
);
32
$dNow = time();
33
$iTimestamp = mktime(
34
date(
"H"
, $dNow),
35
date(
"i"
, $dNow),
36
date(
"s"
, $dNow),
37
date(
"m"
, $dNow),
38
date(
"d"
, $dNow) - $iTimeFrame,
39
date(
"Y"
, $dNow)
40
);
41
$sDeleteFrom = date(
"Y-m-d H:i:s"
, $iTimestamp);
42
43
$oDb =
oxDb::getDb
();
44
$oDb->Execute(
"delete from oxlogs where oxtime < "
. $oDb->quote($sDeleteFrom));
45
}
46
}
application
controllers
admin
statistic_service.php
Generated by
1.8.1.2