Exemplo n.º 1
0
 function updateGenInfo()
 {
     $tableName = 'HS_HR_GENINFO';
     $arrRecordsList[0] = "'001'";
     $arrRecordsList[1] = "'" . $this->getGenInfoKeys() . "'";
     $arrRecordsList[2] = "'" . $this->getGenInfoValues() . "'";
     $arrFieldList[0] = 'CODE';
     $arrFieldList[1] = 'GENINFO_KEYS';
     $arrFieldList[2] = 'GENINFO_VALUES';
     $sql_builder = new SQLQBuilder();
     $sql_builder->table_name = $tableName;
     $sql_builder->flg_update = 'true';
     $sql_builder->arr_update = $arrFieldList;
     $sql_builder->arr_updateRecList = $arrRecordsList;
     $sqlQString = $sql_builder->addUpdateRecord1();
     $compStruct_newTitle = explode("|", $arrRecordsList[2]);
     $compStruct_newTitle = substr($compStruct_newTitle[0], 1);
     $dbConnection = new DMLFunctions();
     $message2 = $dbConnection->executeQuery($sqlQString);
     //Calling the addData() function
     $compStructObj = new CompStruct();
     $compStructObj->setaddStr($compStruct_newTitle);
     $compStructObj->setid(1);
     $compStructObj->setlocation('');
     $compStructObj->updateCompStruct();
     return $message2;
 }
Exemplo n.º 2
0
 /**
  * Searches for subdivisions in the company structure that have a title that
  * match the given search string and returns all subdivions under those
  * matches as a comma separated string of subdivision ids.
  *
  * @param searchStr The string to match against subdivision IDs
  * @return comma separated string of subdivision ids or null if no match.
  */
 private function _getMatchingSubdivisionIds($searchStr)
 {
     $subdivisionIds = null;
     // Get list of workstations with matches in the title or matches higher in the hierachy
     $compStructObj = new CompStruct();
     $sublist = $compStructObj->getSubdivisionsUnderMatchInHierachy($searchStr);
     // Create select condition for employees with workstation set to any of the
     // subdivisions
     if (isset($sublist) && count($sublist) > 0) {
         $rowNum = 0;
         foreach ($sublist as $subdivision) {
             $subdivIdList[$rowNum] = $subdivision['id'];
             $rowNum++;
         }
         $subdivisionIds = implode(',', $subdivIdList);
     }
     return $subdivisionIds;
 }
 function xajaxObjCall($value, $uniqcode, $cntrl)
 {
     switch ($uniqcode) {
         case 'SCD':
             if ($cntrl == 'unAssCurrency') {
                 $salcurdet = new SalCurDet();
                 return $salcurdet->getUnAssSalCurDet($value);
             }
             if ($cntrl == 'currencyEdit') {
                 $currtype = new CurrencyTypes();
                 return $currtype->filterCurrencyTypes($value);
             }
             break;
         case 'LOC':
             if ($cntrl == 'province') {
                 $province = new ProvinceInfo();
                 return $province->getProvinceCodes($value);
             }
             if ($cntrl == 'district') {
                 $district = new DistrictInfo();
                 return $district->getDistrictCodes($value);
             }
             if ($cntrl == 'addLocation') {
                 $location = new models_eimadmin_Location();
                 return $location->addLocation();
             }
             if ($cntrl == 'getLocCodes') {
                 $location = new models_eimadmin_Location();
                 return $location->getLocCodes();
             }
             break;
         case 'DIS':
             if ($cntrl == 'province') {
                 $provinfo = new ProvinceInfo();
                 return $provinfo->getProvinceCodes($value);
             }
             break;
         case 'CST':
             if ($cntrl == 'edit') {
                 $compstruct = new CompStruct();
                 return $compstruct->filterCompStruct($value);
             }
             if ($cntrl == 'assigned') {
                 $level = $value[0];
                 $val = $value[1];
                 $comphier = new CompHierachy();
                 return $comphier->getAssCompHier($level, $val);
             }
             if ($cntrl == 'unAssigned') {
                 $level = $value[0];
                 $val = $value[1];
                 $compstruct = new CompStruct();
                 return $compstruct->getUnAssCompStruct($val, $level);
             }
             break;
         case 'JOB':
             if ($cntrl == 'assigned') {
                 $jobtit_empstat = new JobTitEmpStat();
                 return $jobtit_empstat->getAssEmpStat($value);
             }
             if ($cntrl == 'unAssigned') {
                 $jobtit_empstat = new JobTitEmpStat();
                 return $jobtit_empstat->getUnAssEmpStat($value);
             }
             if ($cntrl == 'editEmpStat') {
                 $empstat = new EmploymentStatus();
                 return $empstat->filterEmpStat($value);
             }
             if ($cntrl == 'allEmpStat') {
                 $jobtit_empstat = new JobTitEmpStat();
                 return $jobtit_empstat->getAllEmpStats($value);
             }
             break;
     }
 }
Exemplo n.º 4
0
    ?>
 order"><?php 
    echo $lang_empview_Supervisor;
    ?>
</a> <img src="../../themes/beyondT/icons/<?php 
    echo $this->getArr['sortOrder' . $j];
    ?>
.png" width="8" height="10" border="0" alt="img" style="vertical-align: middle" />
							</td>
						<?php 
}
?>
					</tr>
					<?php 
if (isset($emplist) && $emplist != '') {
    $compStructObj = new CompStruct();
    $compStructObj->buildAllWorkStations();
    for ($j = 0; $j < count($emplist); $j++) {
        $descField = $emplist[$j][1];
        $subDivision = "-";
        if (isset($emplist[$j][3]) && !empty($emplist[$j][3])) {
            $subDivision = $compStructObj->fetchHierarchString($emplist[$j][3]);
        }
        if ($sysConst->viewDescLen <= strlen($descField)) {
            $descField = substr($descField, 0, $sysConst->viewDescLen);
            $descField .= "....";
        }
        ?>
								<tr valign="top">
								<?php 
        if (!($j % 2)) {
require_once ROOT_PATH . '/lib/dao/DMLFunctions.php';
require_once ROOT_PATH . '/lib/controllers/ViewController.php';
require_once ROOT_PATH . '/lib/confs/sysConf.php';
require_once $lan->getLangPath("full.php");
$GLOBALS['lang_Common_Select'] = $lang_Common_Select;
$GLOBALS['lang_compstruct_Other'] = $lang_compstruct_Other;
$types = array(array($lang_compstruct_Division, $lang_compstruct_Division), array($lang_compstruct_Department, $lang_compstruct_Department), array($lang_compstruct_Team, $lang_compstruct_Team), array('Other', $lang_compstruct_Other));
$dbConnection = new DMLFunctions();
$message2 = $dbConnection->executeQuery("SELECT geninfo_values FROM `hs_hr_geninfo` WHERE code = 001");
$arrCompInfo = mysql_fetch_array($message2, MYSQL_NUM);
$txtCompInfo = explode("|", $arrCompInfo[0]);
if (!isset($_GET['root'])) {
    $_GET['root'] = $txtCompInfo[0];
}
$locations = $this->popArr['locations'];
$treeCompStruct = new CompStruct();
$objAjax = new xajax();
$objAjax->registerFunction('addLocation');
$objAjax->registerFunction('populateStates');
$objAjax->processRequests();
function addLocation($arrElements)
{
    $view_controller = new ViewController();
    $ext_locAdd = new EXTRACTOR_Location();
    $objAddLoc = $ext_locAdd->parseAddData($arrElements);
    $view_controller->addData('LOC', $objAddLoc, true);
    $getLoc = $view_controller->xajaxObjCall('', 'LOC', 'getLocCodes');
    $objResponse = new xajaxResponse();
    $xajaxFiller = new xajaxElementFiller();
    $xajaxFiller->setDefaultOptionName($GLOBALS['lang_Common_Select']);
    $objResponse = $xajaxFiller->cmbFiller($objResponse, $getLoc, 0, 'frmAddNode', 'cmbLocation', 3);
Exemplo n.º 6
0
     $colHead = $this->headName[$i];
 }
 echo "<td valign='top'>" . '<strong>' . $colHead . '</strong>' . '</td>';
 switch ($this->headName[$i]) {
     case 'Reporting method':
         $reportingMethod = $i;
         break;
     case 'Contract':
         $contractDate = $i;
         break;
     case 'Qualifications':
         $qualifications = $i;
         break;
     case 'Sub division':
         $subDivision = $i;
         $compStructObj = new CompStruct();
         $compStructObj->buildAllWorkStations();
         break;
     case 'Job Title':
         $jobTitle = $i;
         break;
     case 'Skills':
         $skills = $i;
         break;
     case 'Work experience':
         $workExperience = $i;
         break;
     case 'Date of Birth':
         $dateFields[$i] = true;
         break;
     case 'Joined Date':