CODE STYLE

files modified:
conditionalShowHide.php
conditionalShowHide_Ajax.php
datemask.php
dynaform_Fields.php
dynaforms_Ajax.php
dynaforms_AssignVariables.php
dynaforms_ChoseType.php
dynaforms_Delete.php
dynaforms_Edit.php
dynaforms_FlatEditor.php
dynaforms_List.php
dynaforms_NewPlugin.php
dynaforms_PagedTableAjax.php
dynaforms_Preview.php
dynaforms_Save.php
dynaforms_SaveProperties.php
dynaforms_Save_as.php
dynaforms_Saveas.php
dynaforms_ToolbarAjax.php
dynaforms_checkDependentFields.php
fieldsGetterAjax.php
fieldsHandler.php
fieldsHandlerAjax.php
fieldsHandlerViewer.php
fields_Ajax.php
fields_Delete.php
fields_Edit.php
fields_List.php
fields_Order.php
test.php
This commit is contained in:
Ralph Asendeteufrer
2012-10-18 11:53:05 -04:00
parent 23d74542be
commit 17631d0082
30 changed files with 1683 additions and 1767 deletions

View File

@@ -18,7 +18,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
@@ -28,26 +27,16 @@
require_once "classes/model/FieldCondition.php";
G::LoadClass( 'ArrayPeer' );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$DISPLAY_MAX_SIZE = 25;
global $_DBArray;
$oFieldCondition = new FieldCondition;
$oFieldCondition = new FieldCondition();
$DYN_UID = $_SESSION['Current_Dynafom']['Parameters']['DYN_UID'];
$aRows = $oFieldCondition->getAllByDynUid( $DYN_UID );
$aFieldNames = Array(
'FCD_NRO',
'FCD_UID',
'FCD_FUNCTION',
'FCD_FIELDS',
'FCD_CONDITION',
'FCD_EVENTS',
'FCD_EVENT_OWNERS',
'FCD_STATUS',
'FCD_DYN_UID'
);
$aFieldNames = Array ('FCD_NRO','FCD_UID','FCD_FUNCTION','FCD_FIELDS','FCD_CONDITION','FCD_EVENTS','FCD_EVENT_OWNERS','FCD_STATUS','FCD_DYN_UID' );
//Routines to limit the show in list max size for some fields that can have large size
$inndex = 0;
@@ -83,14 +72,3 @@
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'dynaforms/dynaforms_ConditionalShowHideList', $oCriteria, Array ('DYN_UID' => $DYN_UID), '' );
G::RenderPage( 'publish', 'raw' );

View File

@@ -18,7 +18,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
@@ -37,7 +36,6 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_ConditionalShowHide', '', '' );
G::RenderPage( 'publish', 'raw' );
break;
case 'edit':
require_once 'classes/model/FieldCondition.php';
$oFieldCondition = new FieldCondition();
@@ -46,10 +44,8 @@ try {
$aData['condition'] = 'neyek';
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_ConditionalShowHide', '', $aRow );
G::RenderPage( 'publish', 'raw' );
//echo '<script>+alert(getField("FCD_CONDITION").value)</script>';
break;
case 'getDynaFieds':
G::LoadThirdParty( 'pear/json', 'class.json' );
G::LoadSystem( 'dynaformhandler' );
@@ -66,7 +62,6 @@ try {
print ($oJSON->encode( $aAvailableFields )) ;
break;
case 'showDynavars':
G::LoadSystem( 'dynaformhandler' );
@@ -77,22 +72,14 @@ try {
$aFilter = explode( ',', $sFilter );
$aAvailableFields = $oDynaformHandler->getFieldNames( $aFilter );
$aFieldNames = Array(
'id' => 'char',
'name' => 'char'
);
$aFieldNames = Array ('id' => 'char','name' => 'char' );
$aRows = Array ();
foreach ($aAvailableFields as $sFieldname) {
array_push($aRows, Array(
'id' => $sFieldname,
'name' => $sFieldname
));
array_push( $aRows, Array ('id' => $sFieldname,'name' => $sFieldname) );
}
$rows = array_merge(Array(
$aFieldNames
), $aRows);
$rows = array_merge( Array ($aFieldNames), $aRows );
global $_DBArray;
$_DBArray['DYNAFIELDS'] = $rows;
@@ -103,9 +90,7 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_vars', '', '' );
G::RenderPage( 'publish', 'raw' );
break;
case 'testSetup':
$sFields = $_POST['sFields'];
$aFields = Array ();
@@ -113,10 +98,7 @@ try {
$i = 1;
foreach ($aFieldsTmp as $aField) {
$aFields['gFields'][$i ++] = Array(
'dynaid' => $aField,
'dynafield' => $aField,
'dynavalue' => ''
$aFields['gFields'][$i ++] = Array ('dynaid' => $aField,'dynafield' => $aField,'dynavalue' => ''
);
}
@@ -127,26 +109,14 @@ try {
print ('false') ;
}
break;
case 'save':
require_once 'classes/model/FieldCondition.php';
$oFieldCondition = new FieldCondition();
$aDYN = $_SESSION['Current_Dynafom']['Parameters'];
$_POST['FCD_UID'] = ($_POST['FCD_UID'] == '0') ? '' : $_POST['FCD_UID'];
$aData = Array(
'FCD_UID' => Isset($_POST['FCD_UID'])?$_POST['FCD_UID']:'',
'FCD_FUNCTION' => $_POST['function'],
'FCD_FIELDS' => $_POST['fields_selected'],
'FCD_CONDITION' => $_POST['condition'],
'FCD_EVENTS' => $_POST['events'],
'FCD_EVENT_OWNERS' => $_POST['event_owner_selected'],
'FCD_STATUS' => $_POST['enabled'],
'FCD_DYN_UID' => $aDYN['DYN_UID']
);
$aData = Array ('FCD_UID' => Isset( $_POST['FCD_UID'] ) ? $_POST['FCD_UID'] : '','FCD_FUNCTION' => $_POST['function'],'FCD_FIELDS' => $_POST['fields_selected'],'FCD_CONDITION' => $_POST['condition'],'FCD_EVENTS' => $_POST['events'],'FCD_EVENT_OWNERS' => $_POST['event_owner_selected'],'FCD_STATUS' => $_POST['enabled'],'FCD_DYN_UID' => $aDYN['DYN_UID']);
$oFieldCondition->quickSave( $aData );
break;
case 'delete':
require_once 'classes/model/FieldCondition.php';
$oFieldCondition = FieldConditionPeer::retrieveByPk( $_POST['FCD_UID'] );
@@ -154,7 +124,6 @@ try {
$oFieldCondition->delete();
}
break;
}
} catch (Exception $e) {
print ($e->getMessage()) ;
@@ -183,23 +152,3 @@ try {
</pre>
*/

View File

@@ -20,22 +20,23 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'dynaFormField' );
// if (!(isset($_GET['A']) && $_GET['A']!=='')) return;
// $file = G::decrypt( $_GET['A'] , URL_KEY );
$file = 'datemask';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/datemask', '', '' );
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/fields/' . $type, '', $Fields , SYS_URI.'dynaforms/fields_Save', SYS_URI.'dynaforms/fields_Ajax');
G::RenderPage( "publish", "raw" );
?>

View File

@@ -20,11 +20,13 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'xmlDb' );
$G_MAIN_MENU = 'processmaker';
@@ -50,11 +52,10 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
define( 'DB_XMLDB_NAME', '' );
define( 'DB_XMLDB_TYPE', 'myxml' );
$G_PUBLISH = new Publisher();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('pagedtable', 'paged-table', 'dynaforms/dynaform_Fields', '', array('SYS_LANG' => SYS_LANG) , 'dynaforms_Save', 'dynaforms_PagedTableAjax');
$G_PUBLISH->AddContent( 'pagedtable', 'paged-table', 'dynaforms/dynaform_Fields', '', array ('SYS_LANG' => SYS_LANG
), 'dynaforms_Save', 'dynaforms_PagedTableAjax' );
G::RenderPage( "publish" );
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Created on 07/01/2008
@@ -226,4 +225,4 @@ $oDynaformEditorAjax = new dynaformEditorAjax($_POST);
// break;
// }
//
?>

View File

@@ -22,8 +22,7 @@ $aFields['VALIDATION_MESSAGE'] = G::LoadTranslation('ID_FILL_PRIMARY_KEYS');
G::LoadClass( 'xmlfield_InputPM' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_AssignVariables', '', $aFields,
SYS_URI . 'dynaforms/dynaforms_Save');
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_AssignVariables', '', $aFields, SYS_URI . 'dynaforms/dynaforms_Save' );
G::RenderPage( 'publish-raw', 'raw' );

View File

@@ -6,4 +6,4 @@
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_ChoseType', '', $aFields , SYS_URI.'dynaforms/dynaforms_Edit');
G::RenderPage( "publish-raw" , "raw" );
?>

View File

@@ -20,9 +20,10 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
require_once ('classes/model/Dynaform.php');
require_once 'classes/model/ObjectPermission.php';
@@ -34,13 +35,13 @@ require_once 'classes/model/CaseTrackerObject.php';
In here we are deleting all datas about this Dynaform into DB
*/
if(isset($_POST['function']))
if (isset( $_POST['function'] )) {
$sfunction = $_POST['function'];
else
} else {
$sfunction = $_POST['functions'];
}
switch ($sfunction) {
case 'getRelationInfDynaform':
$oStepSupervisor = new StepSupervisor();
$fields2 = $oStepSupervisor->loadInfo( $_POST['DYN_UID'] );
@@ -50,7 +51,6 @@ else
}
return print $result;
break;
case 'getDynaformAssign':
$oStep = new Step();
$aDependent = $oStep->loadInfoAssigDynaform( $_POST['PRO_UID'], $_POST['DYN_UID'] );
@@ -60,11 +60,12 @@ else
}
return print $result;
break;
case 'deleteDynaform':
$dynaform = new dynaform();
if (!isset($_POST['DYN_UID'])) return;
if (! isset( $_POST['DYN_UID'] )) {
return;
}
//in table dynaform
$dynaform->remove( $_POST['DYN_UID'] );
@@ -85,7 +86,9 @@ else
$oCTO->removeByObject( 'DYNAFORM', $_POST['DYN_UID'] );
break;
/** erik: new and improved methods */
/**
* erik: new and improved methods
*/
case 'getDynaformSupervisorRelations':
try {
$oStepSupervisor = new StepSupervisor();
@@ -107,10 +110,8 @@ else
$result->passed = false;
$result->msg = $e->getMessage();
}
print G::json_encode( $result );
break;
case 'getDynaformTaskRelations':
try {
$oStepSupervisor = new StepSupervisor();
@@ -133,14 +134,13 @@ else
$result->success = false;
$result->msg = $e->getMessage();
}
print G::json_encode( $result );
break;
case 'removeDynaform':
try {
if ( ! isset($_POST['DYN_UID']) )
if (! isset( $_POST['DYN_UID'] )) {
throw new Exception( 'DYN_UID was not set!' );
}
$DYN_UIDS = explode( ',', $_POST['DYN_UID'] );
@@ -172,7 +172,7 @@ else
$result->success = false;
$result->msg = $e->getMessage();
}
print G::json_encode( $result );
break;
}

View File

@@ -20,12 +20,14 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
require_once ('classes/model/Dynaform.php');
require_once ('classes/model/AdditionalTables.php');
@@ -43,10 +45,7 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
array_push( $aTablesList, $oDataset->getRow() );
}
$filedNames = Array (
"ADD_TAB_UID",
"ADD_TAB_NAME",
);
$filedNames = Array ("ADD_TAB_UID","ADD_TAB_NAME");
$aTablesList = array_merge( Array ($filedNames), $aTablesList );
@@ -55,12 +54,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$dynUid = (isset( $_GET['DYN_UID'] )) ? urldecode( $_GET['DYN_UID'] ) : '';
$dynaform = new dynaform();
if ($dynUid=='')
{
if ($dynUid == '') {
$aFields['DYN_UID'] = $dynUid;
}
else
{
} else {
$aFields = $dynaform->load( $dynUid );
}
$aFields['PRO_UID'] = isset( $dynaform->Fields['PRO_UID'] ) ? $dynaform->Fields['PRO_UID'] : $_GET['PRO_UID'];
@@ -72,3 +68,4 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_Edit', '', $aFields, SYS_URI . 'dynaforms/dynaforms_Save' );
G::RenderPage( "publish-raw", "raw" );

View File

@@ -20,18 +20,21 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'toolBar' );
G::LoadClass( 'dynaFormField' );
G::LoadClass( 'process' );
G::LoadClass( 'dynaform' );
//G::LoadClass('configuration');
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'processes';
$G_ID_MENU_SELECTED = 'PROCESSES';
@@ -50,20 +53,19 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$dynaform->Fields['DYN_UID'] = (isset( $_POST['DYN_UID'] )) ? urldecode( $_POST['DYN_UID'] ) : '0';
$dynaform->Load( $dynaform->Fields['DYN_UID'] );
if (isset($_POST['DYN_UID']) && ($_POST['DYN_UID']!==''))
if (isset( $_POST['DYN_UID'] ) && ($_POST['DYN_UID'] !== '')) {
$file = $dynaform->Fields['DYN_FILENAME'];
else
} else {
//Hardcode: Sample of xmlform.
$file = $PRO_UID . '/' . 'myInfo';
}
/* Start Comment: If file doesn't exist, it is created */
if (! file_exists( PATH_DYNAFORM . $file . '.xml' )) {
$newDoc = new Xml_Document();
$newDoc->addChildNode(
new Xml_Node( 'dynaForm', 'open', '',
array( 'type'=>'xmlform', 'name' => $file ) ) );
$newDoc->children[0]->addChildNode(
new Xml_Node( '', 'cdata', "\n" ) );
$newDoc->addChildNode( new Xml_Node( 'dynaForm', 'open', '', array ('type' => 'xmlform','name' => $file
) ) );
$newDoc->children[0]->addChildNode( new Xml_Node( '', 'cdata', "\n" ) );
G::verifyPath( dirname( PATH_DYNAFORM . $file . '.xml' ), true );
$newDoc->save( PATH_DYNAFORM . $file . '.xml' );
unset( $newDoc );
@@ -88,47 +90,27 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$title = $process->Fields['PRO_TITLE'] . ' : ' . $dynaform->Fields['DYN_TITLE'];
$Parameters = array(
'SYS_LANG' => SYS_LANG,
'URL'=> G::encrypt( $file , URL_KEY ),
'DYN_UID'=> $dynaform->Fields['DYN_UID'],
'DYNAFORM_NAME'=>$title
$Parameters = array ('SYS_LANG' => SYS_LANG,'URL' => G::encrypt( $file, URL_KEY ),'DYN_UID' => $dynaform->Fields['DYN_UID'],'DYNAFORM_NAME' => $title
);
$openDoc = new Xml_Document();
$openDoc->parseXmlFile( PATH_DYNAFORM . $file . '.xml' );
$XmlEditor = array(
'URL'=> G::encrypt( $file , URL_KEY ),
'XML'=> $openDoc->getXml()
$XmlEditor = array ('URL' => G::encrypt( $file, URL_KEY ),'XML' => $openDoc->getXml()
);
$form = new Form( $file, PATH_DYNAFORM, SYS_LANG, true );
$HtmlEditor = array(
'URL'=> G::encrypt( $file , URL_KEY ),
'HTML'=> $form->printTemplate( $form->template , $script )
$HtmlEditor = array ('URL' => G::encrypt( $file, URL_KEY ),'HTML' => $form->printTemplate( $form->template, $script )
);
$JSEditor = array(
'URL'=> G::encrypt( $file , URL_KEY ),
'HTML'=> $form->printTemplate( $form->template , $script )
$JSEditor = array ('URL' => G::encrypt( $file, URL_KEY ),'HTML' => $form->printTemplate( $form->template, $script )
);
/* Block : Loads the Editor configuration */
$defaultConfig = array(
'Editor'=>array(
'left'=>'0',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
$defaultConfig = array ('Editor' => array ('left' => '0',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
'top' => '0',//'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
'width'=>'document.body.clientWidth-4',
'height'=>'document.body.clientHeight-2'//'3/4*(document.body.clientWidth-getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))*2)',
),
'Toolbar'=>array(
'left'=>'document.body.clientWidth-2-toolbar.clientWidth-24-3+7',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
'width' => 'document.body.clientWidth-4','height' => 'document.body.clientHeight-2' //'3/4*(document.body.clientWidth-getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))*2)',
),'Toolbar' => array ('left' => 'document.body.clientWidth-2-toolbar.clientWidth-24-3+7',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
'top' => '52' //'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
),
'FieldsList'=>array(
'left'=>'4+toolbar.clientWidth+24',
'top'=>'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
'width'=>268-24,
'height'=>400,
),'FieldsList' => array ('left' => '4+toolbar.clientWidth+24','top' => 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))','width' => 268 - 24,'height' => 400
)
);
/*$configuration = new Configuration($dbc);
@@ -145,7 +127,7 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$config = $defaultConfig;
/* End Block */
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->publisherId = 'dynaformEditor';
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->setTitle( "Dynaform Editor" );
@@ -153,18 +135,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
//$G_PUBLISH->AddContent('pagedtable', 'paged-table', 'dynaforms/fields_ShortList', '', $Parameters , '', SYS_URI.'dynaforms/dynaforms_PagedTableAjax');
$G_PUBLISH->AddContent( 'blank' );
$panelConf = array(
'title'=>G::LoadTranslation('ID_DYNAFORM_EDITOR').' - ['.$title.']',
'style'=>array(
'title'=>array('textAlign'=>'left')
),
'width'=>700,
'height'=>600,
'tabWidth'=>120,
'modal'=>true,
'drag'=>false,
'resize'=>false,
'blinkToFront'=>false
$panelConf = array ('title' => G::LoadTranslation( 'ID_DYNAFORM_EDITOR' ) . ' - [' . $title . ']','style' => array ('title' => array ('textAlign' => 'left'
)
),'width' => 700,'height' => 600,'tabWidth' => 120,'modal' => true,'drag' => false,'resize' => false,'blinkToFront' => false
);
$panelConf = array_merge( $panelConf, $config['Editor'] );
@@ -179,6 +152,7 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$G_PUBLISH->AddContent( 'blank' );
// $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Properties', '', $JSEditor , '', '');
$G_PUBLISH->AddContent( 'panel-tab', 'Preview', 'dynaformEditor[3]', 'changoToPreview', 'saveCurrentView' );
$G_PUBLISH->AddContent( 'panel-tab', 'XML Code', 'dynaformEditor[4]', 'changoToXmlCode', 'saveCurrentView' );
$G_PUBLISH->AddContent( 'panel-tab', 'HTML Template', 'dynaformEditor[5]', 'changoToHtmlCode', 'saveCurrentView' );
@@ -211,7 +185,6 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
}
resizeXmlEditor();
function toolbarWindow ( title , element, x, y, width, height, callbackFn ) {
var myPanel = new leimnud.module.panel();
myPanel.options = {

View File

@@ -20,10 +20,12 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'processes';
@@ -37,10 +39,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$PRO_UID = '746B734DC23311';
$Fields['PRO_UID'] = $PRO_UID;
$Fields['SYS_LANG'] = SYS_LANG;
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'pagedtable', 'paged-table', 'dynaforms/dynaforms_List', '', $Fields, 'dynaforms_Save' );
G::RenderPage( "publish" );
?>

View File

@@ -20,42 +20,43 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//call plugin
// $oPluginRegistry = &PMPluginRegistry::getSingleton();
// $existsDynaforms = $oPluginRegistry->existsTrigger(PM_NEW_DYNAFORM_LIST );
//for now, we are going with the default list, because the plugin is not complete
include ('dynaforms_Edit.php');
die;
die();
//---*****************
if (! $existsDynaforms) {
include ('dynaforms_Edit.php');
die;
die();
}
print "Existe";
print (class_exists( 'folderData' )) ;
die;
die();
//end plugin
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin =n 'login/login' );
require_once ('classes/model/Dynaform.php');
$dynUid = (isset( $_GET['DYN_UID'] )) ? urldecode( $_GET['DYN_UID'] ) : '';
$dynaform = new dynaform();
if ($dynUid=='')
{
if ($dynUid == '') {
$aFields['DYN_UID'] = $dynUid;
}
else
{
} else {
$aFields = $dynaform->load( $dynUid );
}
$aFields['PRO_UID'] = isset( $dynaform->Fields['PRO_UID'] ) ? $dynaform->Fields['PRO_UID'] : $_GET['PRO_UID'];
@@ -64,4 +65,4 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_Edit', '', $aFields, SYS_URI . 'dynaforms/dynaforms_Save' );
G::RenderPage( "publish-raw", "raw" );
?>

View File

@@ -20,9 +20,11 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
function pagedTable_BeforeQuery (&$ntable)
{
$file = G::decrypt( $ntable->xmlForm->values['URL'], URL_KEY );
@@ -36,7 +38,7 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
/* End Block*/
}
require_once (PATH_GULLIVER_HOME . 'methods/pagedTableAjax.php');
die;
die();
G::LoadSystem( 'pagedTable' );
G::LoadInclude( 'ajax' );
@@ -53,21 +55,26 @@ die;
$filterForm->setValues( $newValues['form'] );
$filter = array ();
foreach ($filterForm->fields as $fieldName => $field) {
if (($field->dataCompareField!=='') && (isset($newValues['form'][$fieldName])))
if (($field->dataCompareField !== '') && (isset( $newValues['form'][$fieldName] ))) {
$filter[$field->dataCompareField] = $filterForm->values[$fieldName];
}
$ntable->filterType[$field->dataCompareField] = $field->dataCompareType;
}
$ntable->filter = $filter; //G::http_build_query($filter);
}
}
$fastSearch = get_ajax_value( 'fastSearch' );
if (isset($fastSearch)) $ntable->fastSearch= urldecode($fastSearch);
if (isset( $fastSearch )) {
$ntable->fastSearch = urldecode( $fastSearch );
}
$orderBy = get_ajax_value( 'order' );
if (isset( $orderBy )) {
$orderBy = urldecode( $orderBy );
$ntable->orderBy = $orderBy;
}
if (isset($page) && $page!=='') $ntable->currentPage=(int) $page;
if (isset( $page ) && $page !== '') {
$ntable->currentPage = (int) $page;
}
$file = G::decrypt( $ntable->xmlForm->values['URL'], URL_KEY );
/* Start Block: Defines the virtual XMLDB*/
@@ -80,39 +87,47 @@ die;
/* End Block*/
$ntable->prepareQuery();
switch ($function)
{
switch ($function) {
case "showHideField":
$field = get_ajax_value( 'field' );
$ntable->style[$field]['showInTable']=
($ntable->style[$field]['showInTable']==='0')?'1':'0';
$ntable->style[$field]['showInTable'] = ($ntable->style[$field]['showInTable'] === '0') ? '1' : '0';
break;
case "paint":
break;
case "delete":
$ntable->prepareQuery();
parse_str( get_ajax_value( 'field' ), $field );
foreach($field as $key => $value) $field[$key]=urldecode($value);
foreach ($field as $key => $value) {
$field[$key] = urldecode( $value );
}
$ntable->ses->execute( $ntable->replaceDataField( $ntable->sqlDelete, $field ) );
break;
case "update":
$ntable->prepareQuery();
parse_str( get_ajax_value( 'field' ), $field );
foreach($field as $key => $value) $field[$key]=urldecode($value);
foreach ($field as $key => $value) {
$field[$key] = urldecode( $value );
}
parse_str( get_ajax_value( 'update' ), $fieldup );
foreach($fieldup as $key => $value) $field['new'.$key]=urldecode($value); //join
foreach ($fieldup as $key => $value) {
$field['new' . $key] = urldecode( $value ); //join
}
$ntable->ses->execute( $ntable->replaceDataField( $ntable->sqlUpdate, $field ) );
break;
case "insert":
$ntable->prepareQuery();
parse_str( get_ajax_value( 'field' ), $field );
foreach($field as $key => $value) $field[$key]=urldecode($value);
foreach ($field as $key => $value) {
$field[$key] = urldecode( $value );
}
$ntable->ses->execute( $ntable->replaceDataField( $ntable->sqlInsert, $field ) );
break;
case "printForm":
parse_str( get_ajax_value( 'field' ), $field );
parse_str( get_ajax_value( 'field' ), $field );
foreach($field as $key => $value) $field[$key]=urldecode($value);
foreach ($field as $key => $value) {
$field[$key] = urldecode( $value );
}
$ntable->printForm( get_ajax_value( 'filename' ), $field );
return;
}
@@ -122,4 +137,4 @@ die;
$conf = new Configuration( $dbc, $ntable );
$conf->setConfig( $ntable->__Configuration, $ntable, $conf->aConfig );
$conf->saveConfig( 'pagedTable', $ntable->__OBJ_UID, '', $_SESSION['USER_LOGGED'], '' );
?>

View File

@@ -20,47 +20,42 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'toolBar' );
G::LoadClass( 'dynaFormField' );
if (!(isset($_POST['A']) && $_POST['A']!=='')) return;
if (! (isset( $_POST['A'] ) && $_POST['A'] !== '')) {
return;
}
$file = G::decrypt( $_POST['A'], URL_KEY );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$form = new Form( $file, PATH_DYNAFORM, SYS_LANG, true );
switch(basename($form->template,'.html'))
{
case 'grid': $template='grid';break;
default: $template='xmlform';
switch (basename( $form->template, '.html' )) {
case 'grid':
$template = 'grid';
break;
default:
$template = 'xmlform';
}
$G_PUBLISH->AddContent('dynaform', $template , $file, '',
array(
'__DYNAFORM_OPTIONS'=> array(
'PREVIOUS_STEP' => '#',
'NEXT_STEP' => '#',
'PREVIOUS_ACTION' => 'return false;',
'NEXT_ACTION' => 'return false;'
$G_PUBLISH->AddContent( 'dynaform', $template, $file, '', array ('__DYNAFORM_OPTIONS' => array ('PREVIOUS_STEP' => '#','NEXT_STEP' => '#','PREVIOUS_ACTION' => 'return false;','NEXT_ACTION' => 'return false;'
)
), '' );
G::RenderPage( 'publish', 'raw' );
/* $toolbar = new ToolBar( '/dynaforms/dynaforms_Toolbar' , PATH_XMLFORM, SYS_LANG, false );
print($toolbar->render( $toolbar->template , $script ));*/
//$form = new Form( $file , PATH_DYNAFORM, SYS_LANG, true );
//print($form->render( $form->template , $script ));
?>

View File

@@ -20,20 +20,23 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
require_once ('classes/model/Dynaform.php');
require_once ('classes/model/Content.php');
$oJSON = new Services_JSON();
if( isset($_POST['function']) )
if (isset( $_POST['function'] )) {
$sfunction = $_POST['function'];
else if( isset($_POST['functions']) )
} elseif (isset( $_POST['functions'] )) {
$sfunction = $_POST['functions'];
}
if (isset( $sfunction ) && $sfunction == 'lookforNameDynaform') {
@@ -61,27 +64,24 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$oDataset1->next();
$aRow1 = $oDataset1->getRow();
if( $aRow1['DYNAFORMS'] )
if ($aRow1['DYNAFORMS']) {
$flag = false;
}
}
print $flag;
} else {
$dynaform = new dynaform();
if(isset($_POST['form']))
{
if (isset( $_POST['form'] )) {
$aData = $_POST['form']; //For old process map form
if ($aData['DYN_UID']==='')
if ($aData['DYN_UID'] === '') {
unset( $aData['DYN_UID'] );
}
else
{
} else {
$aData = $_POST; //For Extjs (Since we are not using form in ExtJS)
$aFields = array ();
$aVariables = array ();
if(isset($aData['FIELDS']))
{
if (isset( $aData['FIELDS'] )) {
$aFields = G::json_decode( $_POST['FIELDS'] );
$aVariables = G::json_decode( $_POST['VARIABLES'] );
}
@@ -93,12 +93,10 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
}
//if ($aData['DYN_UID']==='') unset($aData['DYN_UID']);
if (isset($aData['DYN_UID']))
{
if (isset( $aData['DYN_UID'] )) {
$dynaform->Save( $aData );
}
else
{
} else {
if (! isset( $aData['ADD_TABLE'] ) || $aData['ADD_TABLE'] == "") {
$aFields = $dynaform->create( $aData );
} else {
@@ -109,4 +107,4 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
}
echo $dynaform->getDynUid();
}
?>

View File

@@ -20,10 +20,13 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
}
G::LoadInclude( 'ajax' );
G::LoadClass( 'dynaform' );
@@ -34,22 +37,28 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
//$dynaform = new dynaform( $dbc );
if ($_POST['form']['DYN_UID']==='') unset($_POST['form']['DYN_UID']);
if ($_POST['form']['DYN_UID'] === '') {
unset( $_POST['form']['DYN_UID'] );
}
$Fields = $_POST['form'];
if (!isset($Fields['DYN_UID'])) return;
if (! isset( $Fields['DYN_UID'] )) {
return;
}
$file = G::decrypt( $Fields['A'], URL_KEY );
$Fields['DYN_FILENAME'] = (strcasecmp( substr( $file, - 5 ), '_tmp0' ) == 0) ? substr( $file, 0, strlen( $file ) - 5 ) : $file;
$_SESSION['CURRENT_DYNAFORM'] = $Fields;
//$dynaform->Save( $Fields );
$dbc2 = new DBConnection( PATH_DYNAFORM . $file . '.xml', '', '', '', 'myxml' );
$ses2 = new DBSession( $dbc2 );
if (!isset($Fields['ENABLETEMPLATE'])) $Fields['ENABLETEMPLATE'] ="0";
if (! isset( $Fields['ENABLETEMPLATE'] )) {
$Fields['ENABLETEMPLATE'] = "0";
}
$ses2->execute( G::replaceDataField( "UPDATE . SET WIDTH = @@WIDTH WHERE XMLNODE_NAME = 'dynaForm' ", $Fields ) );
$ses2->execute( G::replaceDataField( "UPDATE . SET ENABLETEMPLATE = @@ENABLETEMPLATE WHERE XMLNODE_NAME = 'dynaForm' ", $Fields ) );
$ses2->execute( G::replaceDataField( "UPDATE . SET MODE = @@MODE WHERE XMLNODE_NAME = 'dynaForm' ", $Fields ) );
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
@@ -35,8 +34,7 @@
require_once "classes/model/FieldCondition.php";
}
try
{
try {
$con = Propel::getConnection( DynaformPeer::DATABASE_NAME );
$frm = $_POST['form'];
$PRO_UID = $frm['PRO_UID'];
@@ -47,7 +45,7 @@
$oFieldCondition = new FieldCondition();
$aConditions = $oFieldCondition->getAllByDynUid( $DYN_UID );
$dynaform = new dynaform;
$dynaform = new dynaform();
/*Save Register*/
$dynUid = (G::generateUniqueID());
@@ -64,6 +62,7 @@
//$con->commit();
$hd = fopen( PATH_DYNAFORM . $PRO_UID . '/' . $DYN_UID . '.xml', "r" );
$hd1 = fopen( PATH_DYNAFORM . $PRO_UID . '/' . $dynUid . '.xml', "w" );
$templateFilename = PATH_DYNAFORM . $PRO_UID . '/' . $DYN_UID . '.html';
@@ -101,9 +100,7 @@
fclose( $templateHd1 );
}
}
catch(Exception $e)
{
} catch (Exception $e) {
return (array) $e;
}
?>

View File

@@ -20,25 +20,28 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
require_once ('classes/model/Dynaform.php');
$dynUid = (isset( $_GET['DYN_UID'] )) ? urldecode( $_GET['DYN_UID'] ) : '';
$dynaform = new dynaform();
$aFields = $dynaform->load( $dynUid );
//print_r($aFields);
//$aFields['PRO_UID'] = isset($dynaform->Fields['PRO_UID'])?$dynaform->Fields['PRO_UID']:$_GET['PRO_UID'];
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_Saveas', '', $aFields, SYS_URI . 'dynaforms/dynaforms_Save_as' );
G::RenderPage( "publish-raw", "raw" );

View File

@@ -1,27 +1,19 @@
<?php
/**
* @author gustavo cruz gustavo-at-colosa.com
* @param POST
* @desc evaluates the dynaform type and other parameters in order to
* evaluates the dynaform type and other parameters in order to
* render the correct toolbar in each case
*
* @author gustavo cruz gustavo-at-colosa.com
* @param POST
*/
G::LoadClass( 'toolBar' );
global $G_PUBLISH;
$script = '';
$G_PUBLISH = new Publisher;
$Parameters = array(
'SYS_LANG' => SYS_LANG,
'URL'=> G::encrypt( $_POST['FILE'] , URL_KEY ),
'DYN_UID'=> $_POST['DYN_UID'],
'PRO_UID'=> $_POST['PRO_UID'],
'DYNAFORM_NAME'=>$_POST['DYN_TITLE'],
'FILE'=>$_POST['FILE'],
);
$G_PUBLISH = new Publisher();
$Parameters = array ('SYS_LANG' => SYS_LANG,'URL' => G::encrypt( $_POST['FILE'], URL_KEY ),'DYN_UID' => $_POST['DYN_UID'],'PRO_UID' => $_POST['PRO_UID'],'DYNAFORM_NAME' => $_POST['DYN_TITLE'],'FILE' => $_POST['FILE']);
//$Parameters = "";
if ($_POST['TOOLBAR'] == "grid") {
@@ -31,4 +23,4 @@ G::LoadClass('toolBar');
}
G::RenderPage( 'publish', 'raw' );
?>

View File

@@ -1,4 +1,5 @@
<?php
/**
* dynaforms_checkDependentFields.php
*
@@ -20,28 +21,36 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* this file is a fix to a dependency bug it was just a minor improvement,
* also the functionality of dependent fields in grids doesn't depends in this
* file so this is somewhat expendable.
*
*/
function subDependencies( $k , &$G_FORM , &$aux, $grid = '') {
function subDependencies ($k, &$G_FORM, &$aux, $grid = '')
{
$myDependentFields = '';
if (array_search( $k, $aux )!==FALSE) return array();
if (array_search( $k, $aux ) !== false) {
return array ();
}
if ($grid == '') {
if (!array_key_exists( $k , $G_FORM->fields )) return array();
if (!isset($G_FORM->fields[$k]->dependentFields)) return array();
if (! array_key_exists( $k, $G_FORM->fields )) {
return array ();
}
if (! isset( $G_FORM->fields[$k]->dependentFields )) {
return array ();
}
$aux[] = $k;
$mydependentFields = $G_FORM->fields[$k]->dependentFields;
} else {
if (! array_key_exists( $k, $G_FORM->fields[$grid]->fields )) {
return array ();
}
if (! isset( $G_FORM->fields[$grid]->fields[$k]->dependentFields )) {
return array ();
}
else {
if (!array_key_exists( $k , $G_FORM->fields[$grid]->fields )) return array();
if (!isset($G_FORM->fields[$grid]->fields[$k]->dependentFields)) return array();
$myDependentFields = $G_FORM->fields[$grid]->fields[$k]->dependentFields;
$myDependentFields = explode( ',', $G_FORM->fields[$grid]->fields[$k]->dependentFields );
@@ -49,7 +58,9 @@
return $myDependentFields;
}
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
// the script responds an ajax request in order to check the dependent fields,
// and generate a json output of the values that the dependent field must have.
$sDynUid = G::getUIDName( urlDecode( $_POST['DYN_UID'] ) );
@@ -70,7 +81,8 @@ $newValues=$json->decode(urlDecode(stripslashes($_POST['form'])));
$aKeys = array_keys( $newValue );
$aValues = array ();
for ($i = 1; $i <= ($_POST['row'] - 1); $i ++) {
$aValues[$i] = array($aKeys[0] => '');
$aValues[$i] = array ($aKeys[0] => ''
);
}
$aValues[$_POST['row']] = array ($aKeys[0] => $newValue[$aKeys[0]] );
$newValues[$sKey]->$_POST['grid'] = $aValues;
@@ -95,8 +107,7 @@ $newValues=$json->decode(urlDecode(stripslashes($_POST['form'])));
}
}
$_SESSION[$G_FORM->id][$k] = $v;
}
else {
} else {
foreach ($v[$_POST['row']] as $k1 => $v1) {
$myDependentFields = subDependencies( $k1, $G_FORM, $aux, $_POST['grid'] );
if (! $found) {
@@ -120,4 +131,3 @@ $newValues=$json->decode(urlDecode(stripslashes($_POST['form'])));
break;
}
?>

View File

@@ -1,20 +1,21 @@
<?php
// added by gustavo cruz gustavo-at-colosa.com
/**
* this function validates which fields cannot be part of a
* grid dynaform those are: password, title, subtitle, button, submit,
* reset, listbox, checkbox, check group, radio group, file, javascript
* and obviously grid.
*
* @name apply_properties
* @author gustavo cruz
* @access public
* @param $gridFields
* @return $invalidFields
* @desc this function validates which fields cannot be part of a
* grid dynaform those are: password, title, subtitle, button, submit,
* reset, listbox, checkbox, check group, radio group, file, javascript
* and obviously grid.
*
**/
*/
G::LoadClass( 'xmlDb' );
function validateGridConversion ($gridFields){
function validateGridConversion ($gridFields)
{
$invalidFields = array ();
foreach ($gridFields as $value) {
@@ -64,39 +65,36 @@ G::LoadClass('xmlDb');
}
// end
// added by gustavo cruz gustavo-at-colosa.com
/**
* this function get the fields that are part of the temporal
* dynaform file.
*
* @name getTemporalFields
* @author gustavo cruz
* @access public
* @param $file - the name of the dynaform file
* @return invalidFields string
* @desc this function get the fields that are part of the temporal
* dynaform file.
**/
function getTemporalFields($file){
*/
function getTemporalFields ($file)
{
try {
//$G_PUBLISH->AddContent('pagedtable', 'paged-table', 'dynaforms/fields_List', 'display:none', $Parameters , '', SYS_URI.'dynaforms/dynaforms_PagedTableAjax');
$i = 0;
$aFields = array ();
$aFields[] = array('XMLNODE_NAME' => 'char',
'TYPE' => 'char',
'UP' => 'char',
'DOWN' => 'char');
$aFields[] = array ('XMLNODE_NAME' => 'char','TYPE' => 'char','UP' => 'char','DOWN' => 'char');
$oSession = new DBSession( new DBConnection( PATH_DYNAFORM . $file . '_tmp0.xml', '', '', '', 'myxml' ) );
$oDataset = $oSession->Execute( 'SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" ) AND TYPE <> "pmconnection"' );
$iMaximun = $oDataset->count();
while ($aRow = $oDataset->Read()) {
$aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],
'TYPE' => $aRow['TYPE'],
'UP' => ($i > 0 ? G::LoadTranslation('ID_UP') : ''),
'DOWN' => ($i < $iMaximun-1 ? G::LoadTranslation('ID_DOWN') : ''),
'row__' => ($i + 1));
$aFields[] = array ('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],'TYPE' => $aRow['TYPE'],'UP' => ($i > 0 ? G::LoadTranslation( 'ID_UP' ) : ''),'DOWN' => ($i < $iMaximun - 1 ? G::LoadTranslation( 'ID_DOWN' ) : ''),'row__' => ($i + 1));
$i ++;
}
// print_r($aFields);
// die;
} catch (Exception $e) {}
} catch (Exception $e) {
}
$invalidFields = validateGridConversion( $aFields );
if (count( $invalidFields ) > 0) {
return (implode( ", ", $invalidFields ));
@@ -107,4 +105,4 @@ G::LoadClass('xmlDb');
// here make a response of the invalid fields for the Ajax request
echo getTemporalFields( $_POST['FILENAME'] );
// end
?>

View File

@@ -18,7 +18,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
@@ -30,3 +29,4 @@
$oHeadPublisher = & headPublisher::getSingleton();
$G_PUBLISH->AddContent( 'view', 'dynaforms/fieldsHandlerViewer' );
G::RenderPage( "publish", "raw" );

View File

@@ -18,7 +18,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
@@ -50,10 +49,8 @@
$o->setNode( $e1 );
}
}
break;
case 'saveHidden':
$tmpfilename = $_SESSION['Current_Dynafom']['Parameters']['FILE'];
G::LoadSystem( 'dynaformhandler' );
@@ -89,9 +86,11 @@
$o->remove( '___pm_boot_strap___' );
}
$metaEncrypt = G::encrypt( $hidden_items_tmp, 'dynafieldsHandler' );
$o->add('___pm_boot_strap___', Array('type'=>'javascript', "meta"=>$metaEncrypt), "/*$msg*/ $hStr");
$o->add( '___pm_boot_strap___', Array ('type' => 'javascript',"meta" => $metaEncrypt
), "/*$msg*/ $hStr" );
echo $metaEncrypt;
} else { //we must to remove the boot strap node;
} else {
//we must to remove the boot strap node;
$o->remove( '___pm_boot_strap___' );
}
break;
@@ -99,17 +98,3 @@
echo 'no request param.';
}

View File

@@ -18,7 +18,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
@@ -28,9 +27,8 @@
$G_PUBLISH = new Publisher();
$_POST['fieldsList'] = Array('button', 'checkbox', 'checkgroup', 'currency', 'date', 'dropdown', 'file', 'grid', 'hidden', 'javascript',
'link', 'listbox', 'password', 'percentage', 'radiogroup', 'radiogroupview', 'reset', 'submit', 'subtitle', 'suggest', 'text',
'textarea', 'title', 'yesno');
$_POST['fieldsList'] = Array ('button','checkbox','checkgroup','currency','date','dropdown','file','grid','hidden','javascript','link','listbox','password','percentage','radiogroup','radiogroupview','reset','submit','subtitle','suggest','text','textarea','title','yesno');
$G_PUBLISH->AddContent( 'view', 'dynaforms/fieldsHandler' );
G::RenderPage( "publish", "raw" );

View File

@@ -20,12 +20,15 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
/*NEXT LINE: Runs any configuration defined to be executed before dependent fields recalc*/
if (isset($_SESSION['CURRENT_PAGE_INITILIZATION'])) eval($_SESSION['CURRENT_PAGE_INITILIZATION']);
if (isset( $_SESSION['CURRENT_PAGE_INITILIZATION'] )) {
eval( $_SESSION['CURRENT_PAGE_INITILIZATION'] );
}
//G::LoadSystem('json');
require_once (PATH_THIRDPARTY . 'pear/json/class.json.php');
$json = new Services_JSON();
@@ -45,7 +48,8 @@ $newValues=($json->decode(urlDecode(stripslashes($_POST['fields']))));
//Resolve dependencies
//Returns an array ($dependentFields) with the names of the fields
//that depends of fields passed through AJAX ($_GET/$_POST)
$dependentFields=array(); $aux=array();
$dependentFields = array ();
$aux = array ();
for ($r = 0; $r < sizeof( $newValues ); $r ++) {
$newValues[$r] = (array) $newValues[$r];
$G_FORM->setValues( $newValues[$r] );
@@ -66,13 +70,15 @@ $sendContent=array();
$r = 0;
foreach ($dependentFields as $d) {
$sendContent[$r]->name = $d;
$sendContent[$r]->content=NULL;
$sendContent[$r]->content = null;
foreach ($G_FORM->fields[$d] as $attribute => $value) {
switch ($attribute) {
case 'type':
$sendContent[$r]->content->{$attribute}=$value; break;
$sendContent[$r]->content->{$attribute} = $value;
break;
case 'options':
$sendContent[$r]->content->{$attribute}=toJSArray($value); break;
$sendContent[$r]->content->{$attribute} = toJSArray( $value );
break;
}
}
$sendContent[$r]->value = $G_FORM->values[$d];
@@ -84,7 +90,7 @@ function toJSArray($array)
{
$result = array ();
foreach ($array as $k => $v) {
$o=NULL;
$o = null;
$o->key = $k;
$o->value = $v;
$result[] = $o;
@@ -92,14 +98,23 @@ function toJSArray($array)
return $result;
}
function subDependencies( $k , &$G_FORM , &$aux ) {
if (array_search( $k, $aux )!==FALSE) return array();
if (!array_key_exists( $k , $G_FORM->fields )) return array();
if (!isset($G_FORM->fields[$k]->dependentFields)) return array();
function subDependencies ($k, &$G_FORM, &$aux)
{
if (array_search( $k, $aux ) !== false) {
return array ();
}
if (! array_key_exists( $k, $G_FORM->fields )) {
return array ();
}
if (! isset( $G_FORM->fields[$k]->dependentFields )) {
return array ();
}
$aux[] = $k;
$myDependentFields = explode( ',', $G_FORM->fields[$k]->dependentFields );
for ($r = 0; $r < sizeof( $myDependentFields ); $r ++) {
if ($myDependentFields[$r]=="") unset($myDependentFields[$r]);
if ($myDependentFields[$r] == "") {
unset( $myDependentFields[$r] );
}
}
$mD = $myDependentFields;
foreach ($mD as $ki) {
@@ -107,4 +122,4 @@ function subDependencies( $k , &$G_FORM , &$aux ) {
}
return $myDependentFields;
}
?>

View File

@@ -20,15 +20,19 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'dynaFormField' );
if (!(isset($_POST['A']) && $_POST['A']!=='')) return;
if (! (isset( $_POST['A'] ) && $_POST['A'] !== '')) {
return;
}
$file = G::decrypt( $_POST['A'], URL_KEY );
@@ -37,28 +41,24 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$fields = new DynaFormField( $dbc );
if (!isset($_POST['XMLNODE_NAME'])) return;
if (! isset( $_POST['XMLNODE_NAME'] )) {
return;
}
$fields->Delete( $_POST['XMLNODE_NAME'] );
G::LoadClass( 'xmlDb' );
$i = 0;
$aFields = array ();
$aFields[] = array('XMLNODE_NAME' => 'char',
'TYPE' => 'char',
'UP' => 'char',
'DOWN' => 'char');
$aFields[] = array ('XMLNODE_NAME' => 'char','TYPE' => 'char','UP' => 'char','DOWN' => 'char');
$oSession = new DBSession( new DBConnection( PATH_DYNAFORM . $file . '.xml', '', '', '', 'myxml' ) );
$oDataset = $oSession->Execute( 'SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" )' );
$iMaximun = $oDataset->count();
while ($aRow = $oDataset->Read()) {
$aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],
'TYPE' => $aRow['TYPE'],
'UP' => ($i > 0 ? G::LoadTranslation('ID_UP') : ''),
'DOWN' => ($i < $iMaximun-1 ? G::LoadTranslation('ID_DOWN') : ''));
$aFields[] = array ('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],'TYPE' => $aRow['TYPE'],'UP' => ($i > 0 ? G::LoadTranslation( 'ID_UP' ) : ''),'DOWN' => ($i < $iMaximun - 1 ? G::LoadTranslation( 'ID_DOWN' ) : '') );
$i ++;
}
global $_DBArray;
$_DBArray['fields'] = $aFields;
$_SESSION['_DBArray'] = $_DBArray;
?>

View File

@@ -20,15 +20,19 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'dynaFormField' );
if (!(isset($_GET['A']) && $_GET['A']!=='')) return;
if (! (isset( $_GET['A'] ) && $_GET['A'] !== '')) {
return;
}
$file = G::decrypt( $_GET['A'], URL_KEY );
@@ -73,7 +77,6 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
// }
/* End Comment: */
define( 'DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml' );
define( 'DB_XMLDB_USER', '' );
define( 'DB_XMLDB_PASS', '' );
@@ -100,27 +103,18 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$type = strtolower( $fields->Fields['TYPE'] );
}
if( $type == 'suggest' ||
$type == 'checkgroup' ||
$type == 'dropdown' ||
$type == 'radiogroup' ||
$type == 'text' ||
$type == 'listbox' ||
$type == 'currency' ||
$type == 'percentage' ||
$type == 'textarea' ||
$type == 'hidden' ) {
if ($type == 'suggest' || $type == 'checkgroup' || $type == 'dropdown' || $type == 'radiogroup' || $type == 'text' || $type == 'listbox' || $type == 'currency' || $type == 'percentage' || $type == 'textarea' || $type == 'hidden') {
$aDefaultConnections = array ();
$aDBConn = array ();
G::LoadClass( 'dbConnections' );
$oDBConn = new DbConnections();
$aDefaultConnections = array (
array('DBS_UID' => '', 'DBS_NAME' => ''),
array('DBS_UID' => 'dbarray', 'DBS_NAME' => 'dbarray'),
array('DBS_UID' => 'workflow', 'DBS_NAME' => 'Workflow'),
array('DBS_UID' => 'rbac', 'DBS_NAME' => 'RBAC'),
array('DBS_UID' => 'rp', 'DBS_NAME' => 'REPORT')
$aDefaultConnections = array (array ('DBS_UID' => '','DBS_NAME' => ''
),array ('DBS_UID' => 'dbarray','DBS_NAME' => 'dbarray'
),array ('DBS_UID' => 'workflow','DBS_NAME' => 'Workflow'
),array ('DBS_UID' => 'rbac','DBS_NAME' => 'RBAC'
),array ('DBS_UID' => 'rp','DBS_NAME' => 'REPORT'
)
);
$aDBConn = $oDBConn->getConnectionsProUid( $proUid );
@@ -129,22 +123,21 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$_SESSION['_DBArray'] = $_DBArray;
}
if ( !( isset($fields->Fields['XMLNODE_NAME']) &&
($fields->Fields['XMLNODE_NAME']!=='') ) ) {
if (! (isset( $fields->Fields['XMLNODE_NAME'] ) && ($fields->Fields['XMLNODE_NAME'] !== ''))) {
$type = strtolower( $_GET['TYPE'] );
$Fields['PME_TYPE'] = $type;
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/fields/' . $type, '', $Fields, SYS_URI . 'dynaforms/fields_Save', SYS_URI . 'dynaforms/fields_Ajax' );
} else {
$Fields['PME_LABEL'] = $form->fields[$fields->Fields['XMLNODE_NAME']]->label;
if (isset($form->fields[$fields->Fields['XMLNODE_NAME']]->code)) $Fields['PME_CODE'] = $form->fields[$fields->Fields['XMLNODE_NAME']]->code;
$options=isset($form->fields[$fields->Fields['XMLNODE_NAME']]->option)?
$form->fields[$fields->Fields['XMLNODE_NAME']]->option:array();
if (!is_array($options) || count($options)==0) $options =array('' => '');
$Fields['PME_OPTIONS'] = array(
'NAME' => array_keys($options),
'LABEL' => array_values($options)
);
if (isset( $form->fields[$fields->Fields['XMLNODE_NAME']]->code )) {
$Fields['PME_CODE'] = $form->fields[$fields->Fields['XMLNODE_NAME']]->code;
}
$options = isset( $form->fields[$fields->Fields['XMLNODE_NAME']]->option ) ? $form->fields[$fields->Fields['XMLNODE_NAME']]->option : array ();
if (! is_array( $options ) || count( $options ) == 0) {
$options = array ('' => '' );
}
$Fields['PME_OPTIONS'] = array ('NAME' => array_keys( $options ),'LABEL' => array_values( $options ) );
$type = strtolower( $fields->Fields['TYPE'] );
if ($type === 'checkbox') {
if ($Fields['PME_DEFAULTVALUE'] === $Fields['PME_VALUE']) {
@@ -158,14 +151,16 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
//define the dbArray with the table fields
//g::pr($Fields);
$tableExists = true;
$sDataBase = 'database_' . strtolower( DB_ADAPTER );
if (G::LoadSystemExist( $sDataBase )) {
G::LoadSystem( $sDataBase );
$oDataBase = new database();
$dataBase = $Fields['PME_SQLCONNECTION'];
if($Fields['PME_SQLCONNECTION']=='workflow')
if ($Fields['PME_SQLCONNECTION'] == 'workflow') {
$dataBase = DB_NAME;
}
$tableExists = $oDataBase->tableExists( 'USERS', $dataBase );
}
if ($tableExists) {
@@ -195,4 +190,4 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
}
G::RenderPage( "publish", "raw" );
?>

View File

@@ -20,12 +20,14 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
G::LoadClass( 'dynaFormField' );
$G_MAIN_MENU = 'processmaker';
@@ -42,14 +44,11 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
define( 'DB_XMLDB_NAME', '' );
define( 'DB_XMLDB_TYPE', 'myxml' );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$Parameters = array(
'SYS_LANG' => SYS_LANG,
'URL'=> G::encrypt( $file , URL_KEY ) );
$Parameters = array ('SYS_LANG' => SYS_LANG,'URL' => G::encrypt( $file, URL_KEY ));
$G_PUBLISH->AddContent( 'pagedtable', 'paged-table', 'dynaforms/fields_List', '', $Parameters, '', 'dynaforms_PagedTableAjax' );
G::RenderPage( "publish" );
?>

View File

@@ -20,32 +20,44 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
if (!(isset($_POST['A']) && $_POST['A']!=='')) return;
if (!(isset($_POST['XMLNODE_NAME']) && $_POST['XMLNODE_NAME']!=='')) return;
if (!(isset($_POST['NEW_POS']) && $_POST['NEW_POS']!=='')) return;
if (! (isset( $_POST['A'] ) && $_POST['A'] !== '')) {
return;
}
if (! (isset( $_POST['XMLNODE_NAME'] ) && $_POST['XMLNODE_NAME'] !== '')) {
return;
}
if (! (isset( $_POST['NEW_POS'] ) && $_POST['NEW_POS'] !== '')) {
return;
}
$file = PATH_DYNAFORM . G::decrypt( $_POST['A'], URL_KEY ) . '.xml';
$fieldName = $_POST['XMLNODE_NAME'];
$newPos = intval( $_POST['NEW_POS'] );
if (!file_exists($file)) return;
if (! file_exists( $file )) {
return;
}
$xmldoc = new Xml_Document();
$xmldoc->parseXmlFile( $file );
$node = & $xmldoc->findNode( '/dynaForm/' . $fieldName );
if (!isset( $node )) return;
if (! isset( $node )) {
return;
}
$numFields = 0;
foreach( $xmldoc->children[0]->children as $child )
foreach ($xmldoc->children[0]->children as $child) {
$numFields += ($child->name !== '') ? 1 : 0;
}
$newPos = ($newPos < 1) ? 1 : $newPos;
$newPos = ($newPos > $numFields) ? $numFields : $newPos;
@@ -53,7 +65,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
$rowCounter = (int) 0;
$newOrder = array ();
foreach ($xmldoc->children[0]->children as $index => $child) {
if ($child->name!=='') $rowCounter++;
if ($child->name !== '') {
$rowCounter ++;
}
if ($rowCounter == $newPos) {
$newOrder[] = $node;
$rowCounter ++;
@@ -61,10 +75,10 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
}
if ($child->name !== $node->name) {
$newOrder[] = $xmldoc->children[0]->children[$index];
}
else
} else {
$rowCounter --;
}
}
if ($rowCounter < $newPos) {
$newOrder[] = $node;
$rowCounter ++;
@@ -77,23 +91,15 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
G::LoadClass( 'xmlDb' );
$i = 0;
$aFields = array ();
$aFields[] = array('XMLNODE_NAME' => 'char',
'TYPE' => 'char',
'UP' => 'char',
'DOWN' => 'char',
'row__' => 'integer');
$aFields[] = array ('XMLNODE_NAME' => 'char','TYPE' => 'char','UP' => 'char','DOWN' => 'char','row__' => 'integer');
$oSession = new DBSession( new DBConnection( $file, '', '', '', 'myxml' ) );
$oDataset = $oSession->Execute( 'SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" )' );
$iMaximun = $oDataset->count();
while ($aRow = $oDataset->Read()) {
$aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],
'TYPE' => $aRow['TYPE'],
'UP' => ($i > 0 ? G::LoadTranslation('ID_UP') : ''),
'DOWN' => ($i < $iMaximun-1 ? G::LoadTranslation('ID_DOWN') : ''),
'row__' => ($i + 1));
$aFields[] = array ('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],'TYPE' => $aRow['TYPE'],'UP' => ($i > 0 ? G::LoadTranslation( 'ID_UP' ) : ''),'DOWN' => ($i < $iMaximun - 1 ? G::LoadTranslation( 'ID_DOWN' ) : ''),'row__' => ($i + 1) );
$i ++;
}
global $_DBArray;
$_DBArray['fields'] = $aFields;
$_SESSION['_DBArray'] = $_DBArray;
?>

View File

@@ -20,9 +20,10 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
/* START BOCK: DAVID CALLIZAYA: PLEASE NO BORRAR ESTE BLOQUE.*/
for ($r = 1; $r < 10; $r ++) {
/* The timestamp is a 60-bit value. For UUID version 1, this is
@@ -47,12 +48,13 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Respons
<option value="three">three</option>
<option value="four">four</option>
<option value="five">five</option>
</select>
<input type="submit" value="Send" />
</select> <input type="submit" value="Send" />
</form>
<?php
$test = $_POST['form']['test'];
if ($test) {
foreach ($test as $t){echo 'You selected ',$t,'<br />';}
foreach ($test as $t) {
echo 'You selected ', $t, '<br />';
}
?>
}