/** * Create the report var registry * @param array $aData * @return string **/ public function create($aData) { $oConnection = Propel::getConnection(ReportVarPeer::DATABASE_NAME); try { if (isset($aData['REP_VAR_UID']) && $aData['REP_VAR_UID'] == '') { unset($aData['REP_VAR_UID']); } if (!isset($aData['REP_VAR_UID'])) { $aData['REP_VAR_UID'] = G::generateUniqueID(); } $oReportVar = new ReportVar(); $oReportVar->fromArray($aData, BasePeer::TYPE_FIELDNAME); if ($oReportVar->validate()) { $oConnection->begin(); $iResult = $oReportVar->save(); $oConnection->commit(); return $aData['REP_VAR_UID']; } else { $sMessage = ''; $aValidationFailures = $oReportVar->getValidationFailures(); foreach ($aValidationFailures as $oValidationFailure) { $sMessage .= $oValidationFailure->getMessage() . '<br />'; } throw new Exception('The registry cannot be created!<br />' . $sMessage); } } catch (Exception $oError) { $oConnection->rollback(); throw $oError; } }
function saveConsolidated($data) { $status = $data['con_status']; $sTasUid = $data['tas_uid']; $sDynUid = $data['dyn_uid']; $sProUid = $data['pro_uid']; $sRepTabUid = $data['rep_uid']; $tableName = $data['table_name']; $title = $data['title']; if ($sRepTabUid != '') { if (!$status) { $oCaseConsolidated = new CaseConsolidatedCore(); $oCaseConsolidated = CaseConsolidatedCorePeer::retrieveByPK($sTasUid); if (!is_object($oCaseConsolidated) || get_class($oCaseConsolidated) != 'CaseConsolidatedCore') { $oCaseConsolidated = new CaseConsolidatedCore(); $oCaseConsolidated->setTasUid($sTasUid); $oCaseConsolidated->setConStatus('INACTIVE'); $oCaseConsolidated->save(); } else { $oCaseConsolidated->delete(); } return 1; } $rptUid = null; $criteria = new Criteria(); $criteria->addSelectColumn(ReportTablePeer::REP_TAB_UID); $criteria->add(ReportTablePeer::REP_TAB_UID, $sRepTabUid); $rsCriteria = ReportTablePeer::doSelectRS($criteria); if ($rsCriteria->next()) { $row = $rsCriteria->getRow(); $rptUid = $row[0]; } $rpts = new ReportTables(); if ($rptUid != null) { $rpts->deleteReportTable($rptUid); } $sClassName = $tableName; $sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP; @unlink($sPath . $sClassName . '.php'); @unlink($sPath . $sClassName . 'Peer.php'); @unlink($sPath . PATH_SEP . 'map' . PATH_SEP . $sClassName . 'MapBuilder.php'); @unlink($sPath . PATH_SEP . 'om' . PATH_SEP . 'Base' . $sClassName . '.php'); @unlink($sPath . PATH_SEP . 'om' . PATH_SEP . 'Base' . $sClassName . 'Peer.php'); $sRepTabUid = ''; } $_POST['form']['PRO_UID'] = $sProUid; $_POST['form']['REP_TAB_UID'] = $sRepTabUid; $_POST['form']['REP_TAB_NAME'] = $tableName; $_POST['form']['REP_TAB_TYPE'] = "NORMAL"; $_POST['form']['REP_TAB_GRID'] = ''; $_POST['form']['REP_TAB_CONNECTION'] = 'wf'; $_POST['form']['REP_TAB_CREATE_DATE'] = date("Y-m-d H:i:s"); $_POST['form']['REP_TAB_STATUS'] = 'ACTIVE'; $_POST['form']['REP_TAB_TITLE'] = $title; $_POST['form']['FIELDS'] = array(); G::LoadClass("reportTables"); $oReportTable = new ReportTable(); $sOldTableName = $_POST['form']['REP_TAB_NAME']; $sOldConnection = $_POST['form']['REP_TAB_CONNECTION']; $oReportTable->create($_POST['form']); $_POST['form']['REP_TAB_UID'] = $oReportTable->getRepTabUid(); $oReportVar = new ReportVar(); $oReportTables = new ReportTables(); $oReportTables->deleteAllReportVars($_POST['form']['REP_TAB_UID']); $aFields = array(); G::LoadClass("pmDynaform"); $pmDyna = new pmDynaform(array()); $pmDyna->fields["CURRENT_DYNAFORM"] = $sDynUid; $dataDyna = $pmDyna->getDynaform(); $json = G::json_decode($dataDyna["DYN_CONTENT"]); $fieldsDyna = $json->items[0]->items; foreach ($fieldsDyna as $value) { foreach ($value as $val) { if (isset($val->type)) { if ($val->type == 'text' || $val->type == 'textarea' || $val->type == 'dropdown' || $val->type == 'checkbox' || $val->type == 'datetime' || $val->type == 'yesno' || $val->type == 'date' || $val->type == 'hidden' || $val->type == 'currency' || $val->type == 'percentage' || $val->type == 'link') { $_POST['form']['FIELDS'][] = $val->name . '-' . $val->type; } } } } $aFieldsClases = array(); $i = 1; $aFieldsClases[$i]['FLD_NAME'] = 'APP_UID'; $aFieldsClases[$i]['FLD_NULL'] = 'off'; $aFieldsClases[$i]['FLD_KEY'] = 'on'; $aFieldsClases[$i]['FLD_AUTO_INCREMENT'] = 'off'; $aFieldsClases[$i]['FLD_DESCRIPTION'] = ''; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR'; $aFieldsClases[$i]['FLD_SIZE'] = 32; $i++; $aFieldsClases[$i]['FLD_NAME'] = 'APP_NUMBER'; $aFieldsClases[$i]['FLD_NULL'] = 'off'; $aFieldsClases[$i]['FLD_KEY'] = 'on'; $aFieldsClases[$i]['FLD_AUTO_INCREMENT'] = 'off'; $aFieldsClases[$i]['FLD_DESCRIPTION'] = ''; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR'; $aFieldsClases[$i]['FLD_SIZE'] = 255; foreach ($_POST['form']['FIELDS'] as $sField) { $aField = explode('-', $sField); if ($aField[1] == 'title' || $aField[1] == 'submit') { continue; } $i++; $aFieldsClases[$i]['FLD_NAME'] = $aField[0]; $aFieldsClases[$i]['FLD_NULL'] = 'off'; $aFieldsClases[$i]['FLD_KEY'] = 'off'; $aFieldsClases[$i]['FLD_AUTO_INCREMENT'] = 'off'; $aFieldsClases[$i]['FLD_DESCRIPTION'] = ''; switch ($aField[1]) { case 'currency': case 'percentage': $sType = 'number'; $aFieldsClases[$i]['FLD_TYPE'] = 'FLOAT'; $aFieldsClases[$i]['FLD_SIZE'] = 255; break; case 'text': case 'password': case 'dropdown': case 'yesno': case 'checkbox': case 'radiogroup': case 'hidden': case "link": $sType = 'char'; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR'; $aFieldsClases[$i]['FLD_SIZE'] = 255; break; case 'textarea': $sType = 'text'; $aFieldsClases[$i]['FLD_TYPE'] = 'TEXT'; $aFieldsClases[$i]['FLD_SIZE'] = ''; break; case 'date': $sType = 'date'; $aFieldsClases[$i]['FLD_TYPE'] = 'DATE'; $aFieldsClases[$i]['FLD_SIZE'] = ''; break; default: $sType = 'char'; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR'; $aFieldsClases[$i]['FLD_SIZE'] = 255; break; } $oReportVar->create(array('REP_TAB_UID' => $_POST['form']['REP_TAB_UID'], 'PRO_UID' => $_POST['form']['PRO_UID'], 'REP_VAR_NAME' => $aField[0], 'REP_VAR_TYPE' => $sType)); $aFields[] = array('sFieldName' => $aField[0], 'sType' => $sType); } $_POST['form']['REP_TAB_TYPE'] = "NORMAL"; $oReportTables->dropTable($sOldTableName, $sOldConnection); $oReportTables->createTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields); $oReportTables->populateTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields, $_POST['form']['PRO_UID'], ''); $sRepTabUid = $_POST['form']['REP_TAB_UID']; $oCaseConsolidated = CaseConsolidatedCorePeer::retrieveByPK($sTasUid); if (!is_object($oCaseConsolidated) || get_class($oCaseConsolidated) != 'CaseConsolidatedCore') { $oCaseConsolidated = new CaseConsolidatedCore(); $oCaseConsolidated->setTasUid($sTasUid); } $criteria = new Criteria(); $criteria->addSelectColumn(CaseConsolidatedCorePeer::TAS_UID); $criteria->add(CaseConsolidatedCorePeer::TAS_UID, $sTasUid); $rsCriteria = CaseConsolidatedCorePeer::doSelectRS($criteria); if ($rsCriteria->next()) { $row = $rsCriteria->getRow(); $oCaseConsolidated->delete(); $oCaseConsolidated = CaseConsolidatedCorePeer::retrieveByPK($sTasUid); } if (!is_object($oCaseConsolidated) || get_class($oCaseConsolidated) != 'CaseConsolidatedCore') { $oCaseConsolidated = new CaseConsolidatedCore(); $oCaseConsolidated->setTasUid($sTasUid); } $oCaseConsolidated->setConStatus('ACTIVE'); $oCaseConsolidated->setDynUid($sDynUid); $oCaseConsolidated->setRepTabUid($sRepTabUid); $oCaseConsolidated->save(); $sClassName = $tableName; $oAdditionalTables = new AdditionalTables(); $oAdditionalTables->createPropelClasses($tableName, $sClassName, $aFieldsClases, $sTasUid); }
/** * Create Report Tables Vars from an array of data * * @param array $aReportTablesVars * @return void */ public function createReportTablesVars ($aReportTablesVars) { foreach ($aReportTablesVars as $sKey => $aRow) { $oRep = new ReportVar(); if ($oRep->reportVarExists( $aRow['REP_VAR_UID'] )) { $oRep->remove( $aRow['REP_VAR_UID'] ); } $oRep->create( $aRow ); } } #@!neyek
public function con_save_properties($sTasUid, $sDynUid, $sStatus, $sProUid, $sRepTabUid, $tableName, $title, $swOverwrite) { G::LoadClass("reportTables"); if ($sStatus == "1" && $sDynUid != "") { //Verified as not to duplicate the name of the table switch ($swOverwrite) { case 1: //Delete report table $criteria = new Criteria(); $criteria->addSelectColumn(ReportTablePeer::REP_TAB_UID); $criteria->add(ReportTablePeer::REP_TAB_NAME, $tableName); $rsCriteria = ReportTablePeer::doSelectRS($criteria); $rptUid = null; if ($rsCriteria->next()) { $row = $rsCriteria->getRow(); $rptUid = $row[0]; } $rpts = new ReportTables(); if ($rptUid != null) { $rpts->deleteReportTable($rptUid); } $sRepTabUid = ""; break; case 2: //Delete table $rpts = new ReportTables(); $rpts->dropTable($tableName, "wf"); $sRepTabUid = ""; break; } $criteria = new Criteria(); $criteria->addSelectColumn(ReportTablePeer::REP_TAB_UID); //$criteria->add(ReportTablePeer::PRO_UID, $sProUid); $criteria->add(ReportTablePeer::REP_TAB_NAME, $tableName); $result = ReportTablePeer::doSelectRS($criteria); $result->setFetchmode(ResultSet::FETCHMODE_ASSOC); if ($result->next()) { $dataRes = $result->getRow(); if ($dataRes["REP_TAB_UID"] != $sRepTabUid) { return 1; } } else { //check if table $tableName exists $con = Propel::getConnection("workflow"); $stmt = $con->createStatement(); $sql="SHOW TABLES"; $rs1 = $stmt->executeQuery($sql, ResultSet::FETCHMODE_NUM); $rs1->next(); while ( is_array($row = $rs1->getRow() )) { if ( $row[0] == $tableName ) { return 2; } $rs1->next(); } } $_POST['form']['PRO_UID'] = $sProUid; $_POST['form']['REP_TAB_UID'] = $sRepTabUid; $_POST['form']['REP_TAB_NAME'] = $tableName; $_POST['form']['REP_TAB_TYPE'] = "GRID"; $_POST['form']['REP_TAB_GRID'] = $sProUid . "-" . $sDynUid; $_POST['form']['REP_TAB_CONNECTION'] = 'wf'; $_POST['form']['REP_TAB_CREATE_DATE'] = date("Y-m-d H:i:s"); $_POST['form']['REP_TAB_STATUS'] = 'ACTIVE'; $_POST['form']['REP_TAB_TITLE'] = $title; $_POST['form']['FIELDS'] = array(); G::LoadClass("reportTables"); $oReportTable = new ReportTable(); //if (!isset($_POST['form']['REP_TAB_CONNECTION'])) { // $_POST['form']['REP_TAB_CONNECTION'] = 'report'; //} if ($_POST['form']['REP_TAB_UID'] != "") { $aReportTable = $oReportTable->load($_POST['form']['REP_TAB_UID']); $sOldTableName = $aReportTable['REP_TAB_NAME']; $sOldConnection = $aReportTable['REP_TAB_CONNECTION']; } else { $sOldTableName = $_POST['form']['REP_TAB_NAME']; $sOldConnection = $_POST['form']['REP_TAB_CONNECTION']; $_POST['form']['REP_TAB_TYPE'] = 'NORMAL'; $oReportTable->create($_POST['form']); $_POST['form']['REP_TAB_UID'] = $oReportTable->getRepTabUid(); } $_POST['form']['REP_TAB_TYPE'] = 'NORMAL'; $oReportTable->update($_POST['form']); $_POST['form']['REP_TAB_TYPE'] = 'GRID'; $oReportVar = new ReportVar(); $oReportTables = new ReportTables(); $oReportTables->deleteAllReportVars($_POST['form']['REP_TAB_UID']); $aFields = array(); if ($_POST['form']['REP_TAB_TYPE'] == 'GRID') { $aAux = explode('-', $_POST['form']['REP_TAB_GRID']); global $G_FORM; G::LoadClass("formBatchRouting"); $G_FORM = new FormBatchRouting($_POST["form"]["PRO_UID"] . PATH_SEP . $aAux[1], PATH_DYNAFORM, SYS_LANG, false); $aAux = $G_FORM->getVars(false); foreach ($aAux as $aField) { $_POST['form']['FIELDS'][] = $aField['sName'] . '-' . $aField['sType']; } } $aFieldsClases = array(); $i = 1; $aFieldsClases[$i]['FLD_NAME'] = 'APP_UID'; $aFieldsClases[$i]['FLD_NULL'] = 'off'; $aFieldsClases[$i]['FLD_KEY'] = 'on'; $aFieldsClases[$i]['FLD_AUTO_INCREMENT'] = 'off'; $aFieldsClases[$i]['FLD_DESCRIPTION'] = ''; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR' ; $aFieldsClases[$i]['FLD_SIZE'] = 32; $i++; $aFieldsClases[$i]['FLD_NAME'] = 'APP_NUMBER'; $aFieldsClases[$i]['FLD_NULL'] = 'off'; $aFieldsClases[$i]['FLD_KEY'] = 'on'; $aFieldsClases[$i]['FLD_AUTO_INCREMENT'] = 'off'; $aFieldsClases[$i]['FLD_DESCRIPTION'] = ''; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR' ; $aFieldsClases[$i]['FLD_SIZE'] = 255; foreach ($_POST['form']['FIELDS'] as $sField) { $aField = explode('-', $sField); $i++; $aFieldsClases[$i]['FLD_NAME'] = $aField[0]; $aFieldsClases[$i]['FLD_NULL'] = 'off'; $aFieldsClases[$i]['FLD_KEY'] = 'off'; $aFieldsClases[$i]['FLD_AUTO_INCREMENT'] = 'off'; $aFieldsClases[$i]['FLD_DESCRIPTION'] = ''; switch ($aField[1]) { case 'currency': case 'percentage': $sType = 'number'; $aFieldsClases[$i]['FLD_TYPE'] = 'FLOAT' ; $aFieldsClases[$i]['FLD_SIZE'] = 255; break; case 'text': case 'password': case 'dropdown': case 'yesno': case 'checkbox': case 'radiogroup': case 'hidden': case "link": $sType = 'char'; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR' ; $aFieldsClases[$i]['FLD_SIZE'] = 255; break; case 'textarea': $sType = 'text'; $aFieldsClases[$i]['FLD_TYPE'] = 'TEXT' ; $aFieldsClases[$i]['FLD_SIZE'] = ''; break; case 'date': $sType = 'date'; $aFieldsClases[$i]['FLD_TYPE'] = 'DATE' ; $aFieldsClases[$i]['FLD_SIZE'] = ''; break; default: $sType = 'char'; $aFieldsClases[$i]['FLD_TYPE'] = 'VARCHAR' ; $aFieldsClases[$i]['FLD_SIZE'] = 255; break; } $oReportVar->create(array('REP_TAB_UID' => $_POST['form']['REP_TAB_UID'], 'PRO_UID' => $_POST['form']['PRO_UID'], 'REP_VAR_NAME' => $aField[0], 'REP_VAR_TYPE' => $sType)); $aFields[] = array('sFieldName' => $aField[0], 'sType' => $sType); } $_POST['form']['REP_TAB_TYPE'] = "NORMAL"; $oReportTables->dropTable($sOldTableName, $sOldConnection); $oReportTables->createTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields); $oReportTables->populateTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields, $_POST['form']['PRO_UID'], ''); $sRepTabUid = $_POST['form']['REP_TAB_UID']; //clases } else { $oReportTables = new ReportTables(); if ($sRepTabUid != "") { $oReportTables->deleteReportTable($sRepTabUid); } $sRepTabUid = ""; } $oCaseConsolidated = CaseConsolidatedPeer::retrieveByPK($sTasUid); if (!(is_object($oCaseConsolidated)) || get_class($oCaseConsolidated) != 'CaseConsolidated') { $oCaseConsolidated = new CaseConsolidated(); $oCaseConsolidated->setTasUid($sTasUid); } if ($sStatus == '1') { $oCaseConsolidated->setConStatus('ACTIVE'); } else { $oCaseConsolidated->setConStatus('INACTIVE'); } $oCaseConsolidated->setDynUid($sDynUid); $oCaseConsolidated->setRepTabUid($sRepTabUid); $oCaseConsolidated->save(); $sClassName = $tableName;//'__' . $sTasUid; if ($sStatus == '1') { //$oAdditionalTables->createPropelClasses($sTableName, $sClassName, $aFields, $sAddTabUid) //require_once 'classes/model/AdditionalTables.php'; //$oAdditionalTables = new AdditionalTables(); $oAdditionalTables = new AdditionalTables();//AdditionalTablesConsolidated $oAdditionalTables->createPropelClasses($tableName, $sClassName, $aFieldsClases, $sTasUid); } else { $sPath = PATH_DB . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP; @unlink($sPath . $sClassName . '.php'); @unlink($sPath . $sClassName . 'Peer.php'); @unlink($sPath . PATH_SEP . 'map' . PATH_SEP . $sClassName . 'MapBuilder.php'); @unlink($sPath . PATH_SEP . 'om' . PATH_SEP . 'Base' . $sClassName . '.php'); @unlink($sPath . PATH_SEP . 'om' . PATH_SEP . 'Base' . $sClassName . 'Peer.php'); } return ($sRepTabUid); }
/** * Validates all modified columns of given ReportVar object. * If parameter $columns is either a single column name or an array of column names * than only those columns are validated. * * NOTICE: This does not apply to primary or foreign keys for now. * * @param ReportVar $obj The object to validate. * @param mixed $cols Column name or array of column names. * * @return mixed TRUE if all columns are valid or the error message of the first invalid column. */ public static function doValidate(ReportVar $obj, $cols = null) { $columns = array(); if ($cols) { $dbMap = Propel::getDatabaseMap(ReportVarPeer::DATABASE_NAME); $tableMap = $dbMap->getTable(ReportVarPeer::TABLE_NAME); if (!is_array($cols)) { $cols = array($cols); } foreach ($cols as $colName) { if ($tableMap->containsColumn($colName)) { $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); $columns[$colName] = $obj->{$get}(); } } } else { if ($obj->isNew() || $obj->isColumnModified(ReportVarPeer::REP_VAR_UID)) { $columns[ReportVarPeer::REP_VAR_UID] = $obj->getRepVarUid(); } if ($obj->isNew() || $obj->isColumnModified(ReportVarPeer::REP_TAB_UID)) { $columns[ReportVarPeer::REP_TAB_UID] = $obj->getRepTabUid(); } if ($obj->isNew() || $obj->isColumnModified(ReportVarPeer::REP_VAR_NAME)) { $columns[ReportVarPeer::REP_VAR_NAME] = $obj->getRepVarName(); } if ($obj->isNew() || $obj->isColumnModified(ReportVarPeer::REP_VAR_TYPE)) { $columns[ReportVarPeer::REP_VAR_TYPE] = $obj->getRepVarType(); } } return BasePeer::doValidate(ReportVarPeer::DATABASE_NAME, ReportVarPeer::TABLE_NAME, $columns); }
$oReportTable = new ReportTable(); if (!isset($values['REP_TAB_CONNECTION'])) { $values['REP_TAB_CONNECTION'] = 'report'; } if ($values['REP_TAB_UID'] != '') { $aReportTable = $oReportTable->load($values['REP_TAB_UID']); $sOldTableName = $aReportTable['REP_TAB_NAME']; $sOldConnection = $aReportTable['REP_TAB_CONNECTION']; } else { $sOldTableName = $values['REP_TAB_NAME']; $sOldConnection = $values['REP_TAB_CONNECTION']; $oReportTable->create($values); $values['REP_TAB_UID'] = $oReportTable->getRepTabUid(); } $oReportTable->update($values); $oReportVar = new ReportVar(); $oReportTables = new ReportTables(); $oReportTables->deleteAllReportVars($values['REP_TAB_UID']); $aFields = array(); if ($values['REP_TAB_TYPE'] == 'GRID') { $aAux = explode('-', $values['REP_TAB_GRID']); global $G_FORM; $G_FORM = new Form($values['PRO_UID'] . '/' . $aAux[1], PATH_DYNAFORM, SYS_LANG, false); $aAux = $G_FORM->getVars(false); foreach ($aAux as $aField) { $values['FIELDS'][] = $aField['sName'] . '-' . $aField['sType']; } } foreach ($values['FIELDS'] as $sField) { $aField = explode('-', $sField); switch ($aField[1]) {
// $_POST['form']['REP_TAB_CONNECTION'] = 'report'; //} if ($_POST['form']['REP_TAB_UID'] != "") { $aReportTable = $oReportTable->load($_POST['form']['REP_TAB_UID']); $sOldTableName = $aReportTable['REP_TAB_NAME']; $sOldConnection = $aReportTable['REP_TAB_CONNECTION']; } else { $sOldTableName = $_POST['form']['REP_TAB_NAME']; $sOldConnection = $_POST['form']['REP_TAB_CONNECTION']; $_POST['form']['REP_TAB_TYPE'] = 'NORMAL'; $oReportTable->create($_POST['form']); $_POST['form']['REP_TAB_UID'] = $oReportTable->getRepTabUid(); } $_POST['form']['REP_TAB_TYPE'] = 'NORMAL'; $oReportTable->update($_POST['form']); $oReportVar = new ReportVar(); $oReportTables = new ReportTables(); $oReportTables->deleteAllReportVars($_POST['form']['REP_TAB_UID']); $aFields = array(); if ($isBPMN) { G::LoadClass("pmDynaform"); $pmDyna = new pmDynaform(array()); $pmDyna->fields["CURRENT_DYNAFORM"] = $sDynUid; $dataDyna = $pmDyna->getDynaform(); $json = G::json_decode($dataDyna["DYN_CONTENT"]); $data = $pmDyna->jsonr($json); G::pr($data); die; } else { $aAux = explode('-', $_POST['form']['REP_TAB_GRID']); global $G_FORM;