当前位置: 首页>>代码示例>>PHP>>正文


PHP type::getMessages方法代码示例

本文整理汇总了PHP中type::getMessages方法的典型用法代码示例。如果您正苦于以下问题:PHP type::getMessages方法的具体用法?PHP type::getMessages怎么用?PHP type::getMessages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在type的用法示例。


在下文中一共展示了type::getMessages方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save


//.........这里部分代码省略.........
         $loginuserRole = $auth->getStorage()->read()->emprole;
     }
     $candDetails = "";
     $canProcess = true;
     $flag = 'true';
     $profile_model = new Default_Model_Profiles();
     $req_model = new Default_Model_Requisition();
     $cand_model = new Default_Model_Candidatedetails();
     if ($form->isValid($this->_request->getPost())) {
         $id = $this->getRequest()->getParam('id');
         $technology = $this->_getParam('technology', null);
         $firstname = $this->_getParam('firstname', null);
         $lastname = $this->_getParam('lastname', null);
         $fullname = $firstname . ' ' . $lastname;
         $email = $this->_getParam('emailaddress', null);
         $contact = $this->_getParam('contact', null);
         $totalexprience = $this->_getParam('totalexprience', null);
         $releventexprience = $this->_getParam('releventexprience', null);
         $currentCTC = $this->_getParam('currentCTC', null);
         $expectedCTC = $this->_getParam('expectedCTC', null);
         $currentcompany = $this->_getParam('currentcompany', null);
         $currentlocation = $this->_getParam('currentlocation', null);
         $noticeperiod = $this->_getParam('noticeperiod', null);
         $requisition_id = $this->_getParam('requisition_id', null);
         $cvcommentdescription = $this->_getParam('cvcommentdescription', null);
         $candresume = $this->_getParam('cand_resume', null);
         $data = array('requisition_id' => $requisition_id, 'technology' => $technology, 'firstname' => trim($firstname), 'lastname' => trim($lastname), 'fullname' => trim($fullname), 'emailaddress' => trim($email), 'contact' => trim($contact), 'totalexprience' => $totalexprience, 'releventexprience' => $releventexprience, 'currentCTC' => $currentCTC, 'expectedCTC' => $expectedCTC, 'currentcompany' => $currentcompany, 'currentlocation' => $currentlocation, 'noticeperiod' => $noticeperiod, 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createdon' => gmdate("Y-m-d H:i:s"), 'modifiedon' => gmdate("Y-m-d H:i:s"), 'profilelastmodifiedon' => gmdate("Y-m-d H:i:s"), 'cvcommentdescription' => $cvcommentdescription, 'cand_resume' => $candresume);
         $data1 = array('requisition_id' => $requisition_id, 'candidate_firstname' => trim($firstname), 'candidate_lastname' => trim($lastname), 'candidate_name' => trim($fullname), 'emailid' => trim($email), 'contact_number' => trim($contact) == '' ? NULL : trim($contact), 'cand_resume' => $candresume, 'cand_status' => "Not Scheduled", 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"), 'cand_technology' => trim($technology), 'totalexprience' => trim($totalexprience), 'releventexprience' => trim($releventexprience), 'currentCTC' => trim($currentCTC), 'expectedCTC' => trim($expectedCTC), 'currentcompany' => trim($currentcompany), 'currentlocation' => trim($currentlocation), 'noticeperiod' => trim($noticeperiod));
         $where = "";
         $actionflag = 1;
         if ($id != '') {
             unset($data['createdby']);
             unset($data['createddate']);
             unset($data['isactive']);
             $where = "id = " . $id;
             $tableid = $id;
             $actionflag = 2;
             if ($canProcess) {
                 $result1 = $cand_model->SaveorUpdateCandidateData($data1, "");
             }
             //perform this action only if login user role is not HRRECRUITER role
             if ($loginuserRole != HRRECRUITER) {
                 $cvshortlistedstatus = "";
                 try {
                     //CV Shortlisted status and comments
                     $cvshortlistedstatus = 1;
                     $cvcommentdescription = $this->_getParam('cvcommentdescription', null);
                     $insertCVShortlistDetailsResult = $req_model->insertCVShortlistDetails($id, $requisition_id, $cvshortlistedstatus, $cvcommentdescription, trim($loginUserId), gmdate("Y-m-d H:i:s"));
                 } catch (Exception $xyz) {
                 }
             }
         }
         if ($where == '') {
             $canProcess = true;
             //$canProcess = $cand_model->IsCandidateExists($candidate_firstname, $candidate_lastname, $contact_number, $emailid, $cand_technology);
         }
         if ($canProcess) {
             $result = $profile_model->SaveorUpdateCandidateData($data, $where);
         } else {
             echo "<script> alert('Profile already exists....!'); </script>";
         }
         $candData = $cand_model->getCandidateForView($result1);
         if (isset($cvshortlistedstatus) || strlen(trim($cvshortlistedstatus)) > 0) {
             //updating existing CV
             $this->requisition_cvupload_emails($requisition_id, "Update", $candData);
         } else {
             if ($requisition_id !== NULL) {
                 //new CV
                 $this->requisition_cvupload_emails($requisition_id, "New", $candData);
             }
         }
         //send email end -------------------------------------------------
         if ($id == '') {
             $tableid = $result;
         }
         if ($result != '') {
             $menumodel = new Default_Model_Menu();
             $objidArr = $menumodel->getMenuObjID('/profiles');
             $objID = $objidArr[0]['id'];
             $result = sapp_Global::logManager($objID, $actionflag, $loginUserId, $tableid);
             if ($id == '') {
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Profile details added successfully."));
             } elseif ($id !== '' && $requisition_id !== '') {
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Profile details Added successfully to Resource Pooling."));
             } else {
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Profile details updated successfully."));
             }
             $this->_redirect('/profiles');
         }
     } else {
         $messages = $form->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:ProfilesController.php

示例2: save


//.........这里部分代码省略.........
                     $subject = APPLICATION_NAME . ': Interview schedule';
                     $location = $int_location;
                     $calRequest = 'REQUEST';
                     sapp_Global::sendIcalEvent($from_name, $from_address, $to_name, $to_address, $startTime, $endTime, $subject, $description, $location, $calRequest, $cal_unique_id);
                 }
                 // update Calendar Invite ID to DB
                 $where = "id = " . $ir_result;
                 $irdata = array('calendarinviteid' => $cal_unique_id);
                 $ir_result1 = $interview_round_model->SaveorUpdateInterviewroundData($irdata, $where);
                 $candData = array('cand_status' => 'Scheduled', 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                 $where = "id = " . $candidate_id;
                 $candResult = $cand_model->SaveorUpdateCandidateData($candData, $where);
             }
         } else {
             $idata = array('interview_status' => trim($interview_status), 'isactive' => 1, 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $iwhere = "id = " . $id;
             $tableid = $id;
             $actionflag = 2;
             $iresult = $interview_model->SaveorUpdateInterviewData($idata, $iwhere);
             $candData = array('cand_status' => 'Scheduled', 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
             if ($cand_status && $cand_status != '0') {
                 $candData['cand_status'] = $cand_status;
             }
             $where = "id = " . $candidate_id;
             $candResult = $cand_model->SaveorUpdateCandidateData($candData, $where);
             //send email
             $currentInterviewData = $requi_model->getinterviewdetails($id);
             $requisition_data = $requi_model->getrequisitiondetails($currentInterviewData["req_id"]);
             $currentrequisition_data = $requi_model->getrequisitiondetails($currentInterviewData["req_id"]);
             $cand_data = $cand_model->getCandidateById($candidate_id);
             //$hrgroupemail = $requi_model->getgroupemailid("REQ_HR", $requisition_data["department_id"]);
             $requesteremailaddress = $requi_model->getemployeeemailaddress($requisition_data["createdby"]);
             $reportingmanageremailaddress = $requi_model->getemployeeemailaddress($requisition_data["reporting_id"]);
             //HR Group
             $mail_arr[0]['name'] = 'HR';
             $mail_arr[0]['email'] = constant('REQ_HR_0');
             //Requester
             $mail_arr[1]['name'] = $requesteremailaddress['userfullname'];
             $mail_arr[1]['email'] = $requesteremailaddress['emailaddress'];
             //Reporting Manager
             $mail_arr[2]['name'] = $reportingmanageremailaddress['userfullname'];
             $mail_arr[2]['email'] = $reportingmanageremailaddress['emailaddress'];
             //Management Group
             $mail_arr[3]['name'] = 'Management';
             $mail_arr[3]['email'] = constant('REQ_MGMT_0');
             //Recruiter Panel
             $requisition_recruiters_data = $requi_model->GetRequisitionRecruiterEmailaddress($currentrequisition_data["requisition_code"]);
             $emailCnt = 4;
             foreach ($requisition_recruiters_data as $requisition_recruiters_data1) {
                 $mail_arr[$emailCnt]['name'] = $requisition_recruiters_data1['userfullname'];
                 $mail_arr[$emailCnt]['email'] = $requisition_recruiters_data1['emailaddress'];
                 $emailCnt = $emailCnt + 1;
             }
             //Technical Panel
             $pnlIDS = implode(',', $requi_model->getRequisitionInterviewPanelIDs($currentInterviewData["req_id"]));
             $interviewpanelnamesemailaddresss = $requi_model->GetInterviewPanelMamesEmailaddress($pnlIDS);
             foreach ($interviewpanelnamesemailaddresss as $interviewpanelnamesemailaddress1) {
                 $mail_arr[$emailCnt]['name'] = $interviewpanelnamesemailaddress1['userfullname'];
                 $mail_arr[$emailCnt]['email'] = $interviewpanelnamesemailaddress1['emailaddress'];
                 $emailCnt = $emailCnt + 1;
             }
             for ($ii = 0; $ii < count($mail_arr); $ii++) {
                 $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                 $view = $this->getHelper('ViewRenderer')->view;
                 $this->view->emp_name = $mail_arr[$ii]['name'];
                 $this->view->type = 'InterviewSummary';
                 $this->view->requisition_data = $currentrequisition_data;
                 $this->view->candidate_details = $cand_data;
                 $this->view->round_data = $currentInterviewData;
                 $this->view->base_url = $base_url;
                 $text = $view->render('mailtemplates/requisition.phtml');
                 $options['subject'] = APPLICATION_NAME . ': Interview feedback';
                 //$options['header'] = 'Interview feedback';
                 $options['toEmail'] = $mail_arr[$ii]['email'];
                 $options['toName'] = $mail_arr[$ii]['name'];
                 $options['message'] = $text;
                 sapp_Global::_sendEmail($options, "interviewrounds_feedback", REQUISITIONMODULESENDEMAIL);
             }
         }
         $menumodel = new Default_Model_Menu();
         $objidArr = $menumodel->getMenuObjID('/scheduleinterviews');
         $objID = $objidArr[0]['id'];
         $result = sapp_Global::logManager($objID, $actionflag, $loginUserId, $tableid);
         if ($id == '') {
             $this->_helper->FlashMessenger()->setNamespace('success')->addMessage('Interview scheduled successfully.');
         } else {
             $this->_helper->FlashMessenger()->setNamespace('success')->addMessage('Interview details updated successfully.');
         }
         $this->_redirect('/scheduleinterviews');
     } else {
         $messages = $form->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:ScheduleinterviewsController.php

示例3: save

 /**
  * 
  * @param type $emppersonaldetailsform
  * @param type $userid
  * @return type
  */
 public function save($emppersonaldetailsform, $userid)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     if ($emppersonaldetailsform->isValid($this->_request->getPost())) {
         $post_values = $this->_request->getPost();
         $new_post_values = array_filter($post_values);
         $empperdetailsModal = new Default_Model_Empprobationreview();
         $id = $this->_request->getParam('id');
         $user_id = $userid;
         $feedback = $this->_request->getParam('feedback');
         $probationstatus = $this->_request->getParam('probationstatus');
         $reviewdate = $this->_request->getParam('reviewdate');
         $nextreviewdate = $this->_request->getParam('next_reviewdate');
         $reviewdate = sapp_Global::change_date($reviewdate, 'database');
         $nextreviewdate = sapp_Global::change_date($nextreviewdate, 'database');
         $data = array('user_id' => $user_id, 'probationdate' => $reviewdate, 'next_reviewdate' => $nextreviewdate, 'comments' => $feedback, 'status' => $probationstatus, 'createdby' => $loginUserId, 'isactive' => 1, 'createddate' => gmdate("Y-m-d H:i:s"));
         $where = '';
         $actionflag = 1;
         $menumodel = new Default_Model_Menu();
         $empperdetailsModal->makeInactiveExistingRecords($user_id);
         $Id = $empperdetailsModal->SaveorUpdateEmpPersonalData($data, $where);
         $tableid = $Id;
         $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee probation review details added successfully."));
         $menuidArr = $menumodel->getMenuObjID('/employee');
         $menuID = $menuidArr[0]['id'];
         $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $user_id);
         $this->_redirect('empprobationreview/edit/userid/' . $userid);
     } else {
         $messages = $emppersonaldetailsform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         //echo '<pre>';print_r($msgarray);exit;
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:48,代码来源:EmpprobationreviewController.php

示例4: save

 /**
  * 
  * @param type $requisitionform
  * @param type $data
  * @return type
  */
 public function save($requisitionform, $data)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $requi_model = new Default_Model_Requisition();
     $user_model = new Default_Model_Usermanagement();
     $req_status = $this->_getParam('req_status', null);
     try {
         //update HR Executive for Requisition
         $hrExecutiveID = $this->_getParam('hrexecutive_id', null);
         $requisition_code = $this->_getParam('requisition_code', null);
         $requisition_id = $this->_getParam('id', null);
         $result1 = $requi_model->update_requisition_hrexecutive($requisition_id, $requisition_code, $hrExecutiveID, $loginUserId, gmdate("Y-m-d H:i:s"));
         //send emails
         $this->hrexecutive_to_requisition_emails($data, $requisition_code, $hrExecutiveID);
     } catch (Exception $xyz) {
     }
     $flag = 'true';
     if ($requisitionform->isValid($this->_request->getPost()) && $flag != 'false') {
         $id = $this->_getParam('id', null);
         $req_status = $this->_getParam('req_status', null);
         $onboard_date = $this->_getParam('onboard_date', null);
         $data = array('req_status' => $req_status, 'modifiedby' => trim($loginUserId), 'modifiedon' => gmdate("Y-m-d H:i:s"));
         if ($onboard_date != '') {
             $data = $data + array('onboard_date' => sapp_Global::change_date($onboard_date, 'database'));
         }
         $where = "id = " . $id;
         $result = $requi_model->SaveorUpdateRequisitionData($data, $where);
         $requisition_data = $requi_model->getReqDataForView($id);
         $requisition_data = $requisition_data[0];
         if ($loginUserId == $requisition_data['approver1']) {
             $result1 = $requi_model->insert_requisition_approvalLog($id, $requisition_data['requisition_code'], $data['req_status'], $loginUserId, gmdate("Y-m-d H:i:s"));
         }
         $tableid = $id;
         $actionflag = 2;
         if ($result != '') {
             if ($req_status == 'Complete' || $req_status == 'Closed') {
                 $requi_model->change_to_requisition_closed($id);
                 $report_person_data = $user_model->getUserDataById($requisition_data['createdby']);
                 $closed_person_data = $user_model->getUserDataById($loginUserId);
                 //HR
                 $mail_arr[0]['name'] = 'HR';
                 $mail_arr[0]['email'] = constant('REQ_HR_0');
                 $mail_arr[0]['type'] = 'HR';
                 //Management
                 $mail_arr[1]['name'] = 'Management';
                 $mail_arr[1]['email'] = constant('REQ_MGMT_0');
                 $mail_arr[1]['type'] = 'Management';
                 //Requester
                 $mail_arr[2]['name'] = $report_person_data['userfullname'];
                 $mail_arr[2]['email'] = $report_person_data['emailaddress'];
                 $mail_arr[2]['type'] = 'Raise';
                 for ($ii = 0; $ii < count($mail_arr); $ii++) {
                     $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                     $view = $this->getHelper('ViewRenderer')->view;
                     $this->view->emp_name = $mail_arr[$ii]['name'];
                     $this->view->base_url = $base_url;
                     $this->view->type = $mail_arr[$ii]['type'];
                     $this->view->requisition_code = $requisition_data['requisition_code'];
                     $this->view->req_status = $status = strtolower($req_status == 'Closed' ? "Closed" : $req_status);
                     $this->view->raised_name = $report_person_data['userfullname'];
                     $this->view->approver_str = $closed_person_data['userfullname'];
                     $text = $view->render('mailtemplates/changedrequisition.phtml');
                     $options['subject'] = APPLICATION_NAME . ':' . $requisition_data['requisition_code'] . '-Requisition is ' . $status;
                     $options['header'] = 'Requisition is ' . $status;
                     $options['toEmail'] = $mail_arr[$ii]['email'];
                     $options['toName'] = $mail_arr[$ii]['name'];
                     $options['message'] = $text;
                     //$options['cron'] = 'yes';
                     sapp_Global::_sendEmail($options, "changedrequisition", REQUISITIONMODULESENDEMAIL);
                 }
             }
             $menumodel = new Default_Model_Menu();
             $objidArr = $menumodel->getMenuObjID('/approvedrequisitions');
             $objID = $objidArr[0]['id'];
             $result = sapp_Global::logManager($objID, $actionflag, $loginUserId, $tableid);
             if ($id != '') {
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Requisition updated successfully."));
             } else {
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Requisition added successfully."));
             }
             $this->_redirect('/approvedrequisitions');
         }
     } else {
         $messages = $requisitionform->getMessages();
         $msgarray = array();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:ApprovedrequisitionsController.php

示例5: save


//.........这里部分代码省略.........
                             $this->view->raised_name = $Raisedby_person_data['userfullname'];
                             $this->view->req_status = $st_arr[$req_status];
                             $this->view->reporting_manager = $report_person_data['userfullname'];
                             $text = $view->render('mailtemplates/changedrequisition.phtml');
                             $options['subject'] = strtolower($st_arr[$req_status]) == 'approved' ? APPLICATION_NAME . ': ' . $requisition_data['requisition_code'] . '-Requisition is approved' : APPLICATION_NAME . ': Requisition is rejected';
                             $options['header'] = 'Requisition Status';
                             $options['toEmail'] = !empty($mail_arr[$ii]['email']) ? $mail_arr[$ii]['email'] : '';
                             $options['toName'] = !empty($mail_arr[$ii]['name']) ? $mail_arr[$ii]['name'] : '';
                             $options['message'] = $text;
                             $mail[$ii] = $options;
                             //$options['cron'] = 'yes';
                             if ($options['toEmail'] != '') {
                                 sapp_Global::_sendEmail($options, "by_approver1", REQUISITIONMODULESENDEMAIL);
                             } else {
                                 sapp_Global::_sendEmail($options, '', REQUISITIONMODULESENDEMAIL);
                             }
                         }
                     } else {
                         if ($req_status == 2) {
                             //Approver
                             $approver_person_data = $user_model->getUserDataById($appr_mail);
                             $mail_arr[0]['name'] = $approver_person_data['userfullname'];
                             $mail_arr[0]['email'] = $approver_person_data['emailaddress'];
                             $mail_arr[0]['type'] = 'Approver';
                             //HR Group
                             $mail_arr[1]['name'] = 'HR';
                             $mail_arr[1]['email'] = constant('REQ_HR_0');
                             $mail_arr[1]['type'] = 'HR';
                             //Management Group
                             $mail_arr[2]['name'] = 'Management';
                             $mail_arr[2]['email'] = constant('REQ_MGMT_0');
                             $mail_arr[2]['type'] = 'Management';
                             //Requester
                             $Raisedby_person_data = $user_model->getUserDataById($requisition_data['createdby']);
                             $mail_arr[3]['name'] = $Raisedby_person_data['userfullname'];
                             $mail_arr[3]['email'] = $Raisedby_person_data['emailaddress'];
                             $mail_arr[3]['type'] = 'Raise';
                             if ($edit_flag == 'yes') {
                                 $approved_by_data = $user_model->getUserDataById($requisition_data['approver' . $appr_per]);
                                 $req_status = 2;
                             } else {
                                 $approved_by_data = $user_model->getUserDataById($appr_per);
                             }
                             $Raisedby_person_data = $user_model->getUserDataById($requisition_data['createdby']);
                             $appr_str = $approved_by_data['userfullname'];
                             for ($ii = 0; $ii < count($mail_arr); $ii++) {
                                 $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                                 $view = $this->getHelper('ViewRenderer')->view;
                                 $this->view->emp_name = $mail_arr[$ii]['name'];
                                 $this->view->base_url = $base_url;
                                 $this->view->type = $mail_arr[$ii]['type'];
                                 $this->view->requisition_code = $requisition_data['requisition_code'];
                                 $this->view->req_status = $st_arr[$req_status];
                                 $this->view->raised_name = $Raisedby_person_data['userfullname'];
                                 $this->view->approver_str = $appr_str;
                                 $text = $view->render('mailtemplates/changedrequisition.phtml');
                                 $options['subject'] = strtolower($st_arr[$req_status]) == 'approved' ? APPLICATION_NAME . ':' . $requisition_data['requisition_code'] . '-Requisition is approved' : APPLICATION_NAME . ': Requisition is rejected';
                                 $options['header'] = 'Requisition Status';
                                 $options['toEmail'] = $mail_arr[$ii]['email'];
                                 $options['toName'] = $mail_arr[$ii]['name'];
                                 $options['message'] = $text;
                                 //$options['cron'] = 'yes';
                                 if ($options['toEmail'] != '') {
                                     sapp_Global::_sendEmail($options, "by_approver2", REQUISITIONMODULESENDEMAIL);
                                 } else {
                                     sapp_Global::_sendEmail($options, '', REQUISITIONMODULESENDEMAIL);
                                 }
                             }
                         }
                     }
                     //end of mailing
                 }
                 $menumodel = new Default_Model_Menu();
                 $objidArr = $menumodel->getMenuObjID('/requisition');
                 $objID = $objidArr[0]['id'];
                 $result = sapp_Global::logManager($objID, $actionflag, $loginUserId, $tableid);
                 if ($id != '') {
                     $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Resource requisition updated successfully."));
                 } else {
                     $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Resource requisition added successfully."));
                 }
                 $trDb->commit();
                 $this->_redirect('/requisition');
             }
         } catch (Exception $e) {
             $trDb->rollBack();
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Something went wrong, please try again later."));
             $this->_redirect('/requisition');
         }
     } else {
         $messages = $requisitionform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:RequisitionController.php

示例6: updateempdetails


//.........这里部分代码省略.........
                             $isactivestatus = 4;
                         }
                     }
                 }
                 $statusdata = array('isactive' => $isactivestatus);
                 $empstatusId = $usersModel->SaveorUpdateUserData($statusdata, $statuswhere);
             } else {
                 $statusdata = array('isactive' => 1);
                 $empstatusId = $usersModel->SaveorUpdateUserData($statusdata, $statuswhere);
             }
             if ($Id == 'update') {
                 $tableid = $id;
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee details updated successfully."));
             } else {
                 //start of mailing
                 $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                 $view = $this->getHelper('ViewRenderer')->view;
                 $this->view->emp_name = $emp_name;
                 $this->view->password = $emppassword;
                 $this->view->emp_id = $employeeId;
                 $this->view->base_url = $base_url;
                 $text = $view->render('mailtemplates/newpassword.phtml');
                 $options['subject'] = APPLICATION_NAME . ' login credentials';
                 $options['header'] = 'Greetings from DeltaONE';
                 $options['toEmail'] = $emailaddress;
                 $options['toName'] = $this->view->emp_name;
                 $options['message'] = $text;
                 $result = sapp_Global::_sendEmail($options, "newpassword");
                 //end of mailing
                 $tableid = $Id;
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Employee details added successfully."));
             }
             $menuidArr = $menumodel->getMenuObjID('/employee');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $tableid);
             $menuidArr = $menumodel->getMenuObjID('/usermanagement');
             $menuID_user = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $user_id);
             if ($act_inact == 1) {
                 if ($user_data['isactive'] == 1) {
                     $act_str = array("Activated" => Zend_Registry::get('currentdate'));
                 } else {
                     $act_str = array("Inactivated" => Zend_Registry::get('currentdate'));
                 }
                 $result = sapp_Global::logManager($menuID_user, 4, $loginUserId, $user_id, '', $act_str);
             }
             $trDb->commit();
             $this->_redirect('employee/edit/id/' . $user_id);
         } catch (Exception $e) {
             $trDb->rollBack();
             $msgarray['employeeId'] = "Something went wrong,please try again later.";
             return $msgarray;
         }
     } else {
         $messages = $employeeform->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         $usersModel = new Default_Model_Users();
         if (isset($businessunit_id) && $businessunit_id != 0 && $businessunit_id != '') {
             $departmentsmodel = new Default_Model_Departments();
             $departmentlistArr = $departmentsmodel->getDepartmentList($businessunit_id);
             $employeeform->department_id->clearMultiOptions();
             $employeeform->reporting_manager->clearMultiOptions();
             $employeeform->department_id->addMultiOption('', 'Select Department');
             foreach ($departmentlistArr as $departmentlistresult) {
                 $employeeform->department_id->addMultiOption($departmentlistresult['id'], utf8_encode($departmentlistresult['deptname']));
             }
             if (isset($department_id) && $department_id != 0 && $department_id != '') {
                 $employeeform->setDefault('department_id', $department_id);
             }
         }
         if (isset($department_id) && $department_id != 0 && $department_id != '') {
             $reportingManagerArr = $usersModel->getReportingManagerList($department_id, $user_id);
             $employeeform->reporting_manager->addMultiOption('', 'Select Reporting Manager');
             foreach ($reportingManagerArr as $reportingManagerresult) {
                 $employeeform->reporting_manager->addMultiOption($reportingManagerresult['id'], utf8_encode($reportingManagerresult['userfullname']));
             }
             if (isset($reporting_manager) && $reporting_manager != 0 && $reporting_manager != '') {
                 $employeeform->setDefault('reporting_manager', $reporting_manager);
             }
         }
         if (isset($jobtitle_id) && $jobtitle_id != 0 && $jobtitle_id != '') {
             $positionsmodel = new Default_Model_Positions();
             $positionlistArr = $positionsmodel->getPositionList($jobtitle_id);
             $employeeform->position_id->clearMultiOptions();
             $employeeform->position_id->addMultiOption('', 'Select Position');
             foreach ($positionlistArr as $positionlistRes) {
                 $employeeform->position_id->addMultiOption($positionlistRes['id'], utf8_encode($positionlistRes['positionname']));
             }
             if (isset($position_id) && $position_id != 0 && $position_id != '') {
                 $employeeform->setDefault('position_id', $position_id);
             }
         }
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:MydetailsController.php

示例7: save


//.........这里部分代码省略.........
             if ($loginuserRole != HRRECRUITER) {
                 $cvshortlistedstatus = "";
                 try {
                     //CV Shortlisted status and comments
                     $cvshortlistedstatus = $this->_getParam('cvshortlistedstatusid', null);
                     $cvcommentdescription = $this->_getParam('cvcommentdescription', null);
                     $insertCVShortlistDetailsResult = $req_model->insertCVShortlistDetails($id, $requisition_id, $cvshortlistedstatus, $cvcommentdescription, trim($loginUserId), gmdate("Y-m-d H:i:s"));
                 } catch (Exception $xyz) {
                 }
             }
         }
         if ($where == '') {
             $canProcess = $cand_model->IsCandidateExists($candidate_firstname, $candidate_lastname, $contact_number, $emailid, $cand_technology);
         }
         if ($canProcess) {
             $result = $cand_model->SaveorUpdateCandidateData($data, $where);
         } else {
             //$this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Candidate already exists....!"));
             //$msgarray['requisition_id'] = 'Candidate already exists....!';
             //$flag = 'false';
             echo "<script> alert('Candidate already exists....!'); </script>";
         }
         //send email start -------------------------------------------------
         if ($id == '') {
             $id = $result;
         }
         $candData = $cand_model->getCandidateForView($id);
         if (isset($cvshortlistedstatus) || strlen(trim($cvshortlistedstatus)) > 0) {
             //updating existing CV
             $this->requisition_cvupload_emails($requisition_id, "Update", $candData);
         } else {
             //new CV
             $this->requisition_cvupload_emails($requisition_id, "New", $candData);
         }
         //send email end -------------------------------------------------
         if ($id == '') {
             $tableid = $result;
         }
         if ($result != '') {
             //saving of candidate work details
             if (count($txt_cname) > 0) {
                 $k = 0;
                 foreach ($txt_cname as $cname) {
                     if ($cname != '') {
                         $cdata = array('cand_id' => $tableid, 'company_name' => $cname, 'contact_number' => $txt_cnumber[$k], 'company_address' => $txt_address[$k], 'company_website' => $txt_website[$k], 'cand_designation' => $txt_desig[$k], 'cand_fromdate' => sapp_Global::change_date($txt_from[$k], 'database'), 'cand_todate' => sapp_Global::change_date($txt_to[$k], 'database'), 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                         $cwhere = $hidworkdata[$k] != '' ? "id = " . $hidworkdata[$k] : "";
                         $candwork_model->SaveorUpdateCandidateWorkData($cdata, $cwhere);
                     }
                     $k++;
                 }
             }
             //end of saving of candidate work details
             $menumodel = new Default_Model_Menu();
             $objidArr = $menumodel->getMenuObjID('/candidatedetails');
             $objID = $objidArr[0]['id'];
             $result = sapp_Global::logManager($objID, $actionflag, $loginUserId, $tableid);
             if ($id == '') {
                 //$this->_helper->FlashMessenger()->setNamespace('success')->addMessage('Candidate details added successfully.');
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Candidate details added successfully."));
             } else {
                 //$this->_helper->FlashMessenger()->setNamespace('success')->addMessage('Candidate details updated successfully.');
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Candidate details updated successfully."));
             }
             $this->_redirect('/candidatedetails');
         }
     } else {
         $messages = $form->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         if (isset($country) && $country != 0 && $country != '') {
             $statesmodel = new Default_Model_States();
             $statesmodeldata = $statesmodel->getStatesList(intval($country));
             $form->state->clearMultiOptions();
             $form->city->clearMultiOptions();
             $form->state->addMultiOption('', 'Select State');
             foreach ($statesmodeldata as $res) {
                 $form->state->addMultiOption($res['id'], utf8_encode($res['state_name']));
             }
             if (isset($state) && $state != 0 && $state != '') {
                 $form->setDefault('state', $state);
             }
         }
         if (isset($state) && $state != 0 && $state != '') {
             $citiesmodel = new Default_Model_Cities();
             $citiesmodeldata = $citiesmodel->getCitiesList(intval($state));
             $form->city->addMultiOption('', 'Select City');
             foreach ($citiesmodeldata as $res) {
                 $form->city->addMultiOption($res['id'], utf8_encode($res['city_name']));
             }
             if (isset($city) && $city != 0 && $city != '') {
                 $form->setDefault('city', $city);
             }
         }
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:CandidatedetailsController.php

示例8: save


//.........这里部分代码省略.........
                         $interviewpanelnamesemailaddresss = $requi_model->GetInterviewPanelMamesEmailaddress($interview_panel);
                         foreach ($interviewpanelnamesemailaddresss as $interviewpanelnamesemailaddress) {
                             $cal_unique_id = $this->getCalendarUniqueID();
                             $from_name = trim($loginuser_person_data['userfullname']);
                             $from_address = trim($loginuser_person_data['emailaddress']);
                             $to_name = trim($interviewpanelnamesemailaddress['userfullname']);
                             $to_address = trim($interviewpanelnamesemailaddress['emailaddress']);
                             $startTime = sapp_Global::_getInterviewStartDateTime(sapp_Global::change_date($interview_date), sapp_Global::change_time(trim($interview_time)), 3600);
                             $endTime = sapp_Global::_getInterviewStartDateTime(sapp_Global::change_date($interview_date), sapp_Global::change_time(trim($interview_time)));
                             $subject = APPLICATION_NAME . ': Interview schedule';
                             $location = $int_location;
                             $calRequest = 'REQUEST';
                             sapp_Global::sendIcalEvent($from_name, $from_address, $to_name, $to_address, $startTime, $endTime, $subject, $description, $location, $calRequest, $cal_unique_id);
                         }
                         //}
                         //end of mailing
                         $tableid = $result;
                         $this->view->eventact = 'scheduled';
                     } else {
                         if ($loginuserGroup == MANAGER_GROUP || $loginuserGroup == SYSTEMADMIN_GROUP || $loginuserGroup == EMPLOYEE_GROUP || $loginuserGroup == MANAGEMENT_GROUP) {
                             $requisition_data = $requi_model->getRequisitionDataById($reqId);
                             $requisition_data_View = $requi_model->getReqDataForView($reqId);
                             $cand_data = $cand_model->getCandidateById($candid);
                             $round_data = $round_model->getSingleRoundData($id);
                             $report_person_data = $user_model->getUserDataById($interviewer_id);
                             $currentrequisition_data = $requi_model->getrequisitiondetails($reqId);
                             $requesteremailaddress = $requi_model->getemployeeemailaddress($currentrequisition_data["createdby"]);
                             $reportingmanageremailaddress = $requi_model->getemployeeemailaddress($currentrequisition_data["reporting_id"]);
                             //$hrgroupemail = $requi_model->getgroupemailid("REQ_HR", $requisition_data["department_id"]);
                             //HR Group
                             $mail_arr[0]['name'] = 'HR';
                             $mail_arr[0]['email'] = constant('REQ_HR_0');
                             //Requester
                             $mail_arr[1]['name'] = $requesteremailaddress['userfullname'];
                             $mail_arr[1]['email'] = $requesteremailaddress['emailaddress'];
                             //Reporting Manager
                             $mail_arr[2]['name'] = $reportingmanageremailaddress['userfullname'];
                             $mail_arr[2]['email'] = $reportingmanageremailaddress['emailaddress'];
                             //Management Group
                             $mail_arr[3]['name'] = 'Management';
                             $mail_arr[3]['email'] = constant('REQ_MGMT_0');
                             //Recruiter Panel
                             $requisition_recruiters_data = $requi_model->GetRequisitionRecruiterEmailaddress($currentrequisition_data["requisition_code"]);
                             $emailCnt = 4;
                             foreach ($requisition_recruiters_data as $requisition_recruiters_data1) {
                                 $mail_arr[$emailCnt]['name'] = $requisition_recruiters_data1['userfullname'];
                                 $mail_arr[$emailCnt]['email'] = $requisition_recruiters_data1['emailaddress'];
                                 $emailCnt = $emailCnt + 1;
                             }
                             //Technical Panel
                             $interviewpanelnamesemailaddresss = $requi_model->GetInterviewPanelMamesEmailaddress($round_data['interview_panel']);
                             foreach ($interviewpanelnamesemailaddresss as $interviewpanelnamesemailaddress1) {
                                 $mail_arr[$emailCnt]['name'] = $interviewpanelnamesemailaddress1['userfullname'];
                                 $mail_arr[$emailCnt]['email'] = $interviewpanelnamesemailaddress1['emailaddress'];
                                 $emailCnt = $emailCnt + 1;
                             }
                             for ($ii = 0; $ii < count($mail_arr); $ii++) {
                                 $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                                 $view = $this->getHelper('ViewRenderer')->view;
                                 $this->view->emp_name = $mail_arr[$ii]['name'];
                                 $this->view->type = 'InterviewFeedback';
                                 $this->view->requisition_data = $requisition_data_View[0];
                                 $this->view->candidate_details = $cand_data;
                                 $this->view->round_data = $round_data;
                                 $this->view->base_url = $base_url;
                                 $text = $view->render('mailtemplates/requisition.phtml');
                                 $options['subject'] = APPLICATION_NAME . ': Interview feedback';
                                 //$options['header'] = 'Interview feedback';
                                 $options['toEmail'] = $mail_arr[$ii]['email'];
                                 $options['toName'] = $mail_arr[$ii]['name'];
                                 $options['message'] = $text;
                                 sapp_Global::_sendEmail($options, "interviewrounds_feedback", REQUISITIONMODULESENDEMAIL);
                             }
                         }
                         $tableid = $id;
                         $this->view->eventact = 'updated';
                     }
                     $menumodel = new Default_Model_Menu();
                     $objidArr = $menumodel->getMenuObjID('/scheduleinterviews');
                     $objID = $objidArr[0]['id'];
                     $result = sapp_Global::logManager($objID, $actionflag, $loginUserId, $intrvwId);
                     $close = 'close';
                     $this->view->popup = $close;
                     $this->view->ermsg = '';
                 }
             }
         } else {
             $this->view->ermsg = 'nodata';
         }
     } else {
         $messages = $form->getMessages();
         foreach ($messages as $key => $val) {
             foreach ($val as $key2 => $val2) {
                 $msgarray[$key] = $val2;
                 break;
             }
         }
         return $msgarray;
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:InterviewroundsController.php

示例9: updateModelWithFormValidation

 /**
  * @param type $form
  * @param type $model
  * @param type $successMsg
  * @return boolean
  * @throws InvalidArgumentException
  */
 protected function updateModelWithFormValidation($form, $model, $successMsg)
 {
     if ($form->isValid() && $model->update()) {
         if (!empty($successMsg)) {
             $this->flashSession->notice($successMsg);
         }
         return true;
     }
     $m = "";
     foreach ($form->getMessages() as $msg) {
         $m .= $msg . "<br>";
     }
     foreach ($model->getMessages() as $msg) {
         $m .= $msg . "<br>";
     }
     throw new InvalidArgumentException($m);
 }
开发者ID:willmontiel,项目名称:sayvot,代码行数:24,代码来源:ControllerBase.php

示例10: defaultUpdate

 /**
  * 
  * @param type $entity
  * @param type $data
  * @param type $returnPartial
  * @param type $extra
  * @return type
  */
 private function defaultUpdate($entity, $data, $returnPartial = false, $extra = null)
 {
     $this->validateVocation($data);
     $vocation = $this->getEntityManager()->getRepository('Core\\Entity\\Vocation')->find($data['vocation']);
     $entity->setVocation($vocation);
     unset($data['vocation']);
     $entity->hydrate($data, $this->getEntityManager());
     if (!$entity->validate()) {
         throw new Exception(Json::encode($entity->getMessages(), true));
     }
     //manytomany validate manually
     if (!count($entity->getGradingType())) {
         throw new Exception(Json::encode('MISSING_GRADING_TYPES', true));
     }
     return $this->singleResult($entity, $returnPartial, $extra);
 }
开发者ID:parnustk,项目名称:lisbackend,代码行数:24,代码来源:ModuleRepository.php


注:本文中的type::getMessages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。