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


PHP Default_Model_Users::getUserDetailsByID方法代码示例

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


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

示例1: _checkstatus

 public static function _checkstatus()
 {
     $auth = Zend_Auth::getInstance();
     $usersmodel = new Default_Model_Users();
     $flag = 'all';
     $isactivestatus = 1;
     $temporarylock = 0;
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         if ($loginUserId) {
             $loggedinEmpId = $usersmodel->getUserDetailsByID($loginUserId, $flag);
         }
     }
     if (!empty($loggedinEmpId)) {
         $isactivestatus = $loggedinEmpId[0]['isactive'];
         $temporarylock = $loggedinEmpId[0]['emptemplock'];
     }
     if ($isactivestatus == 1 && $temporarylock == 0) {
         return 'true';
     } else {
         return 'false';
     }
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:23,代码来源:Global.php

示例2: indexAction

 public function indexAction()
 {
     $editPrivilege = "";
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $loginUserId;
     $data = array();
     $tabName = "employee";
     $callval = $this->getRequest()->getParam('call');
     if ($callval == 'ajaxcall') {
         $this->_helper->layout->disableLayout();
     }
     $employeeform = new Default_Form_employee();
     try {
         if ($id != '' && $id > 0) {
             $employeeModal = new Default_Model_Employee();
             $usersModel = new Default_Model_Users();
             $employmentstatusModel = new Default_Model_Employmentstatus();
             $busineesUnitModel = new Default_Model_Businessunits();
             $deptModel = new Default_Model_Departments();
             $role_model = new Default_Model_Roles();
             $user_model = new Default_Model_Usermanagement();
             $candidate_model = new Default_Model_Candidatedetails();
             $jobtitlesModel = new Default_Model_Jobtitles();
             $positionsmodel = new Default_Model_Positions();
             $prefix_model = new Default_Model_Prefix();
             $data = $employeeModal->getsingleEmployeeData($id);
             if ($data == 'norows') {
                 $this->view->rowexist = "norows";
                 $this->view->empdata = "";
             } else {
                 if (!empty($data)) {
                     $this->view->rowexist = "rows";
                     $this->view->empdata = $data;
                     $elements = $employeeform->getElements();
                     if (count($elements) > 0) {
                         foreach ($elements as $key => $element) {
                             if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                                 $element->setAttrib("disabled", "disabled");
                             }
                         }
                     }
                     $employeeform->removeElement("submit");
                     $data = $data[0];
                     if ($loginUserId == SUPERADMIN) {
                         //If login user is superAdmin..... role is 'Super Admin'.
                         $employeeform->emprole->addMultiOption('superAdmin', 'Super Admin');
                     } else {
                         $roles_arr = $role_model->getRolesDataByID($data['emprole']);
                         if (sizeof($roles_arr) > 0) {
                             $employeeform->emprole->addMultiOption($roles_arr[0]['id'] . '_' . $roles_arr[0]['group_id'], utf8_encode($roles_arr[0]['rolename']));
                         }
                     }
                     $prefix_data = $prefix_model->getsinglePrefixData($data['prefix_id']);
                     if ($prefix_data != 'norows') {
                         $prefix_data = $prefix_data[0];
                         $employeeform->prefix_id->addMultiOption($prefix_data['id'], $prefix_data['prefix']);
                     }
                     $referedby_options = $user_model->getRefferedByForUsers();
                     /* Code for reporting manager dropdown */
                     $reportingManagerData = $usersModel->getUserDetailsByID($data['reporting_manager']);
                     if (!empty($reportingManagerData)) {
                         $employeeform->reporting_manager->addMultiOption($reportingManagerData[0]['id'], $reportingManagerData[0]['userfullname']);
                     }
                     $employmentStatusData = $employmentstatusModel->getempstatuslist();
                     if (sizeof($employmentStatusData) > 0) {
                         $employeeform->emp_status_id->addMultiOption('', 'Select a Employment Status');
                         foreach ($employmentStatusData as $employmentStatusres) {
                             $employeeform->emp_status_id->addMultiOption($employmentStatusres['workcodename'], $employmentStatusres['statusname']);
                         }
                     }
                     $businessunitData = $busineesUnitModel->getDeparmentList();
                     if (sizeof($businessunitData) > 0) {
                         $employeeform->businessunit_id->addMultiOption('0', 'No Business Unit');
                         foreach ($businessunitData as $businessunitres) {
                             $employeeform->businessunit_id->addMultiOption($businessunitres['id'], $businessunitres['unitname']);
                         }
                     }
                     $departmentsData = $deptModel->getDepartmentList($data['businessunit_id']);
                     if (sizeof($departmentsData) > 0) {
                         $employeeform->department_id->addMultiOption('', 'Select a Department');
                         foreach ($departmentsData as $departmentsres) {
                             $employeeform->department_id->addMultiOption($departmentsres['id'], $departmentsres['deptname']);
                         }
                     }
                     $jobtitleData = $jobtitlesModel->getJobTitleList();
                     if (sizeof($jobtitleData) > 0) {
                         $employeeform->jobtitle_id->addMultiOption('', 'Select a Job Title');
                         foreach ($jobtitleData as $jobtitleres) {
                             $employeeform->jobtitle_id->addMultiOption($jobtitleres['id'], $jobtitleres['jobtitlename']);
                         }
                     }
                     $positionlistArr = $positionsmodel->getPositionList($data['jobtitle_id']);
                     if (sizeof($positionlistArr) > 0) {
                         $employeeform->position_id->addMultiOption('', 'Select a Position');
                         foreach ($positionlistArr as $positionlistres) {
                             $employeeform->position_id->addMultiOption($positionlistres['id'], $positionlistres['positionname']);
                         }
//.........这里部分代码省略.........
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:101,代码来源:MydetailsController.php

示例3: viewAction

 public function viewAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $leaverequestmodel = new Default_Model_Leaverequest();
     $id = $this->getRequest()->getParam('id');
     try {
         $useridArr = $leaverequestmodel->getUserID($id);
         if (!empty($useridArr)) {
             $user_id = $useridArr[0]['user_id'];
             if ($user_id == $loginUserId) {
                 $callval = $this->getRequest()->getParam('call');
                 if ($callval == 'ajaxcall') {
                     $this->_helper->layout->disableLayout();
                 }
                 $objName = 'pendingleaves';
                 $leaverequestform = new Default_Form_leaverequest();
                 $leaverequestform->removeElement("submit");
                 $elements = $leaverequestform->getElements();
                 if (count($elements) > 0) {
                     foreach ($elements as $key => $element) {
                         if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                             $element->setAttrib("disabled", "disabled");
                         }
                     }
                 }
                 $data = $leaverequestmodel->getsinglePendingLeavesData($id);
                 $data = $data[0];
                 $getavailbaleleaves = $leaverequestmodel->getAvailableLeaves($loginUserId);
                 if (!empty($data) && $data['leavestatus'] == 'Approved') {
                     $employeeleavetypemodel = new Default_Model_Employeeleavetypes();
                     $usersmodel = new Default_Model_Users();
                     $employeeleavetypeArr = $employeeleavetypemodel->getsingleEmployeeLeavetypeData($data['leavetypeid']);
                     if ($employeeleavetypeArr != 'norows') {
                         $leaverequestform->leavetypeid->addMultiOption($employeeleavetypeArr[0]['id'], utf8_encode($employeeleavetypeArr[0]['leavetype']));
                     }
                     if ($data['leaveday'] == 1) {
                         $leaverequestform->leaveday->addMultiOption($data['leaveday'], 'Full Day');
                     } else {
                         $leaverequestform->leaveday->addMultiOption($data['leaveday'], 'Half Day');
                     }
                     $repmngrnameArr = $usersmodel->getUserDetailsByID($data['rep_mang_id'], 'all');
                     $leaverequestform->populate($data);
                     $from_date = sapp_Global::change_date($data["from_date"], 'view');
                     $to_date = sapp_Global::change_date($data["to_date"], 'view');
                     $appliedon = sapp_Global::change_date($data["createddate"], 'view');
                     $leaverequestform->from_date->setValue($from_date);
                     $leaverequestform->to_date->setValue($to_date);
                     $leaverequestform->createddate->setValue($appliedon);
                     $leaverequestform->appliedleavesdaycount->setValue($data['appliedleavescount']);
                     $leaverequestform->comments->setValue($data['approver_comments']);
                     if (!empty($repmngrnameArr)) {
                         $leaverequestform->rep_mang_id->setValue($repmngrnameArr[0]['userfullname']);
                     } else {
                         $leaverequestform->rep_mang_id->setValue('');
                     }
                     /*	if(!empty($getavailbaleleaves))
                     		 {
                     			$leaverequestform->no_of_days->setValue($getavailbaleleaves[0]['remainingleaves']);
                     		 }  */
                     $this->view->controllername = $objName;
                     $this->view->id = $id;
                     $this->view->form = $leaverequestform;
                     $this->view->data = $data;
                     $leaverequestform->setDefault('leavetypeid', $data['leavetypeid']);
                     $leaverequestform->setDefault('leaveday', $data['leaveday']);
                     $this->view->reportingmanagerStatus = !empty($repmngrnameArr) ? $repmngrnameArr[0]['isactive'] : '';
                 } else {
                     $this->view->rowexist = "rows";
                 }
             } else {
                 $this->view->rowexist = "rows";
             }
         } else {
             $this->view->rowexist = "norows";
         }
     } catch (Exception $e) {
         $this->view->rowexist = "norows";
     }
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:82,代码来源:ApprovedleavesController.php

示例4: viewAction

 public function viewAction()
 {
     $id = intval($this->getRequest()->getParam('id'));
     $callval = $this->getRequest()->getParam('call');
     if ($callval == 'ajaxcall') {
         $this->_helper->layout->disableLayout();
     }
     $objName = 'pendingleaves';
     $reportingmanagerStatus = '';
     $leaverequestform = new Default_Form_leaverequest();
     $leaverequestform->removeElement("submit");
     $elements = $leaverequestform->getElements();
     if (count($elements) > 0) {
         foreach ($elements as $key => $element) {
             if ($key != "Cancel" && $key != "Edit" && $key != "Delete" && $key != "Attachments") {
                 $element->setAttrib("disabled", "disabled");
             }
         }
     }
     $leaverequestmodel = new Default_Model_Leaverequest();
     if (is_int($id) && $id != 0) {
         try {
             if ($id) {
                 $data = $leaverequestmodel->getLeaveRequestDetails($id);
                 if (!empty($data)) {
                     $data = $data[0];
                     $employeeleavetypemodel = new Default_Model_Employeeleavetypes();
                     $usersmodel = new Default_Model_Users();
                     $employeeleavetypeArr = $employeeleavetypemodel->getsingleEmployeeLeavetypeData($data['leavetypeid']);
                     if ($employeeleavetypeArr != 'norows') {
                         $leaverequestform->leavetypeid->addMultiOption($employeeleavetypeArr[0]['id'], utf8_encode($employeeleavetypeArr[0]['leavetype']));
                     }
                     if ($data['leaveday'] == 1) {
                         $leaverequestform->leaveday->addMultiOption($data['leaveday'], 'Full Day');
                     } else {
                         $leaverequestform->leaveday->addMultiOption($data['leaveday'], 'Half Day');
                     }
                     $repmngrnameArr = $usersmodel->getUserDetailsByID($data['rep_mang_id'], 'all');
                     $leaverequestform->populate($data);
                     $from_date = sapp_Global::change_date($data["from_date"], 'view');
                     $to_date = sapp_Global::change_date($data["to_date"], 'view');
                     $appliedon = sapp_Global::change_date($data["createddate"], 'view');
                     $leaverequestform->from_date->setValue($from_date);
                     $leaverequestform->to_date->setValue($to_date);
                     $leaverequestform->createddate->setValue($appliedon);
                     $leaverequestform->appliedleavesdaycount->setValue($data['appliedleavescount']);
                     if (!empty($repmngrnameArr)) {
                         $reportingmanagerStatus = $repmngrnameArr[0]['isactive'];
                         $leaverequestform->rep_mang_id->setValue($repmngrnameArr[0]['userfullname']);
                     }
                     $leaverequestform->setDefault('leavetypeid', $data['leavetypeid']);
                     $leaverequestform->setDefault('leaveday', $data['leaveday']);
                     $this->view->controllername = $objName;
                     $this->view->id = $id;
                     $this->view->form = $leaverequestform;
                     $this->view->reportingmanagerStatus = $reportingmanagerStatus;
                 } else {
                     $this->view->rowexist = "rows";
                 }
             } else {
                 $this->view->rowexist = "rows";
             }
         } catch (Exception $e) {
             $this->view->rowexist = "norows";
         }
     } else {
         $this->view->rowexist = "norows";
     }
 }
开发者ID:sura2k,项目名称:sentrifugo,代码行数:69,代码来源:EmpleavesummaryController.php

示例5: deleteAction

    public function deleteAction()
    {
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            $loginUserId = $auth->getStorage()->read()->id;
            $loginUserEmail = $auth->getStorage()->read()->emailaddress;
            $loginUserName = $auth->getStorage()->read()->userfullname;
        }
        $id = $this->_request->getParam('objid');
        $messages['message'] = '';
        $actionflag = 5;
        $businessunitid = '';
        $leavetypetext = '';
        if ($id) {
            $leaverequestmodel = new Default_Model_Leaverequest();
            $usersmodel = new Default_Model_Users();
            $employeesmodel = new Default_Model_Employees();
            $employeeleavetypesmodel = new Default_Model_Employeeleavetypes();
            $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($loginUserId);
            if ($loggedInEmployeeDetails[0]['businessunit_id'] != '') {
                $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
            }
            $dataarr = array('leavestatus' => 4, 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $loginUserId);
            $where = array('id=?' => $id);
            $Id = $leaverequestmodel->SaveorUpdateLeaveRequest($dataarr, $where);
            $data = $leaverequestmodel->getsinglePendingLeavesData($id);
            $data = $data[0];
            $appliedleavesdaycount = $data['appliedleavescount'];
            $to_date = $data['to_date'];
            $from_date = $data['from_date'];
            $reason = $data['reason'];
            $leavetypeid = $data['leavetypeid'];
            $repmngrnameArr = $usersmodel->getUserDetailsByID($data['rep_mang_id']);
            $reportingmanageremail = $repmngrnameArr[0]['emailaddress'];
            $reportingmanagername = $repmngrnameArr[0]['userfullname'];
            if ($Id == 'update') {
                $menuID = PENDINGLEAVES;
                $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
                /** MAILING CODE **/
                if ($to_date == '' || $to_date == NULL) {
                    $to_date = $from_date;
                }
                /* Mail to Employee */
                $options['subject'] = 'Leave request cancelled';
                $options['header'] = 'Leave Request';
                $options['toEmail'] = $loginUserEmail;
                $options['toName'] = $loginUserName;
                $options['message'] = '<div>Hi,</div>
								<div>The below leave(s) has been cancelled.</div>
								<div>
                <table width="100%" cellspacing="0" cellpadding="15" border="0" style="border:3px solid #BBBBBB; font-size:16px; font-family:Arial, Helvetica, sans-serif; margin:30px 0 30px 0;" bgcolor="#ffffff">
                      <tbody><tr>
                        <td width="28%" style="border-right:2px solid #BBBBBB;">Employee Name</td>
                        <td width="72%">' . $loginUserName . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">No. of Day(s)</td>
                        <td>' . $appliedleavesdaycount . '</td>
                      </tr>
                      <tr>
                        <td style="border-right:2px solid #BBBBBB;">From</td>
                        <td>' . $from_date . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">To</td>
                        <td>' . $to_date . '</td>
            	     </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">Reason for Leave</td>
                        <td>' . $reason . '</td>
                  </tr>
                </tbody></table>

            </div>
            <div style="padding:20px 0 10px 0;">Please <a href="' . BASE_URL . '/index/popup" target="_blank" style="color:#b3512f;">click here</a> to login and check the leave details.</div>';
                $result = sapp_Global::_sendEmail($options);
                /* End */
                /* Mail to Reporting Manager */
                $options['subject'] = 'Leave request cancelled';
                $options['header'] = 'Leave Request';
                $options['toEmail'] = $reportingmanageremail;
                $options['toName'] = $reportingmanagername;
                $options['message'] = '<div>Hi,</div>
								<div>The below leave(s) has been cancelled.</div>
								<div>
                <table width="100%" cellspacing="0" cellpadding="15" border="0" style="border:3px solid #BBBBBB; font-size:16px; font-family:Arial, Helvetica, sans-serif; margin:30px 0 30px 0;" bgcolor="#ffffff">
                      <tbody><tr>
                        <td width="28%" style="border-right:2px solid #BBBBBB;">Employee Name</td>
                        <td width="72%">' . $loginUserName . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">No. of Day(s)</td>
                        <td>' . $appliedleavesdaycount . '</td>
                      </tr>
                      <tr>
                        <td style="border-right:2px solid #BBBBBB;">From</td>
                        <td>' . $from_date . '</td>
                      </tr>
                      <tr bgcolor="#e9f6fc">
                        <td style="border-right:2px solid #BBBBBB;">To</td>
//.........这里部分代码省略.........
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:101,代码来源:PendingleavesController.php

示例6: checkperformanceduedate

 public function checkperformanceduedate()
 {
     $app_init_model = new Default_Model_Appraisalinit();
     $app_ratings_model = new Default_Model_Appraisalemployeeratings();
     $active_appraisal_Arr = $app_init_model->getActiveAppraisals();
     $appraisalPrivMainModel = new Default_Model_Appraisalqsmain();
     $usersmodel = new Default_Model_Users();
     //echo'<pre>';print_r($active_appraisal_Arr);exit;
     $current_day = new DateTime('now');
     $current_day->sub(new DateInterval('P1D'));
     if (!empty($active_appraisal_Arr)) {
         foreach ($active_appraisal_Arr as $appval) {
             if ($appval['enable_step'] == 2) {
                 if ($appval['managers_due_date']) {
                     $manager_due_date = new DateTime($appval['managers_due_date']);
                 } else {
                     $manager_due_date = '';
                 }
                 if ($appval['employees_due_date']) {
                     $emp_due_date = new DateTime($appval['employees_due_date']);
                 } else {
                     $emp_due_date = '';
                 }
                 $employeeidArr = $app_ratings_model->getEmployeeIds($appval['id'], 'cron');
                 if (!empty($employeeidArr)) {
                     foreach ($employeeidArr as $empval) {
                         if ($empval['appraisal_status'] != 7) {
                             $interval = $current_day->diff($emp_due_date);
                             $interval->format('%d');
                             $interval = $interval->days;
                             if ($interval <= 1) {
                                 $employeeDetailsArr = $usersmodel->getUserDetailsByID($empval['employee_id'], '');
                                 $optionArr = array('subject' => 'Performance Appraisal Pending', 'header' => 'Performance Appraisal', 'toemail' => $employeeDetailsArr[0]['userfullname'], 'toname' => $employeeDetailsArr[0]['emailaddress'], 'message' => 'Dear ' . $employeeDetailsArr[0]['userfullname'] . ', performance appraisal is pending.', 'cron' => 'yes');
                                 sapp_PerformanceHelper::saveCronMail($optionArr);
                             }
                         }
                     }
                 }
             } else {
                 if ($appval['managers_due_date']) {
                     $manager_due_date = new DateTime($appval['managers_due_date']);
                 } else {
                     $manager_due_date = '';
                 }
                 if ($appval['manager_ids']) {
                     $manager_comp_array = explode(',', $appval['manager_ids']);
                 } else {
                     $manager_comp_array = array();
                 }
                 $getLine1ManagerId = $appraisalPrivMainModel->getLine1ManagerIdMain($appval['id']);
                 if (!empty($getLine1ManagerId)) {
                     foreach ($getLine1ManagerId as $val) {
                         if (!in_array($val['line_manager_1'], $manager_comp_array)) {
                             $interval = $current_day->diff($manager_due_date);
                             $interval->format('%d');
                             $interval = $interval->days;
                             if ($interval <= 1) {
                                 $optionArr = array('subject' => 'Performance Appraisal Pending', 'header' => 'Performance Appraisal', 'toemail' => $val['emailaddress'], 'toname' => $val['userfullname'], 'message' => 'Dear ' . $val['userfullname'] . ', performance appraisal is pending.', 'cron' => 'yes');
                                 sapp_PerformanceHelper::saveCronMail($optionArr);
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:67,代码来源:CronjobController.php

示例7: editAction

 public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $id = $this->getRequest()->getParam('id');
     $callval = $this->getRequest()->getParam('call');
     if ($callval == 'ajaxcall') {
         $this->_helper->layout->disableLayout();
     }
     $managerleaverequestform = new Default_Form_managerleaverequest();
     try {
         if ($id && is_numeric($id) && $id > 0) {
             $leaverequestmodel = new Default_Model_Leaverequest();
             $usersmodel = new Default_Model_Users();
             $flag = 'true';
             $userid = $leaverequestmodel->getUserID($id);
             $getreportingManagerArr = $leaverequestmodel->getReportingManagerId($id);
             $reportingManager = $getreportingManagerArr[0]['repmanager'];
             if ($reportingManager != $loginUserId) {
                 $flag = 'false';
             }
             if (!empty($userid)) {
                 $isactiveuser = $usersmodel->getUserDetailsByID($userid[0]['user_id']);
             } else {
                 $this->view->rowexist = "rows";
             }
             if (!empty($userid) && !empty($isactiveuser) && $flag == 'true') {
                 $data = $leaverequestmodel->getLeaveRequestDetails($id);
                 if (!empty($data) && $data[0]['leavestatus'] == 'Pending for approval') {
                     $data = $data[0];
                     $reason = $data['reason'];
                     $appliedleavescount = $data['appliedleavescount'];
                     $employeeid = $data['user_id'];
                     $leavetypeid = $data['leavetypeid'];
                     $employeeleavetypemodel = new Default_Model_Employeeleavetypes();
                     $usersmodel = new Default_Model_Users();
                     $employeesmodel = new Default_Model_Employees();
                     $businessunitid = '';
                     $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($employeeid);
                     if ($loggedInEmployeeDetails[0]['businessunit_id'] != '') {
                         $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
                     }
                     $employeeleavetypeArr = $employeeleavetypemodel->getsingleEmployeeLeavetypeData($data['leavetypeid']);
                     if ($employeeleavetypeArr != 'norows') {
                         $managerleaverequestform->leavetypeid->addMultiOption($employeeleavetypeArr[0]['id'], utf8_encode($employeeleavetypeArr[0]['leavetype']));
                     }
                     if ($data['leaveday'] == 1) {
                         $managerleaverequestform->leaveday->addMultiOption($data['leaveday'], 'Full Day');
                     } else {
                         $managerleaverequestform->leaveday->addMultiOption($data['leaveday'], 'Half Day');
                     }
                     $employeenameArr = $usersmodel->getUserDetailsByID($data['user_id']);
                     $employeeemail = $employeenameArr[0]['emailaddress'];
                     $employeename = $employeenameArr[0]['userfullname'];
                     $managerleaverequestform->populate($data);
                     $from_date = sapp_Global::change_date($data['from_date'], 'view');
                     $to_date = sapp_Global::change_date($data['to_date'], 'view');
                     $appliedon = sapp_Global::change_date($data['createddate'], 'view');
                     $managerleaverequestform->from_date->setValue($from_date);
                     $managerleaverequestform->to_date->setValue($to_date);
                     $managerleaverequestform->createddate->setValue($appliedon);
                     $managerleaverequestform->appliedleavesdaycount->setValue($data['appliedleavescount']);
                     $managerleaverequestform->employeename->setValue($employeenameArr[0]['userfullname']);
                     $managerleaverequestform->setDefault('leavetypeid', $data['leavetypeid']);
                     $managerleaverequestform->setDefault('leaveday', $data['leaveday']);
                     $this->view->id = $id;
                     $this->view->form = $managerleaverequestform;
                     $this->view->data = $data;
                     $managerleaverequestform->setAttrib('action', BASE_URL . 'manageremployeevacations/edit/id/' . $id);
                 } else {
                     $this->view->rowexist = "rows";
                 }
             } else {
                 $this->view->rowexist = "rows";
             }
         } else {
             $this->view->rowexist = "rows";
         }
     } catch (Exception $e) {
         $this->view->rowexist = 'norows';
     }
     if ($this->getRequest()->getPost()) {
         $result = $this->save($managerleaverequestform, $appliedleavescount, $employeeemail, $employeeid, $employeename, $from_date, $to_date, $reason, $businessunitid, $leavetypeid);
         $this->view->msgarray = $result;
     }
 }
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:88,代码来源:ManageremployeevacationsController.php

示例8: closeappraisal

 public function closeappraisal($appraisalid, $status, $enablestepflag, $buid, $perfflag, $deptid)
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginuserRole = $auth->getStorage()->read()->emprole;
         $loginuserGroup = $auth->getStorage()->read()->group_id;
         $loginuserArr = array('loginuserid' => $loginUserId, 'loginuserrole' => $loginuserRole, 'loginusergroup' => $loginuserGroup);
     }
     $appraisalinitmodel = new Default_Model_Appraisalinit();
     $appraisalqsmodel = new Default_Model_Appraisalqsmain();
     $appraisalempratingsmodel = new Default_Model_Appraisalemployeeratings();
     $usersmodel = new Default_Model_Users();
     $departmentsmodel = new Default_Model_Departments();
     $announcementsModel = new Default_Model_Announcements();
     $deptids = '';
     $title = 'Performance Appraisal';
     $description = 'Performance appraisal initialized';
     $result = array();
     $employeeidArr = array();
     if ($status == 2) {
         $statustext = 'Closed';
     } else {
         $statustext = 'Forcefully Closed';
     }
     if ($appraisalid) {
         $trDb = Zend_Db_Table::getDefaultAdapter();
         $trDb->beginTransaction();
         try {
             /** Start
              * Updating initialization table
              */
             $init_Arr = array('status' => $status, 'modifiedby' => $loginUserId, 'modifiedby_role' => $loginuserRole, 'modifiedby_group' => $loginuserGroup, 'modifieddate' => gmdate("Y-m-d H:i:s"));
             $where = array('id=?' => $appraisalid);
             $Id = $appraisalinitmodel->SaveorUpdateAppraisalInitData($init_Arr, $where);
             /**
             						End
             */
             /** Start
              * Sending Mails to employees
              */
             if ($enablestepflag == 1) {
                 $employeeidArr = $appraisalqsmodel->getemployeeIDs($appraisalid);
             } else {
                 $employeeidArr = $appraisalempratingsmodel->getEmployeeIds($appraisalid);
             }
             if (!empty($employeeidArr)) {
                 foreach ($employeeidArr as $emp) {
                     $employeeDetailsArr = $usersmodel->getUserDetailsByID($emp['employee_id'], '');
                     if (!empty($employeeDetailsArr)) {
                         $options['subject'] = APPLICATION_NAME . ': Performance Appraisal ' . $statustext;
                         $options['header'] = 'Performance Appraisal ' . $statustext;
                         $options['toEmail'] = $employeeDetailsArr[0]['emailaddress'];
                         $options['toName'] = $employeeDetailsArr[0]['userfullname'];
                         $options['message'] = 'Dear ' . $employeeDetailsArr[0]['userfullname'] . ', performance appraisal ' . $statustext;
                         $options['cron'] = 'yes';
                         // sapp_Global::_sendEmail($options);
                     }
                 }
             }
             /**
              * End
              */
             /** 
              * Mail to performance Appraisal Group
              */
             if (defined('PER_APPRAISAL_' . $buid) && $buid != '') {
                 $options['subject'] = APPLICATION_NAME . ': Performance Appraisal ' . $statustext;
                 $options['header'] = 'Performance Appraisal';
                 $options['toEmail'] = constant('PER_APPRAISAL_' . $buid);
                 $options['toName'] = 'Performance Appraisal';
                 $options['message'] = 'Performance appraisal initiated ' . $statustext;
                 $options['cron'] = 'yes';
                 //  sapp_Global::_sendEmail($options);
             }
             /**
              * End
              */
             $trDb->commit();
             $result['msg'] = 'Performance Appraisal ' . $statustext;
             $result['result'] = 'success';
             $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => "Performance Appraisal " . $statustext));
         } catch (Exception $e) {
             $trDb->rollBack();
             $result['msg'] = $e->getMessage();
             $result['result'] = 'error';
         }
     }
     return $result;
 }
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:90,代码来源:AppraisalinitController.php

示例9: deleteAction

 public function deleteAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
         $loginUserEmail = $auth->getStorage()->read()->emailaddress;
         $loginUserName = $auth->getStorage()->read()->userfullname;
     }
     $id = $this->_request->getParam('objid');
     $messages['message'] = '';
     $actionflag = 5;
     $businessunitid = '';
     $leavetypetext = '';
     if ($id) {
         $leaverequestmodel = new Default_Model_Leaverequest();
         $usersmodel = new Default_Model_Users();
         $employeesmodel = new Default_Model_Employees();
         $menumodel = new Default_Model_Menu();
         $employeeleavetypesmodel = new Default_Model_Employeeleavetypes();
         $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($loginUserId);
         if ($loggedInEmployeeDetails[0]['businessunit_id'] != '') {
             $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
         }
         $dataarr = array('leavestatus' => 4, 'modifieddate' => gmdate("Y-m-d H:i:s"), 'modifiedby' => $loginUserId);
         $where = array('id=?' => $id);
         $Id = $leaverequestmodel->SaveorUpdateLeaveRequest($dataarr, $where);
         $data = $leaverequestmodel->getsinglePendingLeavesData($id);
         $data = $data[0];
         $appliedleavesdaycount = $data['appliedleavescount'];
         $to_date = $data['to_date'];
         $from_date = $data['from_date'];
         $reason = $data['reason'];
         $leavetypeid = $data['leavetypeid'];
         $repmngrnameArr = $usersmodel->getUserDetailsByID($data['rep_mang_id']);
         $reportingmanageremail = $repmngrnameArr[0]['emailaddress'];
         $reportingmanagername = $repmngrnameArr[0]['userfullname'];
         if ($Id == 'update') {
             $menuidArr = $menumodel->getMenuObjID('/manageremployeevacations');
             $menuID = $menuidArr[0]['id'];
             $result = sapp_Global::logManager($menuID, $actionflag, $loginUserId, $id);
             /** MAILING CODE * */
             if ($to_date == '' || $to_date == NULL) {
                 $to_date = $from_date;
             }
             /* Mail to Employee */
             $view = $this->getHelper('ViewRenderer')->view;
             $base_URL = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
             $mailpurpose = "The below leave(s) has been cancelled by your manager.";
             $this->view->base_url = $base_URL;
             $this->view->application_name = APPLICATION_NAME;
             $this->view->type = "New";
             $this->view->emp_name = $loginUserName;
             $this->view->mailpurpose = $mailpurpose;
             $this->view->requester_name = $loginUserName;
             $this->view->NoOfDays = $appliedleavesdaycount;
             $this->view->leave_from = $from_date;
             $this->view->leave_to = $to_date;
             $this->view->reason_for_leave = $reason;
             $this->view->reporting_manager = $reportingmanagername;
             $options['subject'] = APPLICATION_NAME . ':Leave request cancelled by your manager';
             $options['header'] = 'Leave Request';
             $options['toEmail'] = $loginUserEmail;
             $options['toName'] = $loginUserName;
             $options['message'] = $view->render('mailtemplates/leaves.phtml');
             sapp_Global::_sendEmail($options, "new");
             /* End */
             /* Mail to Reporting Manager */
             $view = $this->getHelper('ViewRenderer')->view;
             $base_URL = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
             $mailpurpose = "The below leave(s) has been cancelled by your manager.";
             $this->view->base_url = $base_URL;
             $this->view->application_name = APPLICATION_NAME;
             $this->view->type = "New";
             $this->view->emp_name = $reportingmanagername;
             $this->view->mailpurpose = $mailpurpose;
             $this->view->requester_name = $loginUserName;
             $this->view->NoOfDays = $appliedleavesdaycount;
             $this->view->leave_from = $from_date;
             $this->view->leave_to = $to_date;
             $this->view->reason_for_leave = $reason;
             $this->view->reporting_manager = $reportingmanagername;
             $options['subject'] = APPLICATION_NAME . ':Leave request cancelled by your manager';
             $options['header'] = 'Leave Request';
             $options['toEmail'] = $reportingmanageremail;
             $options['toName'] = $reportingmanagername;
             $options['message'] = $view->render('mailtemplates/leaves.phtml');
             //$options['message'] = '<div>Hi,</div><div>The below leave(s) has been cancelled.</div><div><table ><tbody><tr><td width="28%" >Employee Name</td><td width="72%">' . $loginUserName . '</td></tr><tr ><td >No. of Day(s)</td><td>' . $appliedleavesdaycount . '</td>/tr><tr><td >From</td><td>' . $from_date . '</td></tr><tr ><td >To</td><td>' . $to_date . '</td></tr><tr ><td >Reason for Leave</td><td>' . $reason . '</td></tr></tbody></table></div>';
             sapp_Global::_sendEmail($options, "new");
             /* End */
             /* Mail to HR */
             $view = $this->getHelper('ViewRenderer')->view;
             $base_URL = 'http://' . $this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();
             $mailpurpose = "The below leave(s) has been cancelled by your manager.";
             $this->view->base_url = $base_URL;
             $this->view->application_name = APPLICATION_NAME;
             $this->view->type = "New";
             $this->view->emp_name = 'Leave management';
             $this->view->mailpurpose = $mailpurpose;
             $this->view->requester_name = $loginUserName;
             $this->view->NoOfDays = $appliedleavesdaycount;
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:ManageremployeevacationsController.php

示例10: saveleaverequestdetailsAction

    public function saveleaverequestdetailsAction()
    {
        $this->_helper->layout->disableLayout();
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
            $loginUserId = $auth->getStorage()->read()->id;
        }
        $constantday = '';
        $days = '';
        $errorflag = 'true';
        $msgarray = array();
        $leavetypecount = '';
        $leavedayArr = array(1, 2);
        $availableleaves = '';
        $rep_mang_id = '';
        $employeeemail = '';
        $reportingManageremail = '';
        $week_startday = '';
        $week_endday = '';
        $ishalf_day = '';
        $userfullname = '';
        $reportingmanagerName = '';
        $businessunitid = '';
        $dateofjoining = '';
        $hremailgroup = '';
        $employeeDepartmentId = '';
        $reportingmanagerId = '';
        $leavetypeArr = array();
        $leaverequestform = new Default_Form_leaverequest();
        $leaverequestmodel = new Default_Model_Leaverequest();
        $employeeleavetypesmodel = new Default_Model_Employeeleavetypes();
        $leavemanagementmodel = new Default_Model_Leavemanagement();
        $usersmodel = new Default_Model_Users();
        $employeesmodel = new Default_Model_Employees();
        $weekdaysmodel = new Default_Model_Weekdays();
        if ($loginUserId != '' && $loginUserId != NULL) {
            $loggedinEmpId = $usersmodel->getUserDetailsByID($loginUserId);
            $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($loginUserId);
            if (!empty($loggedInEmployeeDetails)) {
                $reportingmanagerId = $loggedInEmployeeDetails[0]['reporting_manager'];
                $employeeDepartmentId = $loggedInEmployeeDetails[0]['department_id'];
                $employeeEmploymentStatusId = $loggedInEmployeeDetails[0]['emp_status_id'];
                $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
                $dateofjoining = $loggedInEmployeeDetails[0]['date_of_joining'];
                if ($reportingmanagerId != '' && $reportingmanagerId != NULL) {
                    $reportingManagerDetails = $usersmodel->getUserDetailsByID($reportingmanagerId);
                }
                if ($employeeDepartmentId != '' && $employeeDepartmentId != NULL) {
                    $weekendDatailsArr = $leavemanagementmodel->getWeekendDetails($employeeDepartmentId);
                }
                $employeeemail = $loggedinEmpId[0]['emailaddress'];
                $userfullname = $loggedinEmpId[0]['userfullname'];
                if (!empty($reportingManagerDetails)) {
                    $leaverequestform->rep_mang_id->setValue($reportingManagerDetails[0]['userfullname']);
                    $reportingManageremail = $reportingManagerDetails[0]['emailaddress'];
                    $reportingmanagerName = $reportingManagerDetails[0]['userfullname'];
                    $rep_mang_id = $reportingManagerDetails[0]['id'];
                    $rMngr = 'Yes';
                } else {
                    $msgarray['rep_mang_id'] = 'Reporting manager is not assigned yet. Please contact your HR.';
                    $errorflag = 'false';
                }
                if (!empty($weekendDatailsArr)) {
                    $week_startday = $weekendDatailsArr[0]['weekendstartday'];
                    $week_endday = $weekendDatailsArr[0]['weekendday'];
                    $ishalf_day = $weekendDatailsArr[0]['is_halfday'];
                    $isskip_holidays = $weekendDatailsArr[0]['is_skipholidays'];
                } else {
                    $msgarray['from_date'] = 'Leave management options are not configured yet.';
                    $msgarray['to_date'] = 'Leave management options are not configured yet.';
                    $errorflag = 'false';
                }
            } else {
                $errorflag = 'false';
                $msgarray['rep_mang_id'] = 'Reporting manager is not assigned yet. Please contact your HR.';
                $msgarray['from_date'] = 'Leave management options are not configured yet.';
                $msgarray['to_date'] = 'Leave management options are not configured yet.';
            }
        }
        /*START- Validating if employee has been allotted leaves
        		  Validating if employee has not been assigned any leaves
        		*/
        $getavailbaleleaves = $leaverequestmodel->getAvailableLeaves($loginUserId);
        if (!empty($getavailbaleleaves)) {
            $availableleaves = $getavailbaleleaves[0]['remainingleaves'];
        } else {
            $errorflag = 'false';
            $msgarray['no_of_days'] = 'You have not been allotted leaves for this financial year. Please contact your HR';
        }
        /*
          END- Validating if employee has been allotted leaves
        */
        $id = $this->_request->getParam('id');
        $reason = $this->_request->getParam('reason');
        // reason
        $leavetypeparam = $this->_request->getParam('leavetypeid');
        if (isset($leavetypeparam) && $leavetypeparam != '') {
            $leavetypeArr = explode("!@#", $this->_request->getParam('leavetypeid'));
            $leavetypeid = $leavetypeArr[0];
            $leavetypeArr = $employeeleavetypesmodel->getLeavetypeDataByID($leavetypeid);
//.........这里部分代码省略.........
开发者ID:rajbrt,项目名称:sentrifugo,代码行数:101,代码来源:LeaverequestController.php

示例11: weekAction


//.........这里部分代码省略.........
     /*Leave request code starts*/
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $leaverequestform = new Default_Form_leaverequest();
     $leaverequestform->setAttrib('action', BASE_URL . 'leaverequest');
     $leaverequestmodel = new Default_Model_Leaverequest();
     $employeeleavetypemodel = new Default_Model_Employeeleavetypes();
     $leavemanagementmodel = new Default_Model_Leavemanagement();
     $usersmodel = new Default_Model_Users();
     $employeesmodel = new Default_Model_Employees();
     $weekdaysmodel = new Default_Model_Weekdays();
     $holidaydatesmodel = new Default_Model_Holidaydates();
     $msgarray = array();
     $dateofjoiningArr = array();
     $holidayDateslistArr = array();
     $rMngr = 'No';
     $availableleaves = '';
     $rep_mang_id = '';
     $employeeemail = '';
     $reportingManageremail = '';
     $week_startday = '';
     $week_endday = '';
     $ishalf_day = '';
     $userfullname = '';
     $reportingmanagerName = '';
     $businessunitid = '';
     $hremailgroup = '';
     /* Start
     		   Queries to fetch user details,reporting manager details and weekend details from users table and employees table
     		*/
     if ($loginUserId != '' && $loginUserId != NULL) {
         $loggedinEmpId = $usersmodel->getUserDetailsByID($loginUserId);
         $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($loginUserId);
         if (!empty($loggedInEmployeeDetails)) {
             if ($loggedInEmployeeDetails[0]['date_of_joining'] != '') {
                 $date = new DateTime($loggedInEmployeeDetails[0]['date_of_joining']);
                 $datofjoiningtimestamp = $date->getTimestamp();
                 $dateofjoining = explode("-", $loggedInEmployeeDetails[0]['date_of_joining']);
                 $year = $dateofjoining[0];
                 $month = $dateofjoining[1];
                 $day = $dateofjoining[2];
                 $dateofjoiningArr = array('year' => $year, 'month' => $month, 'day' => $day, 'datetimestamp' => $datofjoiningtimestamp);
             }
             $reportingmanagerId = $loggedInEmployeeDetails[0]['reporting_manager'];
             $employeeDepartmentId = $loggedInEmployeeDetails[0]['department_id'];
             $employeeEmploymentStatusId = $loggedInEmployeeDetails[0]['emp_status_id'];
             $employeeHolidayGroupId = $loggedInEmployeeDetails[0]['holiday_group'];
             $reportingManagerDetails = $usersmodel->getUserDetailsByID($reportingmanagerId);
             $weekendDatailsArr = $leavemanagementmodel->getWeekendDetails($employeeDepartmentId);
             $employeeemail = $loggedinEmpId[0]['emailaddress'];
             $userfullname = $loggedinEmpId[0]['userfullname'];
             $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
             if (!empty($reportingManagerDetails)) {
                 $leaverequestform->rep_mang_id->setValue($reportingManagerDetails[0]['userfullname']);
                 $reportingManageremail = $reportingManagerDetails[0]['emailaddress'];
                 $reportingmanagerName = $reportingManagerDetails[0]['userfullname'];
                 $rep_mang_id = $reportingManagerDetails[0]['id'];
                 $rMngr = 'Yes';
             } else {
                 $msgarray['rep_mang_id'] = 'Reporting manager is not assigned yet. Please contact your HR.';
             }
             if (!empty($weekendDatailsArr)) {
                 $week_startday = $weekendDatailsArr[0]['weekendstartday'];
                 $week_endday = $weekendDatailsArr[0]['weekendday'];
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:67,代码来源:IndexController.php

示例12: saveleaverequestdetailsAction

 public function saveleaverequestdetailsAction()
 {
     $this->_helper->layout->disableLayout();
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     $constantday = '';
     $days = '';
     $errorflag = 'true';
     $msgarray = array();
     $leavetypecount = '';
     $leavedayArr = array(1, 2);
     $availableleaves = '';
     $rep_mang_id = '';
     $employeeemail = '';
     $reportingManageremail = '';
     $week_startday = '';
     $week_endday = '';
     $ishalf_day = '';
     $userfullname = '';
     $reportingmanagerName = '';
     $businessunitid = '';
     $dateofjoining = '';
     $hremailgroup = '';
     $employeeDepartmentId = '';
     $reportingmanagerId = '';
     $leavetypeArr = array();
     $leaverequestform = new Default_Form_leaverequest();
     $leaverequestmodel = new Default_Model_Leaverequest();
     $employeeleavetypesmodel = new Default_Model_Employeeleavetypes();
     $leavemanagementmodel = new Default_Model_Leavemanagement();
     $usersmodel = new Default_Model_Users();
     $employeesmodel = new Default_Model_Employees();
     $weekdaysmodel = new Default_Model_Weekdays();
     if ($loginUserId != '' && $loginUserId != NULL) {
         $loggedinEmpId = $usersmodel->getUserDetailsByID($loginUserId);
         $loggedInEmployeeDetails = $employeesmodel->getLoggedInEmployeeDetails($loginUserId);
         if (!empty($loggedInEmployeeDetails)) {
             $reportingmanagerId = $loggedInEmployeeDetails[0]['reporting_manager'];
             $employeeDepartmentId = $loggedInEmployeeDetails[0]['department_id'];
             $employeeEmploymentStatusId = $loggedInEmployeeDetails[0]['emp_status_id'];
             $businessunitid = $loggedInEmployeeDetails[0]['businessunit_id'];
             $dateofjoining = $loggedInEmployeeDetails[0]['date_of_joining'];
             if ($reportingmanagerId != '' && $reportingmanagerId != NULL) {
                 $reportingManagerDetails = $usersmodel->getUserDetailsByID($reportingmanagerId);
             }
             if ($employeeDepartmentId != '' && $employeeDepartmentId != NULL) {
                 $weekendDatailsArr = $leavemanagementmodel->getWeekendDetails($employeeDepartmentId);
             }
             $employeeemail = $loggedinEmpId[0]['emailaddress'];
             $userfullname = $loggedinEmpId[0]['userfullname'];
             if (!empty($reportingManagerDetails)) {
                 $leaverequestform->rep_mang_id->setValue($reportingManagerDetails[0]['userfullname']);
                 $reportingManageremail = $reportingManagerDetails[0]['emailaddress'];
                 $reportingmanagerName = $reportingManagerDetails[0]['userfullname'];
                 $rep_mang_id = $reportingManagerDetails[0]['id'];
                 $rMngr = 'Yes';
             } else {
                 $msgarray['rep_mang_id'] = 'Reporting manager is not assigned yet. Please contact your HR.';
                 $errorflag = 'false';
             }
             if (!empty($weekendDatailsArr)) {
                 $week_startday = $weekendDatailsArr[0]['weekendstartday'];
                 $week_endday = $weekendDatailsArr[0]['weekendday'];
                 $ishalf_day = $weekendDatailsArr[0]['is_halfday'];
                 $isskip_holidays = $weekendDatailsArr[0]['is_skipholidays'];
             } else {
                 //setting default values if LEAVE MANAGEMENT OPTIONS not set for DEPARTMENT
                 $week_startday = '6';
                 //Saturday
                 $week_endday = '0';
                 //Sunday
                 $ishalf_day = '1';
                 //Yes
                 $isskip_holidays = '1';
                 //Yes
                 //$msgarray['from_date'] = 'Leave management options are not configured yet.';
                 //$msgarray['to_date'] = 'Leave management options are not configured yet.';
                 //$errorflag = 'false';
             }
         } else {
             $errorflag = 'false';
             $msgarray['rep_mang_id'] = 'Reporting manager is not assigned yet. Please contact your HR.';
             $msgarray['from_date'] = 'Leave management options are not configured yet.';
             $msgarray['to_date'] = 'Leave management options are not configured yet.';
         }
     }
     /* START- Validating if employee has been allotted leaves
               Validating if employee has not been assigned any leaves
     
               $getavailbaleleaves = $leaverequestmodel->getAvailableLeaves($loginUserId);
     
               if (!empty($getavailbaleleaves)) {
               $availableleaves = $getavailbaleleaves[0]['remainingleaves'];
               } else {
               $errorflag = 'false';
               $msgarray['no_of_days'] = 'You have not been allotted leaves for this financial year. Please contact your HR';
               } */
     /*
//.........这里部分代码省略.........
开发者ID:uskumar33,项目名称:DeltaONE,代码行数:101,代码来源:LeaverequestController.php


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