From f2de2cfd08cc69b0c58dbb1091a27cf874c1e05a Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Fri, 29 Jun 2012 02:46:28 +0000 Subject: [PATCH] + add time select. --- module/report/control.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/module/report/control.php b/module/report/control.php index eec768b450..662fd83135 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -59,8 +59,24 @@ class report extends control $this->display(); } - public function workload() + public function workload($begin = 0, $end = 0) { + if($begin == 0) + { + $begin = date('Y-m-d', strtotime('last month')); + } + else + { + $begin = date('Y-m-d', strtotime($begin)); + } + if($end == 0) + { + $end = date('Y-m-d', strtotime('now')); + } + else + { + $end = date('Y-m-d', strtotime($end)); + } $this->view->header->title = $this->lang->report->workload; $this->view->workload = $this->report->getWorkload(); $this->display();