Files
luos/workflow/engine/methods/bpmn/proxyReportTables.php

46 lines
1.3 KiB
PHP
Raw Normal View History

2010-12-30 09:38:25 +00:00
<?php
try
{
G::LoadClass('processMap');
$oProcessMap = new processMap(new DBConnection);
2010-12-30 11:29:05 +00:00
if(isset($_GET['pid']) && !isset($_GET['type'])){
$rows = $oProcessMap->getExtReportTables($_GET['pid']);
}
2011-01-03 14:44:06 +00:00
else if(isset($_GET['pid']) && $_GET['type'] == 'NORMAL')
2010-12-30 09:38:25 +00:00
{
2010-12-30 11:29:05 +00:00
$aTheFields = array();
$aTheFields = getDynaformsVars($_GET['pid'], false);
foreach ($aTheFields as $aField) {
$rows[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sType'],
'FIELD_NAME' => $aField['sName']);
}
2010-12-30 09:38:25 +00:00
}
2011-01-03 14:44:06 +00:00
else if(isset($_GET['pid']) && $_GET['type'] == 'GRID'){
2010-12-30 11:29:05 +00:00
$aTheFields = array();
$aTheFields = getGridsVars($_GET['pid']);
foreach ($aTheFields as $aField) {
$rows[] = array('FIELD_UID' => $aField['sName'] . '-' . $aField['sXmlForm'],
'FIELD_NAME' => $aField['sName']);
}
}
if(isset($_GET['tid']))
{
require_once 'classes/model/ReportTable.php';
$o = new ReportTable();
$rows = $o->load($_GET['tid']);
}
2010-12-30 09:38:25 +00:00
$result['totalCount'] = count($rows);
$result['data'] = $rows;
print G::json_encode( $result ) ;
2010-12-30 09:38:25 +00:00
}
catch ( Exception $e ) {
print G::json_encode ( $e->getMessage() );
2010-12-30 09:38:25 +00:00
}
?>