summaryrefslogtreecommitdiffstats
path: root/application/controllers/StatisticController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/StatisticController.php')
-rwxr-xr-xapplication/controllers/StatisticController.php49
1 files changed, 38 insertions, 11 deletions
diff --git a/application/controllers/StatisticController.php b/application/controllers/StatisticController.php
index da1e56e..3f42944 100755
--- a/application/controllers/StatisticController.php
+++ b/application/controllers/StatisticController.php
@@ -6,12 +6,14 @@ class StatisticController extends Zend_Controller_Action
protected $pbs2host;
protected $eventMapper;
protected $eventcategoryMapper;
+ protected $eventreportMapper;
public function init()
{
$this->eventMapper = new Application_Model_EventMapper();
$this->eventcategoryMapper = new Application_Model_EventcategoryMapper();
+ $this->eventreportMapper = new Application_Model_EventreportMapper();
if (Zend_Auth::getInstance()->hasIdentity()) {
$this->userIDsNamespace = Zend_Session::namespaceGet('userIDs');
@@ -48,14 +50,14 @@ class StatisticController extends Zend_Controller_Action
if($this->acl->checkRight('eoo')) {
$eventList = $this->eventMapper->fetchAll();
- } else {
+ } else {
$eventList = $this->eventMapper->findBy(array("pbs_membershipID", $this->userIDsNamespace['membershipID']));
- }
+ }
$ret['dataBar'] = $this->eventMapper->getCategoryBarCount($poolID);
$ret['dataPie'] = $this->eventMapper->getCategoryPieCount($poolID);
$ret['color'] = $this->eventcategoryMapper->getCategoryColor($poolID);
-
+
echo json_encode($ret);
}
@@ -70,23 +72,48 @@ class StatisticController extends Zend_Controller_Action
if($this->acl->checkRight('eoo')) {
$eventList = $this->eventMapper->fetchAll();
- } else {
+ } else {
$eventList = $this->eventMapper->findBy(array("pbs_membershipID", $this->userIDsNamespace['membershipID']));
- }
+ }
$ret['dataBar'] = $this->eventMapper->getRunningBarCount($poolID);
$ret['dataPie'] = $this->eventMapper->getRunningPieCount($poolID);
echo json_encode($ret);
-
+
+ }
+
+ public function successlistAction() {
+
+ $this->_helper->layout->disableLayout();
+ $this->_helper->viewRenderer->setNoRender();
+ $poolID = $this->getRequest()->getParam('poolID');
+ $userIDsSession = new Zend_Session_Namespace('userIDs');
+ $userIDsSession->poolID = $poolID;
+
+ if($this->acl->checkRight('eoo')) {
+ $eventList = $this->eventMapper->fetchAll();
+ } else {
+ $eventList = $this->eventMapper->findBy(array("pbs_membershipID", $this->userIDsNamespace['membershipID']));
+ }
+
+ $ret['dataBar'] = $this->eventreportMapper->getSuccessBarCount($poolID);
+ $ret['dataPie'] = $this->eventreportMapper->getSuccessPieCount($poolID);
+
+ echo json_encode($ret);
+
}
-
+
public function categoryAction() {
-
+
}
-
+
public function runningAction() {
-
+
+ }
+
+ public function successAction() {
+
}
-
+
} \ No newline at end of file