function getEmpSub($getID) { $this->getID = $getID; $tableName = 'HS_HR_EMP_REPORTTO a'; $arrFieldList[0] = 'LPAD(a.`EREP_SUP_EMP_NUMBER`, ' . $this->employeeIdLength . ', 0)'; $arrFieldList[1] = 'LPAD(a.`EREP_SUB_EMP_NUMBER`, ' . $this->employeeIdLength . ', 0)'; $arrFieldList[2] = 'a.EREP_REPORTING_MODE'; $sql_builder = new SQLQBuilder(); $sql_builder->table_name = $tableName; $sql_builder->flg_select = 'true'; $sql_builder->arr_select = $arrFieldList; $sqlQString = $sql_builder->selectOneRecordFiltered($this->getID); //echo $sqlQString."\n"; $dbConnection = new DMLFunctions(); $message2 = $dbConnection->executeQuery($sqlQString); //Calling the addData() function $i = 0; $empInfoObj = new EmpInfo(); while ($line = mysql_fetch_array($message2, MYSQL_NUM)) { for ($c = 0; count($arrFieldList) > $c; $c++) { $arrayDispList[$i][$c] = $line[$c]; } $supervisorId = $empInfoObj->fetchEmployeeId($line[0]); if ($supervisorId) { $arrayDispList[$i][count($arrFieldList)] = $supervisorId; } else { $arrayDispList[$i][count($arrFieldList)] = $line[0]; } $subordinateId = $empInfoObj->fetchEmployeeId($line[1]); if ($subordinateId) { $arrayDispList[$i][count($arrFieldList) + 1] = $subordinateId; } else { $arrayDispList[$i][count($arrFieldList) + 1] = $line[1]; } $i++; } if (isset($arrayDispList)) { return $arrayDispList; } else { $arrayDispList = ''; return $arrayDispList; } }
?> type='checkbox' <?php echo in_array('EMPNO', $editCriteriaChk) ? 'checked' : ''; ?> class='checkbox' name='chkcriteria[]' id='EMPNO' value='EMPNO' onClick="chkboxCriteriaEnable()" <?php echo isset($this->postArr['chkcriteria']) && in_array('EMPNO', $this->postArr['chkcriteria']) ? 'checked' : ''; ?> ></td> <td valign="top"><?php echo $lang_rep_Employee; ?> </td> <?php $empId = isset($criteriaData['EMPNO'][0]) ? $criteriaData['EMPNO'][0] : false; if ($empId) { $empId = $empInfoObj->fetchEmployeeId($empId); if (!$empId) { $empId = $criteriaData['EMPNO'][0]; } } else { $empId = ""; } ?> <td align="left"> <select name="cmbId" onchange="disableEmployeeId();" disabled > <option value="0"><?php echo $lang_Leave_Common_AllEmployees; ?> </option> <option value="1" <?php echo $empId == "" ? "" : "selected='selected'";
</strong></td> </tr> <tr> <td valign="top"><?php echo $lang_empview_employeeid; ?> </td> <?php $empsupid = $this->getArr['editIDSup']; ?> <td align="left" valign="top"><input type="hidden" name="txtRepEmpID" value="<?php echo $this->getArr['editIDSup']; ?> "><strong> <?php echo $empInfoObj->fetchEmployeeId($this->getArr['editIDSup']); ?> </strong></td> </tr> <tr> <td valign="top"><?php echo $lang_hrEmpMain_reportingmethod; ?> </td> <td align="left" valign="top"><select disabled name='cmbRepMethod'><strong> <?php $keys = array_keys($arrRepMethod); $values = array_values($arrRepMethod); for ($c = 0; count($arrRepMethod) > $c; $c++) { if ($this->getArr['RepMethod'] == $values[$c]) { echo "<option selected value=" . $values[$c] . ">" . $keys[$c] . "</option>";