Merge remote branch 'upstream/master'

This commit is contained in:
Ralph Asendeteufrer
2012-10-18 14:41:36 -04:00
56 changed files with 3616 additions and 3683 deletions

View File

@@ -1,170 +1,178 @@
<?php
/**
* casesDemo.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
$rows[] = array ( 'uid' => 'char', 'name' => 'char', 'age' => 'integer', 'balance' => 'float' );
$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' => 33, 'name' => 'Mike', 'age' => 21, 'balance' => 4567 );
$rows[] = array ( 'uid' => 44, 'name' => 'Paul', 'age' => 22, 'balance' => 567 );
$rows[] = array ( 'uid' => 55, 'name' => 'Will', 'age' => 23, 'balance' => 67 );
$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 );
G::LoadClass( 'ArrayPeer');
$c = new Criteria ('dbarray');
$c->setDBArrayTable('user');
// $c->add ( 'user.age', 22 , Criteria::GREATER_EQUAL );
// $c->add ( 'user.age', 22 , Criteria::EQUAL );
$c->add ( 'user.name', '%au%' , Criteria::LIKE );
// $c->add ( 'user.balance', 3456 , Criteria::GREATER_EQUAL );
$c->addAscendingOrderByColumn ('name');
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'CASES';
$G_PUBLISH = new Publisher;
// $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
//$G_PUBLISH->AddContent('smarty', 'cases/casesDemo', '', '', $Fields);
// G::RenderPage( "publish" );
//die;
/* Includes */
G::LoadClass('pmScript');
G::LoadClass('case');
G::LoadClass('derivation');
$oCase = new Cases ();
$appUid = isset ($_SESSION['APPLICATION']) ? $_SESSION['APPLICATION'] : '';
$appFields = $oCase->loadCase( $appUid );
$Fields['APP_UID'] = $appFields['APP_UID'];
$Fields['APP_NUMBER'] = $appFields['APP_NUMBER'];
$Fields['APP_STATUS'] = $appFields['APP_STATUS'];
$Fields['STATUS'] = $appFields['STATUS'];
$Fields['APP_TITLE'] = $appFields['TITLE'];
$Fields['PRO_UID'] = $appFields['PRO_UID'];
$Fields['APP_PARALLEL'] = $appFields['APP_PARALLEL'];
$Fields['APP_INIT_USER'] = $appFields['APP_INIT_USER'];
$Fields['APP_CUR_USER'] = $appFields['APP_CUR_USER'];
$Fields['APP_DATA'] = $appFields['APP_DATA'];
$Fields['CREATOR'] = $appFields['CREATOR'];
$Fields['APP_PIN'] = $appFields['APP_PIN'];
$Fields['APP_PROC_CODE'] = $appFields['APP_PROC_CODE'];
$Fields['PRO_TITLE'] = Content::load ( 'PRO_TITLE', '', $appFields['PRO_UID'], SYS_LANG );
$oUser = new Users();
$oUser->load( $appFields['APP_CUR_USER'] );
$Fields['CUR_USER'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
$threads = $oCase->GetAllThreads ($appFields['APP_UID']);
$Fields['THREADS'] = $threads;
$Fields['CANT_THREADS'] = count($threads);
$Fields['CANT_APP_DATA'] = count($Fields['APP_DATA']);
$delegations = $oCase->GetAllDelegations ($appFields['APP_UID']);
foreach ( $delegations as $key => $val ) {
$delegations[$key]['TAS_TITLE'] = Content::load ( 'TAS_TITLE', '', $val['TAS_UID'], SYS_LANG );
if ($val['USR_UID'] != -1) {
$oUser->load( $val['USR_UID'] );
$delegations[$key]['USR_NAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
}
else {
$delegations[$key]['USR_NAME'] = 'Unknow user (Sub-Process User)';
}
}
$Fields['CANT_DELEGATIONS'] = count($delegations);
$Fields['DELEGATIONS'] = $delegations;
require_once 'classes/model/AppDelay.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(AppDelayPeer::APP_THREAD_INDEX);
$oCriteria->addSelectColumn(AppDelayPeer::APP_DEL_INDEX);
$oCriteria->addSelectColumn(AppDelayPeer::APP_TYPE);
$oCriteria->addSelectColumn(AppDelayPeer::APP_STATUS);
$oCriteria->addSelectColumn(AppDelayPeer::APP_ENABLE_ACTION_USER);
$oCriteria->addSelectColumn(AppDelayPeer::APP_ENABLE_ACTION_DATE);
$oCriteria->addSelectColumn(AppDelayPeer::APP_DISABLE_ACTION_USER);
$oCriteria->addSelectColumn(AppDelayPeer::APP_DISABLE_ACTION_DATE);
$oCriteria->add(AppDelayPeer::APP_UID, $appUid);
$oCriteria->addAscendingOrderByColumn(AppDelayPeer::APP_TYPE);
$oCriteria->addAscendingOrderByColumn(AppDelayPeer::APP_ENABLE_ACTION_DATE);
$oDataset = AppDelayPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aDelays = array();
while ($aRow = $oDataset->getRow()) {
$aDelays[] = $aRow;
$oDataset->next();
}
$Fields['DELAYS'] = $aDelays;
$Fields['CANT_DELAYS'] = count($aDelays);
require_once 'classes/model/SubApplication.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(SubApplicationPeer::APP_UID );
$oCriteria->addSelectColumn(SubApplicationPeer::APP_PARENT );
$oCriteria->addSelectColumn(SubApplicationPeer::DEL_INDEX_PARENT );
$oCriteria->addSelectColumn(SubApplicationPeer::DEL_THREAD_PARENT);
$oCriteria->addSelectColumn(SubApplicationPeer::SA_STATUS );
$oCriteria->addSelectColumn(SubApplicationPeer::SA_INIT_DATE );
$oCriteria->addSelectColumn(SubApplicationPeer::SA_FINISH_DATE);
$oCriteria->addSelectColumn(ApplicationPeer::APP_NUMBER);
$oCriteria->add(SubApplicationPeer::APP_UID, $appUid);
$oCriteria->addJoin(ApplicationPeer::APP_UID, SubApplicationPeer::APP_PARENT, Criteria::LEFT_JOIN);
$oCriteria->addAscendingOrderByColumn(SubApplicationPeer::APP_UID);
$oDataset = SubApplicationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aSubprocess = array();
while ($aRow = $oDataset->getRow()) {
$aSubprocess[] = $aRow;
$oDataset->next();
}
$Fields['SUBAPPLICATIONS'] = $aSubprocess;
$Fields['CANT_SUBAPPLICATIONS'] = count($aSubprocess);
/* Render page */
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'CASES';
$G_PUBLISH = new Publisher;
//$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
$G_PUBLISH->AddContent('smarty', 'cases/casesDemo', '', '', $Fields);
G::RenderPage( "publish" );
}
catch ( Exception $e ){
$G_PUBLISH = new Publisher;
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage('publish');
<?php
/**
* casesDemo.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
$rows[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
);
$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' => 33,'name' => 'Mike','age' => 21,'balance' => 4567
);
$rows[] = array ('uid' => 44,'name' => 'Paul','age' => 22,'balance' => 567
);
$rows[] = array ('uid' => 55,'name' => 'Will','age' => 23,'balance' => 67
);
$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 );
G::LoadClass( 'ArrayPeer' );
$c = new Criteria( 'dbarray' );
$c->setDBArrayTable( 'user' );
// $c->add ( 'user.age', 22 , Criteria::GREATER_EQUAL );
// $c->add ( 'user.age', 22 , Criteria::EQUAL );
$c->add( 'user.name', '%au%', Criteria::LIKE );
// $c->add ( 'user.balance', 3456 , Criteria::GREATER_EQUAL );
$c->addAscendingOrderByColumn( 'name' );
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'CASES';
$G_PUBLISH = new Publisher();
// $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
//$G_PUBLISH->AddContent('smarty', 'cases/casesDemo', '', '', $Fields);
// G::RenderPage( "publish" );
//die;
/* Includes */
G::LoadClass( 'pmScript' );
G::LoadClass( 'case' );
G::LoadClass( 'derivation' );
$oCase = new Cases();
$appUid = isset( $_SESSION['APPLICATION'] ) ? $_SESSION['APPLICATION'] : '';
$appFields = $oCase->loadCase( $appUid );
$Fields['APP_UID'] = $appFields['APP_UID'];
$Fields['APP_NUMBER'] = $appFields['APP_NUMBER'];
$Fields['APP_STATUS'] = $appFields['APP_STATUS'];
$Fields['STATUS'] = $appFields['STATUS'];
$Fields['APP_TITLE'] = $appFields['TITLE'];
$Fields['PRO_UID'] = $appFields['PRO_UID'];
$Fields['APP_PARALLEL'] = $appFields['APP_PARALLEL'];
$Fields['APP_INIT_USER'] = $appFields['APP_INIT_USER'];
$Fields['APP_CUR_USER'] = $appFields['APP_CUR_USER'];
$Fields['APP_DATA'] = $appFields['APP_DATA'];
$Fields['CREATOR'] = $appFields['CREATOR'];
$Fields['APP_PIN'] = $appFields['APP_PIN'];
$Fields['APP_PROC_CODE'] = $appFields['APP_PROC_CODE'];
$Fields['PRO_TITLE'] = Content::load( 'PRO_TITLE', '', $appFields['PRO_UID'], SYS_LANG );
$oUser = new Users();
$oUser->load( $appFields['APP_CUR_USER'] );
$Fields['CUR_USER'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
$threads = $oCase->GetAllThreads( $appFields['APP_UID'] );
$Fields['THREADS'] = $threads;
$Fields['CANT_THREADS'] = count( $threads );
$Fields['CANT_APP_DATA'] = count( $Fields['APP_DATA'] );
$delegations = $oCase->GetAllDelegations( $appFields['APP_UID'] );
foreach ($delegations as $key => $val) {
$delegations[$key]['TAS_TITLE'] = Content::load( 'TAS_TITLE', '', $val['TAS_UID'], SYS_LANG );
if ($val['USR_UID'] != - 1) {
$oUser->load( $val['USR_UID'] );
$delegations[$key]['USR_NAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
} else {
$delegations[$key]['USR_NAME'] = 'Unknow user (Sub-Process User)';
}
}
$Fields['CANT_DELEGATIONS'] = count( $delegations );
$Fields['DELEGATIONS'] = $delegations;
require_once 'classes/model/AppDelay.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( AppDelayPeer::APP_THREAD_INDEX );
$oCriteria->addSelectColumn( AppDelayPeer::APP_DEL_INDEX );
$oCriteria->addSelectColumn( AppDelayPeer::APP_TYPE );
$oCriteria->addSelectColumn( AppDelayPeer::APP_STATUS );
$oCriteria->addSelectColumn( AppDelayPeer::APP_ENABLE_ACTION_USER );
$oCriteria->addSelectColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
$oCriteria->addSelectColumn( AppDelayPeer::APP_DISABLE_ACTION_USER );
$oCriteria->addSelectColumn( AppDelayPeer::APP_DISABLE_ACTION_DATE );
$oCriteria->add( AppDelayPeer::APP_UID, $appUid );
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_TYPE );
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
$oDataset = AppDelayPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aDelays = array ();
while ($aRow = $oDataset->getRow()) {
$aDelays[] = $aRow;
$oDataset->next();
}
$Fields['DELAYS'] = $aDelays;
$Fields['CANT_DELAYS'] = count( $aDelays );
require_once 'classes/model/SubApplication.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( SubApplicationPeer::APP_UID );
$oCriteria->addSelectColumn( SubApplicationPeer::APP_PARENT );
$oCriteria->addSelectColumn( SubApplicationPeer::DEL_INDEX_PARENT );
$oCriteria->addSelectColumn( SubApplicationPeer::DEL_THREAD_PARENT );
$oCriteria->addSelectColumn( SubApplicationPeer::SA_STATUS );
$oCriteria->addSelectColumn( SubApplicationPeer::SA_INIT_DATE );
$oCriteria->addSelectColumn( SubApplicationPeer::SA_FINISH_DATE );
$oCriteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
$oCriteria->add( SubApplicationPeer::APP_UID, $appUid );
$oCriteria->addJoin( ApplicationPeer::APP_UID, SubApplicationPeer::APP_PARENT, Criteria::LEFT_JOIN );
$oCriteria->addAscendingOrderByColumn( SubApplicationPeer::APP_UID );
$oDataset = SubApplicationPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aSubprocess = array ();
while ($aRow = $oDataset->getRow()) {
$aSubprocess[] = $aRow;
$oDataset->next();
}
$Fields['SUBAPPLICATIONS'] = $aSubprocess;
$Fields['CANT_SUBAPPLICATIONS'] = count( $aSubprocess );
/* Render page */
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'CASES';
$G_PUBLISH = new Publisher();
//$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/casesDemo', $c );
$G_PUBLISH->AddContent( 'smarty', 'cases/casesDemo', '', '', $Fields );
G::RenderPage( "publish" );
} catch (Exception $e) {
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish' );
}

View File

@@ -74,7 +74,6 @@ function casesShowOuputDocumentExist ($url)
if ($actionAjax == 'casesGenerateDocumentPage') {
global $G_PUBLISH;
$oHeadPublisher = & headPublisher::getSingleton();
G::loadClass( 'configuration' );
$conf = new Configurations();
@@ -128,7 +127,6 @@ if ($actionAjax == 'generateDocumentGrid_Ajax') {
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
$dateFormat = $generalConfCasesList['casesListDateFormat'];
}
$newDir = '/tmp/test/directory';
$r = G::verifyPath( $newDir );
$r->data = $aProcesses;

View File

@@ -121,7 +121,6 @@ body {
}
if ($actionAjax == 'showDynaformListHistory') {
//!dataIndex
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
@@ -141,7 +140,6 @@ body {
</style>
<script language="Javascript">
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)))};
//!Code that simulated reload library javascript maborak
var leimnud = {};
leimnud.exec = "";

View File

@@ -6,7 +6,6 @@ if ($action == 'selfservice')
$action = 'unassigned';
//if ( $action == 'sent' ) $action = 'participated';
G::LoadClass( "BasePeer" );
G::LoadClass( 'configuration' );
require_once ("classes/model/Fields.php");
@@ -16,8 +15,6 @@ require_once ("classes/model/Users.php");
$oHeadPublisher = & headPublisher::getSingleton();
// oHeadPublisher->setExtSkin( 'xtheme-blue');
//get the configuration for this action
$conf = new Configurations();
try {
@@ -57,8 +54,7 @@ if ($action == 'draft' /* && $action == 'cancelled' */) {
//array_unshift ( $columns, array( 'header'=> '', 'width'=> 50, 'sortable'=> false, 'id'=> 'deleteLink' ) );
}
if ($action == 'selfservice') {
array_unshift( $columns, array ('header' => '','width' => 50,'sortable' => false,'id' => 'viewLink'
) );
array_unshift( $columns, array ('header' => '','width' => 50,'sortable' => false,'id' => 'viewLink') );
}
if ($action == 'paused') {
@@ -79,8 +75,7 @@ $oAppCache = new AppCacheView();
$oAppCache->confCasesList = $confCasesList;
//get values for the comboBoxes
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' )
);
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' ));
$status = getStatusArray( $action, $userUid );
$category = getCategoryArray();
$users = getUserArray( $action, $userUid );
@@ -101,7 +96,6 @@ $oHeadPublisher->assign( 'userValues', $users ); //Sending the listing of users
$oHeadPublisher->assign( 'allUsersValues', $allUsers ); //Sending the listing of all users
$oHeadPublisher->assign( "solrEnabled", (($aux = System::solrEnv()) !== false) ? 1 : 0 ); //Sending the status of solar
//menu permissions
/*$c = new Criteria('workflow');
$c->clearSelectColumns();
@@ -112,11 +106,7 @@ $oHeadPublisher->assign( "solrEnabled", (($aux = System::solrEnv()) !== false) ?
$cnt = '';
$menuPerms = '';
$menuPerms = $menuPerms . ($RBAC->userCanAccess( 'PM_REASSIGNCASE' ) == 1) ? 'R' : ''; //can reassign case
$oHeadPublisher->assign( '___p34315105', $menuPerms ); // user menu permissions
G::LoadClass( 'configuration' );
$c = new Configurations();
@@ -131,10 +121,8 @@ function getUserArray ($action, $userUid)
{
global $oAppCache;
$status = array ();
$users[] = array ("CURRENT_USER",G::LoadTranslation( "ID_CURRENT_USER" )
);
$users[] = array ("",G::LoadTranslation( "ID_ALL_USERS" )
);
$users[] = array ("CURRENT_USER",G::LoadTranslation( "ID_CURRENT_USER" ));
$users[] = array ("",G::LoadTranslation( "ID_ALL_USERS" ));
//now get users, just for the Search action
switch ($action) {
@@ -149,8 +137,7 @@ function getUserArray ($action, $userUid)
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$users[] = array ($aRow['USR_UID'],$aRow['USR_LASTNAME'] . ' ' . $aRow['USR_FIRSTNAME']
);
$users[] = array ($aRow['USR_UID'],$aRow['USR_LASTNAME'] . ' ' . $aRow['USR_FIRSTNAME']);
$oDataset->next();
}
break;
@@ -176,8 +163,7 @@ function getCategoryArray ()
$dataset->next();
while ($row = $dataset->getRow()) {
$category[] = array ($row['CATEGORY_UID'],$row['CATEGORY_NAME']
);
$category[] = array ($row['CATEGORY_UID'],$row['CATEGORY_NAME']);
$dataset->next();
}
return $category;
@@ -205,8 +191,7 @@ function getAllUsersArray ($action)
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$users[] = array ($aRow['USR_UID'],$aRow['APP_CURRENT_USER']
);
$users[] = array ($aRow['USR_UID'],$aRow['APP_CURRENT_USER']);
$oDataset->next();
}
}
@@ -217,8 +202,7 @@ function getStatusArray ($action, $userUid)
{
global $oAppCache;
$status = array ();
$status[] = array ('',G::LoadTranslation( 'ID_ALL_STATUS' )
);
$status[] = array ('',G::LoadTranslation( 'ID_ALL_STATUS' ));
//get the list based in the action provided
switch ($action) {
case 'sent':
@@ -274,8 +258,8 @@ function getStatusArray ($action, $userUid)
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] )
); //here we can have a translation for the status ( the second param)
$status[] = array ($aRow['APP_STATUS'],G::LoadTranslation( 'ID_CASES_STATUS_' . $aRow['APP_STATUS'] ));
//here we can have a translation for the status ( the second param)
$oDataset->next();
}
}
@@ -286,8 +270,7 @@ function getStatusArray ($action, $userUid)
function getToDo ()
{
$caseColumns = array ();
$caseColumns[] = array ('header' => '#','dataIndex' => 'APP_NUMBER','width' => 45,'align' => 'center'
);
$caseColumns[] = array ('header' => '#','dataIndex' => 'APP_NUMBER','width' => 45,'align' => 'center');
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_SUMMARY' ),'dataIndex' => 'CASE_SUMMARY','width' => 45,'align' => 'center','sortable' => false
);
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_CASES_NOTES' ),'dataIndex' => 'CASE_NOTES_COUNT','width' => 45,'align' => 'center','sortable' => false

View File

@@ -14,17 +14,13 @@ if (isset( $_GET['ux'] )) {
} else {
$url = 'casesListExtJs';
}
if (isset( $_GET['ux'] )) {
echo 'if (typeof window.parent.ux_env != \'undefined\') {';
}
echo " window.parent.location.href = '$url';";
if (isset( $_GET['ux'] )) {
echo '} else { window.parent.location.href = \'casesListExtJs\'; }';
}
?>
}
</script>

View File

@@ -27,7 +27,6 @@ require_once 'classes/model/AppThread.php';
require_once 'classes/model/AppDelay.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
require_once ("classes/model/AppCacheView.php");
require_once ("classes/model/AppDelegation.php");
require_once ("classes/model/AdditionalTables.php");
@@ -74,12 +73,9 @@ if ($actionAjax == "processListExtJs") {
}
$del = DBAdapter::getStringDelimiter();
$conds = array ();
$conds[] = array (ProcessPeer::PRO_UID,ContentPeer::CON_ID
);
$conds[] = array (ContentPeer::CON_CATEGORY,$del . 'PRO_TITLE' . $del
);
$conds[] = array (ContentPeer::CON_LANG,$del . $lang . $del
);
$conds[] = array (ProcessPeer::PRO_UID,ContentPeer::CON_ID);
$conds[] = array (ContentPeer::CON_CATEGORY,$del . 'PRO_TITLE' . $del);
$conds[] = array (ContentPeer::CON_LANG,$del . $lang . $del);
$cProcess->addJoinMC( $conds, Criteria::LEFT_JOIN );
$cProcess->add( ProcessPeer::PRO_STATUS, 'ACTIVE' );
$oDataset = ProcessPeer::doSelectRS( $cProcess );

View File

@@ -1,9 +1,7 @@
<?php
$action = isset( $_GET['action'] ) ? $_GET['action'] : 'default';
G::LoadClass( 'case' );
G::LoadClass( 'configuration' );
$userId = isset( $_SESSION['USER_LOGGED'] ) ? $_SESSION['USER_LOGGED'] : '00000000000000000000000000000000';
switch ($action) {
case 'getAllCounters':
@@ -26,16 +24,13 @@ function getLoadTreeMenuData ()
$oMenu->load( 'cases' );
$oCases = new Cases();
$aTypes = Array ('to_do','draft','cancelled','sent','paused','completed','selfservice'
$aTypes = Array ('to_do','draft','cancelled','sent','paused','completed','selfservice');
//'to_revise',
//'to_reassign'
;
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice'
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice');
//'CASES_TO_REVISE'=>'to_revise',
//'CASES_TO_REASSIGN'=>'to_reassign'
;
$list = array ();
$list = array ();
$list['count'] = ' ';
$empty = array ();
@@ -66,8 +61,7 @@ function getLoadTreeMenuData ()
$menuCases[$CurrentBlockID]['blockType'] = $oMenu->Types[$i];
$menuCases[$CurrentBlockID]['link'] = $oMenu->Options[$i];
} else {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = Array ('label' => $oMenu->Labels[$i],'link' => $oMenu->Options[$i],'icon' => (isset( $oMenu->Icons[$i] ) && $oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'kcmdf.png'
);
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = Array ('label' => $oMenu->Labels[$i],'link' => $oMenu->Options[$i],'icon' => (isset( $oMenu->Icons[$i] ) && $oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'kcmdf.png');
if (isset( $aTypesID[$oMenu->Id[$i]] )) {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]]['cases_count'] = $aCount[$aTypesID[$oMenu->Id[$i]]]['count'];
@@ -133,8 +127,7 @@ function getProcess ()
$aTypesID['CASES_SELFSERVICE'] = 'selfservice';
//$aTypesID['CASES_TO_REVISE'] = 'to_revise';
//$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign';
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign'
);
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign');
$aCount = $oCases->getAllCounters( Array ($aTypesID[$type]
), $userId, true );
@@ -183,7 +176,6 @@ function getAllCounters ()
//$aTypes['to_revise'] = 'CASES_TO_REVISE';
//$aTypes['to_reassign'] = 'CASES_TO_REASSIGN';
if ((($solrConf = System::solrEnv()) !== false)) {
G::LoadClass( 'AppSolr' );
$ApplicationSolrIndex = new AppSolr( $solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance'] );
@@ -191,8 +183,7 @@ function getAllCounters ()
$aCount = $ApplicationSolrIndex->getCasesCount( $userUid );
//get paused count
$aCountMissing = $oAppCache->getAllCounters( array ('paused','completed','cancelled'
), $userUid );
$aCountMissing = $oAppCache->getAllCounters( array ('paused','completed','cancelled'), $userUid );
$aCount = array_merge( $aCount, $aCountMissing );
} else {

View File

@@ -25,7 +25,6 @@
//$oForm = new Form ( $_SESSION ['PROCESS'] . '/' . $_GET ['UID'], PATH_DYNAFORM );
//$oForm->validatePost ();
/* @author Alvaro Campos Sanchez */
/* Includes */
G::LoadClass( 'case' );
@@ -39,11 +38,7 @@ $Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], (array) $_POST['form'] )
#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 routines...
//cleaning debug variables
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();

View File

@@ -10,6 +10,7 @@
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

View File

@@ -13,8 +13,6 @@ global $RBAC;
switch ($page) {
case "startCase":
$oHeadPublisher->addExtJsScript( 'cases/casesStartCase', true ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesStartCase' ); //adding a html file .html.
G::LoadClass( 'configuration' );
$c = new Configurations();
@@ -43,6 +41,5 @@ switch ($page) {
break;
}
G::RenderPage( 'publish', 'extJs' );

View File

@@ -92,10 +92,7 @@ function getProcessList ()
$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['qtip'] = $tempTreeChild['otherAttributes']['PRO_DESCRIPTION'];
//$tempTree['cls']='file';
$tempTreeChildren[] = $tempTreeChild;
}
}
@@ -289,16 +286,10 @@ function getSimpleDashboardData ()
$Criteria->addSelectColumn( AppCacheViewPeer::USR_UID );
$Criteria->addSelectColumn( AppCacheViewPeer::APP_THREAD_STATUS );
$Criteria->add( AppCacheViewPeer::APP_STATUS, array ("TO_DO","DRAFT"
), CRITERIA::IN );
$Criteria->add( AppCacheViewPeer::USR_UID, array ($sUIDUserLogged,""
), 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::DEL_FINISH_DATE, null, Criteria::ISNULL );
//$Criteria->add ( AppCacheViewPeer::APP_THREAD_STATUS, 'OPEN' );
$Criteria->add( AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN' );
//execute the query

View File

@@ -1,6 +1,7 @@
<?php
// $oHeadPublisher =& headPublisher::getSingleton();
// $TRANSLATIONS = array_merge($TRANSLATIONS, $TRANSLATIONS2);
// $TRANSLATIONS = array_merge($TRANSLATIONS, $TRANSLATIONS2);
$delIndex = $_GET['DEL_INDEX'];
$appUid = $_GET['APP_UID'];
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations

View File

@@ -1,5 +1,4 @@
<?php
class TreeNode
{
public $text = "";
@@ -43,9 +42,7 @@ class ExtJsTreeNode extends TreeNode
}
G::LoadClass( 'case' );
$o = new Cases();
$PRO_UID = $_SESSION['PROCESS'];
$treeArray = array ();

View File

@@ -69,18 +69,13 @@ $oCriteria->addDescendingOrderByColumn( LogCasesSchedulerPeer::EXEC_HOUR );
$oDataset = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
//$oDataset = LogCasesSchedulerPeer::doSelectRS ( $oCriteria );
//$oDataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
$addTables = Array ();
while ($oDataset->next()) {
$addTables[] = $oDataset->getRow();
}
//$oLogCasesScheduler = new LogCasesScheduler();
//$arrData = $oLogCasesScheduler->getAll();
echo '{results: ' . $results . ', rows: ' . G::json_encode( $addTables ) . '}';

View File

@@ -4,7 +4,6 @@ if (isset( $_SESSION['TRIGGER_DEBUG']['info'] )) {
} else {
$aTriggers[0] = $_SESSION['TRIGGER_DEBUG'];
}
//print_r($aTriggers);die;
$triggersList = Array ();
@@ -21,8 +20,6 @@ foreach ($aTriggers as $aTrigger) {
//$t_code = str_replace('"', '\'',$t_code);
//$t_code = addslashes($t_code);
//$t_code = Only1br($t_code);
//highlighting the trigger code using the geshi third party library
G::LoadThirdParty( 'geshi', 'geshi' );
$geshi = new GeSHi( $aTrigger['TRIGGERS_VALUES'][$index]['TRI_WEBBOT'], 'php' );
@@ -65,9 +62,7 @@ foreach ($DEBUG_ERRORS as $error) {
]}';
*/
$triggersRet->total = count( $triggersList );
$triggersRet->data = $triggersList;
echo G::json_encode( $triggersRet );

View File

@@ -1,15 +1,12 @@
<?php
$request = isset( $_POST['request'] ) ? $_POST['request'] : '';
switch ($request) {
case 'getRows':
$fieldname = $_POST['fieldname'];
G::LoadClass( 'case' );
$oApp = new Cases();
$aFields = $oApp->loadCase( $_SESSION['APPLICATION'] );
$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'];
@@ -86,10 +83,8 @@ switch ($request) {
if (isset( $_POST['filter'] ) && $_POST['filter'] == 'sys') {
$aVars = G::getSystemConstants();
}
ksort( $aVars );
$return_object->totalCount = 1;
foreach ($aVars as $i => $var) {
if (is_array( $var ) || is_object( $var )) {
$aVars[$i] = print_r( $var, true );

View File

@@ -20,6 +20,7 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//$newFile = str_replace ( 'index.php', 'cases_List.php' , __FILE__ ) ;
$newFile = str_replace( 'index.php', 'main.php', __FILE__ );

View File

@@ -83,6 +83,5 @@ $oHeadPublisher->assign( '_APP_NUM', '#: ' . $case['APP_NUMBER'] );
$oHeadPublisher->assign( '_ENV_CURRENT_DATE', $conf->getSystemDate( date( 'Y-m-d' ) ) );
$oHeadPublisher->assign( '_ENV_CURRENT_DATE_NO_FORMAT', date( 'Y-m-d' ) );
$oHeadPublisher->assign( 'idfirstform', is_null( $oStep ) ? '' : $oStep->getStepUidObj() );
G::RenderPage( 'publish', 'extJs' );

View File

@@ -18,7 +18,6 @@ $dateTo = isset( $_POST["dateTo"] ) ? substr( $_POST["dateTo"], 0, 10 ) : "";
try {
$result = "";
$userUid = (isset( $_SESSION["USER_LOGGED"] ) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
$user = ($user == "CURRENT_USER") ? $userUid : $user;

View File

@@ -8,7 +8,6 @@ $option = '';
if (isset( $_GET['t'] ))
$option = $_GET['t'];
try {
G::LoadClass( "BasePeer" );
require_once ("classes/model/Process.php");
require_once ("classes/model/AppCacheView.php");

View File

@@ -21,8 +21,7 @@ $allTasUids = array ();
// getting all App Uids and task Uids
foreach ($sentUids as $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'] : '';
@@ -55,8 +54,8 @@ foreach ($allUidsRecords as $aRecord) {
foreach ($aCaseUsers as $aCaseUser) {
if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
$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']
}
}
}

View File

@@ -1,7 +1,5 @@
<?php
G::LoadClass( 'configuration' );
$callback = isset( $_POST['callback'] ) ? $_POST['callback'] : 'stcCallback1001';
$query = isset( $_POST['query'] ) ? $_POST['query'] : '';
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'DESC';

View File

@@ -28,7 +28,6 @@ foreach ($items as $item) {
$dataUids = explode( "|", $item );
$appSelectedUids[] = $dataUids[0];
}
// var_dump($aData);
//var_dump($appSelectedUids);
$casesReassignedCount = 0;
@@ -86,10 +85,8 @@ if (is_array( $aData )) {
$rs->next();
$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;
echo G::json_encode( $serverResponse );

View File

@@ -69,8 +69,7 @@ try {
} catch (Exception $error) {
global $G_PUBLISH;
$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' );
die();
}

View File

@@ -1,50 +1,52 @@
<?php
/**
* buscador.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$frm = $HTTP_GET_VARS;
?>
<h1>demo de buscador</h1>
<form method=post action="buscador2.php">
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>" >
<input type=hidden name=tipo value="<?php echo $frm['tipo'] ?>" >
Buscador tipo : <?php echo $frm['tipo'] ?><br>
<table><tr><td>
curso</td><td>
<select name=curso>
<option value="curso1">Curso 1</option>
<option value="curso2">Curso 2</option>
<option value="curso3">Curso 3</option>
<option value="curso4">Curso 4</4option>
<option value="curso5">Curso 5</option>
</td></tr>
<tr><td colspan=2>
<input type=submit ></td></tr>
</table>
</form>
</body>
</html>
<?php
/**
* buscador.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$frm = $HTTP_GET_VARS;
?>
<h1>demo de buscador</h1>
<form method=post action="buscador2.php">
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
Buscador tipo : <?php echo $frm['tipo'] ?><br>
<table>
<tr>
<td>curso</td>
<td><select name=curso>
<option value="curso1">Curso 1</option>
<option value="curso2">Curso 2</option>
<option value="curso3">Curso 3</option>
<option value="curso4">Curso 4</4option>
<option value="curso5">Curso 5</option></td>
</tr>
<tr>
<td colspan=2><input type=submit></td>
</tr>
</table>
</form>
</body>
</html>

View File

@@ -1,38 +1,32 @@
demo de buscador<br>
/**
* buscador2.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
demo de buscador
<br>
/** * buscador2.php * * ProcessMaker Open Source Edition * Copyright (C)
2004 - 2008 Colosa Inc.23 * * This program is free software: you can
redistribute it and/or modify * it under the terms of the GNU Affero
General Public License as * published by the Free Software Foundation,
either version 3 of the * License, or (at your option) any later
version. * * This program is distributed in the hope that it will be
useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU
Affero General Public License for more details. * * 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 />
.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* 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.
*
*
*/
<?php
$frm = $HTTP_POST_VARS;
$dbc = new dbconnection();
$ses = new DBSession($dbc);
$sql = "update tickets set tipo = ' " . $frm['tipo'] ."', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] ."' ";
$ses->Execute ( $sql );
<?php
$frm = $HTTP_POST_VARS;
$dbc = new dbconnection();
$ses = new DBSession( $dbc );
$sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
$ses->Execute( $sql );
?>
<script language = "JavaScript">
<script language="JavaScript">
window.close();
</script>

View File

@@ -57,9 +57,6 @@ function cal_popup1 (str_datetime) {
);
obj_calwindow.opener = window;
obj_calwindow.focus();
}
// timestamp generating function
@@ -160,3 +157,4 @@ function cal_error (str_message) {
alert (str_message);
return null;
}

View File

@@ -22,7 +22,10 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
td {font-family: Tahoma, Verdana, sans-serif; font-size: 12px;}
td {
font-family: Tahoma, Verdana, sans-serif;
font-size: 12px;
}
</style>
<script language="JavaScript">
@@ -101,45 +104,56 @@ function set_datetime(n_datetime, b_close) {
</script>
<php
$ARR_MONTHS = array ( "January", "February", "March", "April", "May", "June",
<php $ARR_MONTHS=array
( "January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December");
$ARR_WEEKDAYS = array ( "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" );
$NUM_WEEKSTART = 1; //day week starts from (normally 0-Su or 1-Mo)
$ARR_WEEKDAYS=array
( "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" );
$NUM_WEEKSTART=1; //day
week starts from (normally 0-Suor 1-Mo)
?>
<table class="clsOTable" cellspacing="0" border="0" width="100%">
<tr><td bgcolor="#4682B4">
<table cellspacing="1" cellpadding="3" border="0" width="100%">
<tr><td colspan="7"><table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td> +(obj_caller&&obj_caller.year_scroll?'<a href="javascript:set_datetime('+dt_prev_year.valueOf()+')">
<img src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16" border="0" alt="previous year"></a>&nbsp;':'')+'
<a href="javascript:set_datetime('+dt_prev_month.valueOf()+')">
<img src="'+STR_ICONPATH+'prev.gif" width="16" height="16" border="0" alt="previous month"></a>
</td>
<tr>
<td bgcolor="#4682B4">
<table cellspacing="1" cellpadding="3" border="0" width="100%">
<tr>
<td colspan="7"><table cellspacing="0" cellpadding="0" border="0"
width="100%">
<tr>
<td>+(obj_caller&&obj_caller.year_scroll?'<a
href="javascript:set_datetime('+dt_prev_year.valueOf()+')"> <img
src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16"
border="0" alt="previous year"></a>&nbsp;':'')+' <a
href="javascript:set_datetime('+dt_prev_month.valueOf()+')"> <img
src="'+STR_ICONPATH+'prev.gif" width="16" height="16"
border="0" alt="previous month"></a>
</td>
<td align="center" width="100%">
<font color="#ffffff"> +ARR_MONTHS[dt_current.getMonth()]+' '+dt_current.getFullYear() </font></td>
<td><a href="javascript:set_datetime('+dt_next_month.valueOf()+')">
<img src="'+STR_ICONPATH+'next.gif" width="16" height="16" border="0" alt="next month"></a>
'+(obj_caller && obj_caller.year_scroll?'&nbsp;
<a href="javascript:set_datetime('+dt_next_year.valueOf()+')">
<img src="'+STR_ICONPATH+'next_year.gif" width="16" height="16" border="0" alt="next year">
</a>':'')+'
</td>'
);
</tr>
</table></td></tr>
<tr>
<script language="JavaScript">
<?php
// print weekdays titles
for ($n=0; $n<7; $n++)
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[ (NUM_WEEKSTART+n)%7] . "</font></td>";
print "</tr>";
<td align="center" width="100%"><font color="#ffffff">
+ARR_MONTHS[dt_current.getMonth()]+'
'+dt_current.getFullYear() </font></td>
<td><a
href="javascript:set_datetime('+dt_next_month.valueOf()+')"> <img
src="'+STR_ICONPATH+'next.gif" width="16" height="16"
border="0" alt="next month"></a> '+(obj_caller &&
obj_caller.year_scroll?'&nbsp; <a
href="javascript:set_datetime('+dt_next_year.valueOf()+')"> <img
src="'+STR_ICONPATH+'next_year.gif" width="16" height="16"
border="0" alt="next year">
</a>':'')+'</td>' );
</tr>
</table></td>
</tr>
<tr>
<script language="JavaScript">
<?php
// print weekdays titles
for ($n = 0; $n < 7; $n ++)
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
print "</tr>";
?>
// print calendar table
@@ -175,11 +189,15 @@ while (dt_current_day.getMonth() == dt_current.getMonth() ||
// print row footer
document.write('</tr>');
}
if (obj_caller && obj_caller.time_comp)
if (obj_caller && obj_caller.time_comp) {
document.write('<form onsubmit="javascript:set_datetime('+dt_current.valueOf()+', true)" name="cal"><tr><td colspan="7" bgcolor="#87CEFA"><font color="White" face="tahoma, verdana" size="2">Time: <input type="text" name="time" value="'+obj_caller.gen_time(this.dt_current)+'" size="8" maxlength="8"></font></td></tr></form>');
}
</script>
</table></tr></td>
</table>
</tr>
</td>
</table>
</body>
</html>
</html>

View File

@@ -12,69 +12,59 @@
*
* This program is distributed in the hope that it will be useful,
* 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.
*
* 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.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
G::LoadClass('xmlfield_InputPM');
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0);
G::LoadClass( 'xmlfield_InputPM' );
$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);">';
foreach ( $aFields as $aField ) {
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
$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) {
$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 ) {
$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']
);
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']
);
}
$sHTML .= '</select>';
$sHTML = '';
if (! isset($_POST['sNoShowLeyend'])) {
$sHTML = '<table width="100%">';
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
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_NONEC') . '</td></tr>';
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
if (! isset( $_POST['sNoShowLeyend'] )) {
$sHTML = '<table width="100%">';
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
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_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_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_ESCSJS') . '</td></tr>';
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
} 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_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_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_REPLACE_WITHOUT_CHANGES') . '</td></tr>';
}
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">&nbsp;</td></tr>';
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
$sHTML .= '</table>';
} 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_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_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_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
}
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">&nbsp;</td></tr>';
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
$sHTML .= '</table>';
} 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
$sHTML = '<table width="100%">';
$sHTML .= '</table>';
// 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>';
}
$sStyle = " <style type=\"text/css\">
@@ -126,37 +116,37 @@ background: #fff; /* set desired hover color */
</style>";
$cssTabs = "<div id=\"all\">
<ul id=\"tabnav\">
<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=\"process\"><a href=\"#\" onclick=\"changeVariables('process','".$_POST['sProcess']."','".$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">Process</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=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
</ul>
</div>
";
echo $sHTML;
echo $sStyle;
////////////////////////////////////////////////////////
echo "<div id=\"processVariablesContent\">";
echo $cssTabs;
G::LoadClass('ArrayPeer');
G::LoadClass( 'ArrayPeer' );
global $_DBArray;
$_DBArray['dynavars'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('dynavars');
G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable( 'dynavars' );
$aFields = array ();
$G_PUBLISH = new Publisher();
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'triggers/dynavars', $oCriteria);
G::RenderPage('publish', 'raw');
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage( 'publish', 'raw' );
echo "</div>";
?>

View File

@@ -1,115 +1,89 @@
<?php
/**
* varsAjax.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* @author Gustavo Cruz gustavo-at-colosa.com
* @param $_POST variables
* @desc 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
* that show both system and process variables.
* 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
* loaded for that type.
*/
G::LoadClass('xmlfield_InputPM');
$aFields = getDynaformsVars($_POST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0);
$aType = $_POST['type'];
$aRows[0] = Array (
'fieldname' => 'char',
'variable' => 'char',
'type' => 'type',
'label' => 'char'
);
foreach ( $aFields as $aField ) {
switch ($aType){
case "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']
);
}
break;
case "process":
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']
);
}
break;
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']
);
break;
}
}
<?php
/**
* varsAjax.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/**
* 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
* that show both system and process variables.
* 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
* loaded for that type.
*
* @author Gustavo Cruz gustavo-at-colosa.com
* @param $_POST variables
*/
G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
$aType = $_POST['type'];
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
);
foreach ($aFields as $aField) {
switch ($aType) {
case "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']
);
}
break;
case "process":
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']
);
}
break;
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']
);
break;
}
}
// 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\">
<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=\"process\"><a href=\"#\" onclick=\"changeVariables('process','".$_POST['sProcess']."','"
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">Process</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=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
</ul>
</div>
";
echo $cssTabs;
G::LoadClass('ArrayPeer');
global $_DBArray;
$_DBArray['dynavars'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('dynavars');
$aFields = array ();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'triggers/dynavars', $oCriteria);
G::RenderPage('publish', 'raw');
?>
";
echo $cssTabs;
G::LoadClass( 'ArrayPeer' );
global $_DBArray;
$_DBArray['dynavars'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable( 'dynavars' );
$aFields = array ();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage( 'publish', 'raw' );

View File

@@ -12,22 +12,22 @@
*
* This program is distributed in the hope that it will be useful,
* 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.
*
* 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.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$RBAC->requirePermissions('PM_DASHBOARD');
$RBAC->requirePermissions( 'PM_DASHBOARD' );
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'DASHBOARD';
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'DASHBOARD';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'dashboard/load' );
G::RenderPage( 'publish' );
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('view', 'dashboard/load');
G::RenderPage('publish');

View File

@@ -13,6 +13,7 @@ BEGIN
DECLARE APP_DEL_PREVIOUS_USER VARCHAR(255);
DECLARE APP_THREAD_STATUS VARCHAR(32);
SET @DEFAULT_LANG = '{lang}';
SET @APP_CURRENT_USER = '';
SELECT APPLICATION.APP_NUMBER into @APP_NUMBER FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_STATUS into @APP_STATUS FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
@@ -20,7 +21,7 @@ BEGIN
IF ( @APP_TITLE IS NULL ) THEN
SET @APP_TITLE = '';
END IF;
SELECT CONTENT.CON_VALUE into @APP_PRO_TITLE FROM CONTENT WHERE NEW.PRO_UID=CON_ID AND CON_CATEGORY='PRO_TITLE' and CON_LANG = '{lang}' LIMIT 1;
SELECT CONTENT.CON_VALUE into @APP_PRO_TITLE FROM CONTENT WHERE NEW.PRO_UID=CON_ID AND CON_CATEGORY='PRO_TITLE' and CON_LANG = '{lang}' LIMIT 1;
SELECT CONTENT.CON_VALUE into @APP_TAS_TITLE FROM CONTENT WHERE NEW.TAS_UID=CON_ID AND CON_CATEGORY='TAS_TITLE' and CON_LANG = '{lang}' LIMIT 1;
SELECT CONCAT(USERS.USR_LASTNAME, ' ', USERS.USR_FIRSTNAME) INTO @APP_CURRENT_USER FROM USERS WHERE USR_UID = NEW.USR_UID LIMIT 1;
IF ( @APP_CURRENT_USER IS NULL ) THEN
@@ -52,7 +53,7 @@ BEGIN
TAS_UID,
PRO_UID,
DEL_DELEGATE_DATE,
DEL_INIT_DATE,
DEL_INIT_DATE,
DEL_TASK_DUE_DATE,
DEL_FINISH_DATE,
DEL_THREAD_STATUS,
@@ -84,9 +85,9 @@ BEGIN
NEW.TAS_UID,
NEW.PRO_UID,
NEW.DEL_DELEGATE_DATE,
NEW.DEL_INIT_DATE,
NEW.DEL_INIT_DATE,
NEW.DEL_TASK_DUE_DATE,
NEW.DEL_FINISH_DATE,
NEW.DEL_FINISH_DATE,
NEW.DEL_THREAD_STATUS,
@APP_THREAD_STATUS,
@APP_TITLE,

View File

@@ -13,6 +13,7 @@ BEGIN
DECLARE APP_DEL_PREVIOUS_USER VARCHAR(255);
DECLARE APP_THREAD_STATUS VARCHAR(32);
SET @DEFAULT_LANG = '{lang}';
SET @APP_CURRENT_USER = '';
SELECT APPLICATION.APP_NUMBER into @APP_NUMBER FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_STATUS into @APP_STATUS FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
@@ -41,7 +42,7 @@ BEGIN
SET @APP_THREAD_STATUS = 'OPEN';
END IF;
SET @TAS_TYPE = (SELECT TAS_TYPE FROM TASK WHERE TAS_UID = NEW.TAS_UID LIMIT 1);
IF( @TAS_TYPE != 'SUBPROCESS') THEN
IF( @TAS_TYPE != 'SUBPROCESS') THEN
UPDATE `APP_CACHE_VIEW`
SET
APP_NUMBER = @APP_NUMBER,

View File

@@ -1,120 +1,113 @@
<?php
/**
* authentication.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
<?php
/**
* authentication.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Authentication for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_POST['form']) ) {
G::SendTemporalMessage ('ID_USER_HAVENT_RIGHTS_SYSTEM', "error");
G::header ("location: login.php");die;
}
try {
$frm = $_POST['form'];
$case = '';
$pin = '';
if (isset($frm['CASE'])) {
$case = strtolower(trim($frm['CASE']));
$pin = trim($frm['PIN']);
}
G::LoadClass('case');
$cases = new Cases();
$uid = $cases->verifyCaseTracker($case, $pin);
switch ($uid) {
//The case doesn't exist
case -1:
G::SendTemporalMessage ('ID_CASE_NOT_EXISTS', "error");
break;
//The pin is invalid
case -2:
G::SendTemporalMessage ('ID_PIN_INVALID', "error");
break;
}
if ($uid < 0 ) {
G::header ("location: login.php");
die;
}
if(is_array($uid))
{
require_once ("classes/model/CaseTracker.php");
require_once ("classes/model/CaseTrackerObject.php");
$_SESSION['CASE'] = $case;
$_SESSION['PIN'] = $pin;
$_SESSION['PROCESS'] = $uid['PRO_UID'];
$_SESSION['APPLICATION'] = $uid['APP_UID'];
$_SESSION['TASK'] = -1;
$_SESSION['INDEX'] = -1;
$criteria = new Criteria();
$criteria->add(CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS']);
$caseTracker = new CaseTracker();
if (CaseTrackerPeer::doCount($criteria) === 0) {
$permissionsCaseTracker = array('PRO_UID' => $_SESSION['PROCESS'],
'CT_MAP_TYPE' => 'PROCESSMAP',
'CT_DERIVATION_HISTORY' => 1,
'CT_MESSAGE_HISTORY' => 1);
$caseTracker->create($permissionsCaseTracker);
}
$caseTracker = $cases->caseTrackerPermissions( $_SESSION['PROCESS']);
if ($caseTracker['CT_MAP_TYPE']) {
G::header ('location: tracker_ViewMap');
}
else {
if ($caseTracker['DYNADOC']) {
G::header ("location: tracker_DynaDocs");
}
else {
if ($caseTracker['CT_DERIVATION_HISTORY']) {
G::header ("location: tracker_History");
}
else {
if ($caseTracker['CT_MESSAGE_HISTORY']) {
G::header ("location: tracker_No");
}
else {
G::header ("location: login.php");
G::SendTemporalMessage ('ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error");
}
}
}
}
}
}
catch ( Exception $e ) {
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish' );
die;
}
*/
if (! isset( $_POST['form'] )) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', "error" );
G::header( "location: login.php" );
die();
}
try {
$frm = $_POST['form'];
$case = '';
$pin = '';
if (isset( $frm['CASE'] )) {
$case = strtolower( trim( $frm['CASE'] ) );
$pin = trim( $frm['PIN'] );
}
G::LoadClass( 'case' );
$cases = new Cases();
$uid = $cases->verifyCaseTracker( $case, $pin );
switch ($uid) {
//The case doesn't exist
case - 1:
G::SendTemporalMessage( 'ID_CASE_NOT_EXISTS', "error" );
break;
//The pin is invalid
case - 2:
G::SendTemporalMessage( 'ID_PIN_INVALID', "error" );
break;
}
if ($uid < 0) {
G::header( "location: login.php" );
die();
}
if (is_array( $uid )) {
require_once ("classes/model/CaseTracker.php");
require_once ("classes/model/CaseTrackerObject.php");
$_SESSION['CASE'] = $case;
$_SESSION['PIN'] = $pin;
$_SESSION['PROCESS'] = $uid['PRO_UID'];
$_SESSION['APPLICATION'] = $uid['APP_UID'];
$_SESSION['TASK'] = - 1;
$_SESSION['INDEX'] = - 1;
$criteria = new Criteria();
$criteria->add( CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS'] );
$caseTracker = new CaseTracker();
if (CaseTrackerPeer::doCount( $criteria ) === 0) {
$permissionsCaseTracker = array ('PRO_UID' => $_SESSION['PROCESS'],'CT_MAP_TYPE' => 'PROCESSMAP','CT_DERIVATION_HISTORY' => 1,'CT_MESSAGE_HISTORY' => 1
);
$caseTracker->create( $permissionsCaseTracker );
}
$caseTracker = $cases->caseTrackerPermissions( $_SESSION['PROCESS'] );
if ($caseTracker['CT_MAP_TYPE']) {
G::header( 'location: tracker_ViewMap' );
} else {
if ($caseTracker['DYNADOC']) {
G::header( "location: tracker_DynaDocs" );
} else {
if ($caseTracker['CT_DERIVATION_HISTORY']) {
G::header( "location: tracker_History" );
} else {
if ($caseTracker['CT_MESSAGE_HISTORY']) {
G::header( "location: tracker_No" );
} else {
G::header( "location: login.php" );
G::SendTemporalMessage( 'ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error" );
}
}
}
}
}
} catch (Exception $e) {
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish' );
die();
}

View File

@@ -1,45 +1,39 @@
<?php
/**
* login.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Login for authentication of Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
$G_PUBLISH = new Publisher;
<?php
/**
* login.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Login for authentication of Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
$G_PUBLISH = new Publisher();
//echo G::generateUniqueNumber();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/login', '', '', SYS_URI.'tracker/authentication.php');
G::RenderPage( "publish" );
session_destroy();
session_start();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/login', '', '', SYS_URI . 'tracker/authentication.php' );
G::RenderPage( "publish" );
session_destroy();
session_start();

View File

@@ -1,69 +1,68 @@
<?php
/**
* trackerAjax.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
if (isset($_POST['form']['action'])) {
$_POST['action'] = $_POST['form']['action'];
}
switch ($_POST['action']) {
case 'availableCaseTrackerObjects':
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->availableCaseTrackerObjects($_POST['PRO_UID']);
break;
case 'assignCaseTrackerObject':
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$cto_UID = $oProcessMap->assignCaseTrackerObject($_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID']);
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
echo $cto_UID;
break;
case 'removeCaseTrackerObject':
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->removeCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
break;
case 'upCaseTrackerObject':
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->upCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
break;
case 'downCaseTrackerObject':
G::LoadClass('processMap');
$oProcessMap = new ProcessMap();
$oProcessMap->downCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
break;
case 'editStagesMap':
$oTemplatePower = new TemplatePower(PATH_TPL . 'tracker/stages_Map.html');
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode('
<?php
/**
* trackerAjax.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
if (isset( $_POST['form']['action'] )) {
$_POST['action'] = $_POST['form']['action'];
}
switch ($_POST['action']) {
case 'availableCaseTrackerObjects':
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->availableCaseTrackerObjects( $_POST['PRO_UID'] );
break;
case 'assignCaseTrackerObject':
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
echo $cto_UID;
break;
case 'removeCaseTrackerObject':
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
break;
case 'upCaseTrackerObject':
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
break;
case 'downCaseTrackerObject':
G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap();
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
break;
case 'editStagesMap':
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( '
var pb=leimnud.dom.capture("tag.body 0");
Sm=new stagesmap();
Sm.options = {
@@ -77,366 +76,361 @@ try {
rw : true,
hideMenu : false
};
Sm.make();');
G::RenderPage('publish', 'raw');
break;
case 'showUploadedDocumentTracker':
require_once 'classes/model/AppDocument.php';
require_once 'classes/model/AppDelegation.php';
require_once 'classes/model/InputDocument.php';
require_once 'classes/model/Users.php';
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load($_POST['APP_DOC_UID']);
$oInputDocument = new InputDocument();
if ($oAppDocument->Fields['DOC_UID'] != -1) {
$Fields = $oInputDocument->load($oAppDocument->Fields['DOC_UID']);
}
else {
$Fields = array('INP_DOC_FORM_NEEDED' => '', 'FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
}
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX']);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$oTask = new Task();
$aTask = $oTask->load($aRow['TAS_UID']);
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
$oUser = new Users();
$aUser = $oUser->load($oAppDocument->Fields['USR_UID']);
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
switch ($Fields['INP_DOC_FORM_NEEDED'])
{
case 'REAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
break;
case 'VIRTUAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
break;
case 'VREAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
break;
default:
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
break;
}
$oAppDocument->Fields['VIEW'] = G::LoadTranslation('ID_OPEN');
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
//If plugin and trigger are defined for listing
if ( $oPluginRegistry->existsTrigger ( PM_CASE_DOCUMENT_LIST_ARR ) ) {
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$filesPluginArray=$oPluginRegistry->executeTriggers ( PM_CASE_DOCUMENT_LIST_ARR , $_SESSION['APPLICATION'] );
//Now search for the file, if exists the change the download URL
foreach($filesPluginArray as $file){
if($file->filename==$_POST['APP_DOC_UID']){
$oAppDocument->Fields['FILE'] = $file->downloadScript;
}
}
}
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', G::array_merges($Fields, $oAppDocument->Fields), '');
G::RenderPage('publish', 'raw');
break;
case 'showGeneratedDocumentTracker':
require_once 'classes/model/AppDocument.php';
require_once 'classes/model/AppDelegation.php';
$oAppDocument = new AppDocument();
$aFields = $oAppDocument->load($_POST['APP_DOC_UID']);
require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
$aOD = $oOutputDocument->load($aFields['DOC_UID']);
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::APP_UID, $aFields['APP_UID']);
$oCriteria->add(AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX']);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$oTask = new Task();
$aTask = $oTask->load($aRow['TAS_UID']);
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
require_once 'classes/model/Users.php';
$oUser = new Users();
$aUser = $oUser->load($aFields['USR_UID']);
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
$aFields['VIEW'] = G::LoadTranslation('ID_OPEN');
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
//If plugin and trigger are defined for listing
if ( $oPluginRegistry->existsTrigger ( PM_CASE_DOCUMENT_LIST_ARR ) ) {
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$filesPluginArray=$oPluginRegistry->executeTriggers ( PM_CASE_DOCUMENT_LIST_ARR , $aFields['APP_UID'] );
//Now search for the file, if exists the change the download URL
foreach($filesPluginArray as $file){
if($file->filename==$_POST['APP_DOC_UID']){
$aFields['FILE2'] = $file->downloadScript;// The PDF is the only one uploaded to KT
}
}
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges($aOD, $aFields), '');
G::RenderPage('publish', 'raw');
break;
case 'load':
$oConnection = Propel::getConnection('workflow');
$oStatement = $oConnection->prepareStatement("CREATE TABLE IF NOT EXISTS `STAGE` (
Sm.make();' );
G::RenderPage( 'publish', 'raw' );
break;
case 'showUploadedDocumentTracker':
require_once 'classes/model/AppDocument.php';
require_once 'classes/model/AppDelegation.php';
require_once 'classes/model/InputDocument.php';
require_once 'classes/model/Users.php';
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
$oInputDocument = new InputDocument();
if ($oAppDocument->Fields['DOC_UID'] != - 1) {
$Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] );
} else {
$Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
}
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX'] );
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aRow = $oDataset->getRow();
$oTask = new Task();
$aTask = $oTask->load( $aRow['TAS_UID'] );
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
$oUser = new Users();
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
switch ($Fields['INP_DOC_FORM_NEEDED']) {
case 'REAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
break;
case 'VIRTUAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
break;
case 'VREAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
break;
default:
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
break;
}
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
//If plugin and trigger are defined for listing
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
//Now search for the file, if exists the change the download URL
foreach ($filesPluginArray as $file) {
if ($file->filename == $_POST['APP_DOC_UID']) {
$oAppDocument->Fields['FILE'] = $file->downloadScript;
}
}
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
G::RenderPage( 'publish', 'raw' );
break;
case 'showGeneratedDocumentTracker':
require_once 'classes/model/AppDocument.php';
require_once 'classes/model/AppDelegation.php';
$oAppDocument = new AppDocument();
$aFields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( AppDelegationPeer::APP_UID, $aFields['APP_UID'] );
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX'] );
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aRow = $oDataset->getRow();
$oTask = new Task();
$aTask = $oTask->load( $aRow['TAS_UID'] );
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
require_once 'classes/model/Users.php';
$oUser = new Users();
$aUser = $oUser->load( $aFields['USR_UID'] );
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
//If plugin and trigger are defined for listing
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
//Now search for the file, if exists the change the download URL
foreach ($filesPluginArray as $file) {
if ($file->filename == $_POST['APP_DOC_UID']) {
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
}
}
}
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
G::RenderPage( 'publish', 'raw' );
break;
case 'load':
$oConnection = Propel::getConnection( 'workflow' );
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
`STG_UID` VARCHAR( 32 ) NOT NULL ,
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `STG_UID` )
);");
$oStatement->executeQuery();
/***************************************************************************************************************/
require_once 'classes/model/Stage.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
require_once 'classes/model/AppDelegation.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode(stripslashes($_POST['data']));
$oProcess = new Process();
$aRow = $oProcess->load($oData->uid);
$oSM->title->label = strip_tags($aRow['PRO_TITLE']);
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
$oSM->title->position->x = 10;
$oSM->title->position->y = 10;
$oSM->stages = array();
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(StagePeer::STG_UID);
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
$oCriteria->addSelectColumn(StagePeer::STG_POSX);
$oCriteria->addSelectColumn(StagePeer::STG_POSY);
$aConditions = array();
$aConditions[] = array(0 => StagePeer::STG_UID, 1 => ContentPeer::CON_ID);
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(StagePeer::PRO_UID, $oData->uid);
$oCriteria->addAscendingOrderByColumn(StagePeer::STG_INDEX);
$oDataset = StagePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow1 = $oDataset->getRow()) {
$oStage = null;
$oStage->uid = $aRow1['STG_UID'];
$oStage->label = strip_tags($aRow1['CON_VALUE']);
$oStage->position->x = (int)$aRow1['STG_POSX'];
$oStage->position->y = (int)$aRow1['STG_POSY'];
$oStage->derivation = null;
$oStage->derivation->to = array();
if (!$oData->mode) {
$oCriteria = new Criteria('workflow');
$oCriteria->add(TaskPeer::STG_UID, $aRow1['STG_UID']);
$oDataset1 = TaskPeer::doSelectRS($oCriteria);
$oDataset1->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset1->next();
$aTasks = array();
while ($aRow2 = $oDataset1->getRow()) {
$aTasks[] = $aRow2['TAS_UID'];
$oDataset1->next();
}
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::APP_UID, $_SESSION['APPLICATION']);
$oCriteria->add(AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN);
$oCriteria->add($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL)->addOr($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, '')));
if (AppDelegationPeer::doCount($oCriteria) > 0) {
$oStage->color = '#FF0000';
}
}
$oSM->stages[] = $oStage;
$oDataset->next();
}
foreach ($oSM->stages as $iKey => $oStage) {
if (isset($oSM->stages[$iKey + 1])) {
$oDerivation = new StdClass();
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
$oSM->stages[$iKey]->derivation->to = array($oDerivation);
$oSM->stages[$iKey]->derivation->type = 0;
}
}
$oJSON = new Services_JSON();
echo $oJSON->encode($oSM);
break;
case 'addStage':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode(stripslashes($_POST['data']));
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('STG_UID');
$oCriteria->add(StagePeer::PRO_UID, $oData->uid);
$oDataset = StagePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aStages = array();
$iStageNumber = 0;
while ($aRow = $oDataset->getRow()) {
$aStages[] = $aRow['STG_UID'];
$iStageNumber++;
$oDataset->next();
}
if ($iStageNumber == 0) {
$iStageNumber = 1;
}
$iIndex = $iStageNumber + 1;
$bContinue = false;
while (!$bContinue) {
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('COUNT(*) AS TIMES');
$oCriteria->add(ContentPeer::CON_ID, $aStages, Criteria::IN);
$oCriteria->add(ContentPeer::CON_CATEGORY, 'STG_TITLE');
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
$oCriteria->add(ContentPeer::CON_VALUE, G::LoadTranslation('ID_STAGE') . ' ' . $iStageNumber);
$oDataset = ContentPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
if ((int)$aRow['TIMES'] > 0) {
$iStageNumber += 1;
}
else {
$bContinue = true;
}
}
$oStage = new Stage();
$oNewStage->label = G::LoadTranslation('ID_STAGE') . ' ' . $iStageNumber;
if($oData->position->x < 0) $oData->position->x *= -1;
if($oData->position->y < 0) $oData->position->y *= -1;
$oNewStage->uid = $oStage->create(array('PRO_UID' => $oData->uid, 'STG_TITLE' => $oNewStage->label, 'STG_POSX' => $oData->position->x, 'STG_POSY' => $oData->position->y, 'STG_INDEX' => $iIndex));
$oJSON = new Services_JSON();
echo $oJSON->encode($oNewStage);
break;
case 'saveStagePosition':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode(stripslashes($_POST['data']));
$oStage = new Stage();
$aFields = $oStage->load($oData->uid);
$aFields['STG_UID'] = $oData->uid;
$aFields['STG_POSX'] = $oData->position->x;
$aFields['STG_POSY'] = $oData->position->y;
$oStage->update($aFields);
break;
case 'deleteStage':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode(stripslashes($_POST['data']));
$oStage = new Stage();
$aFields = $oStage->load($oData->stg_uid);
$oStage->remove($oData->stg_uid);
$oStage->reorderPositions($aFields['PRO_UID'], $aFields['STG_INDEX']);
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria('workflow');
$oCriteria1->add(TaskPeer::STG_UID, $oData->stg_uid);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(TaskPeer::STG_UID, '');
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
break;
case 'editStage':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode(stripslashes($_POST['data']));
$oStage = new Stage();
$aFields = $oStage->load($oData->stg_uid);
$aFields['THEINDEX'] = $oData->theindex;
$aFields['action'] = 'updateStage';
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax');
G::RenderPage('publish', 'raw');
break;
case 'updateStage':
require_once 'classes/model/Stage.php';
$oStage = new Stage();
$aFields = $oStage->load($_POST['form']['STG_UID']);
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
$oStage->update($aFields);
break;
case 'tasksAssigned':
require_once 'classes/model/Stage.php';
require_once 'classes/model/Task.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode(stripslashes($_POST['data']));
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(TaskPeer::TAS_UID);
$oCriteria->addAsColumn('TAS_TITLE', ContentPeer::CON_VALUE);
$aConditions = array();
$aConditions[] = array(0 => TaskPeer::TAS_UID, 1 => ContentPeer::CON_ID);
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(TaskPeer::STG_UID, $oData->stg_uid);
$oCriteria->addAscendingOrderByColumn('TAS_TITLE');
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array('PRO_UID' => $oData->pro_uid, 'STG_UID' => $oData->stg_uid));
G::RenderPage('publish', 'raw');
break;
case 'availableTasksForTheStage':
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(TaskPeer::TAS_UID);
$oCriteria->addAsColumn('TAS_TITLE', ContentPeer::CON_VALUE);
$aConditions = array();
$aConditions[] = array(0 => TaskPeer::TAS_UID, 1 => ContentPeer::CON_ID);
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
$oCriteria->add(TaskPeer::PRO_UID, $_POST['PRO_UID']);
$oCriteria->add(TaskPeer::STG_UID, '');
$oCriteria->addAscendingOrderByColumn('TAS_TITLE');
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array('STG_UID' => $_POST['STG_UID']));
G::RenderPage('publish', 'raw');
break;
case 'assignTaskToStage':
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria('workflow');
$oCriteria1->add(TaskPeer::TAS_UID, $_POST['TAS_UID']);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(TaskPeer::STG_UID, $_POST['STG_UID']);
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
break;
case 'removeTaskFromTheStage':
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria('workflow');
$oCriteria1->add(TaskPeer::TAS_UID, $_POST['TAS_UID']);
$oCriteria2 = new Criteria('workflow');
$oCriteria2->add(TaskPeer::STG_UID, '');
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
break;
case "processMapLegend":
$arrayField = array();
$arrayField["sLabel1"] = G::LoadTranslation("ID_TASK_IN_PROGRESS");
$arrayField["sLabel2"] = G::LoadTranslation("ID_COMPLETED_TASK");
$arrayField["sLabel3"] = G::LoadTranslation("ID_PENDING_TASK");
$arrayField["sLabel4"] = G::LoadTranslation("ID_PARALLEL_TASK");
$arrayField["tracker"] = 1;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent("smarty", "cases/cases_Leyends", "", "", $arrayField);
G::RenderPage("publish", "raw");
break;
}
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>
);" );
$oStatement->executeQuery();
/**
* ************************************************************************************************************
*/
require_once 'classes/model/Stage.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
require_once 'classes/model/AppDelegation.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
$oProcess = new Process();
$aRow = $oProcess->load( $oData->uid );
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
$oSM->title->position->x = 10;
$oSM->title->position->y = 10;
$oSM->stages = array ();
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( StagePeer::STG_UID );
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
$oCriteria->addSelectColumn( StagePeer::STG_POSX );
$oCriteria->addSelectColumn( StagePeer::STG_POSY );
$aConditions = array ();
$aConditions[] = array (0 => StagePeer::STG_UID,1 => ContentPeer::CON_ID);
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
$oCriteria->addAscendingOrderByColumn( StagePeer::STG_INDEX );
$oDataset = StagePeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
while ($aRow1 = $oDataset->getRow()) {
$oStage = null;
$oStage->uid = $aRow1['STG_UID'];
$oStage->label = strip_tags( $aRow1['CON_VALUE'] );
$oStage->position->x = (int) $aRow1['STG_POSX'];
$oStage->position->y = (int) $aRow1['STG_POSY'];
$oStage->derivation = null;
$oStage->derivation->to = array ();
if (! $oData->mode) {
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( TaskPeer::STG_UID, $aRow1['STG_UID'] );
$oDataset1 = TaskPeer::doSelectRS( $oCriteria );
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset1->next();
$aTasks = array ();
while ($aRow2 = $oDataset1->getRow()) {
$aTasks[] = $aRow2['TAS_UID'];
$oDataset1->next();
}
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
$oStage->color = '#FF0000';
}
}
$oSM->stages[] = $oStage;
$oDataset->next();
}
foreach ($oSM->stages as $iKey => $oStage) {
if (isset( $oSM->stages[$iKey + 1] )) {
$oDerivation = new StdClass();
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
$oSM->stages[$iKey]->derivation->to = array ($oDerivation);
$oSM->stages[$iKey]->derivation->type = 0;
}
}
$oJSON = new Services_JSON();
echo $oJSON->encode( $oSM );
break;
case 'addStage':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( 'STG_UID' );
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
$oDataset = StagePeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aStages = array ();
$iStageNumber = 0;
while ($aRow = $oDataset->getRow()) {
$aStages[] = $aRow['STG_UID'];
$iStageNumber ++;
$oDataset->next();
}
if ($iStageNumber == 0) {
$iStageNumber = 1;
}
$iIndex = $iStageNumber + 1;
$bContinue = false;
while (! $bContinue) {
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( 'COUNT(*) AS TIMES' );
$oCriteria->add( ContentPeer::CON_ID, $aStages, Criteria::IN );
$oCriteria->add( ContentPeer::CON_CATEGORY, 'STG_TITLE' );
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
$oCriteria->add( ContentPeer::CON_VALUE, G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber );
$oDataset = ContentPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aRow = $oDataset->getRow();
if ((int) $aRow['TIMES'] > 0) {
$iStageNumber += 1;
} else {
$bContinue = true;
}
}
$oStage = new Stage();
$oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber;
if ($oData->position->x < 0)
$oData->position->x *= - 1;
if ($oData->position->y < 0)
$oData->position->y *= - 1;
$oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) );
$oJSON = new Services_JSON();
echo $oJSON->encode( $oNewStage );
break;
case 'saveStagePosition':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
$oStage = new Stage();
$aFields = $oStage->load( $oData->uid );
$aFields['STG_UID'] = $oData->uid;
$aFields['STG_POSX'] = $oData->position->x;
$aFields['STG_POSY'] = $oData->position->y;
$oStage->update( $aFields );
break;
case 'deleteStage':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
$oStage = new Stage();
$aFields = $oStage->load( $oData->stg_uid );
$oStage->remove( $oData->stg_uid );
$oStage->reorderPositions( $aFields['PRO_UID'], $aFields['STG_INDEX'] );
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria( 'workflow' );
$oCriteria1->add( TaskPeer::STG_UID, $oData->stg_uid );
$oCriteria2 = new Criteria( 'workflow' );
$oCriteria2->add( TaskPeer::STG_UID, '' );
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
break;
case 'editStage':
require_once 'classes/model/Stage.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
$oStage = new Stage();
$aFields = $oStage->load( $oData->stg_uid );
$aFields['THEINDEX'] = $oData->theindex;
$aFields['action'] = 'updateStage';
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax' );
G::RenderPage( 'publish', 'raw' );
break;
case 'updateStage':
require_once 'classes/model/Stage.php';
$oStage = new Stage();
$aFields = $oStage->load( $_POST['form']['STG_UID'] );
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
$oStage->update( $aFields );
break;
case 'tasksAssigned':
require_once 'classes/model/Stage.php';
require_once 'classes/model/Task.php';
$oJSON = new Services_JSON();
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
$oCriteria->addAsColumn( 'TAS_TITLE', ContentPeer::CON_VALUE );
$aConditions = array ();
$aConditions[] = array (0 => TaskPeer::TAS_UID,1 => ContentPeer::CON_ID);
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->add( TaskPeer::STG_UID, $oData->stg_uid );
$oCriteria->addAscendingOrderByColumn( 'TAS_TITLE' );
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array ('PRO_UID' => $oData->pro_uid,'STG_UID' => $oData->stg_uid) );
G::RenderPage( 'publish', 'raw' );
break;
case 'availableTasksForTheStage':
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
$oCriteria->addAsColumn( 'TAS_TITLE', ContentPeer::CON_VALUE );
$aConditions = array ();
$aConditions[] = array (0 => TaskPeer::TAS_UID,1 => ContentPeer::CON_ID );
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
$oCriteria->add( TaskPeer::PRO_UID, $_POST['PRO_UID'] );
$oCriteria->add( TaskPeer::STG_UID, '' );
$oCriteria->addAscendingOrderByColumn( 'TAS_TITLE' );
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array ('STG_UID' => $_POST['STG_UID']) );
G::RenderPage( 'publish', 'raw' );
break;
case 'assignTaskToStage':
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria( 'workflow' );
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
$oCriteria2 = new Criteria( 'workflow' );
$oCriteria2->add( TaskPeer::STG_UID, $_POST['STG_UID'] );
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
break;
case 'removeTaskFromTheStage':
require_once 'classes/model/Task.php';
$oCriteria1 = new Criteria( 'workflow' );
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
$oCriteria2 = new Criteria( 'workflow' );
$oCriteria2->add( TaskPeer::STG_UID, '' );
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
break;
case "processMapLegend":
$arrayField = array ();
$arrayField["sLabel1"] = G::LoadTranslation( "ID_TASK_IN_PROGRESS" );
$arrayField["sLabel2"] = G::LoadTranslation( "ID_COMPLETED_TASK" );
$arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" );
$arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" );
$arrayField["tracker"] = 1;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField );
G::RenderPage( "publish", "raw" );
break;
}
} catch (Exception $oException) {
die( $oException->getMessage() );
}

View File

@@ -1,54 +1,51 @@
<?php
/**
* tracker_ConditionsEdit.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (!isset($_SESSION['PROCESS']))
{
G::header('location: login');
}
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/CaseTrackerObject.php';
$oCaseTrackerObject = new CaseTrackerObject();
$aFields = $oCaseTrackerObject->load($_GET['CTO_UID']);
G::LoadClass('xmlfield_InputPM');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave');
G::RenderPage('publish-raw' , 'raw');
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>
<?php
/**
* tracker_ConditionsEdit.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
try {
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
require_once 'classes/model/CaseTrackerObject.php';
$oCaseTrackerObject = new CaseTrackerObject();
$aFields = $oCaseTrackerObject->load( $_GET['CTO_UID'] );
G::LoadClass( 'xmlfield_InputPM' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave' );
G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}

View File

@@ -1,57 +1,54 @@
<?php
/**
* tracker_ConditionsSave.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (!isset($_SESSION['PROCESS']))
{
G::header('location: login');
}
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_FACTORY')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
require_once 'classes/model/CaseTrackerObject.php';
$oCaseTrackerObject = new CaseTrackerObject();
if(isset ($_POST['form']))
$value=$_POST['form'];
else
$value=$_POST;
$aFields = $oCaseTrackerObject->load($value['CTO_UID']);
$aFields['CTO_CONDITION'] = $value['CTO_CONDITION'];
$oCaseTrackerObject->update($aFields);
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>
<?php
/**
* tracker_ConditionsSave.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
try {
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
require_once 'classes/model/CaseTrackerObject.php';
$oCaseTrackerObject = new CaseTrackerObject();
if (isset( $_POST['form'] ))
$value = $_POST['form'];
else
$value = $_POST;
$aFields = $oCaseTrackerObject->load( $value['CTO_UID'] );
$aFields['CTO_CONDITION'] = $value['CTO_CONDITION'];
$oCaseTrackerObject->update( $aFields );
} catch (Exception $oException) {
die( $oException->getMessage() );
}

View File

@@ -1,73 +1,69 @@
<?php
/**
* tracker_ViewMap.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
<?php
/**
* tracker_ViewMap.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* dynaforms & documents for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_SESSION['PROCESS'])) {
G::header('location: login');
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'DYNADOC';
G::LoadClass('processMap');
$oProcessMap = new processMap();
G::LoadClass('case');
$oCase = new Cases();
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load($idProcess);
$noShowTitle = 0;
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
if (isset($aFields['TITLE'])) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $aFields);
}
$G_PUBLISH->AddContent( 'propeltable',
'paged-table',
'tracker/tracker_DynaDocs',
$oProcessMap->getCaseTrackerObjectsCriteria($_SESSION['PROCESS']),
array('VIEW' => G::LoadTranslation('ID_VIEW')));
G::RenderPage('publish');
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'DYNADOC';
G::LoadClass( 'processMap' );
$oProcessMap = new processMap();
G::LoadClass( 'case' );
$oCase = new Cases();
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load( $idProcess );
$noShowTitle = 0;
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
if (isset( $aFields['TITLE'] )) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
}
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_DynaDocs', $oProcessMap->getCaseTrackerObjectsCriteria( $_SESSION['PROCESS'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
) );
G::RenderPage( 'publish' );

View File

@@ -1,70 +1,65 @@
<?php
/**
* tracker_ViewMap.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
<?php
/**
* tracker_ViewMap.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Hystory case for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_SESSION['PROCESS'])) {
G::header('location: login');
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'HISTORY';
G::LoadClass('case');
$oCase = new Cases();
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load($idProcess);
$noShowTitle = 0;
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
if (isset($aFields['TITLE'])) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $aFields);
}
$G_PUBLISH->AddContent( 'propeltable',
'paged-table',
'tracker/tracker_TransferHistory',
Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']),
array());
G::RenderPage('publish');
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'HISTORY';
G::LoadClass( 'case' );
$oCase = new Cases();
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load( $idProcess );
$noShowTitle = 0;
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
if (isset( $aFields['TITLE'] )) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
}
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_TransferHistory', Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] ), array () );
G::RenderPage( 'publish' );

View File

@@ -1,70 +1,67 @@
<?php
/**
* tracker_Messages.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
<?php
/**
* tracker_Messages.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* History messages for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_SESSION['PROCESS'])) {
G::header('location: login');
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'MESSAGES';
$oHeadPublisher->addScriptFile('/jscore/tracker/tracker.js');
G::LoadClass('case');
$oCase = new Cases();
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load($idProcess);
$noShowTitle = 0;
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
if (isset($aFields['TITLE'])) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $aFields);
}
$G_PUBLISH->AddContent( 'propeltable',
'paged-table',
'tracker/tracker_Messages',
Cases::getHistoryMessagesTracker($_SESSION['APPLICATION']),
array('VIEW' => G::LoadTranslation('ID_VIEW')));
G::RenderPage('publish');
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'MESSAGES';
$oHeadPublisher->addScriptFile( '/jscore/tracker/tracker.js' );
G::LoadClass( 'case' );
$oCase = new Cases();
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load( $idProcess );
$noShowTitle = 0;
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
if (isset( $aFields['TITLE'] )) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
}
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Messages', Cases::getHistoryMessagesTracker( $_SESSION['APPLICATION'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
) );
G::RenderPage( 'publish' );

View File

@@ -1,45 +1,44 @@
<?php
/**
* tracker_MessagesView.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Messages for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_SESSION['PROCESS']))
{
G::header('location: login');
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'MESSAGES';
G::LoadClass("case");
$Fields = Cases::getHistoryMessagesTrackerView($_GET['APP_UID'], $_GET['APP_MSG_UID']);
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_MessagesView', '',$Fields);
G::RenderPage('publish');
<?php
/**
* tracker_MessagesView.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Messages for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'MESSAGES';
G::LoadClass( "case" );
$Fields = Cases::getHistoryMessagesTrackerView( $_GET['APP_UID'], $_GET['APP_MSG_UID'] );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_MessagesView', '', $Fields );
G::RenderPage( 'publish' );

View File

@@ -1,45 +1,44 @@
<?php
/**
* tracker_No.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* message for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_SESSION['PROCESS']))
{
G::header('location: login');
}
$G_MAIN_MENU = 'caseTracker';
//$G_ID_MENU_SELECTED = 'DYNADOC';
G::LoadClass('processMap');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_No', '', '');
G::RenderPage('publish');
<?php
/**
* tracker_No.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* message for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
$G_MAIN_MENU = 'caseTracker';
//$G_ID_MENU_SELECTED = 'DYNADOC';
G::LoadClass( 'processMap' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_No', '', '' );
G::RenderPage( 'publish' );

View File

@@ -1,76 +1,72 @@
<?php
/**
* Cases_PrintPreview.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
if (!isset($_SESSION['PROCESS']))
{
G::header('location: login');
}
global $_DBArray;
if (!isset($_DBArray)) {
$_DBArray = array();
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'DYNADOC';
global $G_PUBLISH;
G::LoadClass('case');
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
if(isset($_SESSION['APPLICATION'])){
$array['CASE'] = G::LoadTranslation('ID_CASE');
$array['USER'] = G::LoadTranslation('ID_USER');
$array['WORKSPACE'] = G::LoadTranslation('ID_WORKSPACE');
$array['APP_NUMBER'] = $Fields['APP_NUMBER'];
$array['APP_TITLE'] = $Fields['TITLE'];
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
$array['DATEPRINT'] = date('Y-m-d H:m:s');
}
$array['APP_PROCESS'] = $sProcess;
if(isset($Fields['TITLE']) && strlen($Fields['TITLE'])>0)
$array['TITLE'] = G::LoadTranslation('ID_TITLE');
else
$array['TITLE'] = '';
// $array['PROCESS'] = G::LoadTranslation('ID_PROCESS');
$array['DATELABEL'] = G::LoadTranslation('DATE_LABEL');
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('smarty', 'cases/cases_PrintViewTitle', '', '', $array);
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS']. '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view');
G::RenderPage('publish', 'blank');
} catch (Exception $oException) {
die($oException->getMessage());
}
<?php
/**
* Cases_PrintPreview.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
global $_DBArray;
if (! isset( $_DBArray )) {
$_DBArray = array ();
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'DYNADOC';
global $G_PUBLISH;
G::LoadClass( 'case' );
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
if (isset( $_SESSION['APPLICATION'] )) {
$array['CASE'] = G::LoadTranslation( 'ID_CASE' );
$array['USER'] = G::LoadTranslation( 'ID_USER' );
$array['WORKSPACE'] = G::LoadTranslation( 'ID_WORKSPACE' );
$array['APP_NUMBER'] = $Fields['APP_NUMBER'];
$array['APP_TITLE'] = $Fields['TITLE'];
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
$array['DATEPRINT'] = date( 'Y-m-d H:m:s' );
}
$array['APP_PROCESS'] = $sProcess;
if (isset( $Fields['TITLE'] ) && strlen( $Fields['TITLE'] ) > 0)
$array['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
else
$array['TITLE'] = '';
// $array['PROCESS'] = G::LoadTranslation('ID_PROCESS');
$array['DATELABEL'] = G::LoadTranslation( 'DATE_LABEL' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array );
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>
<script>
@@ -101,4 +97,5 @@ try {
window.print();
} catch(e){}
</script>
</script>

View File

@@ -1,16 +1,17 @@
<?php
if(isset($_POST['form']))
$sValue = $_POST['form']; //For old processmap
else
$sValue = $_POST;
unset($sValue['SAVE']);
if (!isset($sValue['CT_DERIVATION_HISTORY'])) {
$sValue['CT_DERIVATION_HISTORY'] = 0;
}
if (!isset($sValue['CT_MESSAGE_HISTORY'])) {
$sValue['CT_MESSAGE_HISTORY'] = 0;
}
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$oCaseTracker->update($sValue);
<?php
if (isset( $_POST['form'] ))
$sValue = $_POST['form']; //For old processmap
else
$sValue = $_POST;
unset( $sValue['SAVE'] );
if (! isset( $sValue['CT_DERIVATION_HISTORY'] )) {
$sValue['CT_DERIVATION_HISTORY'] = 0;
}
if (! isset( $sValue['CT_MESSAGE_HISTORY'] )) {
$sValue['CT_MESSAGE_HISTORY'] = 0;
}
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$oCaseTracker->update( $sValue );

View File

@@ -1,92 +1,88 @@
<?php
/**
* tracker_Show.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* dynaforms & documents for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (!isset($_SESSION['PROCESS']))
{
G::header('location: login');
}
global $_DBArray;
if (!isset($_DBArray)) {
$_DBArray = array();
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'DYNADOC';
global $G_PUBLISH;
switch ($_GET['CTO_TYPE_OBJ'])
{
case 'DYNAFORM':
G::LoadClass('case');
$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'] = 'alert("Sample"); return false;';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW'] = '#';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW_ACTION'] = 'tracker_PrintView?CTO_UID_OBJ=' . $_GET['CTO_UID_OBJ'] . '&CTO_TYPE_OBJ=PRINT_PREVIEW';
$_SESSION['CTO_UID_OBJ'] = $_GET['CTO_UID_OBJ'];
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS']. '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'],'','','view');
G::RenderPage('publish');
break;
case 'INPUT_DOCUMENT':
G::LoadClass('case');
$oCase = new Cases();
$c = $oCase->getAllUploadedDocumentsCriteriaTracker($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ']);
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/tracker/tracker.js');
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_Inputdocs', $c);
G::RenderPage('publish');
break;
case 'OUTPUT_DOCUMENT':
G::LoadClass('case');
$oCase = new Cases();
$c = $oCase->getAllGeneratedDocumentsCriteriaTracker($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ']);
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/tracker/tracker.js');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_Outputdocs', $c);
G::RenderPage('publish');
break;
}
?>
<?php
/**
* tracker_Show.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* dynaforms & documents for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
global $_DBArray;
if (! isset( $_DBArray )) {
$_DBArray = array ();
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'DYNADOC';
global $G_PUBLISH;
switch ($_GET['CTO_TYPE_OBJ']) {
case 'DYNAFORM':
G::LoadClass( 'case' );
$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'] = 'alert("Sample"); return false;';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW'] = '#';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW_ACTION'] = 'tracker_PrintView?CTO_UID_OBJ=' . $_GET['CTO_UID_OBJ'] . '&CTO_TYPE_OBJ=PRINT_PREVIEW';
$_SESSION['CTO_UID_OBJ'] = $_GET['CTO_UID_OBJ'];
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish' );
break;
case 'INPUT_DOCUMENT':
G::LoadClass( 'case' );
$oCase = new Cases();
$c = $oCase->getAllUploadedDocumentsCriteriaTracker( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ'] );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/tracker/tracker.js' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Inputdocs', $c );
G::RenderPage( 'publish' );
break;
case 'OUTPUT_DOCUMENT':
G::LoadClass( 'case' );
$oCase = new Cases();
$c = $oCase->getAllGeneratedDocumentsCriteriaTracker( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ'] );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/tracker/tracker.js' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Outputdocs', $c );
G::RenderPage( 'publish' );
break;
}

View File

@@ -1,85 +1,82 @@
<?php
/**
* tracker_ShowDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
require_once ( "classes/model/AppDocumentPeer.php" );
$oAppDocument = new AppDocument();
if(!isset($_GET['v'])){//Load last version of the document
$docVersion=$oAppDocument->getLastAppDocVersion($_GET['a']);
}else{
$docVersion=$_GET['v'];
}
$oAppDocument->Fields = $oAppDocument->load($_GET['a'],$docVersion);
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
$ext = $info['extension'];
if (isset($_GET['b'])) {
if ($_GET['b'] == '0') {
$bDownload = false;
}
else {
$bDownload = true;
}
}
else {
$bDownload = true;
}
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid .'_'.$iDocVersion . '.' . $ext ;
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext ;
$sw_file_exists=false;
if(file_exists($realPath)){
$sw_file_exists=true;
}elseif(file_exists($realPath1)){
$sw_file_exists=true;
$realPath=$realPath1;
}
if(!$sw_file_exists){
$error_message="'".$oAppDocument->Fields['APP_DOC_FILENAME']. "' ".G::LoadTranslation('ID_ERROR_STREAMING_FILE');
if((isset($_POST['request']))&&($_POST['request']==true)){
$res ['success'] = 'failure';
$res ['message'] = $error_message;
print G::json_encode ( $res );
}else{
G::SendMessageText($error_message, "ERROR");
$backUrlObj=explode("sys".SYS_SYS,$_SERVER['HTTP_REFERER']);
G::header("location: "."/sys".SYS_SYS.$backUrlObj[1]);
die;
}
}else{
if((isset($_POST['request']))&&($_POST['request']==true)){
$res ['success'] = 'success';
$res ['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
print G::json_encode ( $res );
}else{
G::streamFile ( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
}
}
<?php
/**
* tracker_ShowDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
if (! isset( $_GET['v'] )) { //Load last version of the document
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
} else {
$docVersion = $_GET['v'];
}
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
$ext = $info['extension'];
if (isset( $_GET['b'] )) {
if ($_GET['b'] == '0') {
$bDownload = false;
} else {
$bDownload = true;
}
} else {
$bDownload = true;
}
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
$sw_file_exists = true;
$realPath = $realPath1;
}
if (! $sw_file_exists) {
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
print G::json_encode( $res );
} else {
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
}
}

View File

@@ -1,89 +1,86 @@
<?php
/**
* cases_ShowOutputDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
<?php
/**
* cases_ShowOutputDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Created on 13-02-2008
*
* @author David Callizaya <davidsantos@colosa.com>
*/
require_once ( "classes/model/AppDocumentPeer.php" );
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load($_GET['a'],(isset($_GET['v']) )? $_GET['v'] : NULL );
$sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (!isset($_GET['ext'])) {
$ext = $info['extension'];
}
else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
}
else {
$ext = $info['extension'];
}
}
$ver= (isset($_GET['v']) && $_GET['v']!='') ? '_'.$_GET['v'] : '';
if(!$ver) //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 ;
$sw_file_exists=false;
if(file_exists($realPath)){
$sw_file_exists=true;
}elseif(file_exists($realPath1)){
$sw_file_exists=true;
$realPath=$realPath1;
}elseif(file_exists($realPath2)){
$sw_file_exists=true;
$realPath=$realPath2;
}
if(!$sw_file_exists){
$error_message="'".$info['basename'] .$ver. '.' . $ext."' ".G::LoadTranslation('ID_ERROR_STREAMING_FILE');
if((isset($_POST['request']))&&($_POST['request']==true)){
$res ['success'] = 'failure';
$res ['message'] = $error_message;
print G::json_encode ( $res );
}else{
G::SendMessageText($error_message, "ERROR");
$backUrlObj=explode("sys".SYS_SYS,$_SERVER['HTTP_REFERER']);
G::header("location: "."/sys".SYS_SYS.$backUrlObj[1]);
die;
}
}else{
if((isset($_POST['request']))&&($_POST['request']==true)){
$res ['success'] = 'success';
$res ['message'] = $info['basename'] .$ver. '.' . $ext;
print G::json_encode ( $res );
}else{
G::streamFile ( $realPath, true ,$info['basename'] .$ver. '.' . $ext );
}
}
//G::streamFile ( $realPath, true);
?>
*/
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : NULL );
$sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
} else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
} else {
$ext = $info['extension'];
}
}
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
if (! $ver) //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;
$sw_file_exists = false;
if (file_exists( $realPath )) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
$sw_file_exists = true;
$realPath = $realPath1;
} elseif (file_exists( $realPath2 )) {
$sw_file_exists = true;
$realPath = $realPath2;
}
if (! $sw_file_exists) {
$error_message = "'" . $info['basename'] . $ver . '.' . $ext . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $info['basename'] . $ver . '.' . $ext;
print G::json_encode( $res );
} else {
G::streamFile( $realPath, true, $info['basename'] . $ver . '.' . $ext );
}
}
//G::streamFile ( $realPath, true);

View File

@@ -1,79 +1,78 @@
<?php
/**
* tracker_ViewMap.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
<?php
/**
* tracker_ViewMap.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* 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/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/*
* Map for Case Tracker
*
* @author Everth S. Berrios Morales <everth@colosa.com>
*
*/
require_once 'classes/model/Process.php';
if (!isset($_SESSION['PROCESS'])) {
G::header('location: login');
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'MAP';
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$aCaseTracker = $oCaseTracker->load($_SESSION['PROCESS']);
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load($idProcess);
$noShowTitle = 0;
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
switch (($aCaseTracker['CT_MAP_TYPE'])) {
case 'NONE':
*/
require_once 'classes/model/Process.php';
if (! isset( $_SESSION['PROCESS'] )) {
G::header( 'location: login' );
}
$G_MAIN_MENU = 'caseTracker';
$G_ID_MENU_SELECTED = 'MAP';
require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker();
$aCaseTracker = $oCaseTracker->load( $_SESSION['PROCESS'] );
$idProcess = $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load( $idProcess );
$noShowTitle = 0;
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
switch (($aCaseTracker['CT_MAP_TYPE'])) {
case 'NONE':
//Nothing
break;
case 'PROCESSMAP':
G::LoadClass('case');
G::LoadClass('processMap');
$oCase = new Cases();
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
if (isset($aFields['TITLE'])) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $aFields);
}
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode('
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
break;
case 'PROCESSMAP':
G::LoadClass( 'case' );
G::LoadClass( 'processMap' );
$oCase = new Cases();
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
if (isset( $aFields['TITLE'] )) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
}
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( '
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
leimnud.event.add(window,"load",function(){
var pb = leimnud.dom.capture("tag.body 0");
pm = new processmap();
@@ -133,30 +132,30 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
}.extend(this);
rpcRequest.make();
});');
G::RenderPage('publish');
break;
case 'STAGES':
G::LoadClass('case');
$oCase = new Cases();
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
if (isset($aFields['TITLE'])) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
$oTemplatePower = new TemplatePower(PATH_TPL . 'tracker/stages_Map.html');
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $aFields);
}
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode('
});' );
G::RenderPage( 'publish' );
break;
case 'STAGES':
G::LoadClass( 'case' );
$oCase = new Cases();
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
if (isset( $aFields['TITLE'] )) {
$aFields['APP_TITLE'] = $aFields['TITLE'];
}
if ($aFields['APP_PROC_CODE'] != '') {
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
}
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher();
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
}
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( '
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
leimnud.event.add(window,"load",function(){
var pb=leimnud.dom.capture("tag.body 0");
@@ -174,7 +173,8 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
hideMenu : false
};
Sm.make();
});');
G::RenderPage('publish');
break;
}
});' );
G::RenderPage( 'publish' );
break;
}