public function indexAction() { $familyForm = new Familyform_Form_Familyform(); $this->view->form = $familyForm; if ($this->_request->isPost() && $this->_request->getPost('Search')) { $formData = $this->_request->getPost(); if ($familyForm->isValid($formData)) { $id = $this->_getParam('membercode'); $this->view->groupid = $id; // // create instance for groupcommon model page $groupcommon = new Groupresolutionkoota_Model_Groupresolution(); $group_name = $groupcommon->getgroup($id); // get group details $this->view->represent = $groupcommon->represent($id); $this->view->parant = $groupcommon->office($id); //Zend_Debug::dump($group_name); if ($group_name) { $getgroupaccount = $groupcommon->getgroupaccount($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; $this->view->getgroupaccount = $getgroupaccount; $grou_members = $groupcommon->getgroupmembers($id); // get group members // Zend_Debug::dump($grou_members); $this->view->groupmembers = $grou_members; $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 $module = $groupcommon->getmodule('Group'); foreach ($module as $module_id) { } $this->view->mod_id = $module_id['parent']; $this->view->sub_id = $module_id['module_id']; } else { $this->view->error = "Enter valid code"; } } } // } else { // $this->_redirect('index/error'); // } }
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']; }
public function getmembersAction() { $branch_id = $this->_request->getParam('branch_id'); $group_id = $this->_request->getParam('group_id'); $grouptype = $this->_request->getParam('grouptype'); $this->_helper->layout->disableLayout(); $dbobj = new Groupmdefault_Model_Groupdefault(); $Allvillagemembers = $dbobj->GetAllvillagemembers($branch_id); // get All village members $fetchMembers = $dbobj->assignMembers($group_id); //get assigned members $RepMembers = $dbobj->representatives($group_id); //get Representative members $repmembers = array(); $fetchAllGroupmembers = $dbobj->fetchAllgroupmembers(); foreach ($RepMembers as $RepMember) { $repmembers[] = $RepMember['representative_id']; } $this->view->representative = $repmembers; // // Zend_Debug::dump($RepMembers); // // Zend_Debug::dump($fetchMembers); $villagemem = array(); $Allmem = array(); $assign = array(); $assignFamids = array(); $aa = array(); foreach ($Allvillagemembers as $Allvillagemem) { $villagemem[] = $Allvillagemem['id']; } foreach ($fetchAllGroupmembers as $fetchAllGroup) { $Allmem[] = $fetchAllGroup['member_id']; } foreach ($fetchMembers as $fetchMem) { $assign[] = $fetchMem['member_id']; $assignFamids[] = $fetchMem['family_id']; } // // // Zend_Debug::dump($Allmem); // // // Zend_Debug::dump($assign); $aa = array_diff($Allmem, $assign); // // // Zend_Debug::dump($aa); $villagemem = array_diff($villagemem, $aa); $this->view->Allmembers = $Allvillagemembers; $this->view->Allmem = $villagemem; $this->view->Exist = $assign; $this->view->Existfamily = $assignFamids; // Zend_Debug::dump($this->view->Allmembers); // Zend_Debug::dump($this->view->Allmem); $this->view->groupheaddetails = $dbobj->Getgrouphead($group_id); //get group head foreach ($this->view->groupheaddetails as $grouphead) { $this->view->grouphead = $grouphead['head']; } }