$nErrorCode = GetDBData('GetDefaultLayout', 0, $param, $initDefaultLayout); //ErrorLog( $nErrorCode ); $result = array("result" => "success", "data" => $initDashboardObj); print_r(json_encode($result)); break; case "initShiftSchedule": $result = array("result" => "success", "data" => $post); print_r(json_encode($result)); break; case "TranslateDataSource": $nCNCID = $post['cncID']; $funObj = new FunctionObj($nCNCID); $dataSource = array(); if (!empty($post['dataSource']) == true) { foreach ($post['dataSource'] as $key => $value) { $szApiName = $funObj->GetDBAPIFromTWName($value); array_push($dataSource, $szApiName); } } $result = array("result" => "success", "data" => $dataSource, "rawData" => $post['dataSource'], "cnc_id" => $post['cncID']); print_r(json_encode($result)); break; case "GetRecordStr": $recordAry = array(); foreach ($post['cncs'] as $key) { $cncName = array(); $workFile = array(); $nCNCID = $key; $nErrorCode = GetDBData('cncName', $nCNCID, array(), $cncName); $nErrorCode = GetDBData('cncWorkFile', $nCNCID, array(), $workFile); if ($cncName == "") {