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


PHP sapp_Global::change_time方法代码示例

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


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

示例1: chkcurrenttimeAction

 public function chkcurrenttimeAction()
 {
     $sel_time = $this->_getParam('sel_time', null);
     $sel_date = $this->_getParam('sel_date', null);
     $now_date = date('Y-m-d');
     $sel_date_obj = new DateTime($sel_date);
     $new_sel_date = $sel_date_obj->format('Y-m-d');
     $greater = 'no';
     if ($new_sel_date == $now_date) {
         $now_time = date("H:i");
         $selected_time = date("H:i", strtotime($sel_time));
         if ($selected_time > $now_time) {
             $greater = 'yes';
         }
     }
     $timeformat = '';
     if ($greater == 'no') {
         $timeformat = sapp_Global::change_time($sel_time, 'view');
     }
     $this->_helper->_json(array('timeformat' => $timeformat, 'greater' => $greater));
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:21,代码来源:IndexController.php

示例2: userlogsearchajaxAction

 public function userlogsearchajaxAction()
 {
     if ($this->getRequest()->getPost()) {
         $field = $this->_request->getParam('byField');
         $searchString = $this->_request->getParam('searchstring');
         switch ($field) {
             case 'userfullname':
                 $where = "cc.userfullname like '%" . $searchString . "%'";
                 break;
             case 'groupname':
                 $groupIds = $this->activitylog_model->getgroupIdByString($searchString);
                 $groupIdCsv = @implode(",", $groupIds);
                 $where = "cc.group_id IN (" . $groupIdCsv . ")";
                 break;
             case 'role':
                 $empRoleIds = $this->activitylog_model->getemproleIdByString($searchString);
                 $empRoleIdCsv = @implode(",", $empRoleIds);
                 $where = "cc.emprole IN (" . $empRoleIdCsv . ")";
                 break;
             case 'emailaddress':
                 $where = "cc.emailaddress like '%" . $searchString . "%'";
                 break;
             case 'logindatetime':
                 $where = "cc.logindatetime like '%" . $searchString . "%'";
                 break;
             case 'empipaddress':
                 $where = "cc.empipaddress like '%" . $searchString . "%'";
                 break;
         }
         $userlog = $this->activitylog_model->getUserLogManagerDataSearch(1, $this->perPage, $where);
         $userArray = array();
         $empRoleArray = array();
         $groupArray = array();
         if (!empty($userlog)) {
             foreach ($userlog as $key => $curr) {
                 if (!in_array($curr['userid'], $userArray)) {
                     array_push($userArray, $curr['userid']);
                 }
                 if (!in_array($curr['emprole'], $empRoleArray)) {
                     array_push($empRoleArray, $curr['emprole']);
                 }
                 if (!in_array($curr['group_id'], $groupArray)) {
                     array_push($groupArray, $curr['group_id']);
                 }
             }
             $userNameArray = $this->activitylog_model->getuserNamesByIds($userArray);
             $roleNameArray = $this->activitylog_model->getEmpRoleNamesByIds($empRoleArray);
             $groupNameArray = $this->activitylog_model->getGroupNamesByIds($groupArray);
             $html = '';
             foreach ($userlog as $user) {
                 $userName = isset($userNameArray[$user['userid']]) ? $userNameArray[$user['userid']] : "";
                 $groupName = isset($groupNameArray[$user['group_id']]) ? $groupNameArray[$user['group_id']] : "";
                 $roleName = isset($roleNameArray[$user['emprole']]) ? $roleNameArray[$user['emprole']] : "";
                 $imageUrl = '';
                 $imagetag = '';
                 if ($user['profileimg']) {
                     $imageUrl = DOMAIN . 'public/uploads/preview/' . $user['profileimg'];
                     $imagetag = '<img src="' . $imageUrl . '" height="30" width="30">';
                 }
                 $html .= '<div class="rowDiv"><div class="cellDiv">' . $imagetag . $user['userfullname'] . ' (' . $user['employeeId'] . ')</div><div class="cellDiv">' . $groupName . '</div><div class="cellDiv">' . $roleName . '</div><div class="cellDiv">' . $user['emailaddress'] . '</div><div class="cellDiv">' . sapp_Global::change_date($user['logindatetime'], 'view') . ' at ' . sapp_Global::change_time($user['logindatetime'], 'view') . '</div><div class="cellDiv  lastCell">' . $user['empipaddress'] . '</div>';
             }
             echo $html;
             exit;
         } else {
             echo 'No matches found';
             exit;
         }
     }
 }
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:69,代码来源:ActivitylogController.php

示例3: format1

    public static function format1($url = '')
    {
        try {
            $widgetsModel = new Default_Model_Widgets();
            $format1 = $widgetsModel->format1();
            if (!empty($url)) {
                $url = substr($url, 1);
            }
            // Get login user data
            $auth = Zend_Auth::getInstance();
            $session = $auth->getStorage()->read();
            $loginUserId = $session->id;
            $login_user_name = $session->userfullname;
            $login_user_profile_image = $session->profileimg;
            // Get job title name
            if ($session->emprole == 1) {
                $job_title_name = "Super Admin";
            } else {
                $result = $widgetsModel->getJobTitleName($session->jobtitle_id);
                $job_title_name = $result["jobtitlename"];
            }
            $login_user_name1 = strlen($login_user_name) > 13 ? substr($login_user_name, 0, 13) . '..' : $login_user_name;
            $job_title = strlen($job_title_name) > 13 ? substr($job_title_name, 0, 13) . '..' : $job_title_name;
            if (empty($format1)) {
                $htmlContent = '<div id="format1_div" class="interview_shed_block no_interview_shed_block" >
					<div class="left_block_shed">
						<div class="users_left_list_div users_list">
							<span class="values">
								<div class="profile_img">
									<img src="' . DOMAIN . 'public/uploads/profile/' . $login_user_profile_image . '" width="80px" height="80px" onerror=\'this.src="' . DOMAIN . 'public/media/images/default-profile-pic.jpg"\'>
								</div> 
							</span>
							<div class="member_name" title="' . $login_user_name . '">' . $login_user_name1 . '</div>		
							<div class="member_jname" title="' . $job_title_name . '">' . $job_title . '</div>
						</div>
					</div>
			  <div class="interview_shed_box" style="display:none;"><h4><div>Interview Schedules, <span>' . date("D j, M Y") . '</span></div> ';
                $htmlContent .= "<div class='no_interview'>No interviews scheduled for today.</div> </h4>";
            } else {
                $htmlContent = '<div id="format1_div" class="interview_shed_block" >
					<div class="left_block_shed">
						<div class="users_left_list_div users_list">
							<span class="values">
								<div class="profile_img">
									<img src="' . DOMAIN . 'public/uploads/profile/' . $login_user_profile_image . '" width="80px" height="80px" onerror=\'this.src="' . DOMAIN . 'public/media/images/default-profile-pic.jpg"\'>
								</div> 
							</span>
							<div class="member_name" title="' . $login_user_name . '">' . $login_user_name1 . '</div>		
							<div class="member_jname" title="' . $job_title_name . '">' . $job_title . '</div>
						</div>
						<h4><div>Interview Schedules</div><span>' . date("D j, M Y") . '</span></h4>
					</div>
					<div class="interview_shed_box" style="display:none;">';
                if (!empty($url)) {
                    $htmlContent .= '<div class="box_link view_link"><a href="' . BASE_URL . $url . '" >All</a></div>';
                }
                $htmlContent .= '<ul>';
                foreach ($format1 as $interview_scheduled) {
                    $candidate_id = $interview_scheduled['id'];
                    $candidate_name = $interview_scheduled['candidate_name'];
                    $interview_type = $interview_scheduled['interview_mode'];
                    $interview_time = sapp_Global::change_time($interview_scheduled['interview_time'], 'interview_time');
                    $contact_number = $interview_scheduled['contact_number'];
                    $interview_id = $interview_scheduled['interview_id'];
                    $emailid = $interview_scheduled['emailid'];
                    $cand_resume = $interview_scheduled['cand_resume'];
                    $candidate_name_shrt = strlen($candidate_name) > 10 ? substr($candidate_name, 0, 10) : $candidate_name;
                    $htmlContent .= '<li>
					 <span class="emp_lable me_label">Candidate</span>
					 <span class="can_name_lable" title="' . $candidate_name . '">' . $candidate_name_shrt . '(' . $interview_type . '),</span>
					 <span class="txt_lable">At:</span>
					 <span class="txt_block">' . $interview_time . ',</span>';
                    if (!empty($contact_number)) {
                        $htmlContent .= '<div style="display: inline-block;"><span class="txt_lable">Phone:</span>
					 <span class="txt_block">' . $contact_number . ',</span></div>';
                    }
                    if (!empty($emailid)) {
                        $htmlContent .= '<div style="display: inline-block;"><span class="txt_lable">Email:</span>
					 <span class="txt_block">' . $emailid . ',</span></div>';
                    }
                    $htmlContent .= '<span class="emp_resume_link"><a href="' . BASE_URL . 'scheduleinterviews/downloadresume/id/' . $candidate_id . '/int_id/' . $interview_id . '" title="' . $cand_resume . '">';
                    if (!empty($cand_resume)) {
                        $htmlContent .= 'Resume';
                    } else {
                        $htmlContent .= 'View';
                    }
                    $htmlContent .= '</a></span></li>';
                }
                $htmlContent .= '</ul>';
            }
            return $htmlContent .= '</div><div class="clear"></div></div>';
        } catch (Expection $e) {
            echo $e->getMessage();
        }
    }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:95,代码来源:Global.php

示例4: save

 /**
  * 
  * @param type $form
  * @param type $data
  * @return type
  */
 public function save($form, $data)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $cand_model = new Default_Model_Candidatedetails();
     $requi_model = new Default_Model_Requisition();
     $interview_model = new Default_Model_Interviewdetails();
     $user_model = new Default_Model_Usermanagement();
     $interview_round_model = new Default_Model_Interviewrounddetails();
     $form->round_status->setRequired(false);
     $form->interview_feedback->setRequired(false);
     $cand_status = $this->_getParam('cand_status', null);
     $interview_status = $this->_getParam('interview_status', null);
     $flag = 'true';
     if ($interview_status == 'On hold' && $cand_status != 'On hold') {
         $msgarray['statusErr'] = 'Since the interview status is onhold, the candidate status should be onhold.';
         $flag = 'false';
     }
     if ($interview_status == 'Completed' && ($cand_status != 'Disqualified' && $cand_status != 'Shortlisted')) {
         $msgarray['statusErr'] = 'Since interview status is completed, the candidate status can be either disqualified or shortlisted.';
         $flag = 'false';
     }
     if ($interview_status == 'In process' && ($cand_status == 'Disqualified' || $cand_status == 'Shortlisted')) {
         $msgarray['statusErr'] = 'Since the interview status is in process, the candidate cannot be shortlisted or disqualified.';
         $flag = 'false';
     }
     if ($form->isValid($this->_request->getPost()) && $flag != 'false') {
         $id = $this->_getParam('id', null);
         $requisition_id = $this->_getParam('req_id', null);
         $candidate_id = $this->_getParam('candidate_name', null);
         $interviewer_ids = $this->_getParam('interviewer_id', null);
         $interview_panel = implode(",", $interviewer_ids);
         $interviewer_id = 0;
         foreach ($interviewer_ids as $interview) {
             $interviewer_id = $interview;
             break;
         }
         $int_location = $this->_getParam('int_location', null);
         $country = $this->_getParam('country', null);
         $state = $this->_getParam('state', null);
         $city = $this->_getParam('city', null);
         $interview_mode = $this->_getParam('interview_mode', null);
         $interview_type_details = $this->_getParam('interview_Type_Details', null);
         $interview_time = $this->_getParam('interview_time', null);
         $interview_date = $this->_getParam('interview_date', null);
         $interview_round = $this->_getParam('interview_round', null);
         if (!isset($candidate_id)) {
             $candidate_id = $data['id'];
         }
         if (empty($data)) {
             $getExistingCandidateRecord = $interview_model->getCandidateInInterviewProcess(trim($candidate_id));
             if ($getExistingCandidateRecord > 0) {
                 $this->_helper->FlashMessenger()->setNamespace('success')->addMessage('Interview already scheduled for this candidate.');
                 $this->_redirect('/scheduleinterviews');
             }
         }
         if (empty($data)) {
             $idata = array('req_id' => $requisition_id, 'candidate_id' => trim($candidate_id), 'interview_status' => trim($interview_status), 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $idata['interview_status'] = 'In process';
             $iwhere = "";
             $actionflag = 1;
             $iresult = $interview_model->SaveorUpdateInterviewData($idata, $iwhere);
             if ($id == '') {
                 $tableid = $iresult;
             }
             if ($iresult != '') {
                 $irdata = array('interview_id' => $iresult, 'req_id' => $requisition_id, 'candidate_id' => $candidate_id, 'interviewer_id' => $interviewer_id, 'interview_time' => sapp_Global::change_time(trim($interview_time), 'database'), 'interview_date' => sapp_Global::change_date($interview_date, 'database'), 'interview_mode' => $interview_mode, 'interview_mode_details' => $interview_type_details, 'interview_round_number' => 1, 'interview_round' => trim($interview_round), 'int_location' => trim($int_location), 'int_country' => trim(intval($country)), 'int_state' => trim(intval($state)), 'int_city' => trim(intval($city)), 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"), 'interview_panel' => $interview_panel);
                 $ir_result = $interview_round_model->SaveorUpdateInterviewroundData($irdata, '');
                 $requisition_data = $requi_model->getRequisitionDataById($requisition_id);
                 $cand_data = $cand_model->getCandidateById($candidate_id);
                 $hrgroupemail = $requi_model->getgroupemailid("REQ_HR", $requisition_data["department_id"]);
                 $requisition_data = $requi_model->getrequisitiondetails($requisition_id);
                 $requesteremailaddress = $requi_model->getemployeeemailaddress($requisition_data["createdby"]);
                 $reportingmanageremailaddress = $requi_model->getemployeeemailaddress($requisition_data["reporting_id"]);
                 $mail_arr = array('HR' => $hrgroupemail["groupEmail"], $requesteremailaddress['userfullname'] => $requesteremailaddress['emailaddress'], $reportingmanageremailaddress['userfullname'] => $reportingmanageremailaddress['emailaddress']);
                 $loginuser_person_data = $user_model->getUserDataById($loginUserId);
                 $interview_panel = $interview_panel . "," . $loginUserId;
                 $interviewpanelnamesemailaddresss = $requi_model->GetInterviewPanelMamesEmailaddress($interview_panel);
                 /* $emailtemp = array();
                    $nametemp = array();
                    foreach ($interviewpanelnamesemailaddress as $row) {
                    array_push($emailtemp, $row['emailaddress']);
                    array_push($nametemp, $row['userfullname']);
                    }
                    $email = implode(";", $emailtemp);
                    $ename = implode(";", $nametemp); */
                 $cal_unique_id = $this->getCalendarUniqueID();
                 foreach ($interviewpanelnamesemailaddresss as $interviewpanelnamesemailaddress) {
                     $description = "Meeting From : " . $from_name . "\r\n" . "Candidate Name : " . $cand_data['candidate_name'] . "\r\n" . "Interview Type : " . $interview_mode . "\r\n" . "Interview Location : " . $int_location . "\r\n" . "Interview Date : " . $interview_date . "\r\n" . "Interview Time : " . sapp_Global::change_time($interview_time, 'view') . "\r\n" . " " . " " . "\r\n";
                     /* $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                                               $options['subject'] = APPLICATION_NAME . ': Interview schedule';
                                               $options['header'] = 'Interview schedule';
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:ScheduleinterviewsController.php

示例5: editAction


//.........这里部分代码省略.........
                                         if (count($buResources) <= 0) {
                                             $validationMsg['message'] = 'Please select Recipients.';
                                             $validationMsg['msgtype'] = 'error';
                                             $this->view->validationMsg = $validationMsg;
                                             $bFlag = false;
                                         } else {
                                             if (strlen(trim($meetingtitle)) <= 0) {
                                                 $validationMsg['message'] = 'Title cannot be empty.';
                                                 $validationMsg['msgtype'] = 'error';
                                                 $this->view->validationMsg = $validationMsg;
                                                 $bFlag = false;
                                             } else {
                                                 if (strlen(trim($meetingnotes)) <= 0) {
                                                     $validationMsg['message'] = 'Description cannot be empty.';
                                                     $validationMsg['msgtype'] = 'error';
                                                     $this->view->validationMsg = $validationMsg;
                                                     $bFlag = false;
                                                 } else {
                                                     if ($deltaOwnerResource <= 0) {
                                                         $validationMsg['message'] = 'Please select Delta Owner.';
                                                         $validationMsg['msgtype'] = 'error';
                                                         $this->view->validationMsg = $validationMsg;
                                                         $bFlag = false;
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                     if ($bFlag) {
                         $mpolicydata = array('roomid' => trim($deltameetingrooms), 'blockmeetingdate' => trim($meetingDate), 'blockmeetingstarttime' => sapp_Global::change_time(trim($meetingStartTime) . 'database'), 'blockmeetingendtime' => sapp_Global::change_time(trim($meetingEndTime), 'database'), 'businessunit' => implode(',', $projectBU), 'createdby' => trim($loginUserId), 'title' => trim($meetingtitle), 'clientrecipients' => trim($clientrecipients), 'deltarecipients' => implode(',', $buResources), 'createddate' => gmdate("Y-m-d H:i:s"), 'description' => trim($meetingnotes), 'deltaowner' => trim($deltaOwnerResource), 'clientowner' => trim($clientOwnerResource), 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                         $where = array('id = ?' => $id);
                         $Id = $meetingRoom->SaveorUpdateData($mpolicydata, $where);
                         $this->sendInvite(implode(',', $buResources), $loginUserId, trim($meetingDate), trim($meetingStartTime), trim($meetingEndTime), $id, $meetingnotes, $meetingtitle);
                         $menuID = 99;
                         sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                         $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Project details successfully updated."));
                         /* } else {
                            $this->_helper->getHelper("FlashMessenger")->addMessage(array("error" => "Error while updating project details."));
                            } */
                         $trDb->commit();
                         $this->_redirect('/meetingroomblock');
                     }
                 } catch (Exception $e) {
                     $trDb->rollBack();
                     $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Something went wrong, please try again later."));
                     $this->_redirect('/meetingroomblock');
                 }
             }
         } else {
             //Insert code
             $actionflag = 1;
             if ($this->getRequest()->getPost()) {
                 #$result = $this->save($form, $policydata);
                 $trDb = Zend_Db_Table::getDefaultAdapter();
                 // starting transaction
                 $trDb->beginTransaction();
                 try {
                     $bFlag = true;
                     //Meeting Room Details
                     $deltameetingrooms = $this->_getParam('deltameetingrooms', null);
                     $meetingDate = $this->_getParam('meetingDate', null);
                     $meetingStartTime = $this->_getParam('meetingStartTime', null);
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:67,代码来源:MeetingroomblockController.php

示例6: save

 public function save($form, $data)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $cand_model = new Default_Model_Candidatedetails();
     $requi_model = new Default_Model_Requisition();
     $interview_model = new Default_Model_Interviewdetails();
     $user_model = new Default_Model_Usermanagement();
     $interview_round_model = new Default_Model_Interviewrounddetails();
     $cand_status = $this->_getParam('cand_status', null);
     $interview_status = $this->_getParam('interview_status', null);
     $flag = 'true';
     if ($interview_status == 'On hold' && $cand_status != 'On hold') {
         $msgarray['statusErr'] = 'Since the interview status is onhold, the candidate status should be onhold.';
         $flag = 'false';
     }
     if ($interview_status == 'Completed' && ($cand_status != 'Disqualified' && $cand_status != 'Shortlisted')) {
         $msgarray['statusErr'] = 'Since interview status is completed, the candidate status can be either disqualified or shortlisted.';
         $flag = 'false';
     }
     if ($interview_status == 'In process' && ($cand_status == 'Disqualified' || $cand_status == 'Shortlisted')) {
         $msgarray['statusErr'] = 'Since the interview status is in process, the candidate cannot be shortlisted or disqualified.';
         $flag = 'false';
     }
     if ($form->isValid($this->_request->getPost()) && $flag != 'false') {
         $id = $this->_getParam('id', null);
         $requisition_id = $this->_getParam('req_id', null);
         $candidate_id = $this->_getParam('candidate_name', null);
         $interviewer_id = $this->_getParam('interviewer_id', null);
         $int_location = $this->_getParam('int_location', null);
         $country = $this->_getParam('country', null);
         $state = $this->_getParam('state', null);
         $city = $this->_getParam('city', null);
         $interview_mode = $this->_getParam('interview_mode', null);
         $interview_time = $this->_getParam('interview_time', null);
         $interview_date = $this->_getParam('interview_date', null);
         $interview_round = $this->_getParam('interview_round', null);
         if (!isset($candidate_id)) {
             $candidate_id = $data['id'];
         }
         if (empty($data)) {
             $getExistingCandidateRecord = $interview_model->getCandidateInInterviewProcess(trim($candidate_id));
             if ($getExistingCandidateRecord > 0) {
                 $this->_helper->FlashMessenger()->setNamespace('success')->addMessage('Interview already scheduled for this candidate.');
                 $this->_redirect('/scheduleinterviews');
             }
         }
         if (empty($data)) {
             $idata = array('req_id' => $requisition_id, 'candidate_id' => trim($candidate_id), 'interview_status' => trim($interview_status), 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $idata['interview_status'] = 'In process';
             $iwhere = "";
             $actionflag = 1;
             $iresult = $interview_model->SaveorUpdateInterviewData($idata, $iwhere);
             if ($id == '') {
                 $tableid = $iresult;
             }
             if ($iresult != '') {
                 $irdata = array('interview_id' => $iresult, 'req_id' => $requisition_id, 'candidate_id' => $candidate_id, 'interviewer_id' => $interviewer_id, 'interview_time' => sapp_Global::change_time(trim($interview_time), 'database'), 'interview_date' => sapp_Global::change_date($interview_date, 'database'), 'interview_mode' => $interview_mode, 'interview_round_number' => 1, 'interview_round' => trim($interview_round), 'int_location' => trim($int_location), 'int_country' => trim(intval($country)), 'int_state' => trim(intval($state)), 'int_city' => trim(intval($city)), 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
                 $ir_result = $interview_round_model->SaveorUpdateInterviewroundData($irdata, '');
                 $requisition_data = $requi_model->getRequisitionDataById($requisition_id);
                 $cand_data = $cand_model->getCandidateById($candidate_id);
                 $report_person_data = $user_model->getUserDataById($interviewer_id);
                 $mail_arr = array('HR' => defined('REQ_HR_' . $requisition_data['businessunit_id']) ? constant('REQ_HR_' . $requisition_data['businessunit_id']) : "", $report_person_data['userfullname'] => $report_person_data['emailaddress']);
                 foreach ($mail_arr as $ename => $email) {
                     $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                     $view = $this->getHelper('ViewRenderer')->view;
                     $this->view->emp_name = $ename;
                     $this->view->base_url = $base_url;
                     $this->view->candidate_name = $cand_data['candidate_name'];
                     $this->view->interview_type = $interview_mode;
                     $this->view->interview_location = $int_location;
                     $this->view->interview_date = $interview_date;
                     $this->view->interview_time = sapp_Global::change_time($interview_time, 'view');
                     $this->view->requisition_code = $requisition_data['requisition_code'];
                     $text = $view->render('mailtemplates/interviewrounds.phtml');
                     $options['subject'] = APPLICATION_NAME . ': Interview schedule';
                     $options['header'] = 'Interview schedule';
                     $options['toEmail'] = $email;
                     $options['toName'] = $ename;
                     $options['message'] = $text;
                     $options['cron'] = 'yes';
                     sapp_Global::_sendEmail($options);
                 }
                 $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;
//.........这里部分代码省略.........
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:101,代码来源:ScheduleinterviewsController.php

示例7: save

 public function save($form)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $requi_model = new Default_Model_Requisition();
     $round_model = new Default_Model_Interviewrounddetails();
     $intrvwModel = new Default_Model_Interviewdetails();
     $user_model = new Default_Model_Usermanagement();
     $cand_model = new Default_Model_Candidatedetails();
     $intrvwId = $this->getRequest()->getParam('unitId');
     if ($form->isValid($this->_request->getPost())) {
         $reqData = $intrvwModel->getReqByintrvwID($intrvwId);
         if (!empty($reqData)) {
             $reqId = $reqData['req_id'];
             $candid = $reqData['candidate_id'];
             $id = $this->getRequest()->getParam('id');
             $interview_id = $intrvwId;
             $interviewer_id = $this->getRequest()->getParam('interviewer_id');
             $interview_round = $this->getRequest()->getParam('interview_round');
             $interview_mode = $this->getRequest()->getParam('interview_mode');
             $int_location = $this->getRequest()->getParam('int_location');
             $interview_time = $this->getRequest()->getParam('interview_time');
             $interview_date = $this->getRequest()->getParam('interview_date');
             $interview_feedback = $this->getRequest()->getParam('interview_feedback');
             $interview_comments = $this->getRequest()->getParam('interview_comments');
             $round_status = $this->getRequest()->getParam('round_status', null);
             $hid_round_status = $this->getRequest()->getParam('hid_round_status', null);
             $data = array('candidate_id' => $candid, 'req_id' => $reqId, 'interview_id' => trim($intrvwId), 'interviewer_id' => trim($interviewer_id), 'interview_mode' => trim($interview_mode), 'int_location' => trim($int_location), 'int_country' => trim($this->_getParam('country', null)), 'int_state' => trim($this->_getParam('state', null)), 'int_city' => trim($this->_getParam('city', null)), 'interview_time' => sapp_Global::change_time(trim($interview_time), 'database'), 'interview_date' => sapp_Global::change_date(trim($interview_date), 'database'), 'interview_round' => trim($interview_round), 'interview_feedback' => trim($interview_feedback), 'interview_comments' => trim($interview_comments), 'round_status' => trim($round_status), 'isactive' => 1, 'createdby' => trim($loginUserId), 'modifiedby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"), 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $roundnumberData = $intrvwModel->getinterviewroundnumber($interview_id);
             $roundnumber = $roundnumberData['interview_round_number'];
             $data['interview_round_number'] = $roundnumber + 1;
             $where = "";
             $actionflag = 1;
             if ($id != '') {
                 unset($data['createdby']);
                 unset($data['createdon']);
                 unset($data['isactive']);
                 unset($data['interview_round_number']);
                 $where = array("id = " . $id);
                 $tableid = $id;
                 $actionflag = 2;
                 if ($hid_round_status != '') {
                     $data = array();
                     $data['round_status'] = trim($round_status);
                 }
             }
             if ($loginuserGroup == MANAGER_GROUP || $loginuserGroup == SYSTEMADMIN_GROUP || $loginuserGroup == EMPLOYEE_GROUP || ($loginuserGroup == HR_GROUP || $loginuserGroup == MANAGEMENT_GROUP) && $interviewer_id == $loginUserId) {
                 unset($data['interviewer_id']);
                 unset($data['interview_mode']);
                 unset($data['int_location']);
                 unset($data['int_country']);
                 unset($data['int_state']);
                 unset($data['int_city']);
                 unset($data['interview_time']);
                 unset($data['interview_date']);
                 unset($data['interview_round']);
             }
             $result = $round_model->SaveorUpdateInterviewroundData($data, $where);
             if ($id == '') {
                 //start of mailing
                 $requisition_data = $requi_model->getRequisitionDataById($reqId);
                 $cand_data = $cand_model->getCandidateById($candid);
                 $report_person_data = $user_model->getUserDataById($interviewer_id);
                 $mail_arr = array('HR' => defined('REQ_HR_' . $requisition_data['businessunit_id']) ? constant('REQ_HR_' . $requisition_data['businessunit_id']) : "", $report_person_data['userfullname'] => $report_person_data['emailaddress']);
                 foreach ($mail_arr as $ename => $email) {
                     $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                     $view = $this->getHelper('ViewRenderer')->view;
                     $this->view->emp_name = $ename;
                     $this->view->base_url = $base_url;
                     $this->view->candidate_name = $cand_data['candidate_name'];
                     $this->view->interview_type = $interview_mode;
                     $this->view->interview_location = $int_location;
                     $this->view->interview_date = $interview_date;
                     $this->view->interview_time = sapp_Global::change_time($interview_time, 'view');
                     $this->view->requisition_code = $requisition_data['requisition_code'];
                     $text = $view->render('mailtemplates/interviewrounds.phtml');
                     $options['subject'] = APPLICATION_NAME . ': Interview schedule';
                     $options['header'] = 'Interview schedule';
                     $options['toEmail'] = $email;
                     $options['toName'] = $ename;
                     $options['message'] = $text;
                     $options['cron'] = 'yes';
                     sapp_Global::_sendEmail($options);
                 }
                 //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);
                     $cand_data = $cand_model->getCandidateById($candid);
                     $round_data = $round_model->getSingleRoundData($id);
                     $report_person_data = $user_model->getUserDataById($loginUserId);
                     $mail_arr = array('HR' => defined('REQ_HR_' . $requisition_data['businessunit_id']) ? constant('REQ_HR_' . $requisition_data['businessunit_id']) : "", $report_person_data['userfullname'] => $report_person_data['emailaddress']);
                     foreach ($mail_arr as $ename => $email) {
                         $base_url = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
                         $view = $this->getHelper('ViewRenderer')->view;
//.........这里部分代码省略.........
开发者ID:sura2k,项目名称:sentrifugo,代码行数:101,代码来源:InterviewroundsController.php

示例8: save

 /**
  * 
  * @param type $form
  * @return type
  */
 public function save($form)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
     }
     $requi_model = new Default_Model_Requisition();
     $round_model = new Default_Model_Interviewrounddetails();
     $round_reschedule_model = new Default_Model_Interviewroundrescheduledetails();
     $intrvwModel = new Default_Model_Interviewdetails();
     $user_model = new Default_Model_Usermanagement();
     $cand_model = new Default_Model_Candidatedetails();
     $roundId = $this->getRequest()->getParam('id');
     $intrvwId = $this->getRequest()->getParam('unitId');
     if ($form->isValid($this->_request->getPost())) {
         $reqData = $intrvwModel->getReqByintrvwID($intrvwId);
         if (!empty($reqData)) {
             $reqId = $reqData['req_id'];
             $candid = $reqData['candidate_id'];
             $id = $this->getRequest()->getParam('id');
             $interviewrnd_id = $intrvwId;
             $interviewer_id1 = $this->getRequest()->getParam('interviewer_id');
             if (is_array($interviewer_id1)) {
                 $interview_id = $interviewer_id1[0];
             } else {
                 $interview_id = $interviewer_id1;
             }
             $interview_round = $this->getRequest()->getParam('interview_round');
             $interview_mode = $this->getRequest()->getParam('interview_mode');
             $interview_Type_Details = $this->getRequest()->getParam('interview_Type_Details');
             $int_location = $this->getRequest()->getParam('int_location');
             $interview_time = $this->getRequest()->getParam('interview_time');
             $interview_date = $this->getRequest()->getParam('interview_date');
             $interview_feedback = $this->getRequest()->getParam('interview_feedback');
             $interview_comments = $this->getRequest()->getParam('interview_comments');
             $round_status = $this->getRequest()->getParam('round_status', null);
             $hid_round_status = $this->getRequest()->getParam('hid_round_status', null);
             if (is_array($interviewer_id1)) {
                 $interview_panel = implode(",", $this->getRequest()->getParam('interviewer_id', null));
             } else {
                 $interview_id = $interviewer_id1;
             }
             if ($id != null) {
                 //get Feedback Matrix values from Request
                 $requisitionSkillMatrix = $round_model->getRequisitionSkillMatrix($id);
                 $currRowCount = 0;
                 foreach ($requisitionSkillMatrix as $skill) {
                     $unqCode = $skill['uniquecode'];
                     $skillSelValue = $this->getRequest()->getParam($unqCode, null);
                     if ($skillSelValue != null) {
                         $requisitionSkillMatrix[$currRowCount]['Rating'] = $skillSelValue;
                     }
                     $currRowCount++;
                 }
             }
             //check if Skill matrix is filled as per business logic
             $skillsmatrixvalidate = true;
             if ($round_status == "Schedule for next round" || $round_status == "Qualified" || $round_status == "Selected" || $round_status == "Disqualified") {
                 if ($interview_round == "Technical") {
                     foreach ($requisitionSkillMatrix as $skill) {
                         if ($skill['Category'] == "Technical" && ($skill['Rating'] <= 0 || $skill['Rating'] == null)) {
                             $skillsmatrixvalidate = false;
                             break;
                         }
                     }
                 }
                 /* else if ($interview_round == "Managerial") {
                    foreach ($requisitionSkillMatrix as $skill) {
                    if ($skill['Category'] == "Non-Technical" && ($skill['Rating'] <= 0 || $skill['Rating'] == null)) {
                    $skillsmatrixvalidate = false;
                    break;
                    }
                    }
                    } */
             }
             if ($skillsmatrixvalidate != true) {
                 $alertMsg = ($interview_round == "Managerial" ? 'Non-Technical' : 'Technical') . " Skill Rating is Mandatory...!";
                 echo '<script language="javascript">';
                 echo 'alert("' . $alertMsg . '")';
                 echo '</script>';
             } else {
                 // for Interview Reschedule & Cancellations
                 if ($round_status == "Re-Scheduled-Interviewer Request" || $round_status == "Re-Scheduled-Candidate Request" || $round_status == "Cancelled") {
                     $round_data = $round_model->getSingleRoundData($id);
                     $cand_data = $cand_model->getCandidateById($candid);
                     $requisition_data = $requi_model->getRequisitionDataById($reqId);
                     $interviewpanelnamesemailaddress = $requi_model->GetInterviewPanelMamesEmailaddress($round_data['interview_panel']);
                     $loginuser_person_data = $user_model->getUserDataById($loginUserId);
                     $data = array('interviewround_id' => $id, 'interview_id' => trim($intrvwId), 'req_id' => $reqId, 'candidate_id' => $candid, 'interview_location_old' => $round_data['int_location'], 'interview_round_old' => $round_data['interview_round'], 'interview_date_old' => $round_data['interview_date'], 'interview_time_old' => $round_data['interview_time'], 'interview_mode_old' => $round_data['interview_mode'], 'interview_mode_details_old' => $round_data['interview_mode_details'], 'interview_location' => $int_location, 'interview_round' => $interview_round, 'interview_time' => sapp_Global::change_time(trim($interview_time), 'database'), 'interview_date' => sapp_Global::change_date(trim($interview_date), 'database'), 'interview_mode' => $interview_mode, 'interview_mode_details' => $interview_Type_Details, 'interview_feedback' => trim($interview_feedback), 'round_status' => trim($round_status), 'createdby' => trim($loginUserId), 'createddate' => gmdate("Y-m-d H:i:s"));
                     $result1 = $round_reschedule_model->SaveorUpdateInterviewroundData($data, "");
                     $intRound_where = array("id = " . $id);
                     if ($round_status == "Cancelled") {
                         $data_intRound = array('int_location' => $int_location, 'interview_round' => $interview_round, 'interview_time' => sapp_Global::change_time(trim($interview_time), 'database'), 'interview_date' => sapp_Global::change_date(trim($interview_date), 'database'), 'interview_mode' => $interview_mode, 'interview_mode_details' => $interview_Type_Details, 'modifiedby' => trim($loginUserId), 'modifieddate' => gmdate("Y-m-d H:i:s"), 'isactive' => 0);
                     } else {
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:InterviewroundsController.php


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