public function downloadAction()
 {
     $cand_details_model = new Default_Model_Candidatedetails();
     $result = $cand_details_model->getcandidateData($this->_getParam('id'));
     if (!empty($result['cand_resume'])) {
         $status = array();
         $file = BASE_PATH . '/uploads/resumes/' . $result['cand_resume'];
         $status = sapp_Global::downloadFile($file);
         if (!empty($status['message'])) {
             $this->_helper->FlashMessenger()->setNamespace('success')->addMessage($status['message']);
         }
     }
     $this->_redirect('candidatedetails/index');
 }
 public function checkscreeningstatusAction()
 {
     $candid = $this->getRequest()->getParam('candid');
     $empid = $this->getRequest()->getParam('empid');
     $empscreeningModel = new Default_Model_Empscreening();
     $personalData = '';
     $addressData = '';
     $companyData = '';
     if (isset($candid) && $candid != '') {
         $candidateModel = new Default_Model_Candidatedetails();
         $status = $candidateModel->getcandidateData($candid);
         if ($status['backgroundchk_status'] == 'Yet to start') {
             $this->_redirect('empscreening/add/candid/' . $candid);
         } else {
             $this->_redirect('empscreening/edit/id/' . $candid . '-2');
         }
     } elseif (isset($empid) && $empid != '') {
         $usersModel = new Default_Model_Users();
         $bgstatusArr = $usersModel->getBGstatus($empid);
         if ($bgstatusArr[0]['backgroundchk_status'] == 'Yet to start' || $bgstatusArr[0]['backgroundchk_status'] == 'Not Applicable') {
             $this->_redirect('empscreening/add/empid/' . $empid);
         } else {
             $this->_redirect('empscreening/edit/id/' . $empid . '-1');
         }
     }
 }