Пример #1
0
 public function indexAction()
 {
     $searchForm = new Attendance_Form_Search();
     $this->view->form = $searchForm;
     $meeting = new Meeting_Model_Meeting();
     $result = $meeting->fetchAllmeetingdetails();
     foreach ($result as $result) {
         $searchForm->search_meeting_name_att->addMultiOption($result['id'], $result['name']);
     }
     $attendance = new Attendance_Model_Attendance();
     $result = $attendance->fetchAllattendancedetailsview();
     $page = $this->_getParam('page', 1);
     $paginator = Zend_Paginator::factory($result);
     $paginator->setItemCountPerPage(5);
     $paginator->setCurrentPageNumber($page);
     $this->view->paginator = $paginator;
     if ($this->_request->isPost() && $this->_request->getPost('Search')) {
         $formData = $this->_request->getPost();
         if ($this->_request->isPost()) {
             $formData = $this->_request->getPost();
             if ($searchForm->isValid($formData)) {
                 $result = $attendance->SearchAttendance($formData);
                 $page = $this->_getParam('page', 1);
                 $paginator = Zend_Paginator::factory($result);
                 $paginator->setItemCountPerPage(5);
                 $paginator->setCurrentPageNumber($page);
                 //print_r($paginator);
                 $this->view->paginator = $paginator;
             }
         }
     }
 }
Пример #2
0
 public function fetchmemberseditAction()
 {
     $this->_helper->layout->disableLayout();
     $path = $this->view->baseUrl();
     $meeting_ID = $this->_request->getParam('meeting_ID');
     $attendance_id = $this->_request->getParam('attendance_id');
     $fetchMembers = new Attendance_Model_Attend();
     $this->view->fetchgroupid = $groupid1 = $fetchMembers->fetchgroupid($meeting_ID);
     $groupid = $groupid1[0]['group_id'];
     //echo '<pre>'; print_r($groupid);
     $this->view->members = $aa = $fetchMembers->fetchMembers($meeting_ID, $groupid);
     $check = array();
     $fetchMembersForAttendance = new Attendance_Model_Attendance();
     $fetchMembersForAttendance1 = $fetchMembersForAttendance->assignMembers($attendance_id);
     //print_r($fetchMembersForAttendance1);
     foreach ($fetchMembersForAttendance1 as $fetchMembersForAttendance2) {
         $check[] = $fetchMembersForAttendance2['member_id'];
     }
     $this->view->val = $check;
 }