public function attendancedeleteAction() { //Acl // $acl = new App_Model_Acl(); // $access = new App_Model_Access(); // $role = $access->getRole($this->view->id); // // $accessid = $access->accessRights('Attendance',$role,"attendanceeditAction"); // $checkaccess = $acl->isAllowed($role,'Attendance',$accessid); // if(($role) && ($checkaccess != NULL)) { //delete $this->view->attendance_id = $attendance_id = $this->_request->getParam('attendance_id'); $deleteForm = new App_Form_Delete(); $this->view->deleteForm = $deleteForm; $fetchattendance = new Meetingbook_Model_Meetingbook(); if ($this->_request->getPost('Delete')) { $formData = $this->_request->getPost(); // for attendance log details $attendancelog = $this->view->adm->getRecord('ourbank_attendance', 'id', $attendance_id); for ($j = 0; $j < count($attendancelog); $j++) { $this->view->adm->addRecord("ourbank_attendance_log", $attendancelog[$j]); } // for member log details $memberlog = $fetchattendance->fetchmemberlog($attendance_id); for ($j = 0; $j < count($memberlog); $j++) { $this->view->adm->addRecord("ourbank_memberattendance_log", $memberlog[$j]); } // for discussion log details $discussionlog = $fetchattendance->fetchdiscussionlog($attendance_id); for ($j = 0; $j < count($discussionlog); $j++) { $this->view->adm->addRecord("ourbank_discussion_log", $discussionlog[$j]); } // for decision log details $decisionlog = $fetchattendance->fetchdecisionlog($attendance_id); for ($j = 0; $j < count($decisionlog); $j++) { $this->view->adm->addRecord("ourbank_decision_log", $decisionlog[$j]); } $this->view->adm->deleteRecord('ourbank_attendance', $attendance_id); $fetchattendance->deletememberattendance($attendance_id); $fetchattendance->deletediscussion($attendance_id); $fetchattendance->deletedecision($attendance_id); $this->_redirect('meetingbookindex/index'); } // } else { // $this->_redirect('index/index'); // } }