本文整理汇总了PHP中Default_Model_Users::getReportingManagerList_employees方法的典型用法代码示例。如果您正苦于以下问题:PHP Default_Model_Users::getReportingManagerList_employees方法的具体用法?PHP Default_Model_Users::getReportingManagerList_employees怎么用?PHP Default_Model_Users::getReportingManagerList_employees使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Default_Model_Users
的用法示例。
在下文中一共展示了Default_Model_Users::getReportingManagerList_employees方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addemppopupAction
public function addemppopupAction()
{
$flag = 'true';
$controllername = 'employee';
$msgarray = array();
$emptyFlag = 0;
Zend_Layout::getMvcInstance()->setLayoutPath(APPLICATION_PATH . "/layouts/scripts/popup/");
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$loginUserId = $auth->getStorage()->read()->id;
}
$deptidforhead = $this->_getParam('deptidforhead', null);
$report_opt = array();
$emp_form = new Default_Form_employee();
$user_model = new Default_Model_Usermanagement();
$role_model = new Default_Model_Roles();
$prefixModel = new Default_Model_Prefix();
$identity_code_model = new Default_Model_Identitycodes();
$jobtitlesModel = new Default_Model_Jobtitles();
$deptModel = new Default_Model_Departments();
$positionsmodel = new Default_Model_Positions();
$employeeModal = new Default_Model_Employee();
$usersModel2 = new Default_Model_Users();
$employmentstatusModel = new Default_Model_Employmentstatus();
$emp_form->setAction(BASE_URL . 'employee/addemppopup/deptidforhead/' . $deptidforhead);
$emp_form->removeElement('department_id');
$emp_form->removeElement('modeofentry');
$identity_codes = $identity_code_model->getIdentitycodesRecord();
$emp_identity_code = isset($identity_codes[0]) ? $identity_codes[0]['employee_code'] : "";
if ($emp_identity_code != '') {
$emp_id = $emp_identity_code . str_pad($user_model->getMaxEmpId($emp_identity_code), 4, '0', STR_PAD_LEFT);
} else {
$emp_id = '';
$msgarray['employeeId'] = 'Identity codes are not configured yet.';
$flag = 'false';
}
$emp_form->employeeId->setValue($emp_id);
$role_data = $role_model->getRolesList_Dept();
$emp_form->emprole->addMultiOptions(array('' => 'Select Role') + $role_data);
if (empty($role_data)) {
$msgarray['emprole'] = 'Roles are not configured yet.';
$flag = 'false';
}
$prefixData = $prefixModel->getPrefixList();
$emp_form->prefix_id->addMultiOption('', 'Select Prefix');
if (!empty($prefixData)) {
foreach ($prefixData as $prefixres) {
$emp_form->prefix_id->addMultiOption($prefixres['id'], $prefixres['prefix']);
}
} else {
$msgarray['prefix_id'] = 'Prefixes are not configured yet.';
//$flag = 'false';
}
$jobtitleData = $jobtitlesModel->getJobTitleList();
if (!empty($jobtitleData)) {
foreach ($jobtitleData as $jobtitleres) {
$emp_form->jobtitle_id->addMultiOption($jobtitleres['id'], $jobtitleres['jobtitlename']);
}
} else {
$msgarray['jobtitle_id'] = 'Job titles are not configured yet.';
$msgarray['position_id'] = 'Positions are not configured yet.';
//$flag = 'false';
}
if (isset($_POST['jobtitle_id']) && $_POST['jobtitle_id'] != '') {
$positionlistArr = $positionsmodel->getPositionList($_POST['jobtitle_id']);
if (sizeof($positionlistArr) > 0) {
$emp_form->position_id->addMultiOption('', 'Select Position');
foreach ($positionlistArr as $positionlistres) {
$emp_form->position_id->addMultiOption($positionlistres['id'], $positionlistres['positionname']);
}
}
}
$employmentStatusData = $employmentstatusModel->getempstatusActivelist();
$emp_form->emp_status_id->addMultiOption('', 'Select Employment Status');
if (!empty($employmentStatusData)) {
foreach ($employmentStatusData as $employmentStatusres) {
$emp_form->emp_status_id->addMultiOption($employmentStatusres['workcodename'], $employmentStatusres['statusname']);
}
} else {
$msgarray['emp_status_id'] = 'Employment status is not configured yet.';
$emptyFlag++;
}
$reportingManagerData = $usersModel2->getReportingManagerList_employees('', '', MANAGEMENT_GROUP);
if (!empty($reportingManagerData)) {
$report_opt = $reportingManagerData;
if (isset($_POST['reporting_manager']) && $_POST['reporting_manager'] != '') {
$emp_form->setDefault('reporting_manager', $_POST['reporting_manager']);
}
} else {
$msgarray['reporting_manager'] = 'Reporting managers are not added yet.';
$flag = 'false';
}
if ($this->getRequest()->getPost()) {
if ($emp_form->isValid($this->_request->getPost()) && $flag == 'true') {
$jobtitle_id = $this->_request->getParam('jobtitle_id', null);
$position_id = $this->_request->getParam('position_id', null);
$date_of_joining = sapp_Global::change_date($this->_request->getParam('date_of_joining', null), 'database');
$date_of_leaving = $this->_request->getParam('date_of_leaving', null);
$date_of_leaving = sapp_Global::change_date($date_of_leaving, 'database');
$employeeId = $this->_getParam('employeeId', null);
//.........这里部分代码省略.........
示例2: deptroleOnchange
public function deptroleOnchange($params_arr)
{
$result = array();
$status = 0;
$message = "Invalid value.";
if (isset($params_arr['role_id']) && $params_arr['role_id'] != '' && isset($params_arr['group_id']) && $params_arr['group_id'] != '' && isset($params_arr['selected_group']) && $params_arr['selected_group'] != '' && isset($params_arr['dept_id']) && $params_arr['dept_id'] != '' && isset($params_arr['employee_id']) && isset($params_arr['userid']) && $params_arr['userid'] != '') {
$role_id = $params_arr['role_id'];
$group_id = $params_arr['group_id'];
$userid = $params_arr['userid'];
$dept_id = $params_arr['dept_id'];
$employee_id = $params_arr['employee_id'];
$employee_group = $params_arr['selected_group'];
if ($role_id == SUPERADMINROLE || $group_id == MANAGEMENT_GROUP || $group_id == HR_GROUP) {
$privilege_flag = sapp_Global::_checkprivileges(EMPLOYEE, $group_id, $role_id, 'add');
if ($privilege_flag == 'Yes') {
$usersModel = new Default_Model_Users();
$reportingManagerData = $usersModel->getReportingManagerList_employees($dept_id, $employee_id, $employee_group);
$emp_str = sapp_Global::selectOptionBuilder("", "Select Reporting Manager");
if (!empty($reportingManagerData)) {
$status = 1;
$message = "success";
//echo "<pre>";print_r($reportingManagerData);echo "</pre>";
foreach ($reportingManagerData as $data) {
$emp_str .= sapp_Global::selectOptionBuilder($data['id'], $data['name'], $data['profileimg']);
}
} else {
$status = 0;
$message = "Employees are not added yet.";
}
$result['reporting_managers'] = $emp_str;
}
}
}
return array('status' => $status, 'message' => $message, 'result' => $result);
}