diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-01-05 21:04:27 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2004-01-05 21:04:27 +0000 |
| commit | c2e3a22e3058040bc16980d805e509cca31fde55 (patch) | |
| tree | b561b6c991f44ada89fc481433a3d430042cca2f /frontends/php/include/classes.inc.php | |
| parent | eb9756514b11aef945b7caa32ef5e2d8e6702f54 (diff) | |
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1139 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes.inc.php')
| -rw-r--r-- | frontends/php/include/classes.inc.php | 22 |
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; |
