Ejemplo n.º 1
0
    $sStep = $aStepTypeId[0];
    $sType = $aStepTypeId[1];
}
//$_GET['sid'] gets STEP_UID and sTYPE(i.e BEFORE and AFTER) in format STEP_UID-sTYPE
if (isset($_GET['stepid'])) {
    $aStepTypeId = explode('|', $_GET['stepid']);
    $_SESSION['stepUID'] = $_GET['stepid'];
    //$aStepTypeId = explode('-','2517180104cd42c25cc39e4071099227-BEFORE');
    $sStep = $aStepTypeId[0];
    $sType = $aStepTypeId[1];
}
$start = isset($_POST['start']) ? $_POST['start'] : 0;
$limit = isset($_POST['limit']) ? $_POST['limit'] : '';
switch ($_GET['action']) {
    case 'getDynaformList':
        $result = $oProcessMap->getExtDynaformsList($start, $limit, $_GET['pid']);
        print G::json_encode($result);
        break;
    case 'getPMTableDynaform':
        $oAdditionalTables = new AdditionalTables();
        $aData = $oAdditionalTables->load($_GET['tabId'], true);
        $addTabName = $aData['ADD_TAB_NAME'];
        foreach ($aData['FIELDS'] as $iRow => $aRow) {
            if ($aRow['FLD_KEY'] == 1) {
                $rows[] = $aRow;
            }
        }
        $result['totalCount'] = count($rows);
        $result['data'] = $rows;
        print G::json_encode($result);
        break;
Ejemplo n.º 2
0
<?php

try {
    G::LoadClass('processMap');
    $oProcessMap = new processMap(new DBConnection());
    if (isset($_GET['pid'])) {
        //Getting Dynaform List
        $rows = $oProcessMap->getExtDynaformsList($_GET['pid']);
        array_shift($rows);
    } else {
        if (isset($_GET['tabId'])) {
            $oAdditionalTables = new AdditionalTables();
            $aData = $oAdditionalTables->load($_GET['tabId'], true);
            $addTabName = $aData['ADD_TAB_NAME'];
            foreach ($aData['FIELDS'] as $iRow => $aRow) {
                if ($aRow['FLD_KEY'] == 1) {
                    $rows[] = $aRow;
                }
            }
        } else {
            //Getting Dynaform List
            $rows = $oProcessMap->getExtAdditionalTablesList();
        }
    }
    $result['totalCount'] = count($rows);
    $result['data'] = $rows;
    print G::json_encode($result);
} catch (Exception $e) {
    print G::json_encode($e->getMessage());
}