BUG 6400 Replacing json_encode|json_decode by their G implementations
This fixes the problem of some pages of ProcessMaker not working on PHP 5.1, since there is no json_encode or json_decode native functions on PHP 5.1.
This commit is contained in:
@@ -53,7 +53,7 @@ class WebResource
|
||||
if (isset($post['function'])&&$post['function']!='') {
|
||||
/*Call a function*/
|
||||
header('Content-Type: text/json');
|
||||
$parameters=json_decode((urldecode($post['parameters'])));
|
||||
$parameters=G::json_decode((urldecode($post['parameters'])));
|
||||
$paramsRef=array();
|
||||
foreach($parameters as $key => $value)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ try
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
$steps = array();
|
||||
@@ -167,4 +167,4 @@ try
|
||||
}]
|
||||
}]";*/
|
||||
//echo $nodes;
|
||||
echo json_encode($steps);
|
||||
echo G::json_encode($steps);
|
||||
|
||||
@@ -14,7 +14,7 @@ try
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
$steps = array();
|
||||
@@ -121,4 +121,4 @@ try
|
||||
'children' => $assignTaskChildren
|
||||
);
|
||||
|
||||
echo json_encode($steps);
|
||||
echo G::json_encode($steps);
|
||||
|
||||
@@ -261,12 +261,12 @@
|
||||
$result['ROUTES'] = $arrayRoutes;
|
||||
$result['EVENTS'] = $arrayEvents;
|
||||
$result['GATEWAYS'] = $arrayGateways;
|
||||
$aTasks = json_encode($arrayTasks);
|
||||
$aSubProcess = json_encode($arraySubProcess);
|
||||
$aRoutes = json_encode($arrayRoutes);
|
||||
$aEvents = json_encode($arrayEvents);
|
||||
$aGateways = json_encode($arrayGateways);
|
||||
$aProcess = json_encode($process);
|
||||
$aLanes = json_encode($lanes);
|
||||
$aTasks = G::json_encode($arrayTasks);
|
||||
$aSubProcess = G::json_encode($arraySubProcess);
|
||||
$aRoutes = G::json_encode($arrayRoutes);
|
||||
$aEvents = G::json_encode($arrayEvents);
|
||||
$aGateways = G::json_encode($arrayGateways);
|
||||
$aProcess = G::json_encode($process);
|
||||
$aLanes = G::json_encode($lanes);
|
||||
echo "tasks:$aTasks|gateways:$aGateways|events:$aEvents|annotations:$aLanes|process:$aProcess|subprocess:$aSubProcess|routes:$aRoutes";
|
||||
?>
|
||||
@@ -289,16 +289,16 @@ if ( isset ($_REQUEST['action']) ) {
|
||||
|
||||
if(isset($_POST['VAR_OUT']) && $_POST['VAR_OUT'] != ''){
|
||||
$varOut = explode('|',$_POST['VAR_OUT']);
|
||||
$aVarOut1 = json_decode($varOut[0]);
|
||||
$aVarOut2 = json_decode($varOut[1]);
|
||||
$aVarOut1 = G::json_decode($varOut[0]);
|
||||
$aVarOut2 = G::json_decode($varOut[1]);
|
||||
for($i=1; $i<=count($aVarOut1); $i++){
|
||||
$out[$aVarOut1[$i-1]]= $aVarOut2[$i-1];
|
||||
}
|
||||
}
|
||||
if(isset($_POST['VAR_IN']) && $_POST['VAR_IN'] != ''){
|
||||
$varIn = explode('|',$_POST['VAR_IN']);
|
||||
$aVarIn1 = json_decode($varIn[0]);
|
||||
$aVarIn2 = json_decode($varIn[1]);
|
||||
$aVarIn1 = G::json_decode($varIn[0]);
|
||||
$aVarIn2 = G::json_decode($varIn[1]);
|
||||
for($i=1; $i<=count($aVarIn1); $i++){
|
||||
$in[$aVarIn1[$i-1]]= $aVarIn2[$i-1];
|
||||
}
|
||||
@@ -385,7 +385,7 @@ if ( isset ($_REQUEST['action']) ) {
|
||||
$ooutputDocument = new OutputDocument();
|
||||
if (isset($_GET['OUT_DOC_UID'])) {
|
||||
$rows = $ooutputDocument->load($_GET['OUT_DOC_UID']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
$result = $tmpData;
|
||||
echo $result;
|
||||
|
||||
@@ -174,6 +174,6 @@ Notes:
|
||||
/* Handles the error output. This error message will be sent to the uploadSuccess event handler. The event handler
|
||||
will have to check for any error messages and react as needed. */
|
||||
function HandleError($message) {
|
||||
die('{success:false,error:'.json_encode($message).'}');
|
||||
die('{success:false,error:'.G::json_encode($message).'}');
|
||||
}
|
||||
?>
|
||||
@@ -47,7 +47,7 @@ try
|
||||
}
|
||||
|
||||
|
||||
$result = json_encode( $rows ) ;
|
||||
$result = G::json_encode( $rows ) ;
|
||||
$result = str_replace("\\/","/",'{success:true,data:'.$result.'}'); // unescape the slashes
|
||||
}
|
||||
else
|
||||
@@ -57,11 +57,11 @@ try
|
||||
echo $result;
|
||||
}
|
||||
|
||||
//print json_encode( $result ) ;
|
||||
//print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,5 +14,5 @@ if (isset($_GET['tid'] ))
|
||||
array_shift($rows);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode($result);
|
||||
print G::json_encode($result);
|
||||
?>
|
||||
|
||||
@@ -15,13 +15,13 @@ try
|
||||
$rows = $o->load($_GET['tid']);
|
||||
}
|
||||
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
echo $result;
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
?>
|
||||
@@ -29,9 +29,9 @@ try
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ try
|
||||
$oEvent = new Event();
|
||||
$aRows = $oEvent->load($_GET['startInterId']);
|
||||
//$sch_uid = $oData['EVN_ACTION'];
|
||||
$result = json_encode( $aRows );
|
||||
$result = G::json_encode( $aRows );
|
||||
$result = str_replace("\\/","/",'{success:true,data:'.$result.'}'); // unescape the slashes
|
||||
/*else
|
||||
{
|
||||
@@ -18,10 +18,10 @@ try
|
||||
}*/
|
||||
echo $result;
|
||||
}
|
||||
//print json_encode( $result ) ;
|
||||
//print G::json_encode( $result ) ;
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
switch( $_GET['action'] ) {
|
||||
case 'getDynaformList' :
|
||||
$result = $oProcessMap->getExtDynaformsList($start, $limit, $_GET['pid']);
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getPMTableDynaform':
|
||||
@@ -42,14 +42,14 @@
|
||||
}
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAdditionalTables':
|
||||
$rows = $oProcessMap->getExtAdditionalTablesList();
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getInputDocumentList':
|
||||
@@ -57,14 +57,14 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllInputDocumentCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'editInputDocument':
|
||||
require_once 'classes/model/InputDocument.php';
|
||||
$oInputDocument = new InputDocument();
|
||||
$rows = $oInputDocument->load($_GET['INP_DOC_UID']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -76,13 +76,13 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllOutputDocumentCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'editObjectPermission':
|
||||
$rows = $oProcessMap->editExtObjectPermission($_GET['pid'],$_GET['op_uid']);
|
||||
//array_shift($rows);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -93,7 +93,7 @@
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
$oOutputDocument = new OutputDocument();
|
||||
$rows = $oOutputDocument->load($_GET['tid']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -104,14 +104,14 @@
|
||||
$rows = $oProcessMap->getExtReportTables($start, $limit,$_GET['pid']);
|
||||
$result['totalCount'] = $oProcessMap->getAllReportTableCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'editReportTables':
|
||||
require_once 'classes/model/ReportTable.php';
|
||||
$oReportTable = new ReportTable();
|
||||
$rows = $oReportTable->load($_GET['REP_TAB_UID'],$_GET['pid']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -142,21 +142,21 @@
|
||||
}
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getDatabaseConnectionList':
|
||||
$rows = $oProcessMap->getExtCriteriaDBSList($start, $limit,$_GET['pid']);
|
||||
$result['totalCount'] = $oProcessMap->getAllDbSourceCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'editDatabaseConnection':
|
||||
require_once 'classes/model/DbSource.php';
|
||||
$o = new DbSource();
|
||||
$rows = $o->load($_GET['dbs_uid'],$_GET['pid']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -167,39 +167,39 @@
|
||||
$rows = $oProcessMap->listExtProcessesSupervisors($start, $limit, $_GET['pid']);
|
||||
$result['totalCount'] = $oProcessMap->getAllProcessSupervisorsCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'availableProcessesSupervisors':
|
||||
$rows = $oProcessMap->listExtNoProcessesUser($_GET['pid']);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'supervisorDynaforms':
|
||||
$rows = $oProcessMap->getExtSupervisorDynaformsList($start, $limit,$_GET['pid']);
|
||||
$result['totalCount'] = $oProcessMap->getAllSupervisorDynaformsCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
case 'availableSupervisorDynaforms':
|
||||
$rows = $oProcessMap->getExtAvailableSupervisorDynaformsList($_GET['pid']);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
case 'supervisorInputDoc':
|
||||
$rows = $oProcessMap->getExtSupervisorInputsList($start, $limit,$_GET['pid']);
|
||||
$result['totalCount'] = $oProcessMap->getAllSupervisorInputsCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
case 'availableSupervisorInputDoc':
|
||||
$rows = $oProcessMap->getExtAvailableSupervisorInputsList($_GET['pid']);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAssignedCaseTrackerObjects':
|
||||
@@ -207,7 +207,7 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllCaseTrackerObjectCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAvailableCaseTrackerObjects':
|
||||
@@ -215,7 +215,7 @@
|
||||
array_shift($rows);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAvailableSteps':
|
||||
@@ -223,7 +223,7 @@
|
||||
array_shift($rows);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAssignedSteps':
|
||||
@@ -231,7 +231,7 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllStepCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAssignedUsersList':
|
||||
@@ -239,14 +239,14 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllTaskUserCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAvailableUsersList':
|
||||
$rows = $oProcessMap->getAvailableExtUsersCriteria($_GET['tid']);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAvailableStepTriggers':
|
||||
@@ -257,14 +257,14 @@
|
||||
$rows = $oProcessMap->getExtAvailableStepTriggersCriteria($_GET['pid'], $sStep, $_GET['tid'], $sType);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getAssignedStepTriggers':
|
||||
$rows = $oProcessMap->getExtStepTriggersCriteria($start, $limit, $sStep, $_GET['tid'], $sType);
|
||||
$result['totalCount'] = $oProcessMap->getAllStepTriggerCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'availableUsers':
|
||||
@@ -272,7 +272,7 @@
|
||||
array_shift($rows);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'assignedUsers':
|
||||
@@ -280,7 +280,7 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllTaskUserCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getTaskPropertiesList':
|
||||
@@ -303,7 +303,7 @@
|
||||
else if($key == 'TAS_TYPE' && $value == 'ADHOC')
|
||||
$rows[$key] = true;
|
||||
}
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -314,7 +314,7 @@
|
||||
if($_GET['type'] == 2) //Loading sub process details
|
||||
{
|
||||
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'','0');
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -325,14 +325,14 @@
|
||||
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'',$_GET['type']);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
}
|
||||
break;
|
||||
case 'getObjectPermission':
|
||||
$rows = $oProcessMap->getExtObjectsPermissions($start, $limit,$_GET['pid']);
|
||||
$result['totalCount'] = $oProcessMap->getAllObjectPermissionCount();
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'getObjectPermissionType':
|
||||
@@ -340,12 +340,12 @@
|
||||
array_shift($rows);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'process_Edit':
|
||||
$rows = $oProcessMap->editProcessNew($_GET['pid']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -357,7 +357,7 @@
|
||||
$result['totalCount'] = $oProcessMap->getAllTriggersCount();
|
||||
array_shift($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
break;
|
||||
|
||||
case 'editTriggers':
|
||||
@@ -368,7 +368,7 @@
|
||||
$oTrigger = new Triggers();
|
||||
$rows = $oTrigger->load($_GET['TRI_UID']);
|
||||
}
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
$result = $tmpData;
|
||||
echo $result;
|
||||
@@ -378,7 +378,7 @@
|
||||
//$rows = $oProcessMap->caseTracker($_GET['pid']);
|
||||
$oCaseTracker = new CaseTracker ( );
|
||||
$rows = $oCaseTracker->load($_GET['pid']);
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
$result = $tmpData;
|
||||
echo $result;
|
||||
@@ -438,7 +438,7 @@
|
||||
array_shift($rows);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode($result);
|
||||
print G::json_encode($result);
|
||||
break;
|
||||
|
||||
|
||||
@@ -446,8 +446,8 @@
|
||||
|
||||
}
|
||||
//$result['data'] = $rows;
|
||||
//print json_encode( $result ) ;
|
||||
/*$tmpData = json_encode( $rows ) ;
|
||||
//print G::json_encode( $result ) ;
|
||||
/*$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
$result = $tmpData;
|
||||
echo $result;*/
|
||||
|
||||
@@ -16,8 +16,8 @@ try
|
||||
}
|
||||
// $result['totalCount'] = count($rows);
|
||||
// $result['data'] = $rows;
|
||||
// print json_encode( $result) ;
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
// print G::json_encode( $result) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -26,5 +26,5 @@ try
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ if ( isset($_GET['pid'] )&& isset($_GET['action']) )
|
||||
}
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode($result);
|
||||
print G::json_encode($result);
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@ if (isset($_GET['tid']))
|
||||
$rows = $oOutputDocument->load($_GET['tid']);
|
||||
}
|
||||
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -28,9 +28,9 @@ if (isset($_GET['tid']))
|
||||
|
||||
/* $result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result) ;*/
|
||||
print G::json_encode( $result) ;*/
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ try
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -51,7 +51,7 @@ $Fields['FILENAME_LINKXPDL'] = $xpdlFields['FILENAME_LINKXPDL'];
|
||||
$Fields['FILENAME_LINK'] = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/processes/' . $Fields['FILENAME_LINK'];
|
||||
$Fields['FILENAME_LINKXPDL'] = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/processes/' . $Fields['FILENAME_LINKXPDL'];
|
||||
|
||||
$result = json_encode( $Fields );
|
||||
$result = G::json_encode( $Fields );
|
||||
$result = str_replace("\\/","/",'{success:true,data:'.$result.'}'); // unescape the slashes
|
||||
echo $result;
|
||||
|
||||
|
||||
@@ -36,10 +36,10 @@ try
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
?>
|
||||
@@ -30,11 +30,11 @@ try
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -9,7 +9,7 @@ try
|
||||
if($_GET['type'] == 2) //Loading sub process details
|
||||
{
|
||||
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'','0');
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -20,12 +20,12 @@ try
|
||||
$rows = $oProcessMap->subProcessExtProperties($_GET['pid'], $_GET['tid'],'',$_GET['type']);
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
}
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -49,7 +49,7 @@ try
|
||||
}
|
||||
}
|
||||
|
||||
$tmpData = json_encode( $rows ) ;
|
||||
$tmpData = G::json_encode( $rows ) ;
|
||||
$tmpData = str_replace("\\/","/",'{success:true,data:'.$tmpData.'}'); // unescape the slashes
|
||||
|
||||
$result = $tmpData;
|
||||
@@ -58,7 +58,7 @@ try
|
||||
}
|
||||
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -18,11 +18,11 @@ try
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -15,10 +15,10 @@ try
|
||||
|
||||
$result['totalCount'] = count($rows);
|
||||
$result['data'] = $rows;
|
||||
print json_encode( $result ) ;
|
||||
print G::json_encode( $result ) ;
|
||||
|
||||
}
|
||||
catch ( Exception $e ) {
|
||||
print json_encode ( $e->getMessage() );
|
||||
print G::json_encode ( $e->getMessage() );
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -56,5 +56,5 @@ foreach ( $aFields as $aField ) {
|
||||
array_shift($aRows);
|
||||
$result['totalCount'] = count($aRows);
|
||||
$result['data'] = $aRows;
|
||||
print json_encode($result);
|
||||
print G::json_encode($result);
|
||||
?>
|
||||
|
||||
@@ -40,7 +40,7 @@ try{
|
||||
$result['status_code'] = $idProcess;
|
||||
$result['message'] = "the process don't exists";
|
||||
$result['timestamp'] = date('Y-m-d H:i:s');
|
||||
echo json_encode($result);
|
||||
echo G::json_encode($result);
|
||||
die;
|
||||
}
|
||||
}
|
||||
@@ -49,15 +49,15 @@ try{
|
||||
$result['status_code'] = 1;
|
||||
$result['message'] = "you don't send the process uid";
|
||||
$result['timestamp'] = date('Y-m-d H:i:s');
|
||||
echo json_encode($result);
|
||||
echo G::json_encode($result);
|
||||
die;
|
||||
}
|
||||
$aTasks = json_decode ( $_POST['tasks'] );
|
||||
$aRoutes = json_decode ( $_POST['routes'] );
|
||||
$aEvents = json_decode ( $_POST['events'] );
|
||||
$aGateways = json_decode ( $_POST['gateways'] );
|
||||
$aAnnotations = json_decode ( $_POST['annotations'] );
|
||||
$aSubprocess = json_decode ( $_POST['subprocess'] );
|
||||
$aTasks = G::json_decode ( $_POST['tasks'] );
|
||||
$aRoutes = G::json_decode ( $_POST['routes'] );
|
||||
$aEvents = G::json_decode ( $_POST['events'] );
|
||||
$aGateways = G::json_decode ( $_POST['gateways'] );
|
||||
$aAnnotations = G::json_decode ( $_POST['annotations'] );
|
||||
$aSubprocess = G::json_decode ( $_POST['subprocess'] );
|
||||
$fields = $oProcess->serializeProcess($idProcess);
|
||||
$oData = unserialize($fields);
|
||||
$aRoutes = $oProcess->super_unique($aRoutes);
|
||||
|
||||
@@ -8,7 +8,7 @@ require_once ( "classes/model/AdditionalTables.php" );
|
||||
require_once ( "classes/model/Fields.php" );
|
||||
// passing the parameters
|
||||
$pmTableName = (isset($_POST['tableName'])) ? $_POST['tableName'] : 'contenders';
|
||||
$pmTableFields = (isset($_POST['tableFields'])) ? json_decode($_POST['tableFields']) : array();
|
||||
$pmTableFields = (isset($_POST['tableFields'])) ? G::json_decode($_POST['tableFields']) : array();
|
||||
|
||||
// default parameters
|
||||
//$pmTableName = 'Sender';
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
$aData = json_decode($_POST['data']);
|
||||
$aData = G::json_decode($_POST['data']);
|
||||
$appSelectedUids = array ();
|
||||
$items = explode(",",$_POST['APP_UIDS']);
|
||||
foreach ($items as $item) {
|
||||
|
||||
@@ -82,8 +82,8 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
|
||||
$aVariables = array();
|
||||
if(isset($aData['FIELDS']))
|
||||
{
|
||||
$aFields = json_decode($_POST['FIELDS']);
|
||||
$aVariables = json_decode($_POST['VARIABLES']);
|
||||
$aFields = G::json_decode($_POST['FIELDS']);
|
||||
$aVariables = G::json_decode($_POST['VARIABLES']);
|
||||
}
|
||||
$aData['FIELDS'] = array();
|
||||
for($i=0;$i<count($aFields);$i++){
|
||||
|
||||
@@ -305,7 +305,7 @@ try {
|
||||
$oProcessMap->processFilesManager($oData->pro_uid);
|
||||
break;
|
||||
case 'exploreDirectory':
|
||||
$objData = json_decode($_REQUEST['data']);
|
||||
$objData = G::json_decode($_REQUEST['data']);
|
||||
$_SESSION['PFMDirectory'] = $objData->{'main_directory'};
|
||||
$oProcessMap->exploreDirectory($oData->pro_uid, $oData->main_directory, $oData->directory);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user