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