summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/classes.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/classes.inc.php')
-rw-r--r--frontends/php/include/classes.inc.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/frontends/php/include/classes.inc.php b/frontends/php/include/classes.inc.php
index d056ccaf..73e37e18 100644
--- a/frontends/php/include/classes.inc.php
+++ b/frontends/php/include/classes.inc.php
@@ -23,6 +23,7 @@
{
var $period;
var $from;
+ var $stime;
var $sizeX;
var $sizeY;
var $shiftX;
@@ -148,6 +149,15 @@
$this->period=$period;
}
+ function setSTime($stime)
+ {
+ if($stime>20000000 && $stime<22000000)
+ {
+ $this->stime=mktime(0,0,0,substr($stime,4,2),substr($stime,6,2),substr($stime,0,4));
+ $this->period=24*3600;
+ }
+ }
+
function setFrom($from)
{
$this->from=$from;
@@ -431,8 +441,16 @@
function selectData()
{
$now = time(NULL);
- $this->to_time=$now-3600*$this->from;
- $this->from_time=$this->to_time-$this->period;
+ if(isset($this->stime))
+ {
+ $this->to_time=$this->stime+24*3600;
+ $this->from_time=$this->stime;
+ }
+ else
+ {
+ $this->to_time=$now-3600*$this->from;
+ $this->from_time=$this->to_time-$this->period;
+ }
$p=$this->to_time-$this->from_time;
$z=$p-$this->from_time%$p;