Merge remote branch 'upstream/master'
This commit is contained in:
@@ -1,178 +1,167 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* casesDemo.php
|
* casesDemo.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$rows[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
|
$rows[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float');
|
||||||
);
|
$rows[] = array ('uid' => 11,'name' => 'john','age' => 44,'balance' => 123423);
|
||||||
$rows[] = array ('uid' => 11,'name' => 'john','age' => 44,'balance' => 123423
|
$rows[] = array ('uid' => 22,'name' => 'bobby','age' => 33,'balance' => 23456);
|
||||||
);
|
$rows[] = array ('uid' => 33,'name' => 'Dan','age' => 22,'balance' => 34567);
|
||||||
$rows[] = array ('uid' => 22,'name' => 'bobby','age' => 33,'balance' => 23456
|
$rows[] = array ('uid' => 33,'name' => 'Mike','age' => 21,'balance' => 4567);
|
||||||
);
|
$rows[] = array ('uid' => 44,'name' => 'Paul','age' => 22,'balance' => 567);
|
||||||
$rows[] = array ('uid' => 33,'name' => 'Dan','age' => 22,'balance' => 34567
|
$rows[] = array ('uid' => 55,'name' => 'Will','age' => 23,'balance' => 67);
|
||||||
);
|
$rows[] = array ('uid' => 66,'name' => 'Ernest','age' => 24,'balance' => 7);
|
||||||
$rows[] = array ('uid' => 33,'name' => 'Mike','age' => 21,'balance' => 4567
|
$rows[] = array ('uid' => 77,'name' => 'Albert','age' => 25,'balance' => 84567);
|
||||||
);
|
$rows[] = array ('uid' => 88,'name' => 'Sue','age' => 26,'balance' => 94567);
|
||||||
$rows[] = array ('uid' => 44,'name' => 'Paul','age' => 22,'balance' => 567
|
$rows[] = array ('uid' => 99,'name' => 'Freddy','age' => 22,'balance' => 04567);
|
||||||
);
|
|
||||||
$rows[] = array ('uid' => 55,'name' => 'Will','age' => 23,'balance' => 67
|
$_DBArray['user'] = $rows;
|
||||||
);
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
$rows[] = array ('uid' => 66,'name' => 'Ernest','age' => 24,'balance' => 7
|
|
||||||
);
|
|
||||||
$rows[] = array ('uid' => 77,'name' => 'Albert','age' => 25,'balance' => 84567
|
|
||||||
);
|
|
||||||
$rows[] = array ('uid' => 88,'name' => 'Sue','age' => 26,'balance' => 94567
|
|
||||||
);
|
|
||||||
$rows[] = array ('uid' => 99,'name' => 'Freddy','age' => 22,'balance' => 04567
|
|
||||||
);
|
|
||||||
|
|
||||||
$_DBArray['user'] = $rows;
|
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
|
||||||
//krumo ( $_DBArray );
|
//krumo ( $_DBArray );
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$c = new Criteria( 'dbarray' );
|
$c = new Criteria( 'dbarray' );
|
||||||
$c->setDBArrayTable( 'user' );
|
$c->setDBArrayTable( 'user' );
|
||||||
// $c->add ( 'user.age', 22 , Criteria::GREATER_EQUAL );
|
// $c->add ( 'user.age', 22 , Criteria::GREATER_EQUAL );
|
||||||
// $c->add ( 'user.age', 22 , Criteria::EQUAL );
|
// $c->add ( 'user.age', 22 , Criteria::EQUAL );
|
||||||
$c->add( 'user.name', '%au%', Criteria::LIKE );
|
$c->add( 'user.name', '%au%', Criteria::LIKE );
|
||||||
// $c->add ( 'user.balance', 3456 , Criteria::GREATER_EQUAL );
|
// $c->add ( 'user.balance', 3456 , Criteria::GREATER_EQUAL );
|
||||||
$c->addAscendingOrderByColumn( 'name' );
|
$c->addAscendingOrderByColumn( 'name' );
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_ID_MENU_SELECTED = 'CASES';
|
$G_ID_MENU_SELECTED = 'CASES';
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
// $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
|
// $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
|
||||||
//$G_PUBLISH->AddContent('smarty', 'cases/casesDemo', '', '', $Fields);
|
//$G_PUBLISH->AddContent('smarty', 'cases/casesDemo', '', '', $Fields);
|
||||||
// G::RenderPage( "publish" );
|
// G::RenderPage( "publish" );
|
||||||
//die;
|
//die;
|
||||||
|
|
||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
G::LoadClass( 'pmScript' );
|
G::LoadClass( 'pmScript' );
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( 'derivation' );
|
G::LoadClass( 'derivation' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$appUid = isset( $_SESSION['APPLICATION'] ) ? $_SESSION['APPLICATION'] : '';
|
$appUid = isset( $_SESSION['APPLICATION'] ) ? $_SESSION['APPLICATION'] : '';
|
||||||
$appFields = $oCase->loadCase( $appUid );
|
$appFields = $oCase->loadCase( $appUid );
|
||||||
|
|
||||||
$Fields['APP_UID'] = $appFields['APP_UID'];
|
$Fields['APP_UID'] = $appFields['APP_UID'];
|
||||||
$Fields['APP_NUMBER'] = $appFields['APP_NUMBER'];
|
$Fields['APP_NUMBER'] = $appFields['APP_NUMBER'];
|
||||||
$Fields['APP_STATUS'] = $appFields['APP_STATUS'];
|
$Fields['APP_STATUS'] = $appFields['APP_STATUS'];
|
||||||
$Fields['STATUS'] = $appFields['STATUS'];
|
$Fields['STATUS'] = $appFields['STATUS'];
|
||||||
$Fields['APP_TITLE'] = $appFields['TITLE'];
|
$Fields['APP_TITLE'] = $appFields['TITLE'];
|
||||||
$Fields['PRO_UID'] = $appFields['PRO_UID'];
|
$Fields['PRO_UID'] = $appFields['PRO_UID'];
|
||||||
$Fields['APP_PARALLEL'] = $appFields['APP_PARALLEL'];
|
$Fields['APP_PARALLEL'] = $appFields['APP_PARALLEL'];
|
||||||
$Fields['APP_INIT_USER'] = $appFields['APP_INIT_USER'];
|
$Fields['APP_INIT_USER'] = $appFields['APP_INIT_USER'];
|
||||||
$Fields['APP_CUR_USER'] = $appFields['APP_CUR_USER'];
|
$Fields['APP_CUR_USER'] = $appFields['APP_CUR_USER'];
|
||||||
$Fields['APP_DATA'] = $appFields['APP_DATA'];
|
$Fields['APP_DATA'] = $appFields['APP_DATA'];
|
||||||
$Fields['CREATOR'] = $appFields['CREATOR'];
|
$Fields['CREATOR'] = $appFields['CREATOR'];
|
||||||
$Fields['APP_PIN'] = $appFields['APP_PIN'];
|
$Fields['APP_PIN'] = $appFields['APP_PIN'];
|
||||||
$Fields['APP_PROC_CODE'] = $appFields['APP_PROC_CODE'];
|
$Fields['APP_PROC_CODE'] = $appFields['APP_PROC_CODE'];
|
||||||
|
|
||||||
$Fields['PRO_TITLE'] = Content::load( 'PRO_TITLE', '', $appFields['PRO_UID'], SYS_LANG );
|
$Fields['PRO_TITLE'] = Content::load( 'PRO_TITLE', '', $appFields['PRO_UID'], SYS_LANG );
|
||||||
$oUser = new Users();
|
$oUser = new Users();
|
||||||
$oUser->load( $appFields['APP_CUR_USER'] );
|
$oUser->load( $appFields['APP_CUR_USER'] );
|
||||||
$Fields['CUR_USER'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
|
$Fields['CUR_USER'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
|
||||||
|
|
||||||
$threads = $oCase->GetAllThreads( $appFields['APP_UID'] );
|
$threads = $oCase->GetAllThreads( $appFields['APP_UID'] );
|
||||||
$Fields['THREADS'] = $threads;
|
$Fields['THREADS'] = $threads;
|
||||||
$Fields['CANT_THREADS'] = count( $threads );
|
$Fields['CANT_THREADS'] = count( $threads );
|
||||||
|
|
||||||
$Fields['CANT_APP_DATA'] = count( $Fields['APP_DATA'] );
|
$Fields['CANT_APP_DATA'] = count( $Fields['APP_DATA'] );
|
||||||
$delegations = $oCase->GetAllDelegations( $appFields['APP_UID'] );
|
$delegations = $oCase->GetAllDelegations( $appFields['APP_UID'] );
|
||||||
foreach ($delegations as $key => $val) {
|
foreach ($delegations as $key => $val) {
|
||||||
$delegations[$key]['TAS_TITLE'] = Content::load( 'TAS_TITLE', '', $val['TAS_UID'], SYS_LANG );
|
$delegations[$key]['TAS_TITLE'] = Content::load( 'TAS_TITLE', '', $val['TAS_UID'], SYS_LANG );
|
||||||
if ($val['USR_UID'] != - 1) {
|
if ($val['USR_UID'] != - 1) {
|
||||||
$oUser->load( $val['USR_UID'] );
|
$oUser->load( $val['USR_UID'] );
|
||||||
$delegations[$key]['USR_NAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
|
$delegations[$key]['USR_NAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
|
||||||
} else {
|
} else {
|
||||||
$delegations[$key]['USR_NAME'] = 'Unknow user (Sub-Process User)';
|
$delegations[$key]['USR_NAME'] = 'Unknow user (Sub-Process User)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$Fields['CANT_DELEGATIONS'] = count( $delegations );
|
$Fields['CANT_DELEGATIONS'] = count( $delegations );
|
||||||
$Fields['DELEGATIONS'] = $delegations;
|
$Fields['DELEGATIONS'] = $delegations;
|
||||||
|
|
||||||
require_once 'classes/model/AppDelay.php';
|
require_once 'classes/model/AppDelay.php';
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_THREAD_INDEX );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_THREAD_INDEX );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_DEL_INDEX );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_DEL_INDEX );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_TYPE );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_TYPE );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_STATUS );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_STATUS );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_ENABLE_ACTION_USER );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_ENABLE_ACTION_USER );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_DISABLE_ACTION_USER );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_DISABLE_ACTION_USER );
|
||||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_DISABLE_ACTION_DATE );
|
$oCriteria->addSelectColumn( AppDelayPeer::APP_DISABLE_ACTION_DATE );
|
||||||
$oCriteria->add( AppDelayPeer::APP_UID, $appUid );
|
$oCriteria->add( AppDelayPeer::APP_UID, $appUid );
|
||||||
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_TYPE );
|
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_TYPE );
|
||||||
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
|
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
|
||||||
$oDataset = AppDelayPeer::doSelectRS( $oCriteria );
|
$oDataset = AppDelayPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aDelays = array ();
|
$aDelays = array ();
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$aDelays[] = $aRow;
|
$aDelays[] = $aRow;
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
$Fields['DELAYS'] = $aDelays;
|
$Fields['DELAYS'] = $aDelays;
|
||||||
$Fields['CANT_DELAYS'] = count( $aDelays );
|
$Fields['CANT_DELAYS'] = count( $aDelays );
|
||||||
|
|
||||||
require_once 'classes/model/SubApplication.php';
|
require_once 'classes/model/SubApplication.php';
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::APP_UID );
|
$oCriteria->addSelectColumn( SubApplicationPeer::APP_UID );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::APP_PARENT );
|
$oCriteria->addSelectColumn( SubApplicationPeer::APP_PARENT );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::DEL_INDEX_PARENT );
|
$oCriteria->addSelectColumn( SubApplicationPeer::DEL_INDEX_PARENT );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::DEL_THREAD_PARENT );
|
$oCriteria->addSelectColumn( SubApplicationPeer::DEL_THREAD_PARENT );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::SA_STATUS );
|
$oCriteria->addSelectColumn( SubApplicationPeer::SA_STATUS );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::SA_INIT_DATE );
|
$oCriteria->addSelectColumn( SubApplicationPeer::SA_INIT_DATE );
|
||||||
$oCriteria->addSelectColumn( SubApplicationPeer::SA_FINISH_DATE );
|
$oCriteria->addSelectColumn( SubApplicationPeer::SA_FINISH_DATE );
|
||||||
$oCriteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
|
$oCriteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
|
||||||
$oCriteria->add( SubApplicationPeer::APP_UID, $appUid );
|
$oCriteria->add( SubApplicationPeer::APP_UID, $appUid );
|
||||||
$oCriteria->addJoin( ApplicationPeer::APP_UID, SubApplicationPeer::APP_PARENT, Criteria::LEFT_JOIN );
|
$oCriteria->addJoin( ApplicationPeer::APP_UID, SubApplicationPeer::APP_PARENT, Criteria::LEFT_JOIN );
|
||||||
$oCriteria->addAscendingOrderByColumn( SubApplicationPeer::APP_UID );
|
$oCriteria->addAscendingOrderByColumn( SubApplicationPeer::APP_UID );
|
||||||
$oDataset = SubApplicationPeer::doSelectRS( $oCriteria );
|
$oDataset = SubApplicationPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aSubprocess = array ();
|
$aSubprocess = array ();
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$aSubprocess[] = $aRow;
|
$aSubprocess[] = $aRow;
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
$Fields['SUBAPPLICATIONS'] = $aSubprocess;
|
$Fields['SUBAPPLICATIONS'] = $aSubprocess;
|
||||||
$Fields['CANT_SUBAPPLICATIONS'] = count( $aSubprocess );
|
$Fields['CANT_SUBAPPLICATIONS'] = count( $aSubprocess );
|
||||||
|
|
||||||
/* Render page */
|
/* Render page */
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_ID_MENU_SELECTED = 'CASES';
|
$G_ID_MENU_SELECTED = 'CASES';
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
//$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
|
//$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
|
||||||
$G_PUBLISH->AddContent( 'smarty', 'cases/casesDemo', '', '', $Fields );
|
$G_PUBLISH->AddContent( 'smarty', 'cases/casesDemo', '', '', $Fields );
|
||||||
G::RenderPage( "publish" );
|
G::RenderPage( "publish" );
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,137 +1,139 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* casesGenerateDocumentPage_Ajax.php
|
* casesGenerateDocumentPage_Ajax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.
|
* Copyright (C) 2004 - 2008 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||||
|
|
||||||
function casesShowOuputDocumentExist ($url)
|
function casesShowOuputDocumentExist ($url)
|
||||||
{
|
{
|
||||||
$urlArray = explode( "?", $url );
|
$urlArray = explode( "?", $url );
|
||||||
$urlParametroString = $urlArray[1];
|
$urlParametroString = $urlArray[1];
|
||||||
|
|
||||||
parse_str( $urlParametroString, $_GET );
|
parse_str( $urlParametroString, $_GET );
|
||||||
|
|
||||||
require_once ("classes/model/AppDocumentPeer.php");
|
require_once ("classes/model/AppDocumentPeer.php");
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : NULL );
|
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : null );
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||||
if (! isset( $_GET['ext'] )) {
|
if (! isset( $_GET['ext'] )) {
|
||||||
$ext = $info['extension'];
|
$ext = $info['extension'];
|
||||||
} else {
|
} else {
|
||||||
if ($_GET['ext'] != '') {
|
if ($_GET['ext'] != '') {
|
||||||
$ext = $_GET['ext'];
|
$ext = $_GET['ext'];
|
||||||
} else {
|
} else {
|
||||||
$ext = $info['extension'];
|
$ext = $info['extension'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
|
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
|
||||||
|
|
||||||
if (! $ver) //This code is in the case the outputdocument won't be versioned
|
if (! $ver) {
|
||||||
$ver = '_1';
|
//This code is in the case the outputdocument won't be versioned
|
||||||
|
$ver = '_1';
|
||||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
|
}
|
||||||
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
|
|
||||||
$realPath2 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] . '.' . $ext;
|
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
|
||||||
$sw_file_exists = false;
|
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
|
||||||
if (file_exists( $realPath )) {
|
$realPath2 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] . '.' . $ext;
|
||||||
$sw_file_exists = true;
|
$sw_file_exists = false;
|
||||||
} elseif (file_exists( $realPath1 )) {
|
if (file_exists( $realPath )) {
|
||||||
$sw_file_exists = true;
|
$sw_file_exists = true;
|
||||||
$realPath = $realPath1;
|
} elseif (file_exists( $realPath1 )) {
|
||||||
} elseif (file_exists( $realPath2 )) {
|
$sw_file_exists = true;
|
||||||
$sw_file_exists = true;
|
$realPath = $realPath1;
|
||||||
$realPath = $realPath2;
|
} elseif (file_exists( $realPath2 )) {
|
||||||
}
|
$sw_file_exists = true;
|
||||||
|
$realPath = $realPath2;
|
||||||
$swFileExist = 0;
|
}
|
||||||
if ($sw_file_exists) {
|
|
||||||
$swFileExist = 1;
|
$swFileExist = 0;
|
||||||
}
|
if ($sw_file_exists) {
|
||||||
return $swFileExist;
|
$swFileExist = 1;
|
||||||
}
|
}
|
||||||
|
return $swFileExist;
|
||||||
if ($actionAjax == 'casesGenerateDocumentPage') {
|
}
|
||||||
global $G_PUBLISH;
|
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
if ($actionAjax == 'casesGenerateDocumentPage') {
|
||||||
G::loadClass( 'configuration' );
|
global $G_PUBLISH;
|
||||||
$conf = new Configurations();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
G::loadClass( 'configuration' );
|
||||||
$oHeadPublisher->addContent( 'cases/casesGenerateDocumentPage' ); //adding a html file .html.
|
$conf = new Configurations();
|
||||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
$oHeadPublisher->addExtJsScript( 'cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
$oHeadPublisher->addContent( 'cases/casesGenerateDocumentPage' ); //adding a html file .html.
|
||||||
}
|
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||||
if ($actionAjax == 'generateDocumentGrid_Ajax') {
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
G::LoadClass( 'case' );
|
}
|
||||||
G::LoadClass( "BasePeer" );
|
if ($actionAjax == 'generateDocumentGrid_Ajax') {
|
||||||
|
G::LoadClass( 'case' );
|
||||||
global $G_PUBLISH;
|
G::LoadClass( "BasePeer" );
|
||||||
$oCase = new Cases();
|
|
||||||
|
global $G_PUBLISH;
|
||||||
$aProcesses = Array ();
|
$oCase = new Cases();
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$aProcesses = Array ();
|
||||||
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
|
||||||
if ($c->getDbName() == 'dbarray') {
|
$G_PUBLISH = new Publisher();
|
||||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||||
} else {
|
if ($c->getDbName() == 'dbarray') {
|
||||||
$rs = GulliverBasePeer::doSelectRs( $c );
|
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||||
}
|
} else {
|
||||||
|
$rs = GulliverBasePeer::doSelectRs( $c );
|
||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
}
|
||||||
$rs->next();
|
|
||||||
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$totalCount = 0;
|
$rs->next();
|
||||||
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
|
|
||||||
$result = $rs->getRow();
|
$totalCount = 0;
|
||||||
|
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
|
||||||
$result["FILEDOCEXIST"] = casesShowOuputDocumentExist( $result["FILEDOC"] );
|
$result = $rs->getRow();
|
||||||
$result["FILEPDFEXIST"] = casesShowOuputDocumentExist( $result["FILEPDF"] );
|
|
||||||
|
$result["FILEDOCEXIST"] = casesShowOuputDocumentExist( $result["FILEDOC"] );
|
||||||
$aProcesses[] = $result;
|
$result["FILEPDFEXIST"] = casesShowOuputDocumentExist( $result["FILEPDF"] );
|
||||||
|
|
||||||
$rs->next();
|
$aProcesses[] = $result;
|
||||||
$totalCount ++;
|
|
||||||
}
|
$rs->next();
|
||||||
|
$totalCount ++;
|
||||||
//!dateFormat
|
}
|
||||||
G::LoadClass( 'configuration' );
|
|
||||||
$conf = new Configurations();
|
//!dateFormat
|
||||||
try {
|
G::LoadClass( 'configuration' );
|
||||||
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
$conf = new Configurations();
|
||||||
} catch (Exception $e) {
|
try {
|
||||||
$generalConfCasesList = array ();
|
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
}
|
} catch (Exception $e) {
|
||||||
$dateFormat = "";
|
$generalConfCasesList = array ();
|
||||||
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
|
}
|
||||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
$dateFormat = "";
|
||||||
}
|
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
|
||||||
$newDir = '/tmp/test/directory';
|
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||||
$r = G::verifyPath( $newDir );
|
}
|
||||||
$r->data = $aProcesses;
|
$newDir = '/tmp/test/directory';
|
||||||
$r->totalCount = $totalCount;
|
$r = G::verifyPath( $newDir );
|
||||||
$r->dataFormat = $dateFormat;
|
$r->data = $aProcesses;
|
||||||
echo G::json_encode( $r );
|
$r->totalCount = $totalCount;
|
||||||
}
|
$r->dataFormat = $dateFormat;
|
||||||
|
echo G::json_encode( $r );
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,336 +1,456 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* casesHistoryDynaformPage_Ajax.php
|
* casesHistoryDynaformPage_Ajax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.
|
* Copyright (C) 2004 - 2008 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||||
|
|
||||||
if ($actionAjax == "historyDynaformPage") {
|
if ($actionAjax == "historyDynaformPage") {
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
G::loadClass( 'configuration' );
|
G::loadClass( 'configuration' );
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'cases/caseHistoryDynaformPage' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'cases/caseHistoryDynaformPage' ); //adding a html file .html.
|
||||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
}
|
}
|
||||||
if ($actionAjax == 'historyDynaformGrid_Ajax') {
|
if ($actionAjax == 'historyDynaformGrid_Ajax') {
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( "BasePeer" );
|
G::LoadClass( "BasePeer" );
|
||||||
|
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
|
|
||||||
$aProcesses = Array ();
|
$aProcesses = Array ();
|
||||||
$c = $oCase->getallDynaformsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
$c = $oCase->getallDynaformsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||||
|
|
||||||
if ($c->getDbName() == 'dbarray') {
|
if ($c->getDbName() == 'dbarray') {
|
||||||
$rs = ArrayBasePeer::doSelectRs( $c );
|
$rs = ArrayBasePeer::doSelectRs( $c );
|
||||||
} else {
|
} else {
|
||||||
$rs = GulliverBasePeer::doSelectRs( $c );
|
$rs = GulliverBasePeer::doSelectRs( $c );
|
||||||
}
|
}
|
||||||
|
|
||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$rs->next();
|
$rs->next();
|
||||||
|
|
||||||
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
|
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
|
||||||
$result = $rs->getRow();
|
$result = $rs->getRow();
|
||||||
//$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
//$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
||||||
$aProcesses[] = $result;
|
$aProcesses[] = $result;
|
||||||
$rs->next();
|
$rs->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
$newDir = '/tmp/test/directory';
|
$newDir = '/tmp/test/directory';
|
||||||
$r = G::verifyPath( $newDir );
|
$r = G::verifyPath( $newDir );
|
||||||
$r->data = $aProcesses;
|
$r->data = $aProcesses;
|
||||||
$r->totalCount = 2;
|
$r->totalCount = 2;
|
||||||
|
|
||||||
echo G::json_encode( $r );
|
echo G::json_encode( $r );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($actionAjax == 'showHistoryMessage') {
|
if ($actionAjax == 'showHistoryMessage') {
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
html {
|
html {
|
||||||
color: black !important;
|
color: black !important;
|
||||||
}
|
}
|
||||||
|
body {
|
||||||
body {
|
color: black !important;
|
||||||
color: black !important;
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
<script language="Javascript">
|
||||||
<script language="Javascript">
|
//!Code that simulated reload library javascript maborak
|
||||||
//!Code that simulated reload library javascript maborak
|
var leimnud = {};
|
||||||
var leimnud = {};
|
leimnud.exec = "";
|
||||||
leimnud.exec = "";
|
leimnud.fix = {};
|
||||||
leimnud.fix = {};
|
leimnud.fix.memoryLeak = "";
|
||||||
leimnud.fix.memoryLeak = "";
|
leimnud.browser = {};
|
||||||
leimnud.browser = {};
|
leimnud.browser.isIphone = "";
|
||||||
leimnud.browser.isIphone = "";
|
leimnud.iphone = {};
|
||||||
leimnud.iphone = {};
|
leimnud.iphone.make = function(){};
|
||||||
leimnud.iphone.make = function(){};
|
function ajax_function(ajax_server, funcion, parameters, method){
|
||||||
function ajax_function(ajax_server, funcion, parameters, method){
|
}
|
||||||
}
|
//!
|
||||||
//!
|
</script>
|
||||||
</script>
|
<?php
|
||||||
<?php
|
|
||||||
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( 'case' );
|
$oCase = new Cases();
|
||||||
$oCase = new Cases();
|
|
||||||
|
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
||||||
$_POST['APP_MSG_UID'] = $_REQUEST["APP_MSG_UID"];
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH = new Publisher();
|
$oCase = new Cases();
|
||||||
$oCase = new Cases();
|
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
|
|
||||||
|
?>
|
||||||
?>
|
<script language="javascript">
|
||||||
<script language="javascript">
|
<?php
|
||||||
<?php
|
global $G_FORM;
|
||||||
global $G_FORM;
|
?>
|
||||||
?>
|
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
|
||||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
}
|
||||||
}
|
</script>
|
||||||
</script>
|
<?php
|
||||||
<?php
|
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
}
|
||||||
}
|
|
||||||
|
if ($actionAjax == 'showDynaformListHistory') {
|
||||||
if ($actionAjax == 'showDynaformListHistory') {
|
//!dataIndex
|
||||||
//!dataIndex
|
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
$_POST["PRO_UID"] = $_REQUEST["PRO_UID"];
|
||||||
$_POST["PRO_UID"] = $_REQUEST["PRO_UID"];
|
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"];
|
||||||
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"];
|
|
||||||
|
?>
|
||||||
?>
|
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
<style type="text/css">
|
||||||
<style type="text/css">
|
html {
|
||||||
html {
|
color: black !important;
|
||||||
color: black !important;
|
}
|
||||||
}
|
|
||||||
|
body {
|
||||||
body {
|
color: black !important;
|
||||||
color: black !important;
|
}
|
||||||
}
|
</style>
|
||||||
</style>
|
<script language="Javascript">
|
||||||
<script language="Javascript">
|
globalMd5Return=function(s,raw,hexcase,chrsz) {
|
||||||
globalMd5Return=function(s,raw,hexcase,chrsz){raw=raw||false;hexcase=hexcase||false;chrsz=chrsz||8;function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function bit_rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|(~d)),a,b,x,s,t)}function core_md5(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}return[a,b,c,d]}function str2binl(str){var bin=[];var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}return bin}function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}function binl2hex(binarray){var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)}return str}return(raw?binl2str(core_md5(str2binl(s),s.length*chrsz)):binl2hex(core_md5(str2binl(s),s.length*chrsz)))};
|
raw = raw||false;
|
||||||
//!Code that simulated reload library javascript maborak
|
hexcase = hexcase||false;
|
||||||
var leimnud = {};
|
chrsz=chrsz||8;
|
||||||
leimnud.exec = "";
|
function safe_add(x,y) {
|
||||||
leimnud.fix = {};
|
var lsw=(x&0xFFFF)+(y&0xFFFF);
|
||||||
leimnud.fix.memoryLeak = "";
|
var msw=(x>>16)+(y>>16)+(lsw>>16);
|
||||||
leimnud.browser = {};
|
return(msw<<16)|(lsw&0xFFFF)
|
||||||
leimnud.browser.isIphone = "";
|
}
|
||||||
leimnud.iphone = {};
|
function bit_rol(num,cnt) {
|
||||||
leimnud.iphone.make = function(){};
|
return(num<<cnt)|(num>>>(32-cnt))
|
||||||
function ajax_function(ajax_server, funcion, parameters, method){
|
}
|
||||||
}
|
function md5_cmn(q,a,b,x,s,t) {
|
||||||
|
return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)
|
||||||
function toggleTable(tablename){
|
}
|
||||||
//table= document.getElementByName(tablename);
|
function md5_ff(a,b,c,d,x,s,t) {
|
||||||
table= document.getElementById(tablename);
|
return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)
|
||||||
if(table.style.display == ''){
|
}
|
||||||
table.style.display = 'none';
|
function md5_gg(a,b,c,d,x,s,t) {
|
||||||
}else{
|
return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)
|
||||||
table.style.display = '';
|
}
|
||||||
}
|
function md5_hh(a,b,c,d,x,s,t) {
|
||||||
}
|
return md5_cmn(b^c^d,a,b,x,s,t)
|
||||||
|
}
|
||||||
function noesFuncion(idIframe) {
|
function md5_ii(a,b,c,d,x,s,t) {
|
||||||
window.parent.tabIframeWidthFix2(idIframe);
|
return md5_cmn(c^(b|(~d)),a,b,x,s,t)
|
||||||
}
|
}
|
||||||
|
function core_md5(x,len) {
|
||||||
function onResizeIframe(idIframe){
|
x[len>>5]|=0x80<<((len)%32);
|
||||||
|
x[(((len+64)>>>9)<<4)+14]=len;
|
||||||
|
var a=1732584193;
|
||||||
window.onresize = noesFuncion(idIframe);
|
var b=-271733879;
|
||||||
|
var c=-1732584194;
|
||||||
}
|
var d=271733878;
|
||||||
|
for(var i=0; i<x.length;i+=16) {
|
||||||
var showDynaformHistoryGlobal = {};
|
var olda=a;
|
||||||
showDynaformHistoryGlobal.dynUID = '';
|
var oldb=b;
|
||||||
showDynaformHistoryGlobal.tablename = '';
|
var oldc=c;
|
||||||
showDynaformHistoryGlobal.dynDate = '';
|
var oldd=d;
|
||||||
showDynaformHistoryGlobal.dynTitle = '';
|
a=md5_ff(a,b,c,d,x[i+0],7,-680876936);
|
||||||
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
d=md5_ff(d,a,b,c,x[i+1],12,-389564586);
|
||||||
showDynaformHistoryGlobal.dynUID = dynUID;
|
c=md5_ff(c,d,a,b,x[i+2],17,606105819);
|
||||||
showDynaformHistoryGlobal.tablename = tablename;
|
b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);
|
||||||
showDynaformHistoryGlobal.dynDate = dynDate;
|
a=md5_ff(a,b,c,d,x[i+4],7,-176418897);
|
||||||
showDynaformHistoryGlobal.dynTitle = dynTitle;
|
d=md5_ff(d,a,b,c,x[i+5],12,1200080426);
|
||||||
|
c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);
|
||||||
var dynUID = showDynaformHistoryGlobal.dynUID;
|
b=md5_ff(b,c,d,a,x[i+7],22,-45705983);
|
||||||
var tablename = showDynaformHistoryGlobal.tablename;
|
a=md5_ff(a,b,c,d,x[i+8],7,1770035416);
|
||||||
var dynDate = showDynaformHistoryGlobal.dynDate;
|
d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);
|
||||||
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
c=md5_ff(c,d,a,b,x[i+10],17,-42063);
|
||||||
|
b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);
|
||||||
var idUnique = globalMd5Return(dynUID+tablename+dynDate+dynTitle);
|
a=md5_ff(a,b,c,d,x[i+12],7,1804603682);
|
||||||
|
d=md5_ff(d,a,b,c,x[i+13],12,-40341101);
|
||||||
var tabData = window.parent.Ext.util.JSON.encode(showDynaformHistoryGlobal);
|
c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);
|
||||||
var tabName = 'dynaformChangeLogViewHistory'+idUnique;
|
b=md5_ff(b,c,d,a,x[i+15],22,1236535329);
|
||||||
var tabTitle = 'View('+dynTitle+' '+dynDate+')';
|
a=md5_gg(a,b,c,d,x[i+1],5,-165796510);
|
||||||
|
d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);
|
||||||
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
c=md5_gg(c,d,a,b,x[i+11],14,643717713);
|
||||||
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
b=md5_gg(b,c,d,a,x[i+0],20,-373897302);
|
||||||
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
a=md5_gg(a,b,c,d,x[i+5],5,-701558691);
|
||||||
|
d=md5_gg(d,a,b,c,x[i+10],9,38016083);
|
||||||
window.parent.Actions.tabFrame(tabName);
|
c=md5_gg(c,d,a,b,x[i+15],14,-660478335);
|
||||||
}
|
b=md5_gg(b,c,d,a,x[i+4],20,-405537848);
|
||||||
</script>
|
a=md5_gg(a,b,c,d,x[i+9],5,568446438);
|
||||||
<?php
|
d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);
|
||||||
|
c=md5_gg(c,d,a,b,x[i+3],14,-187363961);
|
||||||
require_once 'classes/model/AppHistory.php';
|
b=md5_gg(b,c,d,a,x[i+8],20,1163531501);
|
||||||
$G_PUBLISH = new Publisher();
|
a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);
|
||||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
|
d=md5_gg(d,a,b,c,x[i+2],9,-51403784);
|
||||||
|
c=md5_gg(c,d,a,b,x[i+7],14,1735328473);
|
||||||
G::RenderPage( 'publish', 'raw' );
|
b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);
|
||||||
}
|
a=md5_hh(a,b,c,d,x[i+5],4,-378558);
|
||||||
|
d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);
|
||||||
if ($actionAjax == 'dynaformChangeLogViewHistory') {
|
c=md5_hh(c,d,a,b,x[i+11],16,1839030562);
|
||||||
|
b=md5_hh(b,c,d,a,x[i+14],23,-35309556);
|
||||||
?>
|
a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);
|
||||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
d=md5_hh(d,a,b,c,x[i+4],11,1272893353);
|
||||||
<style type="text/css">
|
c=md5_hh(c,d,a,b,x[i+7],16,-155497632);
|
||||||
html {
|
b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);
|
||||||
color: black !important;
|
a=md5_hh(a,b,c,d,x[i+13],4,681279174);
|
||||||
}
|
d=md5_hh(d,a,b,c,x[i+0],11,-358537222);
|
||||||
|
c=md5_hh(c,d,a,b,x[i+3],16,-722521979);
|
||||||
body {
|
b=md5_hh(b,c,d,a,x[i+6],23,76029189);
|
||||||
color: black !important;
|
a=md5_hh(a,b,c,d,x[i+9],4,-640364487);
|
||||||
}
|
d=md5_hh(d,a,b,c,x[i+12],11,-421815835);
|
||||||
</style>
|
c=md5_hh(c,d,a,b,x[i+15],16,530742520);
|
||||||
<script language="Javascript">
|
b=md5_hh(b,c,d,a,x[i+2],23,-995338651);
|
||||||
|
a=md5_ii(a,b,c,d,x[i+0],6,-198630844);
|
||||||
|
d=md5_ii(d,a,b,c,x[i+7],10,1126891415);
|
||||||
|
c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);
|
||||||
//!Code that simulated reload library javascript maborak
|
b=md5_ii(b,c,d,a,x[i+5],21,-57434055);
|
||||||
var leimnud = {};
|
a=md5_ii(a,b,c,d,x[i+12],6,1700485571);
|
||||||
leimnud.exec = "";
|
d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);
|
||||||
leimnud.fix = {};
|
c=md5_ii(c,d,a,b,x[i+10],15,-1051523);
|
||||||
leimnud.fix.memoryLeak = "";
|
b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);
|
||||||
leimnud.browser = {};
|
a=md5_ii(a,b,c,d,x[i+8],6,1873313359);
|
||||||
leimnud.browser.isIphone = "";
|
d=md5_ii(d,a,b,c,x[i+15],10,-30611744);
|
||||||
leimnud.iphone = {};
|
c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);
|
||||||
leimnud.iphone.make = function(){};
|
b=md5_ii(b,c,d,a,x[i+13],21,1309151649);
|
||||||
function ajax_function(ajax_server, funcion, parameters, method){
|
a=md5_ii(a,b,c,d,x[i+4],6,-145523070);
|
||||||
}
|
d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);
|
||||||
//!
|
c=md5_ii(c,d,a,b,x[i+2],15,718787259);
|
||||||
</script>
|
b=md5_ii(b,c,d,a,x[i+9],21,-343485551);
|
||||||
<?php
|
a=safe_add(a,olda);b=safe_add(b,oldb);
|
||||||
|
c=safe_add(c,oldc);d=safe_add(d,oldd)
|
||||||
$_POST['DYN_UID'] = $_REQUEST['DYN_UID'];
|
}
|
||||||
$_POST['HISTORY_ID'] = $_REQUEST['HISTORY_ID'];
|
return[a,b,c,d]
|
||||||
|
}
|
||||||
global $G_PUBLISH;
|
function str2binl(str) {
|
||||||
$G_PUBLISH = new Publisher();
|
var bin=[];
|
||||||
$FieldsHistory = unserialize( $_SESSION['HISTORY_DATA'] );
|
var mask=(1<<chrsz)-1;
|
||||||
$Fields['APP_DATA'] = $FieldsHistory[$_POST['HISTORY_ID']];
|
for(var i=0;i<str.length*chrsz;i+=chrsz) {
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
}
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
return bin
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
}
|
||||||
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
function binl2str(bin) {
|
||||||
|
var str="";
|
||||||
?>
|
var mask=(1<<chrsz)-1;
|
||||||
<script language="javascript">
|
for(var i=0;i<bin.length*32;i+=chrsz) {
|
||||||
<?php
|
str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)
|
||||||
global $G_FORM;
|
}
|
||||||
?>
|
return str
|
||||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
}
|
||||||
|
function binl2hex(binarray) {
|
||||||
}
|
var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";
|
||||||
</script>
|
var str="";
|
||||||
<?php
|
for(var i=0;i<binarray.length*4;i++) {
|
||||||
|
str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)
|
||||||
G::RenderPage( 'publish', 'raw' );
|
}
|
||||||
|
return str
|
||||||
}
|
}
|
||||||
if ($actionAjax == 'historyDynaformGridPreview') {
|
return(raw?binl2str(core_md5(str2binl(s),s.length*chrsz)):binl2hex(core_md5(str2binl(s),s.length*chrsz)))
|
||||||
?>
|
};
|
||||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
//!Code that simulated reload library javascript maborak
|
||||||
<style type="text/css">
|
var leimnud = {};
|
||||||
html {
|
leimnud.exec = "";
|
||||||
color: black !important;
|
leimnud.fix = {};
|
||||||
}
|
leimnud.fix.memoryLeak = "";
|
||||||
|
leimnud.browser = {};
|
||||||
body {
|
leimnud.browser.isIphone = "";
|
||||||
color: black !important;
|
leimnud.iphone = {};
|
||||||
}
|
leimnud.iphone.make = function(){};
|
||||||
</style>
|
function ajax_function(ajax_server, funcion, parameters, method){
|
||||||
<script language="Javascript">
|
}
|
||||||
|
|
||||||
|
function toggleTable(tablename){
|
||||||
|
//table= document.getElementByName(tablename);
|
||||||
//!Code that simulated reload library javascript maborak
|
table= document.getElementById(tablename);
|
||||||
var leimnud = {};
|
if(table.style.display == ''){
|
||||||
leimnud.exec = "";
|
table.style.display = 'none';
|
||||||
leimnud.fix = {};
|
}else{
|
||||||
leimnud.fix.memoryLeak = "";
|
table.style.display = '';
|
||||||
leimnud.browser = {};
|
}
|
||||||
leimnud.browser.isIphone = "";
|
}
|
||||||
leimnud.iphone = {};
|
|
||||||
leimnud.iphone.make = function(){};
|
function noesFuncion(idIframe) {
|
||||||
function ajax_function(ajax_server, funcion, parameters, method){
|
window.parent.tabIframeWidthFix2(idIframe);
|
||||||
}
|
}
|
||||||
//!
|
|
||||||
</script>
|
function onResizeIframe(idIframe){
|
||||||
<?php
|
window.onresize = noesFuncion(idIframe);
|
||||||
|
}
|
||||||
//!dataIndex
|
|
||||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
var showDynaformHistoryGlobal = {};
|
||||||
|
showDynaformHistoryGlobal.dynUID = '';
|
||||||
G::LoadClass( 'case' );
|
showDynaformHistoryGlobal.tablename = '';
|
||||||
|
showDynaformHistoryGlobal.dynDate = '';
|
||||||
$G_PUBLISH = new Publisher();
|
showDynaformHistoryGlobal.dynTitle = '';
|
||||||
$oCase = new Cases();
|
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
||||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
showDynaformHistoryGlobal.dynUID = dynUID;
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
showDynaformHistoryGlobal.tablename = tablename;
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
showDynaformHistoryGlobal.dynDate = dynDate;
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
showDynaformHistoryGlobal.dynTitle = dynTitle;
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_POST['DYN_UID'];
|
var dynUID = showDynaformHistoryGlobal.dynUID;
|
||||||
|
var tablename = showDynaformHistoryGlobal.tablename;
|
||||||
$_SESSION['DYN_UID_PRINT'] = $_POST['DYN_UID'];
|
var dynDate = showDynaformHistoryGlobal.dynDate;
|
||||||
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
var dynTitle = showDynaformHistoryGlobal.dynTitle;
|
||||||
|
|
||||||
?>
|
var idUnique = globalMd5Return(dynUID+tablename+dynDate+dynTitle);
|
||||||
<script language="javascript">
|
|
||||||
function popUp(URL, width, height, left, top, resizable) {
|
var tabData = window.parent.Ext.util.JSON.encode(showDynaformHistoryGlobal);
|
||||||
window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable='+resizable+',width='+width+',height='+height+',left = '+left+',top = '+top+'');
|
var tabName = 'dynaformChangeLogViewHistory'+idUnique;
|
||||||
}
|
var tabTitle = 'View('+dynTitle+' '+dynDate+')';
|
||||||
<?php
|
|
||||||
global $G_FORM;
|
window.parent.ActionTabFrameGlobal.tabData = tabData;
|
||||||
?>
|
window.parent.ActionTabFrameGlobal.tabName = tabName;
|
||||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
|
window.parent.ActionTabFrameGlobal.tabTitle = tabTitle;
|
||||||
}
|
|
||||||
</script>
|
window.parent.Actions.tabFrame(tabName);
|
||||||
<?php
|
}
|
||||||
|
</script>
|
||||||
G::RenderPage( 'publish', 'raw' );
|
<?php
|
||||||
}
|
|
||||||
|
require_once 'classes/model/AppHistory.php';
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
|
||||||
|
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($actionAjax == 'dynaformChangeLogViewHistory') {
|
||||||
|
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||||
|
<style type="text/css">
|
||||||
|
html {
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script language="Javascript">
|
||||||
|
|
||||||
|
//!Code that simulated reload library javascript maborak
|
||||||
|
var leimnud = {};
|
||||||
|
leimnud.exec = "";
|
||||||
|
leimnud.fix = {};
|
||||||
|
leimnud.fix.memoryLeak = "";
|
||||||
|
leimnud.browser = {};
|
||||||
|
leimnud.browser.isIphone = "";
|
||||||
|
leimnud.iphone = {};
|
||||||
|
leimnud.iphone.make = function(){};
|
||||||
|
function ajax_function(ajax_server, funcion, parameters, method){
|
||||||
|
}
|
||||||
|
//!
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$_POST['DYN_UID'] = $_REQUEST['DYN_UID'];
|
||||||
|
$_POST['HISTORY_ID'] = $_REQUEST['HISTORY_ID'];
|
||||||
|
|
||||||
|
global $G_PUBLISH;
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$FieldsHistory = unserialize( $_SESSION['HISTORY_DATA'] );
|
||||||
|
$Fields['APP_DATA'] = $FieldsHistory[$_POST['HISTORY_ID']];
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||||
|
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script language="javascript">
|
||||||
|
<?php
|
||||||
|
global $G_FORM;
|
||||||
|
?>
|
||||||
|
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
}
|
||||||
|
if ($actionAjax == 'historyDynaformGridPreview') {
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||||
|
<style type="text/css">
|
||||||
|
html {
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
color: black !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script language="Javascript">
|
||||||
|
//!Code that simulated reload library javascript maborak
|
||||||
|
var leimnud = {};
|
||||||
|
leimnud.exec = "";
|
||||||
|
leimnud.fix = {};
|
||||||
|
leimnud.fix.memoryLeak = "";
|
||||||
|
leimnud.browser = {};
|
||||||
|
leimnud.browser.isIphone = "";
|
||||||
|
leimnud.iphone = {};
|
||||||
|
leimnud.iphone.make = function(){};
|
||||||
|
function ajax_function(ajax_server, funcion, parameters, method){
|
||||||
|
}
|
||||||
|
//!
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
//!dataIndex
|
||||||
|
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||||
|
|
||||||
|
G::LoadClass( 'case' );
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$oCase = new Cases();
|
||||||
|
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
|
||||||
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_POST['DYN_UID'];
|
||||||
|
|
||||||
|
$_SESSION['DYN_UID_PRINT'] = $_POST['DYN_UID'];
|
||||||
|
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script language="javascript">
|
||||||
|
function popUp(URL, width, height, left, top, resizable) {
|
||||||
|
window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable='+resizable+',width='+width+',height='+height+',left = '+left+',top = '+top+'');
|
||||||
|
}
|
||||||
|
<?php
|
||||||
|
global $G_FORM;
|
||||||
|
?>
|
||||||
|
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -243,24 +243,114 @@ if ($actionAjax == 'showDynaformListHistory') {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script language="Javascript">
|
<script language="Javascript">
|
||||||
globalMd5Return=function(s,raw,hexcase,chrsz){
|
globalMd5Return=function(s,raw,hexcase,chrsz) {
|
||||||
raw=raw||false;hexcase=hexcase||false;chrsz=chrsz||8;function safe_add(x,y){
|
raw=raw||false;
|
||||||
var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}
|
hexcase=hexcase||false;
|
||||||
function bit_rol(num,cnt){return(num<<cnt)|(num>>>(32-cnt))}function md5_cmn(q,a,b,x,s,t){
|
chrsz=chrsz||8;
|
||||||
return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){
|
function safe_add(x,y) {
|
||||||
return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)}
|
var lsw=(x&0xFFFF)+(y&0xFFFF);
|
||||||
function md5_gg(a,b,c,d,x,s,t){
|
var msw=(x>>16)+(y>>16)+(lsw>>16);
|
||||||
return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)}
|
return(msw<<16)|(lsw&0xFFFF)
|
||||||
function md5_hh(a,b,c,d,x,s,t){
|
}
|
||||||
return md5_cmn(b^c^d,a,b,x,s,t)}
|
function bit_rol(num,cnt) {
|
||||||
function md5_ii(a,b,c,d,x,s,t){
|
return(num<<cnt)|(num>>>(32-cnt))
|
||||||
return md5_cmn(c^(b|(~d)),a,b,x,s,t)}
|
}
|
||||||
function core_md5(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16){
|
function md5_cmn(q,a,b,x,s,t) {
|
||||||
var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);
|
return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)
|
||||||
a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);
|
}
|
||||||
b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);
|
function md5_ff(a,b,c,d,x,s,t) {
|
||||||
d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd)}
|
return md5_cmn((b&c)|((~b)&d),a,b,x,s,t)
|
||||||
return[a,b,c,d]}
|
}
|
||||||
|
function md5_gg(a,b,c,d,x,s,t) {
|
||||||
|
return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t)
|
||||||
|
}
|
||||||
|
function md5_hh(a,b,c,d,x,s,t) {
|
||||||
|
return md5_cmn(b^c^d,a,b,x,s,t)
|
||||||
|
}
|
||||||
|
function md5_ii(a,b,c,d,x,s,t) {
|
||||||
|
return md5_cmn(c^(b|(~d)),a,b,x,s,t)
|
||||||
|
}
|
||||||
|
function core_md5(x,len) {
|
||||||
|
x[len>>5]|=0x80<<((len)%32);
|
||||||
|
x[(((len+64)>>>9)<<4)+14]=len;
|
||||||
|
var a=1732584193;
|
||||||
|
var b=-271733879;
|
||||||
|
var c=-1732584194;
|
||||||
|
var d=271733878;
|
||||||
|
for(var i=0;i<x.length;i+=16) {
|
||||||
|
var olda=a;
|
||||||
|
var oldb=b;
|
||||||
|
var oldc=c;
|
||||||
|
var oldd=d;
|
||||||
|
a=md5_ff(a,b,c,d,x[i+0],7,-680876936);
|
||||||
|
d=md5_ff(d,a,b,c,x[i+1],12,-389564586);
|
||||||
|
c=md5_ff(c,d,a,b,x[i+2],17,606105819);
|
||||||
|
b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);
|
||||||
|
a=md5_ff(a,b,c,d,x[i+4],7,-176418897);
|
||||||
|
d=md5_ff(d,a,b,c,x[i+5],12,1200080426);
|
||||||
|
c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);
|
||||||
|
b=md5_ff(b,c,d,a,x[i+7],22,-45705983);
|
||||||
|
a=md5_ff(a,b,c,d,x[i+8],7,1770035416);
|
||||||
|
d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);
|
||||||
|
c=md5_ff(c,d,a,b,x[i+10],17,-42063);
|
||||||
|
b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);
|
||||||
|
a=md5_ff(a,b,c,d,x[i+12],7,1804603682);
|
||||||
|
d=md5_ff(d,a,b,c,x[i+13],12,-40341101);
|
||||||
|
c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);
|
||||||
|
b=md5_ff(b,c,d,a,x[i+15],22,1236535329);
|
||||||
|
a=md5_gg(a,b,c,d,x[i+1],5,-165796510);
|
||||||
|
d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);
|
||||||
|
c=md5_gg(c,d,a,b,x[i+11],14,643717713);
|
||||||
|
b=md5_gg(b,c,d,a,x[i+0],20,-373897302);
|
||||||
|
a=md5_gg(a,b,c,d,x[i+5],5,-701558691);
|
||||||
|
d=md5_gg(d,a,b,c,x[i+10],9,38016083);
|
||||||
|
c=md5_gg(c,d,a,b,x[i+15],14,-660478335);
|
||||||
|
b=md5_gg(b,c,d,a,x[i+4],20,-405537848);
|
||||||
|
a=md5_gg(a,b,c,d,x[i+9],5,568446438);
|
||||||
|
d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);
|
||||||
|
c=md5_gg(c,d,a,b,x[i+3],14,-187363961);
|
||||||
|
b=md5_gg(b,c,d,a,x[i+8],20,1163531501);
|
||||||
|
a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);
|
||||||
|
d=md5_gg(d,a,b,c,x[i+2],9,-51403784);
|
||||||
|
c=md5_gg(c,d,a,b,x[i+7],14,1735328473);
|
||||||
|
b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);
|
||||||
|
a=md5_hh(a,b,c,d,x[i+5],4,-378558);
|
||||||
|
d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);
|
||||||
|
c=md5_hh(c,d,a,b,x[i+11],16,1839030562);
|
||||||
|
b=md5_hh(b,c,d,a,x[i+14],23,-35309556);
|
||||||
|
a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);
|
||||||
|
d=md5_hh(d,a,b,c,x[i+4],11,1272893353);
|
||||||
|
c=md5_hh(c,d,a,b,x[i+7],16,-155497632);
|
||||||
|
b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);
|
||||||
|
a=md5_hh(a,b,c,d,x[i+13],4,681279174);
|
||||||
|
d=md5_hh(d,a,b,c,x[i+0],11,-358537222);
|
||||||
|
c=md5_hh(c,d,a,b,x[i+3],16,-722521979);
|
||||||
|
b=md5_hh(b,c,d,a,x[i+6],23,76029189);
|
||||||
|
a=md5_hh(a,b,c,d,x[i+9],4,-640364487);
|
||||||
|
d=md5_hh(d,a,b,c,x[i+12],11,-421815835);
|
||||||
|
c=md5_hh(c,d,a,b,x[i+15],16,530742520);
|
||||||
|
b=md5_hh(b,c,d,a,x[i+2],23,-995338651);
|
||||||
|
a=md5_ii(a,b,c,d,x[i+0],6,-198630844);
|
||||||
|
d=md5_ii(d,a,b,c,x[i+7],10,1126891415);
|
||||||
|
c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);
|
||||||
|
b=md5_ii(b,c,d,a,x[i+5],21,-57434055);
|
||||||
|
a=md5_ii(a,b,c,d,x[i+12],6,1700485571);
|
||||||
|
d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);
|
||||||
|
c=md5_ii(c,d,a,b,x[i+10],15,-1051523);
|
||||||
|
b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);
|
||||||
|
a=md5_ii(a,b,c,d,x[i+8],6,1873313359);
|
||||||
|
d=md5_ii(d,a,b,c,x[i+15],10,-30611744);
|
||||||
|
c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);
|
||||||
|
b=md5_ii(b,c,d,a,x[i+13],21,1309151649);
|
||||||
|
a=md5_ii(a,b,c,d,x[i+4],6,-145523070);
|
||||||
|
d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);
|
||||||
|
c=md5_ii(c,d,a,b,x[i+2],15,718787259);
|
||||||
|
b=md5_ii(b,c,d,a,x[i+9],21,-343485551);
|
||||||
|
a=safe_add(a,olda);b=safe_add(b,oldb);
|
||||||
|
c=safe_add(c,oldc);d=safe_add(d,oldd)
|
||||||
|
}
|
||||||
|
return[a,b,c,d]
|
||||||
|
}
|
||||||
function str2binl(str){var bin=[];var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}
|
function str2binl(str){var bin=[];var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32)}
|
||||||
return bin}
|
return bin}
|
||||||
function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}
|
function binl2str(bin){var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz){str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask)}return str}
|
||||||
@@ -304,7 +394,7 @@ if ($actionAjax == 'showDynaformListHistory') {
|
|||||||
var showDynaformHistoryGlobal = {};
|
var showDynaformHistoryGlobal = {};
|
||||||
showDynaformHistoryGlobal.dynUID = '';
|
showDynaformHistoryGlobal.dynUID = '';
|
||||||
showDynaformHistoryGlobal.tablename = '';
|
showDynaformHistoryGlobal.tablename = '';
|
||||||
showDynaformHistoryGlobal.dynDate = '';
|
showDynaformHistoryGlobal.dynDate = '';casesList_Ajax.php
|
||||||
showDynaformHistoryGlobal.dynTitle = '';
|
showDynaformHistoryGlobal.dynTitle = '';
|
||||||
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
function showDynaformHistory(dynUID,tablename,dynDate,dynTitle){
|
||||||
showDynaformHistoryGlobal.dynUID = dynUID;
|
showDynaformHistoryGlobal.dynUID = dynUID;
|
||||||
|
|||||||
@@ -1,78 +1,78 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* cases_SaveData.php
|
* cases_SaveData.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
//validate the data post
|
//validate the data post
|
||||||
//$oForm = new Form ( $_SESSION ['PROCESS'] . '/' . $_GET ['UID'], PATH_DYNAFORM );
|
//$oForm = new Form ( $_SESSION ['PROCESS'] . '/' . $_GET ['UID'], PATH_DYNAFORM );
|
||||||
//$oForm->validatePost ();
|
//$oForm->validatePost ();
|
||||||
|
|
||||||
/* @author Alvaro Campos Sanchez */
|
/* @author Alvaro Campos Sanchez */
|
||||||
/* Includes */
|
/* Includes */
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
|
|
||||||
//load the variables
|
//load the variables
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
|
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
|
||||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], G::getSystemConstants() );
|
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], G::getSystemConstants() );
|
||||||
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], (array) $_POST['form'] );
|
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], (array) $_POST['form'] );
|
||||||
|
|
||||||
#here we must verify if is a debug session
|
#here we must verify if is a debug session
|
||||||
$trigger_debug_session = $_SESSION['TRIGGER_DEBUG']['ISSET']; #here we must verify if is a debugg session
|
$trigger_debug_session = $_SESSION['TRIGGER_DEBUG']['ISSET']; #here we must verify if is a debugg session
|
||||||
#trigger debug routines...
|
#trigger debug routines...
|
||||||
//cleaning debug variables
|
//cleaning debug variables
|
||||||
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
||||||
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
||||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = Array ();
|
||||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = Array ();
|
||||||
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER' );
|
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER' );
|
||||||
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
|
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
|
||||||
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
|
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
|
||||||
|
|
||||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
|
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||||
//Execute after triggers - Start
|
//Execute after triggers - Start
|
||||||
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER', $Fields['APP_DATA'] );
|
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER', $Fields['APP_DATA'] );
|
||||||
//Execute after triggers - End
|
//Execute after triggers - End
|
||||||
}
|
}
|
||||||
|
|
||||||
//go to the next step
|
//go to the next step
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||||
if (isset( $_GET['_REFRESH_'] )) {
|
if (isset( $_GET['_REFRESH_'] )) {
|
||||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||||
|
|
||||||
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep['PAGE'];
|
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep['PAGE'];
|
||||||
|
|
||||||
if ($trigger_debug_session) {
|
if ($trigger_debug_session) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
||||||
$aNextStep['PAGE'] = $aNextStep['PAGE'] . '&breakpoint=triggerdebug';
|
$aNextStep['PAGE'] = $aNextStep['PAGE'] . '&breakpoint=triggerdebug';
|
||||||
}
|
}
|
||||||
|
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
|
|
||||||
|
|||||||
@@ -1,43 +1,43 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* casesSchedulerLog_Ajax.php
|
* casesSchedulerLog_Ajax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
//if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
//if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
||||||
G::LoadInclude( 'ajax' );
|
G::LoadInclude( 'ajax' );
|
||||||
$_POST['action'] = get_ajax_value( 'action' );
|
$_POST['action'] = get_ajax_value( 'action' );
|
||||||
|
|
||||||
switch ($_POST['action']) {
|
switch ($_POST['action']) {
|
||||||
case 'updatePageSize':
|
case 'updatePageSize':
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$arr['pageSize'] = $_REQUEST['size'];
|
$arr['pageSize'] = $_REQUEST['size'];
|
||||||
$arr['dateSave'] = date( 'Y-m-d H:i:s' );
|
$arr['dateSave'] = date( 'Y-m-d H:i:s' );
|
||||||
$config = Array ();
|
$config = Array ();
|
||||||
$config[] = $arr;
|
$config[] = $arr;
|
||||||
$c->aConfig = $config;
|
$c->aConfig = $config;
|
||||||
$c->saveConfig( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
$c->saveConfig( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
echo '{success: true}';
|
echo '{success: true}';
|
||||||
break;
|
break;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,45 +1,45 @@
|
|||||||
<?php
|
<?php
|
||||||
unset( $_SESSION['__currentTabDashboard'] );
|
unset( $_SESSION['__currentTabDashboard'] );
|
||||||
if (isset( $_GET['action'] )) {
|
if (isset( $_GET['action'] )) {
|
||||||
$_SESSION['__currentTabDashboard'] = $_GET['action'];
|
$_SESSION['__currentTabDashboard'] = $_GET['action'];
|
||||||
}
|
}
|
||||||
$page = "";
|
$page = "";
|
||||||
if (isset( $_GET['action'] )) {
|
if (isset( $_GET['action'] )) {
|
||||||
$page = $_GET['action'];
|
$page = $_GET['action'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
switch ($page) {
|
switch ($page) {
|
||||||
case "startCase":
|
case "startCase":
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/casesStartCase', true ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'cases/casesStartCase', true ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'cases/casesStartCase' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'cases/casesStartCase' ); //adding a html file .html.
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||||
break;
|
break;
|
||||||
case "documents":
|
case "documents":
|
||||||
|
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$configPage = $c->getConfiguration( 'documentsModule', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
$configPage = $c->getConfiguration( 'documentsModule', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||||
|
|
||||||
$oHeadPublisher->assign( 'permitodelete', $RBAC->userCanAccess( 'PM_FOLDER_DELETE' ) );
|
$oHeadPublisher->assign( 'permitodelete', $RBAC->userCanAccess( 'PM_FOLDER_DELETE' ) );
|
||||||
$oHeadPublisher->assign( 'permitoaddfile', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FILE' ) );
|
$oHeadPublisher->assign( 'permitoaddfile', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FILE' ) );
|
||||||
$oHeadPublisher->assign( 'permitoaddfolder', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FOLDER' ) );
|
$oHeadPublisher->assign( 'permitoaddfolder', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FOLDER' ) );
|
||||||
|
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/casesDocuments', false ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'cases/casesDocuments', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'cases/casesDocuments' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'cases/casesDocuments' ); //adding a html file .html.
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/casesStartPage', false ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'cases/casesStartPage', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'cases/casesStartPage' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'cases/casesStartPage' ); //adding a html file .html.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -1,357 +1,361 @@
|
|||||||
<?php
|
<?php
|
||||||
if (! isset( $_REQUEST['action'] )) {
|
if (! isset( $_REQUEST['action'] )) {
|
||||||
$res['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res['message'] = 'You may request an action';
|
$res['message'] = 'You may request an action';
|
||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
if (! function_exists( $_REQUEST['action'] )) {
|
if (! function_exists( $_REQUEST['action'] )) {
|
||||||
$res['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res['message'] = 'The requested action does not exist';
|
$res['message'] = 'The requested action does not exist';
|
||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$functionName = $_REQUEST['action'];
|
$functionName = $_REQUEST['action'];
|
||||||
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
|
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
|
||||||
|
|
||||||
$functionName( $functionParams );
|
$functionName( $functionParams );
|
||||||
|
|
||||||
function getProcessList ()
|
function getProcessList ()
|
||||||
{
|
{
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( 'process' );
|
G::LoadClass( 'process' );
|
||||||
G::LoadClass( 'calendar' );
|
G::LoadClass( 'calendar' );
|
||||||
$calendar = new Calendar();
|
$calendar = new Calendar();
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
|
|
||||||
//Get ProcessStatistics Info
|
//Get ProcessStatistics Info
|
||||||
$start = 0;
|
$start = 0;
|
||||||
$limit = '';
|
$limit = '';
|
||||||
$proData = $oProcess->getAllProcesses( $start, $limit, null, null, false, true );
|
$proData = $oProcess->getAllProcesses( $start, $limit, null, null, false, true );
|
||||||
|
|
||||||
$bCanStart = $oCase->canStartCase( $_SESSION['USER_LOGGED'] );
|
$bCanStart = $oCase->canStartCase( $_SESSION['USER_LOGGED'] );
|
||||||
if ($bCanStart) {
|
if ($bCanStart) {
|
||||||
$processListInitial = $oCase->getStartCasesPerType( $_SESSION['USER_LOGGED'], 'category' );
|
$processListInitial = $oCase->getStartCasesPerType( $_SESSION['USER_LOGGED'], 'category' );
|
||||||
$processList = array ();
|
$processList = array ();
|
||||||
foreach ($processListInitial as $key => $procInfo) {
|
foreach ($processListInitial as $key => $procInfo) {
|
||||||
if (isset( $procInfo['pro_uid'] )) {
|
if (isset( $procInfo['pro_uid'] )) {
|
||||||
if (trim( $procInfo['cat'] ) == "")
|
if (trim( $procInfo['cat'] ) == "") {
|
||||||
$procInfo['cat'] = "_OTHER_";
|
$procInfo['cat'] = "_OTHER_";
|
||||||
$processList[$procInfo['catname']][$procInfo['value']] = $procInfo;
|
}
|
||||||
}
|
$processList[$procInfo['catname']][$procInfo['value']] = $procInfo;
|
||||||
}
|
}
|
||||||
ksort( $processList );
|
}
|
||||||
foreach ($processList as $key => $processInfo) {
|
ksort( $processList );
|
||||||
ksort( $processList[$key] );
|
foreach ($processList as $key => $processInfo) {
|
||||||
}
|
ksort( $processList[$key] );
|
||||||
|
}
|
||||||
if (! isset( $_REQUEST['node'] )) {
|
|
||||||
$node = 'root';
|
if (! isset( $_REQUEST['node'] )) {
|
||||||
} else {
|
$node = 'root';
|
||||||
$node = $_REQUEST['node'];
|
} else {
|
||||||
}
|
$node = $_REQUEST['node'];
|
||||||
|
}
|
||||||
foreach ($proData as $key => $proInfo) {
|
|
||||||
$proData[$proInfo['PRO_UID']] = $proInfo;
|
foreach ($proData as $key => $proInfo) {
|
||||||
}
|
$proData[$proInfo['PRO_UID']] = $proInfo;
|
||||||
|
}
|
||||||
$processListTree = array ();
|
|
||||||
if (1) {
|
$processListTree = array ();
|
||||||
foreach ($processList as $key => $processInfo) {
|
if (1) {
|
||||||
$tempTree['text'] = $key;
|
foreach ($processList as $key => $processInfo) {
|
||||||
$tempTree['id'] = $key;
|
$tempTree['text'] = $key;
|
||||||
$tempTree['cls'] = 'folder';
|
$tempTree['id'] = $key;
|
||||||
$tempTree['draggable'] = true;
|
$tempTree['cls'] = 'folder';
|
||||||
$tempTree['optionType'] = "category";
|
$tempTree['draggable'] = true;
|
||||||
|
$tempTree['optionType'] = "category";
|
||||||
//$tempTree['allowDrop']=false;
|
//$tempTree['allowDrop']=false;
|
||||||
$tempTree['singleClickExpand'] = true;
|
$tempTree['singleClickExpand'] = true;
|
||||||
if ($key != "No Category") {
|
if ($key != "No Category") {
|
||||||
$tempTree['expanded'] = true;
|
$tempTree['expanded'] = true;
|
||||||
} else {
|
} else {
|
||||||
//$tempTree ['expanded'] = false;
|
//$tempTree ['expanded'] = false;
|
||||||
$tempTree['expanded'] = true;
|
$tempTree['expanded'] = true;
|
||||||
}
|
}
|
||||||
$tempTreeChildren = array ();
|
$tempTreeChildren = array ();
|
||||||
foreach ($processList[$key] as $keyChild => $processInfoChild) {
|
foreach ($processList[$key] as $keyChild => $processInfoChild) {
|
||||||
//print_r($processInfo);
|
//print_r($processInfo);
|
||||||
$tempTreeChild['text'] = $keyChild; //ellipsis ( $keyChild, 50 );
|
$tempTreeChild['text'] = $keyChild; //ellipsis ( $keyChild, 50 );
|
||||||
//$tempTree['text']=$key;
|
//$tempTree['text']=$key;
|
||||||
$tempTreeChild['id'] = $keyChild;
|
$tempTreeChild['id'] = $keyChild;
|
||||||
$tempTreeChild['draggable'] = true;
|
$tempTreeChild['draggable'] = true;
|
||||||
$tempTreeChild['leaf'] = true;
|
$tempTreeChild['leaf'] = true;
|
||||||
$tempTreeChild['icon'] = '/images/icon.trigger.png';
|
$tempTreeChild['icon'] = '/images/icon.trigger.png';
|
||||||
$tempTreeChild['allowChildren'] = false;
|
$tempTreeChild['allowChildren'] = false;
|
||||||
$tempTreeChild['optionType'] = "startProcess";
|
$tempTreeChild['optionType'] = "startProcess";
|
||||||
$tempTreeChild['pro_uid'] = $processInfoChild['pro_uid'];
|
$tempTreeChild['pro_uid'] = $processInfoChild['pro_uid'];
|
||||||
$tempTreeChild['tas_uid'] = $processInfoChild['uid'];
|
$tempTreeChild['tas_uid'] = $processInfoChild['uid'];
|
||||||
$processInfoChild['myInbox'] = 0;
|
$processInfoChild['myInbox'] = 0;
|
||||||
$processInfoChild['totalInbox'] = 0;
|
$processInfoChild['totalInbox'] = 0;
|
||||||
if (isset( $proData[$processInfoChild['pro_uid']] )) {
|
if (isset( $proData[$processInfoChild['pro_uid']] )) {
|
||||||
$tempTreeChild['otherAttributes'] = array_merge( $processInfoChild, $proData[$processInfoChild['pro_uid']], $calendar->getCalendarFor( $processInfoChild['uid'], $processInfoChild['uid'], $processInfoChild['uid'] ) );
|
$tempTreeChild['otherAttributes'] = array_merge( $processInfoChild, $proData[$processInfoChild['pro_uid']], $calendar->getCalendarFor( $processInfoChild['uid'], $processInfoChild['uid'], $processInfoChild['uid'] ) );
|
||||||
$tempTreeChild['otherAttributes']['PRO_TAS_TITLE'] = str_replace( ")", "", str_replace( "(", "", trim( str_replace( $tempTreeChild['otherAttributes']['PRO_TITLE'], "", $tempTreeChild['otherAttributes']["value"] ) ) ) );
|
$tempTreeChild['otherAttributes']['PRO_TAS_TITLE'] = str_replace( ")", "", str_replace( "(", "", trim( str_replace( $tempTreeChild['otherAttributes']['PRO_TITLE'], "", $tempTreeChild['otherAttributes']["value"] ) ) ) );
|
||||||
$tempTreeChild['qtip'] = $tempTreeChild['otherAttributes']['PRO_DESCRIPTION'];
|
$tempTreeChild['qtip'] = $tempTreeChild['otherAttributes']['PRO_DESCRIPTION'];
|
||||||
//$tempTree['cls']='file';
|
//$tempTree['cls']='file';
|
||||||
$tempTreeChildren[] = $tempTreeChild;
|
$tempTreeChildren[] = $tempTreeChild;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tempTree['children'] = $tempTreeChildren;
|
$tempTree['children'] = $tempTreeChildren;
|
||||||
|
|
||||||
$processListTree[] = $tempTree;
|
$processListTree[] = $tempTree;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach ($processList[$node] as $key => $processInfo) {
|
foreach ($processList[$node] as $key => $processInfo) {
|
||||||
//print_r($processInfo);
|
//print_r($processInfo);
|
||||||
$tempTree['text'] = $key; //ellipsis ( $key, 50 );
|
$tempTree['text'] = $key; //ellipsis ( $key, 50 );
|
||||||
//$tempTree['text']=$key;
|
//$tempTree['text']=$key;
|
||||||
$tempTree['id'] = $key;
|
$tempTree['id'] = $key;
|
||||||
$tempTree['draggable'] = true;
|
$tempTree['draggable'] = true;
|
||||||
$tempTree['leaf'] = true;
|
$tempTree['leaf'] = true;
|
||||||
$tempTree['icon'] = '/images/icon.trigger.png';
|
$tempTree['icon'] = '/images/icon.trigger.png';
|
||||||
$tempTree['allowChildren'] = false;
|
$tempTree['allowChildren'] = false;
|
||||||
$tempTree['optionType'] = "startProcess";
|
$tempTree['optionType'] = "startProcess";
|
||||||
$tempTree['pro_uid'] = $processInfo['pro_uid'];
|
$tempTree['pro_uid'] = $processInfo['pro_uid'];
|
||||||
$tempTree['tas_uid'] = $processInfo['uid'];
|
$tempTree['tas_uid'] = $processInfo['uid'];
|
||||||
$processInfo['myInbox'] = 0;
|
$processInfo['myInbox'] = 0;
|
||||||
$processInfo['totalInbox'] = 0;
|
$processInfo['totalInbox'] = 0;
|
||||||
$tempTree['otherAttributes'] = array_merge( $processInfo, $proData[$processInfo['pro_uid']], $calendar->getCalendarFor( $processInfo['uid'], $processInfo['uid'], $processInfo['uid'] ) );
|
$tempTree['otherAttributes'] = array_merge( $processInfo, $proData[$processInfo['pro_uid']], $calendar->getCalendarFor( $processInfo['uid'], $processInfo['uid'], $processInfo['uid'] ) );
|
||||||
$tempTree['otherAttributes']['PRO_TAS_TITLE'] = str_replace( ")", "", str_replace( "(", "", trim( str_replace( $tempTree['otherAttributes']['PRO_TITLE'], "", $tempTree['otherAttributes']["value"] ) ) ) );
|
$tempTree['otherAttributes']['PRO_TAS_TITLE'] = str_replace( ")", "", str_replace( "(", "", trim( str_replace( $tempTree['otherAttributes']['PRO_TITLE'], "", $tempTree['otherAttributes']["value"] ) ) ) );
|
||||||
$tempTree['qtip'] = $tempTree['otherAttributes']['PRO_DESCRIPTION'];
|
$tempTree['qtip'] = $tempTree['otherAttributes']['PRO_DESCRIPTION'];
|
||||||
//$tempTree['cls']='file';
|
//$tempTree['cls']='file';
|
||||||
$processListTree[] = $tempTree;
|
$processListTree[] = $tempTree;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
$processList = $processListTree;
|
||||||
$processList = $processListTree;
|
} else {
|
||||||
} else {
|
$processList['success'] = 'failure';
|
||||||
$processList['success'] = 'failure';
|
$processList['message'] = 'User can\'t start process';
|
||||||
$processList['message'] = 'User can\'t start process';
|
}
|
||||||
}
|
print G::json_encode( $processList );
|
||||||
print G::json_encode( $processList );
|
die();
|
||||||
die();
|
}
|
||||||
}
|
|
||||||
|
function ellipsis ($text, $numb)
|
||||||
function ellipsis ($text, $numb)
|
{
|
||||||
{
|
$text = html_entity_decode( $text, ENT_QUOTES );
|
||||||
$text = html_entity_decode( $text, ENT_QUOTES );
|
if (strlen( $text ) > $numb) {
|
||||||
if (strlen( $text ) > $numb) {
|
$text = substr( $text, 0, $numb );
|
||||||
$text = substr( $text, 0, $numb );
|
$text = substr( $text, 0, strrpos( $text, " " ) );
|
||||||
$text = substr( $text, 0, strrpos( $text, " " ) );
|
|
||||||
//This strips the full stop:
|
//This strips the full stop:
|
||||||
if ((substr( $text, - 1 )) == ".") {
|
if ((substr( $text, - 1 )) == ".") {
|
||||||
$text = substr( $text, 0, (strrpos( $text, "." )) );
|
$text = substr( $text, 0, (strrpos( $text, "." )) );
|
||||||
}
|
}
|
||||||
$etc = "...";
|
$etc = "...";
|
||||||
$text = $text . $etc;
|
$text = $text . $etc;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function lookinginforContentProcess ($sproUid)
|
function lookinginforContentProcess ($sproUid)
|
||||||
{
|
{
|
||||||
require_once 'classes/model/Content.php';
|
require_once 'classes/model/Content.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
require_once 'classes/model/Content.php';
|
require_once 'classes/model/Content.php';
|
||||||
|
|
||||||
$oContent = new Content();
|
$oContent = new Content();
|
||||||
///we are looking for a pro title for this process $sproUid
|
///we are looking for a pro title for this process $sproUid
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
||||||
$oCriteria->add( ContentPeer::CON_LANG, 'en' );
|
$oCriteria->add( ContentPeer::CON_LANG, 'en' );
|
||||||
$oCriteria->add( ContentPeer::CON_ID, $sproUid );
|
$oCriteria->add( ContentPeer::CON_ID, $sproUid );
|
||||||
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
if (! is_array( $aRow )) {
|
if (! is_array( $aRow )) {
|
||||||
|
|
||||||
$oC = new Criteria( 'workflow' );
|
$oC = new Criteria( 'workflow' );
|
||||||
$oC->addSelectColumn( TaskPeer::TAS_UID );
|
$oC->addSelectColumn( TaskPeer::TAS_UID );
|
||||||
$oC->add( TaskPeer::PRO_UID, $sproUid );
|
$oC->add( TaskPeer::PRO_UID, $sproUid );
|
||||||
$oDataset1 = TaskPeer::doSelectRS( $oC );
|
$oDataset1 = TaskPeer::doSelectRS( $oC );
|
||||||
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
while ($oDataset1->next()) {
|
while ($oDataset1->next()) {
|
||||||
$aRow1 = $oDataset1->getRow();
|
$aRow1 = $oDataset1->getRow();
|
||||||
|
|
||||||
$oCriteria1 = new Criteria( 'workflow' );
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE' );
|
$oCriteria1->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE' );
|
||||||
$oCriteria1->add( ContentPeer::CON_LANG, SYS_LANG );
|
$oCriteria1->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||||
$oCriteria1->add( ContentPeer::CON_ID, $aRow1['TAS_UID'] );
|
$oCriteria1->add( ContentPeer::CON_ID, $aRow1['TAS_UID'] );
|
||||||
$oDataset2 = ContentPeer::doSelectRS( $oCriteria1 );
|
$oDataset2 = ContentPeer::doSelectRS( $oCriteria1 );
|
||||||
$oDataset2->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset2->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset2->next();
|
$oDataset2->next();
|
||||||
$aRow2 = $oDataset2->getRow();
|
$aRow2 = $oDataset2->getRow();
|
||||||
|
|
||||||
Content::insertContent( 'TAS_TITLE', '', $aRow2['CON_ID'], 'en', $aRow2['CON_VALUE'] );
|
Content::insertContent( 'TAS_TITLE', '', $aRow2['CON_ID'], 'en', $aRow2['CON_VALUE'] );
|
||||||
}
|
}
|
||||||
$oC2 = new Criteria( 'workflow' );
|
$oC2 = new Criteria( 'workflow' );
|
||||||
$oC2->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
$oC2->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
|
||||||
$oC2->add( ContentPeer::CON_LANG, SYS_LANG );
|
$oC2->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||||
$oC2->add( ContentPeer::CON_ID, $sproUid );
|
$oC2->add( ContentPeer::CON_ID, $sproUid );
|
||||||
$oDataset3 = ContentPeer::doSelectRS( $oC2 );
|
$oDataset3 = ContentPeer::doSelectRS( $oC2 );
|
||||||
$oDataset3->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset3->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset3->next();
|
$oDataset3->next();
|
||||||
$aRow3 = $oDataset3->getRow();
|
$aRow3 = $oDataset3->getRow();
|
||||||
|
|
||||||
Content::insertContent( 'PRO_TITLE', '', $aRow3['CON_ID'], 'en', $aRow3['CON_VALUE'] );
|
Content::insertContent( 'PRO_TITLE', '', $aRow3['CON_ID'], 'en', $aRow3['CON_VALUE'] );
|
||||||
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function startCase ()
|
function startCase ()
|
||||||
{
|
{
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
|
|
||||||
/* GET , POST & $_SESSION Vars */
|
/* GET , POST & $_SESSION Vars */
|
||||||
/* unset any variable, because we are starting a new case */
|
/* unset any variable, because we are starting a new case */
|
||||||
if (isset( $_SESSION['APPLICATION'] ))
|
if (isset( $_SESSION['APPLICATION'] )) {
|
||||||
unset( $_SESSION['APPLICATION'] );
|
unset( $_SESSION['APPLICATION'] );
|
||||||
if (isset( $_SESSION['PROCESS'] ))
|
}
|
||||||
unset( $_SESSION['PROCESS'] );
|
if (isset( $_SESSION['PROCESS'] )) {
|
||||||
if (isset( $_SESSION['TASK'] ))
|
unset( $_SESSION['PROCESS'] );
|
||||||
unset( $_SESSION['TASK'] );
|
}
|
||||||
if (isset( $_SESSION['INDEX'] ))
|
if (isset( $_SESSION['TASK'] )) {
|
||||||
unset( $_SESSION['INDEX'] );
|
unset( $_SESSION['TASK'] );
|
||||||
if (isset( $_SESSION['STEP_POSITION'] ))
|
}
|
||||||
unset( $_SESSION['STEP_POSITION'] );
|
if (isset( $_SESSION['INDEX'] )) {
|
||||||
|
unset( $_SESSION['INDEX'] );
|
||||||
/* Process */
|
}
|
||||||
try {
|
if (isset( $_SESSION['STEP_POSITION'] )) {
|
||||||
$oCase = new Cases();
|
unset( $_SESSION['STEP_POSITION'] );
|
||||||
|
}
|
||||||
lookinginforContentProcess( $_POST['processId'] );
|
|
||||||
|
/* Process */
|
||||||
$aData = $oCase->startCase( $_REQUEST['taskId'], $_SESSION['USER_LOGGED'] );
|
try {
|
||||||
|
$oCase = new Cases();
|
||||||
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
|
|
||||||
$_SESSION['INDEX'] = $aData['INDEX'];
|
lookinginforContentProcess( $_POST['processId'] );
|
||||||
$_SESSION['PROCESS'] = $aData['PROCESS'];
|
|
||||||
$_SESSION['TASK'] = $_REQUEST['taskId'];
|
$aData = $oCase->startCase( $_REQUEST['taskId'], $_SESSION['USER_LOGGED'] );
|
||||||
$_SESSION['STEP_POSITION'] = 0;
|
|
||||||
|
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
|
||||||
$_SESSION['CASES_REFRESH'] = true;
|
$_SESSION['INDEX'] = $aData['INDEX'];
|
||||||
|
$_SESSION['PROCESS'] = $aData['PROCESS'];
|
||||||
|
$_SESSION['TASK'] = $_REQUEST['taskId'];
|
||||||
|
$_SESSION['STEP_POSITION'] = 0;
|
||||||
|
|
||||||
|
$_SESSION['CASES_REFRESH'] = true;
|
||||||
|
|
||||||
// Execute Events
|
// Execute Events
|
||||||
require_once 'classes/model/Event.php';
|
require_once 'classes/model/Event.php';
|
||||||
$event = new Event();
|
$event = new Event();
|
||||||
$event->createAppEvents( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK'] );
|
$event->createAppEvents( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK'] );
|
||||||
|
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||||
|
|
||||||
$aNextStep['PAGE'] = 'open?APP_UID=' . $aData['APPLICATION'] . '&DEL_INDEX=' . $aData['INDEX'] . '&action=draft';
|
$aNextStep['PAGE'] = 'open?APP_UID=' . $aData['APPLICATION'] . '&DEL_INDEX=' . $aData['INDEX'] . '&action=draft';
|
||||||
|
|
||||||
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
||||||
$aData['openCase'] = $aNextStep;
|
$aData['openCase'] = $aNextStep;
|
||||||
|
|
||||||
$aData['status'] = 'success';
|
$aData['status'] = 'success';
|
||||||
print (G::json_encode( $aData )) ;
|
print (G::json_encode( $aData )) ;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$aData['status'] = 'failure';
|
$aData['status'] = 'failure';
|
||||||
$aData['message'] = $e->getMessage();
|
$aData['message'] = $e->getMessage();
|
||||||
print_r( G::json_encode( $aData ) );
|
print_r( G::json_encode( $aData ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSimpleDashboardData ()
|
function getSimpleDashboardData ()
|
||||||
{
|
{
|
||||||
G::LoadClass( "BasePeer" );
|
G::LoadClass( "BasePeer" );
|
||||||
require_once ("classes/model/AppCacheView.php");
|
require_once ("classes/model/AppCacheView.php");
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
|
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
|
||||||
|
|
||||||
$Criteria = new Criteria( 'workflow' );
|
$Criteria = new Criteria( 'workflow' );
|
||||||
|
|
||||||
$Criteria->clearSelectColumns();
|
$Criteria->clearSelectColumns();
|
||||||
|
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
$Criteria->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_UID );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_UID );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_NUMBER );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_NUMBER );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_STATUS );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_STATUS );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_INDEX );
|
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_INDEX );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_TITLE );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_TITLE );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_TAS_TITLE );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_TAS_TITLE );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_DEL_PREVIOUS_USER );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_DEL_PREVIOUS_USER );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_TASK_DUE_DATE );
|
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_TASK_DUE_DATE );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_UPDATE_DATE );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_UPDATE_DATE );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_PRIORITY );
|
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_PRIORITY );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_DELAYED );
|
$Criteria->addSelectColumn( AppCacheViewPeer::DEL_DELAYED );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::USR_UID );
|
$Criteria->addSelectColumn( AppCacheViewPeer::USR_UID );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_THREAD_STATUS );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_THREAD_STATUS );
|
||||||
|
|
||||||
$Criteria->add( AppCacheViewPeer::APP_STATUS, array ("TO_DO","DRAFT"), CRITERIA::IN );
|
$Criteria->add( AppCacheViewPeer::APP_STATUS, array ("TO_DO","DRAFT"), CRITERIA::IN );
|
||||||
$Criteria->add( AppCacheViewPeer::USR_UID, array ($sUIDUserLogged,""), CRITERIA::IN );
|
$Criteria->add( AppCacheViewPeer::USR_UID, array ($sUIDUserLogged,""), CRITERIA::IN );
|
||||||
$Criteria->add( AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );
|
$Criteria->add( AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );
|
||||||
//$Criteria->add ( AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN' );
|
//$Criteria->add ( AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN' );
|
||||||
$Criteria->add( AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN' );
|
$Criteria->add( AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN' );
|
||||||
|
|
||||||
//execute the query
|
//execute the query
|
||||||
$oDataset = AppCacheViewPeer::doSelectRS( $Criteria );
|
$oDataset = AppCacheViewPeer::doSelectRS( $Criteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
|
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
|
|
||||||
$rows = array ();
|
$rows = array ();
|
||||||
$processNames = array ();
|
$processNames = array ();
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
// G::pr($aRow);
|
// G::pr($aRow);
|
||||||
if (! isset( $processNames[$aRow['PRO_UID']] )) {
|
if (! isset( $processNames[$aRow['PRO_UID']] )) {
|
||||||
$aProcess = $oProcess->load( $aRow['PRO_UID'] );
|
$aProcess = $oProcess->load( $aRow['PRO_UID'] );
|
||||||
$processNames[$aRow['PRO_UID']] = $aProcess['PRO_TITLE'];
|
$processNames[$aRow['PRO_UID']] = $aProcess['PRO_TITLE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($aRow['USR_UID'] == "")
|
if ($aRow['USR_UID'] == "") {
|
||||||
$aRow['APP_STATUS'] = "UNASSIGNED";
|
$aRow['APP_STATUS'] = "UNASSIGNED";
|
||||||
if (((in_array( $aRow['APP_STATUS'], array ("TO_DO","UNASSIGNED"
|
}
|
||||||
) )) && ($aRow['APP_THREAD_STATUS'] == "OPEN")) || ($aRow['APP_STATUS'] == "DRAFT")) {
|
if (((in_array( $aRow['APP_STATUS'], array ("TO_DO","UNASSIGNED"
|
||||||
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']][$aRow['DEL_DELAYED']][] = $aRow['APP_UID'];
|
) )) && ($aRow['APP_THREAD_STATUS'] == "OPEN")) || ($aRow['APP_STATUS'] == "DRAFT")) {
|
||||||
if (! isset( $rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] ))
|
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']][$aRow['DEL_DELAYED']][] = $aRow['APP_UID'];
|
||||||
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] = 0;
|
if (! isset( $rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] )) {
|
||||||
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] ++;
|
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] = 0;
|
||||||
}
|
}
|
||||||
|
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] ++;
|
||||||
$oDataset->next();
|
}
|
||||||
}
|
|
||||||
|
$oDataset->next();
|
||||||
|
}
|
||||||
//Generate different groups of data for graphs
|
//Generate different groups of data for graphs
|
||||||
$rowsResponse = array ();
|
$rowsResponse = array ();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($rows as $processID => $processInfo) {
|
foreach ($rows as $processID => $processInfo) {
|
||||||
$i ++;
|
$i ++;
|
||||||
if ($i <= 10) {
|
if ($i <= 10) {
|
||||||
$rowsResponse['caseStatusByProcess'][] = array ('process' => $processID,'inbox' => isset( $processInfo['TO_DO']['count'] ) ? $processInfo['TO_DO']['count'] : 0,'draft' => isset( $processInfo['DRAFT']['count'] ) ? $processInfo['DRAFT']['count'] : 0,'unassigned' => isset( $processInfo['UNASSIGNED']['count'] ) ? $processInfo['UNASSIGNED']['count'] : 0
|
$rowsResponse['caseStatusByProcess'][] = array ('process' => $processID,'inbox' => isset( $processInfo['TO_DO']['count'] ) ? $processInfo['TO_DO']['count'] : 0,'draft' => isset( $processInfo['DRAFT']['count'] ) ? $processInfo['DRAFT']['count'] : 0,'unassigned' => isset( $processInfo['UNASSIGNED']['count'] ) ? $processInfo['UNASSIGNED']['count'] : 0);
|
||||||
);
|
}
|
||||||
|
}
|
||||||
}
|
$rowsResponse['caseDelayed'][] = array ('delayed' => 'On Time','total' => 100);
|
||||||
}
|
$rowsResponse['caseDelayed'][] = array ('delayed' => 'Delayed','total' => 50
|
||||||
$rowsResponse['caseDelayed'][] = array ('delayed' => 'On Time','total' => 100
|
);
|
||||||
);
|
|
||||||
$rowsResponse['caseDelayed'][] = array ('delayed' => 'Delayed','total' => 50
|
print_r( G::json_encode( $rowsResponse ) );
|
||||||
);
|
}
|
||||||
|
|
||||||
print_r( G::json_encode( $rowsResponse ) );
|
function getRegisteredDashboards ()
|
||||||
}
|
{
|
||||||
|
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||||
function getRegisteredDashboards ()
|
$dashBoardPages = $oPluginRegistry->getDashboardPages();
|
||||||
{
|
print_r( G::json_encode( $dashBoardPages ) );
|
||||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
}
|
||||||
$dashBoardPages = $oPluginRegistry->getDashboardPages();
|
|
||||||
print_r( G::json_encode( $dashBoardPages ) );
|
function getDefaultDashboard ()
|
||||||
}
|
{
|
||||||
|
$defaultDashboard['defaultTab'] = "mainDashboard";
|
||||||
function getDefaultDashboard ()
|
if (isset( $_SESSION['__currentTabDashboard'] )) {
|
||||||
{
|
$defaultDashboard['defaultTab'] = $_SESSION['__currentTabDashboard'];
|
||||||
$defaultDashboard['defaultTab'] = "mainDashboard";
|
}
|
||||||
if (isset( $_SESSION['__currentTabDashboard'] )) {
|
print_r( G::json_encode( $defaultDashboard ) );
|
||||||
$defaultDashboard['defaultTab'] = $_SESSION['__currentTabDashboard'];
|
}
|
||||||
}
|
|
||||||
print_r( G::json_encode( $defaultDashboard ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
// $oHeadPublisher =& headPublisher::getSingleton();
|
// $oHeadPublisher =& headPublisher::getSingleton();
|
||||||
// $TRANSLATIONS = array_merge($TRANSLATIONS, $TRANSLATIONS2);
|
// $TRANSLATIONS = array_merge($TRANSLATIONS, $TRANSLATIONS2);
|
||||||
|
|
||||||
$delIndex = $_GET['DEL_INDEX'];
|
$delIndex = $_GET['DEL_INDEX'];
|
||||||
$appUid = $_GET['APP_UID'];
|
$appUid = $_GET['APP_UID'];
|
||||||
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations
|
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations
|
||||||
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex;
|
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex;
|
||||||
$oHeadPublisher->assign( 'casesPanelUrl', $casesPanelUrl ); //translations
|
$oHeadPublisher->assign( 'casesPanelUrl', $casesPanelUrl ); //translations
|
||||||
$oHeadPublisher->assign( 'treeTitle', G::loadtranslation( 'ID_STEP_LIST' ) ); //translations
|
$oHeadPublisher->assign( 'treeTitle', G::loadtranslation( 'ID_STEP_LIST' ) ); //translations
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/casesToRevisePanel', false ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'cases/casesToRevisePanel', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'cases/casesToRevisePanel' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'cases/casesToRevisePanel' ); //adding a html file .html.
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -1,96 +1,96 @@
|
|||||||
<?php
|
<?php
|
||||||
class TreeNode
|
class TreeNode
|
||||||
{
|
{
|
||||||
public $text = "";
|
public $text = "";
|
||||||
public $id = "";
|
public $id = "";
|
||||||
public $iconCls = "";
|
public $iconCls = "";
|
||||||
public $leaf = true;
|
public $leaf = true;
|
||||||
public $draggable = false;
|
public $draggable = false;
|
||||||
public $href = "#";
|
public $href = "#";
|
||||||
public $hrefTarget = "";
|
public $hrefTarget = "";
|
||||||
|
|
||||||
function __construct ($id, $text, $iconCls, $leaf, $draggable, $href, $hrefTarget)
|
public function __construct ($id, $text, $iconCls, $leaf, $draggable, $href, $hrefTarget)
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->text = $text;
|
$this->text = $text;
|
||||||
$this->iconCls = $iconCls;
|
$this->iconCls = $iconCls;
|
||||||
$this->leaf = $leaf;
|
$this->leaf = $leaf;
|
||||||
$this->draggable = $draggable;
|
$this->draggable = $draggable;
|
||||||
$this->href = $href;
|
$this->href = $href;
|
||||||
$this->hrefTarget = $hrefTarget;
|
$this->hrefTarget = $hrefTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toJson ()
|
public function toJson ()
|
||||||
{
|
{
|
||||||
return G::json_encode( $this );
|
return G::json_encode( $this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ExtJsTreeNode extends TreeNode
|
class ExtJsTreeNode extends TreeNode
|
||||||
{
|
{
|
||||||
public $children = array ();
|
public $children = array ();
|
||||||
|
|
||||||
function add ($object)
|
public function add ($object)
|
||||||
{
|
{
|
||||||
$this->children[] = $object;
|
$this->children[] = $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toJson ()
|
public function toJson ()
|
||||||
{
|
{
|
||||||
return G::json_encode( $this );
|
return G::json_encode( $this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$o = new Cases();
|
$o = new Cases();
|
||||||
$PRO_UID = $_SESSION['PROCESS'];
|
$PRO_UID = $_SESSION['PROCESS'];
|
||||||
|
|
||||||
$treeArray = array ();
|
$treeArray = array ();
|
||||||
//if (isset($_GET['action'])&&$_GET['action']=='test'){
|
//if (isset($_GET['action'])&&$_GET['action']=='test'){
|
||||||
echo "[";
|
echo "[";
|
||||||
// dynaforms assemble
|
// dynaforms assemble
|
||||||
$extTreeDynaforms = new ExtJsTreeNode( "node-dynaforms", G::loadtranslation( 'ID_DYNAFORMS' ), "", false, false, "", "" );
|
$extTreeDynaforms = new ExtJsTreeNode( "node-dynaforms", G::loadtranslation( 'ID_DYNAFORMS' ), "", false, false, "", "" );
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$APP_UID = $_GET['APP_UID'];
|
$APP_UID = $_GET['APP_UID'];
|
||||||
$DEL_INDEX = $_GET['DEL_INDEX'];
|
$DEL_INDEX = $_GET['DEL_INDEX'];
|
||||||
$steps = $o->getAllDynaformsStepsToRevise( $_GET['APP_UID'] );
|
$steps = $o->getAllDynaformsStepsToRevise( $_GET['APP_UID'] );
|
||||||
$steps->next();
|
$steps->next();
|
||||||
while ($step = $steps->getRow()) {
|
while ($step = $steps->getRow()) {
|
||||||
require_once 'classes/model/Dynaform.php';
|
require_once 'classes/model/Dynaform.php';
|
||||||
$od = new Dynaform();
|
$od = new Dynaform();
|
||||||
$dynaformF = $od->Load( $step['STEP_UID_OBJ'] );
|
$dynaformF = $od->Load( $step['STEP_UID_OBJ'] );
|
||||||
|
|
||||||
$n = $step['STEP_POSITION'];
|
$n = $step['STEP_POSITION'];
|
||||||
$TITLE = " - " . $dynaformF['DYN_TITLE'];
|
$TITLE = " - " . $dynaformF['DYN_TITLE'];
|
||||||
$DYN_UID = $dynaformF['DYN_UID'];
|
$DYN_UID = $dynaformF['DYN_UID'];
|
||||||
$href = "cases_StepToRevise?type=DYNAFORM&ex=$i&PRO_UID=$PRO_UID&DYN_UID=$DYN_UID&APP_UID=$APP_UID&position=" . $step['STEP_POSITION'] . "&DEL_INDEX=$DEL_INDEX";
|
$href = "cases_StepToRevise?type=DYNAFORM&ex=$i&PRO_UID=$PRO_UID&DYN_UID=$DYN_UID&APP_UID=$APP_UID&position=" . $step['STEP_POSITION'] . "&DEL_INDEX=$DEL_INDEX";
|
||||||
$extTreeDynaforms->add( new TreeNode( $DYN_UID, $TITLE, "datasource", true, false, $href, "openCaseFrame" ) );
|
$extTreeDynaforms->add( new TreeNode( $DYN_UID, $TITLE, "datasource", true, false, $href, "openCaseFrame" ) );
|
||||||
$i ++;
|
$i ++;
|
||||||
$steps->next();
|
$steps->next();
|
||||||
}
|
}
|
||||||
echo $extTreeDynaforms->toJson();
|
echo $extTreeDynaforms->toJson();
|
||||||
// end the dynaforms tree menu
|
// end the dynaforms tree menu
|
||||||
echo ",";
|
echo ",";
|
||||||
// assembling the input documents tree menu
|
// assembling the input documents tree menu
|
||||||
$extTreeInputDocs = new ExtJsTreeNode( "node-input-documents", G::loadtranslation( 'ID_REQUEST_DOCUMENTS' ), "", false, false, "", "" );
|
$extTreeInputDocs = new ExtJsTreeNode( "node-input-documents", G::loadtranslation( 'ID_REQUEST_DOCUMENTS' ), "", false, false, "", "" );
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$APP_UID = $_GET['APP_UID'];
|
$APP_UID = $_GET['APP_UID'];
|
||||||
$DEL_INDEX = $_GET['DEL_INDEX'];
|
$DEL_INDEX = $_GET['DEL_INDEX'];
|
||||||
$steps = $o->getAllInputsStepsToRevise( $_GET['APP_UID'] );
|
$steps = $o->getAllInputsStepsToRevise( $_GET['APP_UID'] );
|
||||||
$steps->next();
|
$steps->next();
|
||||||
while ($step = $steps->getRow()) {
|
while ($step = $steps->getRow()) {
|
||||||
require_once 'classes/model/InputDocument.php';
|
require_once 'classes/model/InputDocument.php';
|
||||||
$od = new InputDocument();
|
$od = new InputDocument();
|
||||||
$IDF = $od->Load( $step['STEP_UID_OBJ'] );
|
$IDF = $od->Load( $step['STEP_UID_OBJ'] );
|
||||||
|
|
||||||
$n = $step['STEP_POSITION'];
|
$n = $step['STEP_POSITION'];
|
||||||
$TITLE = " - " . $IDF['INP_DOC_TITLE'];
|
$TITLE = " - " . $IDF['INP_DOC_TITLE'];
|
||||||
$INP_DOC_UID = $IDF['INP_DOC_UID'];
|
$INP_DOC_UID = $IDF['INP_DOC_UID'];
|
||||||
$href = "cases_StepToReviseInputs?type=INPUT_DOCUMENT&ex=$i&PRO_UID=$PRO_UID&INP_DOC_UID=$INP_DOC_UID&APP_UID=$APP_UID&position=" . $step['STEP_POSITION'] . "&DEL_INDEX=$DEL_INDEX";
|
$href = "cases_StepToReviseInputs?type=INPUT_DOCUMENT&ex=$i&PRO_UID=$PRO_UID&INP_DOC_UID=$INP_DOC_UID&APP_UID=$APP_UID&position=" . $step['STEP_POSITION'] . "&DEL_INDEX=$DEL_INDEX";
|
||||||
$extTreeInputDocs->add( new TreeNode( $INP_DOC_UID, $TITLE, "datasource", true, false, $href, "openCaseFrame" ) );
|
$extTreeInputDocs->add( new TreeNode( $INP_DOC_UID, $TITLE, "datasource", true, false, $href, "openCaseFrame" ) );
|
||||||
$i ++;
|
$i ++;
|
||||||
$steps->next();
|
$steps->next();
|
||||||
}
|
}
|
||||||
echo $extTreeInputDocs->toJson();
|
echo $extTreeInputDocs->toJson();
|
||||||
echo "]";
|
echo "]";
|
||||||
|
|
||||||
|
|||||||
@@ -1,89 +1,89 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* cases_ShowDocument.php
|
* cases_ShowDocument.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Created on 13-02-2008
|
* Created on 13-02-2008
|
||||||
*
|
*
|
||||||
* @author David Callizaya <davidsantos@colosa.com>
|
* @author David Callizaya <davidsantos@colosa.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once ("classes/model/AppDocumentPeer.php");
|
require_once ("classes/model/AppDocumentPeer.php");
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
if (! isset( $_GET['v'] )) {
|
if (! isset( $_GET['v'] )) {
|
||||||
//Load last version of the document
|
//Load last version of the document
|
||||||
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
|
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
|
||||||
} else {
|
} else {
|
||||||
$docVersion = $_GET['v'];
|
$docVersion = $_GET['v'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
|
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
$iDocVersion = $oAppDocument->getDocVersion();
|
$iDocVersion = $oAppDocument->getDocVersion();
|
||||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||||
$ext = $info['extension'];
|
$ext = $info['extension'];
|
||||||
|
|
||||||
if (isset( $_GET['b'] )) {
|
if (isset( $_GET['b'] )) {
|
||||||
if ($_GET['b'] == '0') {
|
if ($_GET['b'] == '0') {
|
||||||
$bDownload = false;
|
$bDownload = false;
|
||||||
} else {
|
} else {
|
||||||
$bDownload = true;
|
$bDownload = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$bDownload = true;
|
$bDownload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
|
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
|
||||||
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext;
|
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext;
|
||||||
$sw_file_exists = false;
|
$sw_file_exists = false;
|
||||||
if (file_exists( $realPath )) {
|
if (file_exists( $realPath )) {
|
||||||
$sw_file_exists = true;
|
$sw_file_exists = true;
|
||||||
} elseif (file_exists( $realPath1 )) {
|
} elseif (file_exists( $realPath1 )) {
|
||||||
$sw_file_exists = true;
|
$sw_file_exists = true;
|
||||||
$realPath = $realPath1;
|
$realPath = $realPath1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $sw_file_exists) {
|
if (! $sw_file_exists) {
|
||||||
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
|
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
|
||||||
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||||
$res['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res['message'] = $error_message;
|
$res['message'] = $error_message;
|
||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
} else {
|
} else {
|
||||||
G::SendMessageText( $error_message, "ERROR" );
|
G::SendMessageText( $error_message, "ERROR" );
|
||||||
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
||||||
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||||
$res['success'] = 'success';
|
$res['success'] = 'success';
|
||||||
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
|
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
|
||||||
print G::json_encode( $res );
|
print G::json_encode( $res );
|
||||||
} else {
|
} else {
|
||||||
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
|
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* cases_ShowOutputDocument.php
|
* cases_ShowOutputDocument.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Created on 13-02-2008
|
* Created on 13-02-2008
|
||||||
*
|
*
|
||||||
* @author David Callizaya <davidsantos@colosa.com>
|
* @author David Callizaya <davidsantos@colosa.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die();
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once ("classes/model/AppDocumentPeer.php");
|
require_once ("classes/model/AppDocumentPeer.php");
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'] );
|
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'] );
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||||
if (! isset( $_GET['ext'] )) {
|
if (! isset( $_GET['ext'] )) {
|
||||||
$ext = $info['extension'];
|
$ext = $info['extension'];
|
||||||
} else {
|
} else {
|
||||||
if ($_GET['ext'] != '') {
|
if ($_GET['ext'] != '') {
|
||||||
$ext = $_GET['ext'];
|
$ext = $_GET['ext'];
|
||||||
} else {
|
} else {
|
||||||
$ext = $info['extension'];
|
$ext = $info['extension'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$realPath = PATH_DOCUMENT . $_SESSION['APPLICATION'] . '/outdocs/' . $info['basename'] . '.' . $ext;
|
$realPath = PATH_DOCUMENT . $_SESSION['APPLICATION'] . '/outdocs/' . $info['basename'] . '.' . $ext;
|
||||||
G::streamFile( $realPath, true );
|
G::streamFile( $realPath, true );
|
||||||
|
|
||||||
|
|||||||
@@ -96,3 +96,5 @@ function setSelect()
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -1,81 +1,81 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* data_casesSchedulerLog.php
|
* data_casesSchedulerLog.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once 'classes/model/LogCasesSchedulerPeer.php';
|
require_once 'classes/model/LogCasesSchedulerPeer.php';
|
||||||
require_once 'classes/model/LogCasesScheduler.php';
|
require_once 'classes/model/LogCasesScheduler.php';
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
|
|
||||||
$co = new Configurations();
|
$co = new Configurations();
|
||||||
$config = $co->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
$config = $co->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||||
|
|
||||||
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||||
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
|
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->clearSelectColumns();
|
$oCriteria->clearSelectColumns();
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::LOG_CASE_UID );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::LOG_CASE_UID );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::PRO_UID );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::PRO_UID );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::TAS_UID );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::TAS_UID );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::USR_NAME );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::USR_NAME );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::EXEC_DATE );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::EXEC_DATE );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::EXEC_HOUR );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::EXEC_HOUR );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::RESULT );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::RESULT );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::SCH_UID );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::SCH_UID );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS );
|
||||||
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS );
|
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS );
|
||||||
|
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
$c_or = $oCriteria->getNewCriterion( LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS, '%' . $filter . '%', Criteria::LIKE ) );
|
$c_or = $oCriteria->getNewCriterion( LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS, '%' . $filter . '%', Criteria::LIKE ) );
|
||||||
$oCriteria->add( $c_or );
|
$oCriteria->add( $c_or );
|
||||||
}
|
}
|
||||||
|
|
||||||
$oDataset = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
|
$oDataset = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
|
||||||
$addTables = Array ();
|
$addTables = Array ();
|
||||||
while ($oDataset->next()) {
|
while ($oDataset->next()) {
|
||||||
$addTables[] = $oDataset->getRow();
|
$addTables[] = $oDataset->getRow();
|
||||||
}
|
}
|
||||||
$results = count( $addTables );
|
$results = count( $addTables );
|
||||||
|
|
||||||
$oCriteria->setOffset( $start );
|
$oCriteria->setOffset( $start );
|
||||||
$oCriteria->setLimit( $limit );
|
$oCriteria->setLimit( $limit );
|
||||||
|
|
||||||
$oCriteria->addDescendingOrderByColumn( LogCasesSchedulerPeer::EXEC_DATE );
|
$oCriteria->addDescendingOrderByColumn( LogCasesSchedulerPeer::EXEC_DATE );
|
||||||
$oCriteria->addDescendingOrderByColumn( LogCasesSchedulerPeer::EXEC_HOUR );
|
$oCriteria->addDescendingOrderByColumn( LogCasesSchedulerPeer::EXEC_HOUR );
|
||||||
|
|
||||||
$oDataset = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
|
$oDataset = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
//$oDataset = LogCasesSchedulerPeer::doSelectRS ( $oCriteria );
|
//$oDataset = LogCasesSchedulerPeer::doSelectRS ( $oCriteria );
|
||||||
//$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
//$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
$addTables = Array ();
|
$addTables = Array ();
|
||||||
while ($oDataset->next()) {
|
while ($oDataset->next()) {
|
||||||
$addTables[] = $oDataset->getRow();
|
$addTables[] = $oDataset->getRow();
|
||||||
}
|
}
|
||||||
//$oLogCasesScheduler = new LogCasesScheduler();
|
//$oLogCasesScheduler = new LogCasesScheduler();
|
||||||
//$arrData = $oLogCasesScheduler->getAll();
|
//$arrData = $oLogCasesScheduler->getAll();
|
||||||
echo '{results: ' . $results . ', rows: ' . G::json_encode( $addTables ) . '}';
|
echo '{results: ' . $results . ', rows: ' . G::json_encode( $addTables ) . '}';
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +1,68 @@
|
|||||||
<?php
|
<?php
|
||||||
if (isset( $_SESSION['TRIGGER_DEBUG']['info'] )) {
|
if (isset( $_SESSION['TRIGGER_DEBUG']['info'] )) {
|
||||||
$aTriggers = $_SESSION['TRIGGER_DEBUG']['info'];
|
$aTriggers = $_SESSION['TRIGGER_DEBUG']['info'];
|
||||||
} else {
|
} else {
|
||||||
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
|
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
|
||||||
}
|
}
|
||||||
//print_r($aTriggers);die;
|
//print_r($aTriggers);die;
|
||||||
$triggersList = Array ();
|
$triggersList = Array ();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($aTriggers as $aTrigger) {
|
foreach ($aTriggers as $aTrigger) {
|
||||||
|
|
||||||
if ($aTrigger['NUM_TRIGGERS'] != 0) {
|
if ($aTrigger['NUM_TRIGGERS'] != 0) {
|
||||||
|
|
||||||
foreach ($aTrigger['TRIGGERS_NAMES'] as $index => $name) {
|
foreach ($aTrigger['TRIGGERS_NAMES'] as $index => $name) {
|
||||||
|
|
||||||
$triggersList[$i]['name'] = $name;
|
$triggersList[$i]['name'] = $name;
|
||||||
$triggersList[$i]['execution_time'] = strtolower( $aTrigger['TIME'] );
|
$triggersList[$i]['execution_time'] = strtolower( $aTrigger['TIME'] );
|
||||||
//$t_code = $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
|
//$t_code = $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
|
||||||
//$t_code = str_replace('"', '\'',$t_code);
|
//$t_code = str_replace('"', '\'',$t_code);
|
||||||
//$t_code = addslashes($t_code);
|
//$t_code = addslashes($t_code);
|
||||||
//$t_code = Only1br($t_code);
|
//$t_code = Only1br($t_code);
|
||||||
//highlighting the trigger code using the geshi third party library
|
//highlighting the trigger code using the geshi third party library
|
||||||
G::LoadThirdParty( 'geshi', 'geshi' );
|
G::LoadThirdParty( 'geshi', 'geshi' );
|
||||||
$geshi = new GeSHi( $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php' );
|
$geshi = new GeSHi( $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php' );
|
||||||
$geshi->enable_line_numbers( GESHI_FANCY_LINE_NUMBERS, 2 );
|
$geshi->enable_line_numbers( GESHI_FANCY_LINE_NUMBERS, 2 );
|
||||||
$geshi->set_line_style( 'background: #f0f0f0;' );
|
$geshi->set_line_style( 'background: #f0f0f0;' );
|
||||||
|
|
||||||
$triggersList[$i]['code'] = $geshi->parse_code(); //$aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
|
$triggersList[$i]['code'] = $geshi->parse_code(); //$aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'];
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//print_r($_SESSION['TRIGGER_DEBUG']['ERRORS']); die;
|
//print_r($_SESSION['TRIGGER_DEBUG']['ERRORS']); die;
|
||||||
$DEBUG_ERRORS = array_unique( $_SESSION['TRIGGER_DEBUG']['ERRORS'] );
|
$DEBUG_ERRORS = array_unique( $_SESSION['TRIGGER_DEBUG']['ERRORS'] );
|
||||||
|
|
||||||
foreach ($DEBUG_ERRORS as $error) {
|
foreach ($DEBUG_ERRORS as $error) {
|
||||||
if (isset( $error['ERROR'] ) and $error['ERROR'] != '') {
|
if (isset( $error['ERROR'] ) and $error['ERROR'] != '') {
|
||||||
$triggersList[$i]['name'] = 'Error';
|
$triggersList[$i]['name'] = 'Error';
|
||||||
$triggersList[$i]['execution_time'] = 'error';
|
$triggersList[$i]['execution_time'] = 'error';
|
||||||
$triggersList[$i]['code'] = $error['ERROR'];
|
$triggersList[$i]['code'] = $error['ERROR'];
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset( $error['FATAL'] ) and $error['FATAL'] != '') {
|
if (isset( $error['FATAL'] ) and $error['FATAL'] != '') {
|
||||||
$error['FATAL'] = str_replace( "<br />", "\n", $error['FATAL'] );
|
$error['FATAL'] = str_replace( "<br />", "\n", $error['FATAL'] );
|
||||||
$tmp = explode( "\n", $error['FATAL'] );
|
$tmp = explode( "\n", $error['FATAL'] );
|
||||||
$triggersList[$i]['name'] = isset( $tmp[0] ) ? $tmp[0] : 'Fatal Error in trigger';
|
$triggersList[$i]['name'] = isset( $tmp[0] ) ? $tmp[0] : 'Fatal Error in trigger';
|
||||||
$triggersList[$i]['execution_time'] = 'Fatal error';
|
$triggersList[$i]['execution_time'] = 'Fatal error';
|
||||||
$triggersList[$i]['code'] = $error['FATAL'];
|
$triggersList[$i]['code'] = $error['FATAL'];
|
||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*echo '{total:5, data:[
|
/*echo '{total:5, data:[
|
||||||
{name:"trigger1", execution_time:"after"},
|
{name:"trigger1", execution_time:"after"},
|
||||||
{name:"trigger2", execution_time:"before"},
|
{name:"trigger2", execution_time:"before"},
|
||||||
{name:"trigger13", execution_time:"before"},
|
{name:"trigger13", execution_time:"before"},
|
||||||
]}';
|
]}';
|
||||||
|
|
||||||
*/
|
*/
|
||||||
$triggersRet->total = count( $triggersList );
|
$triggersRet->total = count( $triggersList );
|
||||||
$triggersRet->data = $triggersList;
|
$triggersRet->data = $triggersList;
|
||||||
echo G::json_encode( $triggersRet );
|
echo G::json_encode( $triggersRet );
|
||||||
|
|
||||||
|
|||||||
@@ -1,99 +1,96 @@
|
|||||||
<?php
|
<?php
|
||||||
$request = isset( $_POST['request'] ) ? $_POST['request'] : '';
|
$request = isset( $_POST['request'] ) ? $_POST['request'] : '';
|
||||||
switch ($request) {
|
switch ($request) {
|
||||||
case 'getRows':
|
case 'getRows':
|
||||||
|
|
||||||
$fieldname = $_POST['fieldname'];
|
$fieldname = $_POST['fieldname'];
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oApp = new Cases();
|
$oApp = new Cases();
|
||||||
$aFields = $oApp->loadCase( $_SESSION['APPLICATION'] );
|
$aFields = $oApp->loadCase( $_SESSION['APPLICATION'] );
|
||||||
$aVars = Array ();
|
$aVars = Array ();
|
||||||
for ($i = 0; $i < count( $_SESSION['TRIGGER_DEBUG']['DATA'] ); $i ++) {
|
for ($i = 0; $i < count( $_SESSION['TRIGGER_DEBUG']['DATA'] ); $i ++) {
|
||||||
$aVars[$_SESSION['TRIGGER_DEBUG']['DATA'][$i]['key']] = $_SESSION['TRIGGER_DEBUG']['DATA'][$i]['value'];
|
$aVars[$_SESSION['TRIGGER_DEBUG']['DATA'][$i]['key']] = $_SESSION['TRIGGER_DEBUG']['DATA'][$i]['value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aVars = array_merge( $aFields['APP_DATA'], $aVars );
|
$aVars = array_merge( $aFields['APP_DATA'], $aVars );
|
||||||
|
|
||||||
$field = $aVars[$fieldname];
|
$field = $aVars[$fieldname];
|
||||||
$response->headers = Array ();
|
$response->headers = Array ();
|
||||||
$response->columns = Array ();
|
$response->columns = Array ();
|
||||||
$response->rows = Array ();
|
$response->rows = Array ();
|
||||||
|
|
||||||
$sw = true;
|
$sw = true;
|
||||||
$j = 0;
|
$j = 0;
|
||||||
if (is_array( $field )) {
|
if (is_array( $field )) {
|
||||||
foreach ($field as $row) {
|
foreach ($field as $row) {
|
||||||
if ($sw) {
|
if ($sw) {
|
||||||
foreach ($row as $key => $value) {
|
foreach ($row as $key => $value) {
|
||||||
$response->headers[] = Array ('name' => $key
|
$response->headers[] = Array ('name' => $key);
|
||||||
);
|
$response->columns[] = Array ('header' => $key,'width' => 100,'dataIndex' => $key);
|
||||||
$response->columns[] = Array ('header' => $key,'width' => 100,'dataIndex' => $key
|
}
|
||||||
);
|
$sw = false;
|
||||||
}
|
}
|
||||||
$sw = false;
|
|
||||||
}
|
$tmp = Array ();
|
||||||
|
foreach ($row as $key => $value) {
|
||||||
$tmp = Array ();
|
$tmp[] = $value;
|
||||||
foreach ($row as $key => $value) {
|
}
|
||||||
$tmp[] = $value;
|
$response->rows[$j ++] = $tmp;
|
||||||
}
|
}
|
||||||
$response->rows[$j ++] = $tmp;
|
} else {
|
||||||
}
|
if (is_object( $field )) {
|
||||||
} else {
|
$response->headers = Array (Array ('name' => 'name'
|
||||||
if (is_object( $field )) {
|
),Array ('name' => 'value'
|
||||||
$response->headers = Array (Array ('name' => 'name'
|
)
|
||||||
),Array ('name' => 'value'
|
);
|
||||||
)
|
$response->columns = Array (Array ('header' => 'Property','width' => 100,'dataIndex' => 'name'
|
||||||
);
|
),Array ('header' => 'Value','width' => 100,'dataIndex' => 'value'
|
||||||
$response->columns = Array (Array ('header' => 'Property','width' => 100,'dataIndex' => 'name'
|
)
|
||||||
),Array ('header' => 'Value','width' => 100,'dataIndex' => 'value'
|
);
|
||||||
)
|
|
||||||
);
|
foreach ($field as $key => $value) {
|
||||||
|
$response->rows[] = Array ($key,$value);
|
||||||
foreach ($field as $key => $value) {
|
}
|
||||||
$response->rows[] = Array ($key,$value
|
}
|
||||||
);
|
}
|
||||||
}
|
|
||||||
}
|
echo G::json_encode( $response );
|
||||||
}
|
break;
|
||||||
|
default:
|
||||||
echo G::json_encode( $response );
|
G::LoadClass( 'case' );
|
||||||
break;
|
$oApp = new Cases();
|
||||||
default:
|
$aFields = $oApp->loadCase( $_SESSION['APPLICATION'] );
|
||||||
G::LoadClass( 'case' );
|
|
||||||
$oApp = new Cases();
|
$aVars = Array ();
|
||||||
$aFields = $oApp->loadCase( $_SESSION['APPLICATION'] );
|
for ($i = 0; $i < count( $_SESSION['TRIGGER_DEBUG']['DATA'] ); $i ++) {
|
||||||
|
$aVars[$_SESSION['TRIGGER_DEBUG']['DATA'][$i]['key']] = $_SESSION['TRIGGER_DEBUG']['DATA'][$i]['value'];
|
||||||
$aVars = Array ();
|
}
|
||||||
for ($i = 0; $i < count( $_SESSION['TRIGGER_DEBUG']['DATA'] ); $i ++) {
|
|
||||||
$aVars[$_SESSION['TRIGGER_DEBUG']['DATA'][$i]['key']] = $_SESSION['TRIGGER_DEBUG']['DATA'][$i]['value'];
|
$aVars = array_merge( $aFields['APP_DATA'], $aVars );
|
||||||
}
|
|
||||||
|
if (isset( $_POST['filter'] ) && $_POST['filter'] == 'dyn') {
|
||||||
$aVars = array_merge( $aFields['APP_DATA'], $aVars );
|
$sysVars = array_keys( G::getSystemConstants() );
|
||||||
|
$varNames = array_keys( $aVars );
|
||||||
if (isset( $_POST['filter'] ) && $_POST['filter'] == 'dyn') {
|
foreach ($varNames as $var) {
|
||||||
$sysVars = array_keys( G::getSystemConstants() );
|
if (in_array( $var, $sysVars )) {
|
||||||
$varNames = array_keys( $aVars );
|
unset( $aVars[$var] );
|
||||||
foreach ($varNames as $var) {
|
}
|
||||||
if (in_array( $var, $sysVars )) {
|
}
|
||||||
unset( $aVars[$var] );
|
}
|
||||||
}
|
if (isset( $_POST['filter'] ) && $_POST['filter'] == 'sys') {
|
||||||
}
|
$aVars = G::getSystemConstants();
|
||||||
}
|
}
|
||||||
if (isset( $_POST['filter'] ) && $_POST['filter'] == 'sys') {
|
ksort( $aVars );
|
||||||
$aVars = G::getSystemConstants();
|
$return_object->totalCount = 1;
|
||||||
}
|
foreach ($aVars as $i => $var) {
|
||||||
ksort( $aVars );
|
if (is_array( $var ) || is_object( $var )) {
|
||||||
$return_object->totalCount = 1;
|
$aVars[$i] = print_r( $var, true );
|
||||||
foreach ($aVars as $i => $var) {
|
}
|
||||||
if (is_array( $var ) || is_object( $var )) {
|
}
|
||||||
$aVars[$i] = print_r( $var, true );
|
|
||||||
}
|
$return_object->data[0] = $aVars;
|
||||||
}
|
|
||||||
|
echo G::json_encode( $return_object );
|
||||||
$return_object->data[0] = $aVars;
|
break;
|
||||||
|
}
|
||||||
echo G::json_encode( $return_object );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* index.php
|
* index.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//$newFile = str_replace ( 'index.php', 'cases_List.php' , __FILE__ ) ;
|
//$newFile = str_replace ( 'index.php', 'cases_List.php' , __FILE__ ) ;
|
||||||
$newFile = str_replace( 'index.php', 'main.php', __FILE__ );
|
$newFile = str_replace( 'index.php', 'main.php', __FILE__ );
|
||||||
return $newFile;
|
return $newFile;
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,35 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* main.php Cases List main processor
|
* main.php Cases List main processor
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$RBAC->requirePermissions( 'PM_CASES' );
|
$RBAC->requirePermissions( 'PM_CASES' );
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_ID_MENU_SELECTED = 'CASES';
|
$G_ID_MENU_SELECTED = 'CASES';
|
||||||
|
|
||||||
$_POST['qs'] = isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] != '' ? '?' . $_SERVER['QUERY_STRING'] : '';
|
$_POST['qs'] = isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] != '' ? '?' . $_SERVER['QUERY_STRING'] : '';
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_Load' );
|
$G_PUBLISH->AddContent( 'view', 'cases/cases_Load' );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
|
|
||||||
|
|||||||
@@ -1,92 +1,92 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* main.php Cases List main processor
|
* main.php Cases List main processor
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G::LoadClass( "configuration" );
|
G::LoadClass( "configuration" );
|
||||||
|
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
|
|
||||||
$oHeadPublisher = &headPublisher::getSingleton();
|
$oHeadPublisher = &headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addExtJsScript( "cases/main", false ); //Adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( "cases/main", false ); //Adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( "cases/main" ); //Adding a html file .html.
|
$oHeadPublisher->addContent( "cases/main" ); //Adding a html file .html.
|
||||||
|
|
||||||
|
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
|
||||||
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
|
$memcache = &PMmemcached::getSingleton( SYS_SYS );
|
||||||
$memcache = &PMmemcached::getSingleton( SYS_SYS );
|
|
||||||
|
if (($arrayConfig = $memcache->get( $keyMem )) === false) {
|
||||||
if (($arrayConfig = $memcache->get( $keyMem )) === false) {
|
$conf->loadConfig( $x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "" );
|
||||||
$conf->loadConfig( $x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "" );
|
$arrayConfig = $conf->aConfig;
|
||||||
$arrayConfig = $conf->aConfig;
|
$memcache->set( $keyMem, $arrayConfig, PMmemcached::ONE_HOUR );
|
||||||
$memcache->set( $keyMem, $arrayConfig, PMmemcached::ONE_HOUR );
|
}
|
||||||
}
|
|
||||||
|
$confDefaultOption = "";
|
||||||
$confDefaultOption = "";
|
|
||||||
|
if (isset( $arrayConfig["DEFAULT_CASES_MENU"] )) {
|
||||||
if (isset( $arrayConfig["DEFAULT_CASES_MENU"] )) { //this user has a configuration record
|
//this user has a configuration record
|
||||||
$confDefaultOption = $arrayConfig["DEFAULT_CASES_MENU"];
|
$confDefaultOption = $arrayConfig["DEFAULT_CASES_MENU"];
|
||||||
|
|
||||||
global $G_TMP_MENU;
|
global $G_TMP_MENU;
|
||||||
|
|
||||||
$oMenu = new Menu();
|
$oMenu = new Menu();
|
||||||
$oMenu->load( "cases" );
|
$oMenu->load( "cases" );
|
||||||
$defaultOption = "";
|
$defaultOption = "";
|
||||||
|
|
||||||
foreach ($oMenu->Id as $i => $id) {
|
foreach ($oMenu->Id as $i => $id) {
|
||||||
if ($id == $confDefaultOption) {
|
if ($id == $confDefaultOption) {
|
||||||
$defaultOption = $oMenu->Options[$i];
|
$defaultOption = $oMenu->Options[$i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$defaultOption = ($defaultOption != "") ? $defaultOption : "casesListExtJs";
|
$defaultOption = ($defaultOption != "") ? $defaultOption : "casesListExtJs";
|
||||||
} else {
|
} else {
|
||||||
$defaultOption = "casesListExtJs";
|
$defaultOption = "casesListExtJs";
|
||||||
$confDefaultOption = "CASES_INBOX";
|
$confDefaultOption = "CASES_INBOX";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset( $_GET["id"] ) && isset( $_GET["id"] )) {
|
if (isset( $_GET["id"] ) && isset( $_GET["id"] )) {
|
||||||
$defaultOption = "../cases/open?APP_UID=" . $_GET["id"] . "&DEL_INDEX=" . $_GET["i"];
|
$defaultOption = "../cases/open?APP_UID=" . $_GET["id"] . "&DEL_INDEX=" . $_GET["i"];
|
||||||
|
|
||||||
if (isset( $_GET["a"] )) {
|
if (isset( $_GET["a"] )) {
|
||||||
$defaultOption .= "&action=" . $_GET["a"];
|
$defaultOption .= "&action=" . $_GET["a"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$oServerConf = & serverConf::getSingleton();
|
$oServerConf = & serverConf::getSingleton();
|
||||||
if ($oServerConf->isRtl( SYS_LANG )) {
|
if ($oServerConf->isRtl( SYS_LANG )) {
|
||||||
$regionTreePanel = 'east';
|
$regionTreePanel = 'east';
|
||||||
$regionDebug = 'west';
|
$regionDebug = 'west';
|
||||||
} else {
|
} else {
|
||||||
$regionTreePanel = 'west';
|
$regionTreePanel = 'west';
|
||||||
$regionDebug = 'east';
|
$regionDebug = 'east';
|
||||||
}
|
}
|
||||||
$oHeadPublisher->assign( 'regionTreePanel', $regionTreePanel );
|
$oHeadPublisher->assign( 'regionTreePanel', $regionTreePanel );
|
||||||
$oHeadPublisher->assign( 'regionDebug', $regionDebug );
|
$oHeadPublisher->assign( 'regionDebug', $regionDebug );
|
||||||
$oHeadPublisher->assign( "defaultOption", $defaultOption ); //User menu permissions
|
$oHeadPublisher->assign( "defaultOption", $defaultOption ); //User menu permissions
|
||||||
$oHeadPublisher->assign( "_nodeId", isset( $confDefaultOption ) ? $confDefaultOption : "PM_USERS" ); //User menu permissions
|
$oHeadPublisher->assign( "_nodeId", isset( $confDefaultOption ) ? $confDefaultOption : "PM_USERS" ); //User menu permissions
|
||||||
$oHeadPublisher->assign( "FORMATS", $conf->getFormats() );
|
$oHeadPublisher->assign( "FORMATS", $conf->getFormats() );
|
||||||
|
|
||||||
$_SESSION["current_ux"] = "NORMAL";
|
$_SESSION["current_ux"] = "NORMAL";
|
||||||
|
|
||||||
G::RenderPage( "publish", "extJs" );
|
G::RenderPage( "publish", "extJs" );
|
||||||
|
|
||||||
|
|||||||
@@ -1,87 +1,87 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* open.php Open Case main processor
|
* open.php Open Case main processor
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||||
* @date Jan 3th, 2010
|
* @date Jan 3th, 2010
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (! isset( $_GET['APP_UID'] ) || ! isset( $_GET['DEL_INDEX'] )) {
|
if (! isset( $_GET['APP_UID'] ) || ! isset( $_GET['DEL_INDEX'] )) {
|
||||||
if (isset( $_GET['APP_NUMBER'] )) {
|
if (isset( $_GET['APP_NUMBER'] )) {
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$_GET['APP_UID'] = $oCase->getApplicationUIDByNumber( $_GET['APP_NUMBER'] );
|
$_GET['APP_UID'] = $oCase->getApplicationUIDByNumber( $_GET['APP_NUMBER'] );
|
||||||
$_GET['DEL_INDEX'] = $oCase->getCurrentDelegation( $_GET['APP_UID'], $_SESSION['USER_LOGGED'] );
|
$_GET['DEL_INDEX'] = $oCase->getCurrentDelegation( $_GET['APP_UID'], $_SESSION['USER_LOGGED'] );
|
||||||
if (is_null( $_GET['APP_UID'] )) {
|
if (is_null( $_GET['APP_UID'] )) {
|
||||||
throw new Exception( G::LoadTranslation( 'ID_CASE_DOES_NOT_EXISTS' ) );
|
throw new Exception( G::LoadTranslation( 'ID_CASE_DOES_NOT_EXISTS' ) );
|
||||||
}
|
}
|
||||||
if (is_null( $_GET['DEL_INDEX'] )) {
|
if (is_null( $_GET['DEL_INDEX'] )) {
|
||||||
throw new Exception( G::LoadTranslation( 'ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER' ) );
|
throw new Exception( G::LoadTranslation( 'ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER' ) );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Exception( "Application ID or Delegation Index is missing!. The System can't open the case." );
|
throw new Exception( "Application ID or Delegation Index is missing!. The System can't open the case." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once ("classes/model/Step.php");
|
require_once ("classes/model/Step.php");
|
||||||
G::LoadClass( "configuration" );
|
G::LoadClass( "configuration" );
|
||||||
G::LoadClass( "case" );
|
G::LoadClass( "case" );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
|
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
|
|
||||||
$oHeadPublisher->addExtJsScript( 'app/main', true );
|
$oHeadPublisher->addExtJsScript( 'app/main', true );
|
||||||
$oHeadPublisher->addExtJsScript( 'cases/open', true );
|
$oHeadPublisher->addExtJsScript( 'cases/open', true );
|
||||||
$oHeadPublisher->assign( 'FORMATS', $conf->getFormats() );
|
$oHeadPublisher->assign( 'FORMATS', $conf->getFormats() );
|
||||||
$uri = '';
|
$uri = '';
|
||||||
foreach ($_GET as $k => $v) {
|
foreach ($_GET as $k => $v) {
|
||||||
$uri .= ($uri == '') ? "$k=$v" : "&$k=$v";
|
$uri .= ($uri == '') ? "$k=$v" : "&$k=$v";
|
||||||
}
|
}
|
||||||
|
|
||||||
$case = $oCase->loadCase( $_GET['APP_UID'], $_GET['DEL_INDEX'] );
|
$case = $oCase->loadCase( $_GET['APP_UID'], $_GET['DEL_INDEX'] );
|
||||||
|
|
||||||
if (! isset( $_GET['to_revise'] )) {
|
if (! isset( $_GET['to_revise'] )) {
|
||||||
$script = 'cases_Open?';
|
$script = 'cases_Open?';
|
||||||
} else {
|
} else {
|
||||||
$script = 'cases_OpenToRevise?';
|
$script = 'cases_OpenToRevise?';
|
||||||
$delIndex = $_GET['DEL_INDEX'];
|
$delIndex = $_GET['DEL_INDEX'];
|
||||||
$appUid = $_GET['APP_UID'];
|
$appUid = $_GET['APP_UID'];
|
||||||
$oHeadPublisher->assign( 'treeToReviseTitle', G::loadtranslation( 'ID_STEP_LIST' ) );
|
$oHeadPublisher->assign( 'treeToReviseTitle', G::loadtranslation( 'ID_STEP_LIST' ) );
|
||||||
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex;
|
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex;
|
||||||
$oHeadPublisher->assign( 'casesPanelUrl', $casesPanelUrl ); //translations
|
$oHeadPublisher->assign( 'casesPanelUrl', $casesPanelUrl ); //translations
|
||||||
echo "<div id='toReviseTree'></div>";
|
echo "<div id='toReviseTree'></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$oStep = new Step();
|
$oStep = new Step();
|
||||||
$oStep = $oStep->loadByProcessTaskPosition( $case['PRO_UID'], $case['TAS_UID'], 1 );
|
$oStep = $oStep->loadByProcessTaskPosition( $case['PRO_UID'], $case['TAS_UID'], 1 );
|
||||||
|
|
||||||
$oHeadPublisher->assign( 'uri', $script . $uri );
|
$oHeadPublisher->assign( 'uri', $script . $uri );
|
||||||
$oHeadPublisher->assign( '_APP_NUM', '#: ' . $case['APP_NUMBER'] );
|
$oHeadPublisher->assign( '_APP_NUM', '#: ' . $case['APP_NUMBER'] );
|
||||||
$oHeadPublisher->assign( '_ENV_CURRENT_DATE', $conf->getSystemDate( date( 'Y-m-d' ) ) );
|
$oHeadPublisher->assign( '_ENV_CURRENT_DATE', $conf->getSystemDate( date( 'Y-m-d' ) ) );
|
||||||
$oHeadPublisher->assign( '_ENV_CURRENT_DATE_NO_FORMAT', date( 'Y-m-d' ) );
|
$oHeadPublisher->assign( '_ENV_CURRENT_DATE_NO_FORMAT', date( 'Y-m-d' ) );
|
||||||
$oHeadPublisher->assign( 'idfirstform', is_null( $oStep ) ? '' : $oStep->getStepUidObj() );
|
$oHeadPublisher->assign( 'idfirstform', is_null( $oStep ) ? '' : $oStep->getStepUidObj() );
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -1,46 +1,46 @@
|
|||||||
<?php
|
<?php
|
||||||
//Getting the extJs parameters
|
//Getting the extJs parameters
|
||||||
$callback = isset( $_POST["callback"] ) ? $_POST["callback"] : "stcCallback1001";
|
$callback = isset( $_POST["callback"] ) ? $_POST["callback"] : "stcCallback1001";
|
||||||
$dir = isset( $_POST["dir"] ) ? $_POST["dir"] : "DESC";
|
$dir = isset( $_POST["dir"] ) ? $_POST["dir"] : "DESC";
|
||||||
$sort = isset( $_POST["sort"] ) ? $_POST["sort"] : "";
|
$sort = isset( $_POST["sort"] ) ? $_POST["sort"] : "";
|
||||||
$start = isset( $_POST["start"] ) ? $_POST["start"] : "0";
|
$start = isset( $_POST["start"] ) ? $_POST["start"] : "0";
|
||||||
$limit = isset( $_POST["limit"] ) ? $_POST["limit"] : "25";
|
$limit = isset( $_POST["limit"] ) ? $_POST["limit"] : "25";
|
||||||
$filter = isset( $_POST["filter"] ) ? $_POST["filter"] : "";
|
$filter = isset( $_POST["filter"] ) ? $_POST["filter"] : "";
|
||||||
$process = isset( $_POST["process"] ) ? $_POST["process"] : "";
|
$process = isset( $_POST["process"] ) ? $_POST["process"] : "";
|
||||||
$category = isset( $_POST["category"] ) ? $_POST["category"] : "";
|
$category = isset( $_POST["category"] ) ? $_POST["category"] : "";
|
||||||
$status = isset( $_POST["status"] ) ? strtoupper( $_POST["status"] ) : "";
|
$status = isset( $_POST["status"] ) ? strtoupper( $_POST["status"] ) : "";
|
||||||
$user = isset( $_POST["user"] ) ? $_POST["user"] : "";
|
$user = isset( $_POST["user"] ) ? $_POST["user"] : "";
|
||||||
$search = isset( $_POST["search"] ) ? $_POST["search"] : "";
|
$search = isset( $_POST["search"] ) ? $_POST["search"] : "";
|
||||||
$action = isset( $_GET["action"] ) ? $_GET["action"] : (isset( $_POST["action"] ) ? $_POST["action"] : "todo");
|
$action = isset( $_GET["action"] ) ? $_GET["action"] : (isset( $_POST["action"] ) ? $_POST["action"] : "todo");
|
||||||
$type = isset( $_GET["type"] ) ? $_GET["type"] : (isset( $_POST["type"] ) ? $_POST["type"] : "extjs");
|
$type = isset( $_GET["type"] ) ? $_GET["type"] : (isset( $_POST["type"] ) ? $_POST["type"] : "extjs");
|
||||||
$dateFrom = isset( $_POST["dateFrom"] ) ? substr( $_POST["dateFrom"], 0, 10 ) : "";
|
$dateFrom = isset( $_POST["dateFrom"] ) ? substr( $_POST["dateFrom"], 0, 10 ) : "";
|
||||||
$dateTo = isset( $_POST["dateTo"] ) ? substr( $_POST["dateTo"], 0, 10 ) : "";
|
$dateTo = isset( $_POST["dateTo"] ) ? substr( $_POST["dateTo"], 0, 10 ) : "";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = "";
|
$result = "";
|
||||||
$userUid = (isset( $_SESSION["USER_LOGGED"] ) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
|
$userUid = (isset( $_SESSION["USER_LOGGED"] ) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
|
||||||
$user = ($user == "CURRENT_USER") ? $userUid : $user;
|
$user = ($user == "CURRENT_USER") ? $userUid : $user;
|
||||||
|
|
||||||
if (($action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" || $action == "unassigned" || $action == "search") && (($solrConf = System::solrEnv()) !== false)) {
|
if (($action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" || $action == "unassigned" || $action == "search") && (($solrConf = System::solrEnv()) !== false)) {
|
||||||
G::LoadClass( "AppSolr" );
|
G::LoadClass( "AppSolr" );
|
||||||
|
|
||||||
$ApplicationSolrIndex = new AppSolr( $solrConf["solr_enabled"], $solrConf["solr_host"], $solrConf["solr_instance"] );
|
$ApplicationSolrIndex = new AppSolr( $solrConf["solr_enabled"], $solrConf["solr_host"], $solrConf["solr_instance"] );
|
||||||
|
|
||||||
$data = $ApplicationSolrIndex->getAppGridData( $userUid, $start, $limit, $action, $filter, $search, $process, $user, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort );
|
$data = $ApplicationSolrIndex->getAppGridData( $userUid, $start, $limit, $action, $filter, $search, $process, $user, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort );
|
||||||
|
|
||||||
$result = G::json_encode( $data );
|
$result = G::json_encode( $data );
|
||||||
} else {
|
} else {
|
||||||
G::LoadClass( "applications" );
|
G::LoadClass( "applications" );
|
||||||
|
|
||||||
$apps = new Applications();
|
$apps = new Applications();
|
||||||
$data = $apps->getAll( $userUid, $start, $limit, $action, $filter, $search, $process, $user, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category );
|
$data = $apps->getAll( $userUid, $start, $limit, $action, $filter, $search, $process, $user, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category );
|
||||||
|
|
||||||
$result = G::json_encode( $data );
|
$result = G::json_encode( $data );
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $result;
|
echo $result;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$msg = array ("error" => $e->getMessage() );
|
$msg = array ("error" => $e->getMessage() );
|
||||||
echo G::json_encode( $msg );
|
echo G::json_encode( $msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +1,72 @@
|
|||||||
<?php
|
<?php
|
||||||
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
|
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
|
||||||
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
|
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
|
||||||
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
||||||
$query = isset( $_POST['query'] ) ? $_POST['query'] : '';
|
$query = isset( $_POST['query'] ) ? $_POST['query'] : '';
|
||||||
//$action = isset($_GET['action']) ? $_GET['action'] : 'read';
|
//$action = isset($_GET['action']) ? $_GET['action'] : 'read';
|
||||||
$option = '';
|
$option = '';
|
||||||
if (isset( $_GET['t'] ))
|
if (isset( $_GET['t'] ))
|
||||||
$option = $_GET['t'];
|
$option = $_GET['t'];
|
||||||
try {
|
try {
|
||||||
G::LoadClass( "BasePeer" );
|
G::LoadClass( "BasePeer" );
|
||||||
require_once ("classes/model/Process.php");
|
require_once ("classes/model/Process.php");
|
||||||
require_once ("classes/model/AppCacheView.php");
|
require_once ("classes/model/AppCacheView.php");
|
||||||
|
|
||||||
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
|
$sUIDUserLogged = $_SESSION['USER_LOGGED'];
|
||||||
|
|
||||||
$Criteria = new Criteria( 'workflow' );
|
$Criteria = new Criteria( 'workflow' );
|
||||||
|
|
||||||
$Criteria->clearSelectColumns();
|
$Criteria->clearSelectColumns();
|
||||||
$Criteria->setDistinct();
|
$Criteria->setDistinct();
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
$Criteria->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||||
$Criteria->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
$Criteria->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||||
|
|
||||||
if ($query != '') {
|
if ($query != '') {
|
||||||
$Criteria->add( AppCacheViewPeer::APP_PRO_TITLE, $query . '%', Criteria::LIKE );
|
$Criteria->add( AppCacheViewPeer::APP_PRO_TITLE, $query . '%', Criteria::LIKE );
|
||||||
}
|
}
|
||||||
|
|
||||||
$Criteria->add( AppCacheViewPeer::APP_STATUS, "TO_DO", CRITERIA::EQUAL );
|
$Criteria->add( AppCacheViewPeer::APP_STATUS, "TO_DO", CRITERIA::EQUAL );
|
||||||
$Criteria->add( AppCacheViewPeer::USR_UID, $sUIDUserLogged );
|
$Criteria->add( AppCacheViewPeer::USR_UID, $sUIDUserLogged );
|
||||||
|
|
||||||
//$totalCount = AppCacheViewPeer::doCount( $Criteria );
|
//$totalCount = AppCacheViewPeer::doCount( $Criteria );
|
||||||
|
|
||||||
|
|
||||||
if (isset( $limit ))
|
if (isset( $limit )) {
|
||||||
$Criteria->setLimit( $limit );
|
$Criteria->setLimit( $limit );
|
||||||
if (isset( $start ))
|
}
|
||||||
$Criteria->setOffset( $start );
|
if (isset( $start )) {
|
||||||
|
$Criteria->setOffset( $start );
|
||||||
if ($sort != '') {
|
}
|
||||||
if ($dir == 'DESC')
|
|
||||||
$Criteria->addDescendingOrderByColumn( $sort );
|
if ($sort != '') {
|
||||||
else
|
if ($dir == 'DESC') {
|
||||||
$Criteria->addAscendingOrderByColumn( $sort );
|
$Criteria->addDescendingOrderByColumn( $sort );
|
||||||
}
|
} else {
|
||||||
$oDataset = AppCacheViewPeer::doSelectRS( $Criteria );
|
$Criteria->addAscendingOrderByColumn( $sort );
|
||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
}
|
||||||
$oDataset->next();
|
}
|
||||||
|
$oDataset = AppCacheViewPeer::doSelectRS( $Criteria );
|
||||||
$result = array ();
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$rows = array ();
|
$oDataset->next();
|
||||||
$index = isset( $start ) ? $start : 0;
|
|
||||||
while ($aRow = $oDataset->getRow()) {
|
$result = array ();
|
||||||
$aRow['index'] = ++ $index;
|
$rows = array ();
|
||||||
$rows[] = $aRow;
|
$index = isset( $start ) ? $start : 0;
|
||||||
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$oDataset->next();
|
$aRow['index'] = ++ $index;
|
||||||
}
|
$rows[] = $aRow;
|
||||||
$result['totalCount'] = count( $rows );
|
|
||||||
$result['data'] = $rows;
|
$oDataset->next();
|
||||||
|
}
|
||||||
print G::json_encode( $result );
|
$result['totalCount'] = count( $rows );
|
||||||
|
$result['data'] = $rows;
|
||||||
} catch (Exception $e) {
|
|
||||||
$G_PUBLISH = new Publisher();
|
print G::json_encode( $result );
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
} catch (Exception $e) {
|
||||||
G::RenderPage( 'publish', 'blank' );
|
$G_PUBLISH = new Publisher();
|
||||||
}
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
|
G::RenderPage( 'publish', 'blank' );
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,97 +1,97 @@
|
|||||||
<?php
|
<?php
|
||||||
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
|
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
|
||||||
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
|
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
|
||||||
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
||||||
$start = isset( $_POST['start'] ) ? $_POST['start'] : '0';
|
$start = isset( $_POST['start'] ) ? $_POST['start'] : '0';
|
||||||
$limit = isset( $_POST['limit'] ) ? $_POST['limit'] : '25';
|
$limit = isset( $_POST['limit'] ) ? $_POST['limit'] : '25';
|
||||||
$filter = isset( $_POST['filter'] ) ? $_POST['filter'] : '';
|
$filter = isset( $_POST['filter'] ) ? $_POST['filter'] : '';
|
||||||
$search = isset( $_POST['search'] ) ? $_POST['search'] : '';
|
$search = isset( $_POST['search'] ) ? $_POST['search'] : '';
|
||||||
$process = isset( $_POST['process'] ) ? $_POST['process'] : '';
|
$process = isset( $_POST['process'] ) ? $_POST['process'] : '';
|
||||||
$user = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
$user = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
||||||
$status = isset( $_POST['status'] ) ? strtoupper( $_POST['status'] ) : '';
|
$status = isset( $_POST['status'] ) ? strtoupper( $_POST['status'] ) : '';
|
||||||
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
||||||
$type = isset( $_GET['type'] ) ? $_GET['type'] : (isset( $_POST['type'] ) ? $_POST['type'] : 'extjs');
|
$type = isset( $_GET['type'] ) ? $_GET['type'] : (isset( $_POST['type'] ) ? $_POST['type'] : 'extjs');
|
||||||
$user = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
$user = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
||||||
|
|
||||||
$sentUids = explode( ',', $_POST['APP_UIDS'] );
|
$sentUids = explode( ',', $_POST['APP_UIDS'] );
|
||||||
|
|
||||||
$allUidsRecords = array ();
|
$allUidsRecords = array ();
|
||||||
$allTasUids = array ();
|
$allTasUids = array ();
|
||||||
|
|
||||||
// getting all App Uids and task Uids
|
// getting all App Uids and task Uids
|
||||||
foreach ($sentUids as $sentUid) {
|
foreach ($sentUids as $sentUid) {
|
||||||
$aItem = explode( '|', $sentUid );
|
$aItem = explode( '|', $sentUid );
|
||||||
$allUidsRecords[] = array ('APP_UID' => $aItem[0],'TAS_UID' => $aItem[1],'DEL_INDEX' => $aItem[2]);
|
$allUidsRecords[] = array ('APP_UID' => $aItem[0],'TAS_UID' => $aItem[1],'DEL_INDEX' => $aItem[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sReassignFromUser = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
$sReassignFromUser = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
||||||
$sProcessUid = isset( $_POST['process'] ) ? $_POST['process'] : '';
|
$sProcessUid = isset( $_POST['process'] ) ? $_POST['process'] : '';
|
||||||
|
|
||||||
G::LoadClass( 'tasks' );
|
G::LoadClass( 'tasks' );
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( 'users' );
|
G::LoadClass( 'users' );
|
||||||
require_once ("classes/model/AppCacheView.php");
|
require_once ("classes/model/AppCacheView.php");
|
||||||
|
|
||||||
$oTasks = new Tasks();
|
$oTasks = new Tasks();
|
||||||
$oGroups = new Groups();
|
$oGroups = new Groups();
|
||||||
$oUser = new Users();
|
$oUser = new Users();
|
||||||
$oCases = new Cases();
|
$oCases = new Cases();
|
||||||
|
|
||||||
$aCasesList = Array ();
|
$aCasesList = Array ();
|
||||||
$vard = 0;
|
$vard = 0;
|
||||||
foreach ($allUidsRecords as $aRecord) {
|
foreach ($allUidsRecords as $aRecord) {
|
||||||
$vard = $vard + 1;
|
$vard = $vard + 1;
|
||||||
$APP_UID = $aRecord['APP_UID'];
|
$APP_UID = $aRecord['APP_UID'];
|
||||||
$delIndex = $aRecord['DEL_INDEX'];
|
$delIndex = $aRecord['DEL_INDEX'];
|
||||||
$aCase = $oCases->loadCaseByDelegation( $APP_UID, $delIndex );
|
$aCase = $oCases->loadCaseByDelegation( $APP_UID, $delIndex );
|
||||||
|
|
||||||
$aUsersInvolved = Array ();
|
$aUsersInvolved = Array ();
|
||||||
$aCaseGroups = $oTasks->getGroupsOfTask( $aCase['TAS_UID'], 1 );
|
$aCaseGroups = $oTasks->getGroupsOfTask( $aCase['TAS_UID'], 1 );
|
||||||
|
|
||||||
foreach ($aCaseGroups as $aCaseGroup) {
|
foreach ($aCaseGroups as $aCaseGroup) {
|
||||||
$aCaseUsers = $oGroups->getUsersOfGroup( $aCaseGroup['GRP_UID'] );
|
$aCaseUsers = $oGroups->getUsersOfGroup( $aCaseGroup['GRP_UID'] );
|
||||||
foreach ($aCaseUsers as $aCaseUser) {
|
foreach ($aCaseUsers as $aCaseUser) {
|
||||||
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
||||||
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
||||||
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']);
|
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']);
|
||||||
// . ' (' . $aCaseUserRecord['USR_USERNAME']
|
// . ' (' . $aCaseUserRecord['USR_USERNAME']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$aCaseUsers = $oTasks->getUsersOfTask( $aCase['TAS_UID'], 1 );
|
$aCaseUsers = $oTasks->getUsersOfTask( $aCase['TAS_UID'], 1 );
|
||||||
foreach ($aCaseUsers as $aCaseUser) {
|
foreach ($aCaseUsers as $aCaseUser) {
|
||||||
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
||||||
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
||||||
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']
|
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oTmp = $aUsersInvolved;
|
$oTmp = $aUsersInvolved;
|
||||||
$aCase['USERS'] = $oTmp;
|
$aCase['USERS'] = $oTmp;
|
||||||
array_push( $aCasesList, $aCase );
|
array_push( $aCasesList, $aCase );
|
||||||
}
|
}
|
||||||
|
|
||||||
$filedNames = Array ("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER","USERS"
|
$filedNames = Array ("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER","USERS"
|
||||||
);
|
);
|
||||||
|
|
||||||
$aCasesList = array_merge( Array ($filedNames
|
$aCasesList = array_merge( Array ($filedNames
|
||||||
), $aCasesList );
|
), $aCasesList );
|
||||||
$rows = array ();
|
$rows = array ();
|
||||||
$i = $start;
|
$i = $start;
|
||||||
for ($j = 0; $j < $limit; $j ++) {
|
for ($j = 0; $j < $limit; $j ++) {
|
||||||
$i ++;
|
$i ++;
|
||||||
if (isset( $aCasesList[$i] )) {
|
if (isset( $aCasesList[$i] )) {
|
||||||
$rows[] = $aCasesList[$i];
|
$rows[] = $aCasesList[$i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$totalCount = count( $aCasesList ) - 1;
|
$totalCount = count( $aCasesList ) - 1;
|
||||||
$result = array ();
|
$result = array ();
|
||||||
$result['totalCount'] = $totalCount;
|
$result['totalCount'] = $totalCount;
|
||||||
|
|
||||||
$index = $start;
|
$index = $start;
|
||||||
$result['data'] = $rows;
|
$result['data'] = $rows;
|
||||||
//print the result in json format
|
//print the result in json format
|
||||||
print G::json_encode( $result );
|
print G::json_encode( $result );
|
||||||
|
|
||||||
|
|||||||
@@ -1,108 +1,109 @@
|
|||||||
<?php
|
<?php
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
|
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
|
||||||
$query = isset( $_POST['query'] ) ? $_POST['query'] : '';
|
$query = isset( $_POST['query'] ) ? $_POST['query'] : '';
|
||||||
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
|
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';
|
||||||
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
||||||
$start = isset( $_POST['start'] ) ? $_POST['start'] : '0';
|
$start = isset( $_POST['start'] ) ? $_POST['start'] : '0';
|
||||||
$limit = isset( $_POST['limit'] ) ? $_POST['limit'] : '25';
|
$limit = isset( $_POST['limit'] ) ? $_POST['limit'] : '25';
|
||||||
$filter = isset( $_POST['filter'] ) ? $_POST['filter'] : '';
|
$filter = isset( $_POST['filter'] ) ? $_POST['filter'] : '';
|
||||||
$search = isset( $_POST['search'] ) ? $_POST['search'] : '';
|
$search = isset( $_POST['search'] ) ? $_POST['search'] : '';
|
||||||
$process = isset( $_POST['process'] ) ? $_POST['process'] : '';
|
$process = isset( $_POST['process'] ) ? $_POST['process'] : '';
|
||||||
$user = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
$user = isset( $_POST['user'] ) ? $_POST['user'] : '';
|
||||||
$status = isset( $_POST['status'] ) ? strtoupper( $_POST['status'] ) : '';
|
$status = isset( $_POST['status'] ) ? strtoupper( $_POST['status'] ) : '';
|
||||||
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
||||||
$type = isset( $_GET['type'] ) ? $_GET['type'] : (isset( $_POST['type'] ) ? $_POST['type'] : 'extjs');
|
$type = isset( $_GET['type'] ) ? $_GET['type'] : (isset( $_POST['type'] ) ? $_POST['type'] : 'extjs');
|
||||||
|
|
||||||
function array_sort ($array, $on, $order = SORT_ASC, $query = '')
|
function array_sort ($array, $on, $order = SORT_ASC, $query = '')
|
||||||
{
|
{
|
||||||
$new_array = array ();
|
$new_array = array ();
|
||||||
$sortable_array = array ();
|
$sortable_array = array ();
|
||||||
|
|
||||||
if (count( $array ) > 0) {
|
if (count( $array ) > 0) {
|
||||||
foreach ($array as $k => $v) {
|
foreach ($array as $k => $v) {
|
||||||
if (is_array( $v )) {
|
if (is_array( $v )) {
|
||||||
foreach ($v as $k2 => $v2) {
|
foreach ($v as $k2 => $v2) {
|
||||||
if ($k2 == $on) {
|
if ($k2 == $on) {
|
||||||
$sortable_array[$k] = $v2;
|
$sortable_array[$k] = $v2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sortable_array[$k] = $v;
|
$sortable_array[$k] = $v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($order) {
|
switch ($order) {
|
||||||
case SORT_ASC:
|
case SORT_ASC:
|
||||||
asort( $sortable_array );
|
asort( $sortable_array );
|
||||||
break;
|
break;
|
||||||
case SORT_DESC:
|
case SORT_DESC:
|
||||||
arsort( $sortable_array );
|
arsort( $sortable_array );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($sortable_array as $k => $v) {
|
foreach ($sortable_array as $k => $v) {
|
||||||
if ($query == '') {
|
if ($query == '') {
|
||||||
$new_array[] = $array[$k];
|
$new_array[] = $array[$k];
|
||||||
} else {
|
} else {
|
||||||
if (preg_match( "/" . $query . "/i", $array[$k]['userFullname'] )) {
|
if (preg_match( "/" . $query . "/i", $array[$k]['userFullname'] )) {
|
||||||
$new_array[] = $array[$k];
|
$new_array[] = $array[$k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $new_array;
|
return $new_array;
|
||||||
}
|
}
|
||||||
// $APP_UIDS = explode(',', $_POST['APP_UID']);
|
// $APP_UIDS = explode(',', $_POST['APP_UID']);
|
||||||
|
|
||||||
|
|
||||||
$appUid = isset( $_POST['application'] ) ? $_POST['application'] : '';
|
$appUid = isset( $_POST['application'] ) ? $_POST['application'] : '';
|
||||||
// $processUid = isset($_POST['process']) ? $_POST['process'] : '';
|
// $processUid = isset($_POST['process']) ? $_POST['process'] : '';
|
||||||
$TaskUid = isset( $_POST['task'] ) ? $_POST['task'] : '';
|
$TaskUid = isset( $_POST['task'] ) ? $_POST['task'] : '';
|
||||||
$sReassignFromUser = isset( $_POST['currentUser'] ) ? $_POST['currentUser'] : '';
|
$sReassignFromUser = isset( $_POST['currentUser'] ) ? $_POST['currentUser'] : '';
|
||||||
|
|
||||||
G::LoadClass( 'tasks' );
|
G::LoadClass( 'tasks' );
|
||||||
G::LoadClass( 'groups' );
|
G::LoadClass( 'groups' );
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass( 'users' );
|
G::LoadClass( 'users' );
|
||||||
|
|
||||||
$oTasks = new Tasks();
|
$oTasks = new Tasks();
|
||||||
$oGroups = new Groups();
|
$oGroups = new Groups();
|
||||||
$oUser = new Users();
|
$oUser = new Users();
|
||||||
$oCases = new Cases();
|
$oCases = new Cases();
|
||||||
|
|
||||||
$aCasesList = Array ();
|
$aCasesList = Array ();
|
||||||
|
|
||||||
$aUsersInvolved = Array ();
|
$aUsersInvolved = Array ();
|
||||||
$aCaseGroups = $oTasks->getGroupsOfTask( $TaskUid, 1 );
|
$aCaseGroups = $oTasks->getGroupsOfTask( $TaskUid, 1 );
|
||||||
$oConf = new Configurations();
|
$oConf = new Configurations();
|
||||||
$ConfEnv = $oConf->getFormats();
|
$ConfEnv = $oConf->getFormats();
|
||||||
foreach ($aCaseGroups as $aCaseGroup) {
|
foreach ($aCaseGroups as $aCaseGroup) {
|
||||||
$aCaseUsers = $oGroups->getUsersOfGroup( $aCaseGroup['GRP_UID'] );
|
$aCaseUsers = $oGroups->getUsersOfGroup( $aCaseGroup['GRP_UID'] );
|
||||||
foreach ($aCaseUsers as $aCaseUser) {
|
foreach ($aCaseUsers as $aCaseUser) {
|
||||||
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
||||||
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
||||||
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $aCaseUserRecord );
|
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $aCaseUserRecord );
|
||||||
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
||||||
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $sCaseUser
|
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $sCaseUser
|
||||||
); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$aCaseUsers = $oTasks->getUsersOfTask( $TaskUid, 1 );
|
$aCaseUsers = $oTasks->getUsersOfTask( $TaskUid, 1 );
|
||||||
foreach ($aCaseUsers as $aCaseUser) {
|
foreach ($aCaseUsers as $aCaseUser) {
|
||||||
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
|
||||||
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
|
||||||
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $aCaseUserRecord );
|
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $aCaseUserRecord );
|
||||||
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
||||||
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $sCaseUser
|
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $sCaseUser
|
||||||
); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// $oTmp = new stdClass();
|
// $oTmp = new stdClass();
|
||||||
// $oTmp->items = $aUsersInvolved;
|
// $oTmp->items = $aUsersInvolved;
|
||||||
$result = array ();
|
$result = array ();
|
||||||
$aUsersInvolved = array_sort( $aUsersInvolved, 'userFullname', SORT_ASC, $query );
|
$aUsersInvolved = array_sort( $aUsersInvolved, 'userFullname', SORT_ASC, $query );
|
||||||
$result['data'] = $aUsersInvolved;
|
$result['data'] = $aUsersInvolved;
|
||||||
print G::json_encode( $result );
|
print G::json_encode( $result );
|
||||||
|
|
||||||
|
|||||||
@@ -1,92 +1,92 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* proxySaveReassignCasesList.php
|
* proxySaveReassignCasesList.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
$aData = G::json_decode( $_POST['data'] );
|
$aData = G::json_decode( $_POST['data'] );
|
||||||
$appSelectedUids = array ();
|
$appSelectedUids = array ();
|
||||||
$items = explode( ",", $_POST['APP_UIDS'] );
|
$items = explode( ",", $_POST['APP_UIDS'] );
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$dataUids = explode( "|", $item );
|
$dataUids = explode( "|", $item );
|
||||||
$appSelectedUids[] = $dataUids[0];
|
$appSelectedUids[] = $dataUids[0];
|
||||||
}
|
}
|
||||||
// var_dump($aData);
|
// var_dump($aData);
|
||||||
//var_dump($appSelectedUids);
|
//var_dump($appSelectedUids);
|
||||||
$casesReassignedCount = 0;
|
$casesReassignedCount = 0;
|
||||||
$serverResponse = array ();
|
$serverResponse = array ();
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oCases = new Cases();
|
$oCases = new Cases();
|
||||||
require_once ('classes/model/Task.php');
|
require_once ('classes/model/Task.php');
|
||||||
require_once ('classes/model/AppCacheView.php');
|
require_once ('classes/model/AppCacheView.php');
|
||||||
$oAppCacheView = new AppCacheView();
|
$oAppCacheView = new AppCacheView();
|
||||||
$oCasesReassignList = $oAppCacheView->getToReassignListCriteria();
|
$oCasesReassignList = $oAppCacheView->getToReassignListCriteria();
|
||||||
if (isset( $_POST['selected'] ) && $_POST['selected'] == 'true') {
|
if (isset( $_POST['selected'] ) && $_POST['selected'] == 'true') {
|
||||||
$oCasesReassignList->add( AppCacheViewPeer::APP_UID, $appSelectedUids, Criteria::IN );
|
$oCasesReassignList->add( AppCacheViewPeer::APP_UID, $appSelectedUids, Criteria::IN );
|
||||||
}
|
}
|
||||||
// if there are no records to save return -1
|
// if there are no records to save return -1
|
||||||
if (empty( $aData )) {
|
if (empty( $aData )) {
|
||||||
$serverResponse['TOTAL'] = - 1;
|
$serverResponse['TOTAL'] = - 1;
|
||||||
echo G::json_encode( $serverResponse );
|
echo G::json_encode( $serverResponse );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
// $params = array ();
|
// $params = array ();
|
||||||
// $sql = BasePeer::createSelectSql($oCasesReassignList, $params);
|
// $sql = BasePeer::createSelectSql($oCasesReassignList, $params);
|
||||||
// var_dump($sql);
|
// var_dump($sql);
|
||||||
if (is_array( $aData )) {
|
if (is_array( $aData )) {
|
||||||
$currentCasesReassigned = 0;
|
$currentCasesReassigned = 0;
|
||||||
foreach ($aData as $data) {
|
foreach ($aData as $data) {
|
||||||
$oTmpReassignCriteria = $oCasesReassignList;
|
$oTmpReassignCriteria = $oCasesReassignList;
|
||||||
$oTmpReassignCriteria->add( AppCacheViewPeer::TAS_UID, $data->TAS_UID );
|
$oTmpReassignCriteria->add( AppCacheViewPeer::TAS_UID, $data->TAS_UID );
|
||||||
$rs = AppCacheViewPeer::doSelectRS( $oTmpReassignCriteria );
|
$rs = AppCacheViewPeer::doSelectRS( $oTmpReassignCriteria );
|
||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
$aCase = $oCases->loadCaseInCurrentDelegation( $data->APP_UID );
|
$aCase = $oCases->loadCaseInCurrentDelegation( $data->APP_UID );
|
||||||
$oCases->reassignCase( $aCase['APP_UID'], $aCase['DEL_INDEX'], ($aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED']), $data->APP_REASSIGN_USER_UID );
|
$oCases->reassignCase( $aCase['APP_UID'], $aCase['DEL_INDEX'], ($aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED']), $data->APP_REASSIGN_USER_UID );
|
||||||
$currentCasesReassigned ++;
|
$currentCasesReassigned ++;
|
||||||
$casesReassignedCount ++;
|
$casesReassignedCount ++;
|
||||||
$serverResponse[] = array ('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER,'APP_TITLE' => $data->APP_TITLE,'TAS_TITLE' => $data->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned
|
$serverResponse[] = array ('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER,'APP_TITLE' => $data->APP_TITLE,'TAS_TITLE' => $data->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$oTmpReassignCriteria = $oCasesReassignList;
|
$oTmpReassignCriteria = $oCasesReassignList;
|
||||||
$oTmpReassignCriteria->add( AppCacheViewPeer::TAS_UID, $aData->TAS_UID );
|
$oTmpReassignCriteria->add( AppCacheViewPeer::TAS_UID, $aData->TAS_UID );
|
||||||
$rs = AppCacheViewPeer::doSelectRS( $oTmpReassignCriteria );
|
$rs = AppCacheViewPeer::doSelectRS( $oTmpReassignCriteria );
|
||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
$currentCasesReassigned = 0;
|
$currentCasesReassigned = 0;
|
||||||
while (is_array( $row )) {
|
while (is_array( $row )) {
|
||||||
$APP_UID = $row['APP_UID'];
|
$APP_UID = $row['APP_UID'];
|
||||||
$aCase = $oCases->loadCaseInCurrentDelegation( $APP_UID );
|
$aCase = $oCases->loadCaseInCurrentDelegation( $APP_UID );
|
||||||
$oCases->reassignCase( $aCase['APP_UID'], $aCase['DEL_INDEX'], ($aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED']), $aData->APP_REASSIGN_USER_UID );
|
$oCases->reassignCase( $aCase['APP_UID'], $aCase['DEL_INDEX'], ($aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED']), $aData->APP_REASSIGN_USER_UID );
|
||||||
$currentCasesReassigned ++;
|
$currentCasesReassigned ++;
|
||||||
$casesReassignedCount ++;
|
$casesReassignedCount ++;
|
||||||
// var_dump($aCase);
|
// var_dump($aCase);
|
||||||
// echo ("<br>");
|
// echo ("<br>");
|
||||||
$rs->next();
|
$rs->next();
|
||||||
$row = $rs->getRow();
|
$row = $rs->getRow();
|
||||||
}
|
}
|
||||||
$serverResponse[] = array ('TAS_TITLE' => $aData->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned);
|
$serverResponse[] = array ('TAS_TITLE' => $aData->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned);
|
||||||
}
|
}
|
||||||
$serverResponse['TOTAL'] = $casesReassignedCount;
|
$serverResponse['TOTAL'] = $casesReassignedCount;
|
||||||
echo G::json_encode( $serverResponse );
|
echo G::json_encode( $serverResponse );
|
||||||
|
|
||||||
|
|||||||
@@ -1,76 +1,76 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* summary.php
|
* summary.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2011 Colosa Inc.
|
* Copyright (C) 2004 - 2011 Colosa Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
case - 2:
|
case - 2:
|
||||||
throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_SYSTEM' ) );
|
throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_SYSTEM' ) );
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_PAGE' ) );
|
throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_PAGE' ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset( $_REQUEST['APP_UID'] ) || ! isset( $_REQUEST['DEL_INDEX'] ) || ! isset( $_REQUEST['DYN_UID'] )) {
|
if (! isset( $_REQUEST['APP_UID'] ) || ! isset( $_REQUEST['DEL_INDEX'] ) || ! isset( $_REQUEST['DYN_UID'] )) {
|
||||||
throw new Exception( G::LoadTranslation( 'ID_REQUIRED_FIELDS_ERROR' ) . ' (APP_UID, DEL_INDEX, DYN_UID)' );
|
throw new Exception( G::LoadTranslation( 'ID_REQUIRED_FIELDS_ERROR' ) . ' (APP_UID, DEL_INDEX, DYN_UID)' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_REQUEST['APP_UID'] == '' || $_REQUEST['DEL_INDEX'] == '' || $_REQUEST['DYN_UID'] == '') {
|
if ($_REQUEST['APP_UID'] == '' || $_REQUEST['DEL_INDEX'] == '' || $_REQUEST['DYN_UID'] == '') {
|
||||||
throw new Exception( G::LoadTranslation( 'ID_REQUIRED_FIELDS_ERROR' ) . ' (APP_UID, DEL_INDEX, DYN_UID)' );
|
throw new Exception( G::LoadTranslation( 'ID_REQUIRED_FIELDS_ERROR' ) . ' (APP_UID, DEL_INDEX, DYN_UID)' );
|
||||||
}
|
}
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$case = new Cases();
|
$case = new Cases();
|
||||||
if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && $case->userParticipatedInCase( $_REQUEST['APP_UID'], $_SESSION['USER_LOGGED'] ) == 0) {
|
if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && $case->userParticipatedInCase( $_REQUEST['APP_UID'], $_SESSION['USER_LOGGED'] ) == 0) {
|
||||||
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
|
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
|
||||||
}
|
}
|
||||||
$applicationFields = $case->loadCase( $_REQUEST['APP_UID'], $_REQUEST['DEL_INDEX'] );
|
$applicationFields = $case->loadCase( $_REQUEST['APP_UID'], $_REQUEST['DEL_INDEX'] );
|
||||||
|
|
||||||
if (file_exists( PATH_DYNAFORM . $applicationFields['PRO_UID'] . PATH_SEP . $_REQUEST['DYN_UID'] . '.xml' )) {
|
if (file_exists( PATH_DYNAFORM . $applicationFields['PRO_UID'] . PATH_SEP . $_REQUEST['DYN_UID'] . '.xml' )) {
|
||||||
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||||
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = '#';
|
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = '#';
|
||||||
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||||
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = '#';
|
$applicationFields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = '#';
|
||||||
|
|
||||||
G::LoadClass( 'dbConnections' );
|
G::LoadClass( 'dbConnections' );
|
||||||
$_SESSION['PROCESS'] = $applicationFields['PRO_UID'];
|
$_SESSION['PROCESS'] = $applicationFields['PRO_UID'];
|
||||||
$dbConnections = new dbConnections( $_SESSION['PROCESS'] );
|
$dbConnections = new dbConnections( $_SESSION['PROCESS'] );
|
||||||
$dbConnections->loadAdditionalConnections();
|
$dbConnections->loadAdditionalConnections();
|
||||||
$_SESSION['CURRENT_DYN_UID'] = $_REQUEST['DYN_UID'];
|
$_SESSION['CURRENT_DYN_UID'] = $_REQUEST['DYN_UID'];
|
||||||
|
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $applicationFields['PRO_UID'] . '/' . $_REQUEST['DYN_UID'], '', $applicationFields['APP_DATA'], '', '', 'view' );
|
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $applicationFields['PRO_UID'] . '/' . $_REQUEST['DYN_UID'], '', $applicationFields['APP_DATA'], '', '', 'view' );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
} else {
|
} else {
|
||||||
throw new Exception( G::LoadTranslation( 'INVALID_FILE' ) . ': ' . $_REQUEST['DYN_UID'] );
|
throw new Exception( G::LoadTranslation( 'INVALID_FILE' ) . ': ' . $_REQUEST['DYN_UID'] );
|
||||||
}
|
}
|
||||||
} catch (Exception $error) {
|
} catch (Exception $error) {
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => $error->getMessage()) );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => $error->getMessage()) );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,52 +1,53 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* buscador.php
|
* buscador.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
$frm = $HTTP_GET_VARS;
|
$frm = $HTTP_GET_VARS;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<h1>demo de buscador</h1>
|
<h1>demo de buscador</h1>
|
||||||
<form method=post action="buscador2.php">
|
<form method=post action="buscador2.php">
|
||||||
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
|
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
|
||||||
type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
|
type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
|
||||||
Buscador tipo : <?php echo $frm['tipo'] ?><br>
|
Buscador tipo : <?php echo $frm['tipo'] ?><br>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>curso</td>
|
<td>curso</td>
|
||||||
<td><select name=curso>
|
<td><select name=curso>
|
||||||
<option value="curso1">Curso 1</option>
|
<option value="curso1">Curso 1</option>
|
||||||
<option value="curso2">Curso 2</option>
|
<option value="curso2">Curso 2</option>
|
||||||
<option value="curso3">Curso 3</option>
|
<option value="curso3">Curso 3</option>
|
||||||
<option value="curso4">Curso 4</4option>
|
<option value="curso4">Curso 4</4option>
|
||||||
|
|
||||||
<option value="curso5">Curso 5</option></td>
|
<option value="curso5">Curso 5</option></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2><input type=submit></td>
|
<td colspan=2><input type=submit></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -18,15 +18,16 @@ this program. If not, see
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
<?php
|
<?php
|
||||||
$frm = $HTTP_POST_VARS;
|
$frm = $HTTP_POST_VARS;
|
||||||
|
|
||||||
$dbc = new dbconnection();
|
$dbc = new dbconnection();
|
||||||
$ses = new DBSession( $dbc );
|
$ses = new DBSession( $dbc );
|
||||||
$sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
|
$sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
|
||||||
$ses->Execute( $sql );
|
$ses->Execute( $sql );
|
||||||
?>
|
?>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
window.close();
|
window.close();
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -148,12 +148,13 @@ function set_datetime(n_datetime, b_close) {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<script language="JavaScript">
|
<script language="JavaScript">
|
||||||
<?php
|
<?php
|
||||||
// print weekdays titles
|
// print weekdays titles
|
||||||
for ($n = 0; $n < 7; $n ++)
|
for ($n = 0; $n < 7; $n ++) {
|
||||||
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
|
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
|
||||||
print "</tr>";
|
}
|
||||||
|
print "</tr>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
// print calendar table
|
// print calendar table
|
||||||
|
|
||||||
@@ -194,10 +195,12 @@ if (obj_caller && obj_caller.time_comp) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</td>
|
</td>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -1,152 +1,152 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* varsAjax.php
|
* varsAjax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
G::LoadClass( 'xmlfield_InputPM' );
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
||||||
|
|
||||||
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
|
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
|
||||||
);
|
);
|
||||||
foreach ($aFields as $aField) {
|
foreach ($aFields as $aField) {
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$sHTML .= '</select>';
|
$sHTML .= '</select>';
|
||||||
$sHTML = '';
|
$sHTML = '';
|
||||||
|
|
||||||
if (! isset( $_POST['sNoShowLeyend'] )) {
|
if (! isset( $_POST['sNoShowLeyend'] )) {
|
||||||
$sHTML = '<table width="100%">';
|
$sHTML = '<table width="100%">';
|
||||||
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
|
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
|
||||||
if (isset( $_POST['sType'] )) {
|
if (isset( $_POST['sType'] )) {
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_ESC' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_ESC' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_NONEC' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_NONEC' ) . '</td></tr>';
|
||||||
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
|
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
|
||||||
} else {
|
} else {
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_STRING' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_STRING' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_INTEGER' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_INTEGER' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_URL' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_URL' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_SQL_ESCAPE' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_SQL_ESCAPE' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
|
||||||
}
|
}
|
||||||
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"> </td></tr>';
|
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"> </td></tr>';
|
||||||
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
|
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
|
||||||
$sHTML .= '</table>';
|
$sHTML .= '</table>';
|
||||||
} else {
|
} else {
|
||||||
// please don't remove this definition if there isn't some sort of html tags before the css styles aren't loaded in IE
|
// please don't remove this definition if there isn't some sort of html tags before the css styles aren't loaded in IE
|
||||||
$sHTML = '<table width="100%">';
|
$sHTML = '<table width="100%">';
|
||||||
$sHTML .= '</table>';
|
$sHTML .= '</table>';
|
||||||
}
|
}
|
||||||
$sStyle = " <style type=\"text/css\">
|
$sStyle = " <style type=\"text/css\">
|
||||||
|
|
||||||
.pm__dynavars a#dynalink{color:#000000;}
|
.pm__dynavars a#dynalink{color:#000000;}
|
||||||
|
|
||||||
/* begin css tabs */
|
/* begin css tabs */
|
||||||
ul#tabnav { /* general settings */
|
ul#tabnav { /* general settings */
|
||||||
text-align: left; /* set to left, right or center */
|
text-align: left; /* set to left, right or center */
|
||||||
margin: 1em 0 1em 0; /* set margins as desired */
|
margin: 1em 0 1em 0; /* set margins as desired */
|
||||||
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
|
font: bold 11px verdana, arial, sans-serif; /* set font as desired */
|
||||||
border-bottom: 1px solid #ccc; /* set border COLOR as desired */
|
border-bottom: 1px solid #ccc; /* set border COLOR as desired */
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 3px 10px 3px 10px; /* THIRD number must change with respect to padding-top (X) below */
|
padding: 3px 10px 3px 10px; /* THIRD number must change with respect to padding-top (X) below */
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#tabnav li { /* do not change */
|
ul#tabnav li { /* do not change */
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#all li.all, div#system li.system, div#process li.process, div#tab4 li.tab4 { /* settings for selected tab */
|
div#all li.all, div#system li.system, div#process li.process, div#tab4 li.tab4 { /* settings for selected tab */
|
||||||
border-bottom: 1px solid #fff; /* set border color to page background color */
|
border-bottom: 1px solid #fff; /* set border color to page background color */
|
||||||
background-color: #fff; /* set background color to match above border color */
|
background-color: #fff; /* set background color to match above border color */
|
||||||
}
|
}
|
||||||
|
|
||||||
div#all li.all a, div#system li.system a, div#process li.process a, div#tab4 li.tab4 a { /* settings for selected tab link */
|
div#all li.all a, div#system li.system a, div#process li.process a, div#tab4 li.tab4 a { /* settings for selected tab link */
|
||||||
background-color: #fff; /* set selected tab background color as desired */
|
background-color: #fff; /* set selected tab background color as desired */
|
||||||
color: #000; /* set selected tab link color as desired */
|
color: #000; /* set selected tab link color as desired */
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
padding-top: 4px; /* must change with respect to padding (X) above and below */
|
padding-top: 4px; /* must change with respect to padding (X) above and below */
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#tabnav li a { /* settings for all tab links */
|
ul#tabnav li a { /* settings for all tab links */
|
||||||
padding: 3px 4px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
|
padding: 3px 4px; /* set padding (tab size) as desired; FIRST number must change with respect to padding-top (X) above */
|
||||||
border: 1px solid #aaa; /* set border COLOR as desired; usually matches border color specified in #tabnav */
|
border: 1px solid #aaa; /* set border COLOR as desired; usually matches border color specified in #tabnav */
|
||||||
background-color: #ccc; /* set unselected tab background color as desired */
|
background-color: #ccc; /* set unselected tab background color as desired */
|
||||||
color: #666; /* set unselected tab link color as desired */
|
color: #666; /* set unselected tab link color as desired */
|
||||||
margin-right: 10px; /* set additional spacing between tabs as desired */
|
margin-right: 10px; /* set additional spacing between tabs as desired */
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul#tabnav a:hover { /* settings for hover effect */
|
ul#tabnav a:hover { /* settings for hover effect */
|
||||||
background: #fff; /* set desired hover color */
|
background: #fff; /* set desired hover color */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end css tabs */
|
/* end css tabs */
|
||||||
|
|
||||||
</style>";
|
</style>";
|
||||||
$cssTabs = "<div id=\"all\">
|
$cssTabs = "<div id=\"all\">
|
||||||
<ul id=\"tabnav\">
|
<ul id=\"tabnav\">
|
||||||
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
|
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
|
||||||
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
|
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
|
||||||
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
echo $sHTML;
|
echo $sHTML;
|
||||||
echo $sStyle;
|
echo $sStyle;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
echo "<div id=\"processVariablesContent\">";
|
echo "<div id=\"processVariablesContent\">";
|
||||||
echo $cssTabs;
|
echo $cssTabs;
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['dynavars'] = $aRows;
|
$_DBArray['dynavars'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$oCriteria = new Criteria( 'dbarray' );
|
$oCriteria = new Criteria( 'dbarray' );
|
||||||
$oCriteria->setDBArrayTable( 'dynavars' );
|
$oCriteria->setDBArrayTable( 'dynavars' );
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
|
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
|
|||||||
@@ -1,66 +1,65 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* varsAjax.php
|
* varsAjax.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Affero General Public License as
|
* it under the terms of the GNU Affero General Public License as
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the varAjaxByType file as the varAjax.php handle the render of the diferent
|
* the varAjaxByType file as the varAjax.php handle the render of the diferent
|
||||||
* types of dynaform variables there are 3 of them system, process, and the default
|
* types of dynaform variables there are 3 of them system, process, and the default
|
||||||
* that show both system and process variables.
|
* that show both system and process variables.
|
||||||
* uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the
|
* uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the
|
||||||
* type of the variables. Then it render a propel table with all the variables
|
* type of the variables. Then it render a propel table with all the variables
|
||||||
* loaded for that type.
|
* loaded for that type.
|
||||||
*
|
*
|
||||||
* @author Gustavo Cruz gustavo-at-colosa.com
|
* @author Gustavo Cruz gustavo-at-colosa.com
|
||||||
* @param $_POST variables
|
* @param $_POST variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
G::LoadClass( 'xmlfield_InputPM' );
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
||||||
$aType = $_POST['type'];
|
$aType = $_POST['type'];
|
||||||
|
|
||||||
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
|
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char');
|
||||||
);
|
foreach ($aFields as $aField) {
|
||||||
foreach ($aFields as $aField) {
|
switch ($aType) {
|
||||||
switch ($aType) {
|
case "system":
|
||||||
case "system":
|
if ($aField['sType'] == "system") {
|
||||||
if ($aField['sType'] == "system") {
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
);
|
||||||
);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case "process":
|
||||||
case "process":
|
if ($aField['sType'] != "system") {
|
||||||
if ($aField['sType'] != "system") {
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
);
|
||||||
);
|
}
|
||||||
}
|
break;
|
||||||
break;
|
default:
|
||||||
default:
|
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||||
$aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
);
|
||||||
);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
||||||
// Use and make a load translation variable call to the titles of the tabs
|
// Use and make a load translation variable call to the titles of the tabs
|
||||||
$cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
|
$cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
|
||||||
<ul id=\"tabnav\">
|
<ul id=\"tabnav\">
|
||||||
@@ -69,21 +68,21 @@ $cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
|
|||||||
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
|
|
||||||
echo $cssTabs;
|
echo $cssTabs;
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['dynavars'] = $aRows;
|
$_DBArray['dynavars'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass( 'ArrayPeer' );
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$oCriteria = new Criteria( 'dbarray' );
|
$oCriteria = new Criteria( 'dbarray' );
|
||||||
$oCriteria->setDBArrayTable( 'dynavars' );
|
$oCriteria->setDBArrayTable( 'dynavars' );
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
|
||||||
G::RenderPage( 'publish', 'raw' );
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user