コード例 #1
0
ファイル: Bgpocdetails.php プロジェクト: lukkyrich/sentrifugo
 public function deleteBGcheckdetails($agencyid, $pocid, $userid)
 {
     $screeningmodel = new Default_Model_Empscreening();
     $data = array('isactive' => 4, 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $this->getLoginUserId());
     $where = "isactive = 1 and bgagency_pocid = " . $pocid . " and bgagency_id = " . $agencyid;
     $screeningmodel->SaveorUpdateDetails($data, $where);
 }
コード例 #2
0
ファイル: Empscreening.php プロジェクト: lukkyrich/sentrifugo
 public function updatebgstatus($con, $specimenid, $flag)
 {
     $db = Zend_Db_Table::getDefaultAdapter();
     $screeningmodel = new Default_Model_Empscreening();
     $usermodel = new Default_Model_Users();
     $candmodel = new Default_Model_Candidatedetails();
     if ($con == 'onhold') {
         $userdata = array('backgroundchk_status' => 'On hold', 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $this->getLoginUserId());
         $userwhere = "id=" . $specimenid;
         if ($flag == 1) {
             $usermodel->addOrUpdateUserModel($userdata, $userwhere);
         } else {
             $candmodel->SaveorUpdateCandidateData($userdata, $userwhere);
         }
         $data = array('bgcheck_status' => 'On hold', 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $this->getLoginUserId());
         $where = "flag = " . $flag . " AND specimen_id=" . $specimenid;
         $screeningmodel->SaveorUpdateDetails($data, $where);
     }
     if ($con == 'complete') {
         $userdata = array('backgroundchk_status' => 'Completed', 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $this->getLoginUserId());
         $userwhere = "id=" . $specimenid;
         if ($flag == 1) {
             $usermodel->addOrUpdateUserModel($userdata, $userwhere);
         } else {
             $candmodel->SaveorUpdateCandidateData($userdata, $userwhere);
         }
         $data = array('bgcheck_status' => 'Complete', 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $this->getLoginUserId());
         $where = "flag = " . $flag . " AND specimen_id=" . $specimenid;
         $screeningmodel->SaveorUpdateDetails($data, $where);
     }
 }
コード例 #3
0
 public function savefeedbackAction()
 {
     try {
         $auth = Zend_Auth::getInstance();
         if ($auth->hasIdentity()) {
             $loginUserId = $auth->getStorage()->read()->id;
             $loginuserRole = $auth->getStorage()->read()->emprole;
             $loginuserGroup = $auth->getStorage()->read()->group_id;
         }
         $detailId = $this->_request->getParam('detailid');
         $emp_screening_model = new Default_Model_Empscreening();
         // To save feedback file name in the database
         $feedback_file = $this->_request->getParam('feedback_file', NULL);
         if (!empty($feedback_file)) {
             $data = array('feedback_file' => $feedback_file);
             $where = "id='{$detailId}'";
             $result = $emp_screening_model->SaveorUpdateDetails($data, $where);
             $updateresult['feedback_file'] = $result;
         }
         $updateresult['result'] = 'saved';
         $this->_helper->json($updateresult);
     } catch (Exception $e) {
         exit($e->getMessage());
     }
 }
コード例 #4
0
 public function deletefeedbackAction()
 {
     $emp_screeing_model = new Default_Model_Empscreening();
     $data = array('feedback_file' => NULL, 'feedback_deletedby' => $emp_screeing_model->getLoginUserId());
     $where = 'id="' . $this->_getParam('rec_id') . '"';
     // To empty feedback file name in DB
     $message = $emp_screeing_model->SaveorUpdateDetails($data, $where);
     // To remove feedback file from folder
     if ($message == 'update') {
         @unlink(UPLOAD_PATH_FEEDBACK . "/" . $this->_getParam('feedback_file'));
     }
     $this->_helper->json(array('action' => $message));
 }