public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $messages['msgtype'] = '';
     $messages['flagtype'] = '';
     $actionflag = 3;
     if ($id) {
         $jobtitlesmodel = new Default_Model_Jobtitles();
         $positionsModel = new Default_Model_Positions();
         $menumodel = new Default_Model_Menu();
         $data = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
         $where = array('id=?' => $id);
         $job_data = $jobtitlesmodel->getsingleJobTitleData($id);
         $Id = $jobtitlesmodel->SaveorUpdateJobTitleData($data, $where);
         if ($Id == 'update') {
             $positionData = array('isactive' => 0, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $positionsWhere = array('jobtitleid=?' => $id);
             $positionsModel->SaveorUpdatePositionData($positionData, $positionsWhere);
             sapp_Global::send_configuration_mail("Job Titles", $job_data[0]['jobtitlename']);
             $menuidArr = $menumodel->getMenuObjID('/jobtitles');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             $messages['message'] = 'Job title deleted successfully.';
             $messages['msgtype'] = 'success';
         } else {
             $messages['message'] = 'Job title cannot be deleted.';
             $messages['msgtype'] = 'error';
         }
     } else {
         $messages['message'] = 'Job title cannot be deleted.';
         $messages['msgtype'] = 'error';
     }
     $this->_helper->json($messages);
 }