Exemplo n.º 1
0
 public function commonviewAction()
 {
     $this->view->title = "Group";
     $id = $this->_request->getParam('id');
     $this->view->groupid = $id;
     // create instance for groupcommon model page
     $groupcommon = new Groupcommonview_Model_groupcommon();
     $group_name = $groupcommon->getgroup($id);
     // get group details
     $group_location = $groupcommon->getlocation($id);
     // get group Location details - Latitude and longitude
     foreach ($group_location as $location) {
         $this->view->latitude = $location['latitude'];
         $this->view->longitude = $location['longitude'];
     }
     $this->view->groupname = $group_name;
     $group_members = $groupcommon->getgroupmembers($id);
     // get group members
     $this->view->groupmembers = $group_members;
     $groupreps = $groupcommon->groupreps($id);
     // get group representatives
     $this->view->groupreps = $groupreps;
     $dbobj = new Groupmdefault_Model_Groupdefault();
     $groupheaddetails = $dbobj->Getgrouphead($id);
     //Get group head
     foreach ($groupheaddetails as $grouphead) {
         $this->view->grouphead = $grouphead['head'];
     }
     $this->view->address = $this->view->adm->getmodule("ourbank_address", $id, "Group");
     // get address for particular group
     $this->view->contact = $this->view->adm->getmodule("ourbank_contact", $id, "Group");
     // get contact for particular group
     $module = $groupcommon->getmodule('Group');
     foreach ($module as $module_id) {
     }
     $this->view->mod_id = $module_id['parent'];
     $this->view->sub_id = $module_id['module_id'];
 }