public function targetsAction()
 {
     $group_id = $this->_request->getParam('g');
     if ($group_id) {
         $target_DB = new Application_Model_DbTable_Target();
         $level_DB = new Application_Model_DbTable_Level();
         $targets = $target_DB->getAll();
         $_targets = array();
         foreach ($targets as $t) {
             $t['levels'] = $level_DB->getAll($t['target_id']);
             $_targets[] = $t;
         }
         $this->view->group_id = $group_id;
         $this->view->targets = $_targets;
     }
 }
Пример #2
0
 public function targetsAction()
 {
     $group_id = $this->_request->getParam('g');
     if ($group_id) {
         $target_DB = new Application_Model_DbTable_Target();
         //$level_DB  = new Application_Model_DbTable_Level();
         $targets = $target_DB->getAll($_SESSION['Default']['field']);
         $_targets = array();
         foreach ($targets as $t) {
             $t['subgoals'] = $target_DB->getAllSubGoals($t['goalID']);
             $_targets[] = $t;
         }
         $this->view->group_id = $group_id;
         $this->view->targets = $_targets;
         $groups_DB = new Application_Model_DbTable_Group();
         $this->view->groupName = $groups_DB->getName($group_id);
     }
 }
Пример #3
0
 public function goalsAction()
 {
     $fieldID = $this->_request->getParam('f');
     if ($fieldID) {
         $_SESSION['Default']['field'] = $fieldID;
     }
     $goals_DB = new Application_Model_DbTable_Target();
     $this->view->goals = $goals_DB->getAll($_SESSION['Default']['field']);
 }