Merge pull request #810 from norahmollo/master

CODE STYLE Formating workflow/engine/methods/cases
This commit is contained in:
ferOnti
2012-10-18 09:18:15 -07:00
73 changed files with 8610 additions and 8737 deletions

View File

@@ -167,3 +167,4 @@ catch ( Exception $e ){
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage('publish');
}

View File

@@ -20,19 +20,16 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
function casesShowOuputDocumentExist($url){
function casesShowOuputDocumentExist ($url)
{
$urlArray = explode( "?", $url );
$urlParametroString = $urlArray[1];
parse_str( $urlParametroString, $_GET );
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
@@ -42,12 +39,10 @@
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
}
else {
} else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
}
else {
} else {
$ext = $info['extension'];
}
}
@@ -82,7 +77,7 @@
$oHeadPublisher = & headPublisher::getSingleton();
G::loadClass( 'configuration' );
$conf = new Configurations;
$conf = new Configurations();
$oHeadPublisher->addExtJsScript( 'cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesGenerateDocumentPage' ); //adding a html file .html.
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
@@ -101,8 +96,7 @@
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
if ($c->getDbName() == 'dbarray') {
$rs = ArrayBasePeer::doSelectRs( $c );
}
else{
} else {
$rs = GulliverBasePeer::doSelectRs( $c );
}
@@ -118,7 +112,6 @@
$aProcesses[] = $result;
$rs->next();
$totalCount ++;
}
@@ -128,8 +121,7 @@
$conf = new Configurations();
try {
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
}
catch (Exception $e){
} catch (Exception $e) {
$generalConfCasesList = array ();
}
$dateFormat = "";
@@ -137,8 +129,6 @@
$dateFormat = $generalConfCasesList['casesListDateFormat'];
}
$newDir = '/tmp/test/directory';
$r = G::verifyPath( $newDir );
$r->data = $aProcesses;
@@ -146,4 +136,4 @@
$r->dataFormat = $dateFormat;
echo G::json_encode( $r );
}
?>

View File

@@ -20,17 +20,15 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
if ($actionAjax == "historyDynaformPage") {
global $G_PUBLISH;
$oHeadPublisher = & headPublisher::getSingleton();
G::loadClass( 'configuration' );
$conf = new Configurations;
$conf = new Configurations();
$oHeadPublisher->addExtJsScript( 'cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/caseHistoryDynaformPage' ); //adding a html file .html.
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
@@ -48,8 +46,7 @@
if ($c->getDbName() == 'dbarray') {
$rs = ArrayBasePeer::doSelectRs( $c );
}
else{
} else {
$rs = GulliverBasePeer::doSelectRs( $c );
}
@@ -71,7 +68,6 @@
echo G::json_encode( $r );
}
if ($actionAjax == 'showHistoryMessage') {
?>
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
@@ -79,6 +75,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -110,7 +107,6 @@
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
?>
<script language="javascript">
<?php
@@ -138,6 +134,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -224,6 +221,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -250,7 +248,6 @@
$_POST['DYN_UID'] = $_REQUEST['DYN_UID'];
$_POST['HISTORY_ID'] = $_REQUEST['HISTORY_ID'];
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$FieldsHistory = unserialize( $_SESSION['HISTORY_DATA'] );
@@ -261,7 +258,6 @@
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
?>
<script language="javascript">
<?php
@@ -283,6 +279,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -337,5 +334,5 @@ function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
<?php
G::RenderPage( 'publish', 'raw' );
}

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,7 @@ if (isset($_GET['ux'])) {
default:
$url = 'casesListExtJs';
}
}
else {
} else {
$url = 'casesListExtJs';
}
@@ -29,3 +28,4 @@ if (isset($_GET['ux'])) {
?>
}
</script>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
require_once 'classes/model/Application.php';
require_once 'classes/model/Users.php';
@@ -45,7 +44,8 @@
global $oAppCache;
$oAppCache = new AppCacheView();
$processes = Array ();
$processes[] = array ( '', G::LoadTranslation('ID_ALL_PROCESS') );
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' )
);
//get the list based in the action provided
switch ($action) {
@@ -60,7 +60,7 @@
//in search action, the query to obtain all process is too slow, so we need to query directly to
//process and content tables, and for that reason we need the current language in AppCacheView.
G::loadClass( 'configuration' );
$oConf = new Configurations;
$oConf = new Configurations();
$oConf->loadConfig( $x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '' );
$appCacheViewEngine = $oConf->aConfig;
$lang = isset( $appCacheViewEngine['LANG'] ) ? $appCacheViewEngine['LANG'] : 'en';
@@ -74,9 +74,12 @@
}
$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 );
@@ -84,7 +87,8 @@
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$processes[] = array ( $aRow['PRO_UID'], $aRow['CON_VALUE'] );
$processes[] = array ($aRow['PRO_UID'],$aRow['CON_VALUE']
);
$oDataset->next();
}
return print G::json_encode( $processes );
@@ -127,7 +131,8 @@
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$processes[] = array ( $aRow['PRO_UID'], $aRow['APP_PRO_TITLE'] );
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']
);
$oDataset->next();
}
return print G::json_encode( $processes );
@@ -147,7 +152,6 @@
$_SESSION['APPLICATION'] = $APP_UID;
$_SESSION['INDEX'] = $DEL_INDEX;
$cases = new Cases();
$user = new Users();
$app = new Application();
@@ -170,10 +174,8 @@
print G::json_encode( $result );
}
if ($actionAjax == 'showHistoryMessage') {
?>
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
@@ -181,6 +183,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -212,7 +215,6 @@
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
?>
<script language="javascript">
<?php
@@ -240,6 +242,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -326,6 +329,7 @@
html {
color: black !important;
}
body {
color: black !important;
}
@@ -352,7 +356,6 @@
$_POST['DYN_UID'] = $_REQUEST['DYN_UID'];
$_POST['HISTORY_ID'] = $_REQUEST['HISTORY_ID'];
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$FieldsHistory = unserialize( $_SESSION['HISTORY_DATA'] );
@@ -363,7 +366,6 @@
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
?>
<script language="javascript">
<?php
@@ -385,14 +387,13 @@
html {
color: black !important;
}
body {
color: black !important;
}
</style>
<script language="Javascript">
//!Code that simulated reload library javascript maborak
var leimnud = {};
leimnud.exec = "";
@@ -435,5 +436,5 @@
<?php
G::RenderPage( 'publish', 'raw' );
}

View File

@@ -17,8 +17,8 @@
break;
}
function getLoadTreeMenuData () {
function getLoadTreeMenuData ()
{
header( "content-type: text/xml" );
global $G_TMP_MENU;
@@ -26,28 +26,14 @@
$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['count'] = ' ';
@@ -80,10 +66,7 @@
$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]] )) {
@@ -105,8 +88,7 @@
$i ++;
if (isset( $aMenu['cases_count'] ) && $aMenu['cases_count'] !== '') {
$nofifier = "cases_count=\"{$aMenu['cases_count']}\" ";
}
else {
} else {
$nofifier = '';
}
$xml .= '<option title="' . $aMenu['label'] . '" id="' . $id . '" ' . $nofifier . ' url="' . $aMenu['link'] . '">';
@@ -128,11 +110,12 @@
}
// get the process summary of specific case list type,
function getProcess () {
function getProcess ()
{
global $G_TMP_MENU;
global $userId;
if (! isset( $_GET['item'] )) {
die;
die();
}
$oMenu = new Menu();
@@ -150,9 +133,11 @@
$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);
$aCount = $oCases->getAllCounters( Array ($aTypesID[$type]
), $userId, true );
$response = Array ();
//disabling the summary...
@@ -183,7 +168,8 @@
echo G::json_encode( $response );
}
function getAllCounters() {
function getAllCounters ()
{
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
$oAppCache = new AppCacheView();
$aTypes = Array ();
@@ -197,6 +183,7 @@
//$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'] );
@@ -204,11 +191,11 @@
$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 {
} else {
$aCount = $oAppCache->getAllCounters( array_keys( $aTypes ), $userUid );

View File

@@ -20,12 +20,12 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//validate the data post
//$oForm = new Form ( $_SESSION ['PROCESS'] . '/' . $_GET ['UID'], PATH_DYNAFORM );
//$oForm->validatePost ();
/* @author Alvaro Campos Sanchez */
/* Includes */
G::LoadClass( 'case' );
@@ -64,7 +64,6 @@ if ($_SESSION ['TRIGGER_DEBUG'] ['NUM_TRIGGERS'] != 0) {
//Execute after triggers - End
}
//go to the next step
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
if (isset( $_GET['_REFRESH_'] )) {

View File

@@ -20,14 +20,12 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
G::LoadInclude( 'ajax' );
$_POST['action'] = get_ajax_value( 'action' );
switch ($_POST['action'])
{
switch ($_POST['action']) {
case 'updatePageSize':
G::LoadClass( 'configuration' );
$c = new Configurations();
@@ -41,4 +39,4 @@ switch ($_POST['action'])
break;
break;
}
?>

View File

@@ -14,6 +14,7 @@ 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,5 +44,5 @@ switch($page){
}
G::RenderPage( 'publish', 'extJs' );

View File

@@ -1,5 +1,4 @@
<?php
if (! isset( $_REQUEST['action'] )) {
$res['success'] = 'failure';
$res['message'] = 'You may request an action';
@@ -18,7 +17,8 @@ $functionParams = isset ( $_REQUEST ['params'] ) ? $_REQUEST ['params'] : array
$functionName( $functionParams );
function getProcessList() {
function getProcessList ()
{
G::LoadClass( 'case' );
G::LoadClass( 'process' );
G::LoadClass( 'calendar' );
@@ -53,7 +53,6 @@ function getProcessList() {
$node = $_REQUEST['node'];
}
foreach ($proData as $key => $proInfo) {
$proData[$proInfo['PRO_UID']] = $proInfo;
}
@@ -96,6 +95,7 @@ function getProcessList() {
//$tempTree['cls']='file';
$tempTreeChildren[] = $tempTreeChild;
}
}
@@ -136,7 +136,8 @@ function getProcessList() {
die();
}
function ellipsis($text, $numb) {
function ellipsis ($text, $numb)
{
$text = html_entity_decode( $text, ENT_QUOTES );
if (strlen( $text ) > $numb) {
$text = substr( $text, 0, $numb );
@@ -152,7 +153,8 @@ function ellipsis($text, $numb) {
return $text;
}
function lookinginforContentProcess($sproUid){
function lookinginforContentProcess ($sproUid)
{
require_once 'classes/model/Content.php';
require_once 'classes/model/Task.php';
require_once 'classes/model/Content.php';
@@ -205,17 +207,22 @@ function ellipsis($text, $numb) {
}
function startCase() {
function startCase ()
{
G::LoadClass( 'case' );
/* GET , POST & $_SESSION Vars */
/* unset any variable, because we are starting a new case */
if (isset ( $_SESSION ['APPLICATION'] )) unset ( $_SESSION ['APPLICATION'] );
if (isset ( $_SESSION ['PROCESS'] )) unset ( $_SESSION ['PROCESS'] );
if (isset ( $_SESSION ['TASK'] )) unset ( $_SESSION ['TASK'] );
if (isset ( $_SESSION ['INDEX'] )) unset ( $_SESSION ['INDEX'] );
if (isset ( $_SESSION ['STEP_POSITION'] )) unset ( $_SESSION ['STEP_POSITION'] );
if (isset( $_SESSION['APPLICATION'] ))
unset( $_SESSION['APPLICATION'] );
if (isset( $_SESSION['PROCESS'] ))
unset( $_SESSION['PROCESS'] );
if (isset( $_SESSION['TASK'] ))
unset( $_SESSION['TASK'] );
if (isset( $_SESSION['INDEX'] ))
unset( $_SESSION['INDEX'] );
if (isset( $_SESSION['STEP_POSITION'] ))
unset( $_SESSION['STEP_POSITION'] );
/* Process */
try {
@@ -248,15 +255,15 @@ function startCase() {
$aData['status'] = 'success';
print (G::json_encode( $aData )) ;
}
catch ( Exception $e ) {
} catch (Exception $e) {
$aData['status'] = 'failure';
$aData['message'] = $e->getMessage();
print_r( G::json_encode( $aData ) );
}
}
function getSimpleDashboardData() {
function getSimpleDashboardData ()
{
G::LoadClass( "BasePeer" );
require_once ("classes/model/AppCacheView.php");
require_once 'classes/model/Process.php';
@@ -282,8 +289,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 );
@@ -310,9 +319,11 @@ function getSimpleDashboardData() {
if ($aRow['USR_UID'] == "")
$aRow['APP_STATUS'] = "UNASSIGNED";
if (((in_array ( $aRow ['APP_STATUS'], array ("TO_DO", "UNASSIGNED" ) )) && ($aRow ['APP_THREAD_STATUS'] == "OPEN")) || ($aRow ['APP_STATUS'] == "DRAFT")) {
if (((in_array( $aRow['APP_STATUS'], array ("TO_DO","UNASSIGNED"
) )) && ($aRow['APP_THREAD_STATUS'] == "OPEN")) || ($aRow['APP_STATUS'] == "DRAFT")) {
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']][$aRow['DEL_DELAYED']][] = $aRow['APP_UID'];
if(!isset($rows [$processNames [$aRow ['PRO_UID']]] [$aRow ['APP_STATUS']]['count'])) $rows [$processNames [$aRow ['PRO_UID']]] [$aRow ['APP_STATUS']]['count']=0;
if (! isset( $rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] ))
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] = 0;
$rows[$processNames[$aRow['PRO_UID']]][$aRow['APP_STATUS']]['count'] ++;
}
@@ -324,26 +335,32 @@ function getSimpleDashboardData() {
foreach ($rows as $processID => $processInfo) {
$i ++;
if ($i <= 10) {
$rowsResponse['caseStatusByProcess'][]=array('process'=>$processID,'inbox'=>isset($processInfo['TO_DO']['count'])?$processInfo['TO_DO']['count']:0,'draft'=>isset($processInfo['DRAFT']['count'])?$processInfo['DRAFT']['count']:0,'unassigned'=>isset($processInfo['UNASSIGNED']['count'])?$processInfo['UNASSIGNED']['count']:0);
$rowsResponse['caseStatusByProcess'][] = array ('process' => $processID,'inbox' => isset( $processInfo['TO_DO']['count'] ) ? $processInfo['TO_DO']['count'] : 0,'draft' => isset( $processInfo['DRAFT']['count'] ) ? $processInfo['DRAFT']['count'] : 0,'unassigned' => isset( $processInfo['UNASSIGNED']['count'] ) ? $processInfo['UNASSIGNED']['count'] : 0
);
}
}
$rowsResponse['caseDelayed'][]=array('delayed'=>'On Time','total'=>100);
$rowsResponse['caseDelayed'][]=array('delayed'=>'Delayed','total'=>50);
$rowsResponse['caseDelayed'][] = array ('delayed' => 'On Time','total' => 100
);
$rowsResponse['caseDelayed'][] = array ('delayed' => 'Delayed','total' => 50
);
print_r( G::json_encode( $rowsResponse ) );
}
function getRegisteredDashboards() {
function getRegisteredDashboards ()
{
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$dashBoardPages = $oPluginRegistry->getDashboardPages();
print_r( G::json_encode( $dashBoardPages ) );
}
function getDefaultDashboard(){
function getDefaultDashboard ()
{
$defaultDashboard['defaultTab'] = "mainDashboard";
if (isset( $_SESSION['__currentTabDashboard'] )) {
$defaultDashboard['defaultTab'] = $_SESSION['__currentTabDashboard'];
}
print_r( G::json_encode( $defaultDashboard ) );
}

View File

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

View File

@@ -1,7 +1,7 @@
<?php
class TreeNode {
class TreeNode
{
public $text = "";
public $id = "";
public $iconCls = "";
@@ -10,8 +10,8 @@ class TreeNode {
public $href = "#";
public $hrefTarget = "";
function __construct($id,$text,$iconCls,$leaf,$draggable,$href,$hrefTarget) {
function __construct ($id, $text, $iconCls, $leaf, $draggable, $href, $hrefTarget)
{
$this->id = $id;
$this->text = $text;
$this->iconCls = $iconCls;
@@ -21,18 +21,23 @@ class TreeNode {
$this->hrefTarget = $hrefTarget;
}
function toJson() {
function toJson ()
{
return G::json_encode( $this );
}
}
class ExtJsTreeNode extends TreeNode {
class ExtJsTreeNode extends TreeNode
{
public $children = array ();
function add($object) {
function add ($object)
{
$this->children[] = $object;
}
function toJson() {
function toJson ()
{
return G::json_encode( $this );
}
}
@@ -91,3 +96,4 @@ $treeArray = array();
}
echo $extTreeInputDocs->toJson();
echo "]";

View File

@@ -20,29 +20,25 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
if (isset( $_POST['form']['BTN_CANCEL'] )) {
header( "Location: ../cases/main" );
die;
die();
}
/* Includes */
@@ -67,16 +63,12 @@ $validation = (SYS_SKIN != 'uxs')? 'true' : 'false';
die( '<script type="text/javascript">
if (' . $validation . ') {
if (window.parent.frames.length != 0) {
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] .
'&action=unassigned";
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
} else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
$_SESSION['INDEX'] . '&action=unassigned";
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
}
} else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
$_SESSION['INDEX'] . '&action=unassigned";
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
}
</script>'
);
</script>' );

View File

@@ -20,20 +20,18 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -43,7 +41,6 @@ G::LoadClass('case');
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
/* Render page */
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
@@ -67,8 +64,7 @@ try {
$oCurUser = new Users();
$oCurUser->load( $aAppDel['USR_UID'] );
$Fields['PREVIOUS_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
}
catch (Exception $oError) {
} catch (Exception $oError) {
$Fields['PREVIOUS_USER'] = '';
}
@@ -104,7 +100,7 @@ $oHeadPublisher->addScriptCode('
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute' );
G::RenderPage( 'publish', 'blank' );

View File

@@ -20,20 +20,18 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -57,4 +55,3 @@ try{
echo $e->getMessage();
}

View File

@@ -20,20 +20,18 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -48,16 +46,14 @@ $oAppDocument = new AppDocument();
$oAppDocument->remove( $_GET['DOC'] );
$oCase = new Cases();
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
if ($_GET['TYPE'] == 'INPUT')
{
if ($_GET['TYPE'] == 'INPUT') {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
}
if ($_GET['TYPE'] == 'OUTPUT')
{
if ($_GET['TYPE'] == 'OUTPUT') {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
}
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
/* Redirect */
G::header( 'location: ' . $aNextStep['PAGE'] );
?>

View File

@@ -20,20 +20,18 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -49,3 +47,4 @@ $oAppDocument->remove($_GET['DOC']);
/* Redirect */
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );

View File

@@ -20,22 +20,19 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -83,14 +80,10 @@ try {
$oCase->updateCase( $_SESSION['APPLICATION'], $appFields ); //Save data
//derivate case
$oDerivation = new Derivation();
$aCurrentDerivation = array(
'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX'],
'APP_STATUS' => $sStatus,
'TAS_UID' => $_SESSION['TASK'],
'ROU_TYPE' => $_POST['form']['ROU_TYPE']
$aCurrentDerivation = array ('APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'APP_STATUS' => $sStatus,'TAS_UID' => $_SESSION['TASK'],'ROU_TYPE' => $_POST['form']['ROU_TYPE']
);
$oDerivation->derivate( $aCurrentDerivation, $_POST['form']['TASKS'] );
@@ -100,6 +93,7 @@ try {
if (sizeof( $triggers ) > 0) {
$appFields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'ASSIGN_TASK', - 2, 'AFTER', $appFields['APP_DATA'] ); //Execute triggers after derivation
$_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
@@ -121,6 +115,7 @@ try {
}
// Send notifications - End
// Events - Start
$oEvent = new Event();
@@ -137,8 +132,7 @@ try {
if (! $multipleDelegation) {
$aCurrentAppDel = $oCurrentAppDel->toArray( BasePeer::TYPE_FIELDNAME );
$oEvent->createAppEvents( $aCurrentAppDel['PRO_UID'], $aCurrentAppDel['APP_UID'], $aCurrentAppDel['DEL_INDEX'], $aCurrentAppDel['TAS_UID'] );
}
else {
} else {
// else we need to check every task and create the events if it have any
foreach ($_POST['form']['TASKS'] as $taskDelegated) {
$aCurrentAppDel = $oCurrentAppDel->toArray( BasePeer::TYPE_FIELDNAME );
@@ -152,16 +146,14 @@ try {
if (isset( $_SESSION['user_experience'] )) {
$aNextStep['PAGE'] = 'casesListExtJsRedirector?ux=' . $_SESSION['user_experience'];
$debuggerAvailable = false;
}
else {
} else {
$aNextStep['PAGE'] = 'casesListExtJsRedirector';
}
if (isset( $_SESSION['PMDEBUGGER'] ) && $_SESSION['PMDEBUGGER'] && $debuggerAvailable) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
$loc = 'cases_Step?' . 'breakpoint=triggerdebug';
}
else {
} else {
$loc = $aNextStep['PAGE'];
}
//Triggers After
@@ -169,7 +161,7 @@ try {
if ($_SESSION['TRIGGER_DEBUG']['ISSET'] == 1) {
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$_POST['NextStep'] = $loc;
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameLoader' );
@@ -183,11 +175,11 @@ try {
}
G::header( "location: $loc" );
}
catch ( Exception $e ) {
} catch (Exception $e) {
$aMessage = array ();
$aMessage['MESSAGE'] = $e->getMessage() . '<br>' . $e->getTraceAsString();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish', 'blank' );
}

View File

@@ -20,16 +20,17 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* Cases list (Refactored)
* By Erik A. O. <erik@colosa.com, aortiz.erik@gmail.com>
* By Erik A.
* O. <erik@colosa.com, aortiz.erik@gmail.com>
*/
/* Permissions */
if (($RBAC_Response = $RBAC->userCanAccess("PM_CASES"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_CASES" )) != 1)
return $RBAC_Response;
/* Includes */
G::LoadClass( 'case' );
@@ -37,19 +38,19 @@ G::LoadClass('configuration');
// $_GET['l'] has the type of cases list like todo,pause,cancel, all
$conf = new Configurations();
if (! isset( $_GET['l'] )) {
$confCasesList = $conf->loadObject( 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
if (is_array( $confCasesList )) {
$sTypeList = $confCasesList['sTypeList'];
}
else {
} else {
$sTypeList = 'to_do';
}
}
else {
} else {
$sTypeList = $_GET['l'];
$confCasesList=array('sTypeList'=>$sTypeList);
$confCasesList = array ('sTypeList' => $sTypeList
);
$conf->saveObject( $confCasesList, 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
}
@@ -58,7 +59,9 @@ $_SESSION['CASES_MENU_OPTION'] = $sTypeList;
$oCases = new Cases();
/** here we verify if there is a any case with a unpause on this day*/
/**
* here we verify if there is a any case with a unpause on this day
*/
if ($sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
$oCases->ThrowUnpauseDaemon( date( 'Y-m-d' ) );
}
@@ -70,7 +73,6 @@ if( $sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused')
$aAdditionalFilter = Array ();
if (isset( $_GET['PROCESS_UID'] ) and $_GET['PROCESS_UID'] != "0" && $_GET['PROCESS_UID'] != "") {
$PRO_UID = $_GET['PROCESS_UID'];
$aAdditionalFilter['PRO_UID'] = $PRO_UID;
@@ -92,16 +94,12 @@ if( isset($_GET['MINE']) and $_GET['MINE'] == "1" ){
$aAdditionalFilter['MINE'] = $_GET['MINE'];
}
switch ($sTypeList) {
case 'to_do':
if (defined( 'ENABLE_CASE_LIST_OPTIMIZATION' )) {
$aCriteria = $oCases->prepareCriteriaForToDo( $sUIDUserLogged );
$xmlfile = 'cases/cases_ListTodoNew';
}
else
} else
list ($aCriteria, $xmlfile) = $oCases->getConditionCasesList( $sTypeList, $sUIDUserLogged, true, $aAdditionalFilter );
break;
default:
@@ -140,34 +138,30 @@ if( !isset($_GET['PROCESS_UID']) ) {
$_DBArray = $_SESSION['_DBArray'];
}
/* Render page */
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->ROWS_PER_PAGE = 12;
if ($sTypeList == 'to_reassign') {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', array ('REASSIGN_BY' => 1 ) );
}
$aData = Array(
'PROCESS_FILTER'=>$PRO_UID,
'APP_STATUS_FILTER'=>(isset($_GET['APP_STATUS_FILTER'])?$_GET['APP_STATUS_FILTER']:'0')
$aData = Array ('PROCESS_FILTER' => $PRO_UID,'APP_STATUS_FILTER' => (isset( $_GET['APP_STATUS_FILTER'] ) ? $_GET['APP_STATUS_FILTER'] : '0')
);
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', $xmlfile, $aCriteria, $aData );
G::RenderPage( 'publish', 'blank' );
function InAssocArray($a, $k, $v){
function InAssocArray ($a, $k, $v)
{
foreach ($a as $item) {
if( isset($item[$k]) && $v == $item[$k]) return true;
if (isset( $item[$k] ) && $v == $item[$k])
return true;
}
return false;
}
?>
<script>
@@ -181,7 +175,5 @@ function InAssocArray($a, $k, $v){
parent.PANEL_EAST_OPEN = false;
if(parent.refreshCountFolders) parent.refreshCountFolders();
}catch(e){}
</script>

View File

@@ -1,4 +1,5 @@
<?php
/**
* cases_New.php
*
@@ -20,10 +21,10 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//we're looking for the type of view
function putTypeView(){
function putTypeView ()
{
require_once 'classes/model/Configuration.php';
$oConfiguration = new Configuration();
$oCriteria = new Criteria( 'workflow' );
@@ -41,18 +42,17 @@
$_GET['change'] = (isset( $_GET['change'] )) ? $_GET['change'] : putTypeView();
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -71,16 +71,14 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
$aFields = array ();
$oCase = new Cases();
$bCanStart = $oCase->canStartCase( $_SESSION['USER_LOGGED'] );
if ($bCanStart)
{
if ($bCanStart) {
$aFields['LANG'] = SYS_LANG;
$aFields['USER'] = $_SESSION['USER_LOGGED'];
$sXmlForm = 'cases/cases_New.xml';
//$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
$_DBArray['NewCase'] = $oCase->getStartCasesPerType( $_SESSION['USER_LOGGED'], $_GET['change'] );
}
else {
} else {
$sXmlForm = 'cases/cases_CannotInitiateCase.xml';
}
@@ -110,8 +108,7 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
$oConfig = new Configuration();
$oConfig->create( $aData );
$listType = 'dropdown';
}
else {
} else {
$oConfiguration = new Configuration();
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( ConfigurationPeer::CFG_UID, 'StartNewCase' );
@@ -134,7 +131,7 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
}
/* Render page */
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$aFields['CHANGE_LINK'] = G::LoadTranslation( 'ID_CHANGE_VIEW' );
if (isset( $aMessage )) {
@@ -144,12 +141,14 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save' );
if ($listType == 'link') {
if ($bCanStart) $sXmlForm = 'cases/cases_NewRadioGroup.xml';
if ($bCanStart)
$sXmlForm = 'cases/cases_NewRadioGroup.xml';
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save' );
}
if ($listType == 'category') {
if ($bCanStart) $sXmlForm = 'cases/cases_NewCategory.xml';
if ($bCanStart)
$sXmlForm = 'cases/cases_NewCategory.xml';
$G_PUBLISH->AddContent( 'view', 'cases/cases_NewCategory' );
}
@@ -160,3 +159,4 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
parent.outerLayout.hide('east');
parent.PANEL_EAST_OPEN = false;
</script>

View File

@@ -20,13 +20,13 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_CASES"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_CASES" )) != 1)
return $RBAC_Response;
//go to the next step
G::LoadClass( 'case' );
$oCase = new Cases();
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
G::header( 'location: ' . $aNextStep['PAGE'] );
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
@@ -57,14 +56,14 @@ try {
if (is_null( $_GET['APP_UID'] )) {
G::SendMessageText( G::LoadTranslation( 'ID_CASE_DOES_NOT_EXISTS' ), 'info' );
G::header( 'location: casesListExtJs' );
exit;
exit();
}
//if the application exists but the
if (is_null( $_GET['DEL_INDEX'] )) {
G::SendMessageText( G::LoadTranslation( 'ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER' ), 'info' );
G::header( 'location: casesListExtJs' );
exit;
exit();
}
//wrong implemented, need refactored
//$participated = $oCase->userParticipatedInCase($_GET['APP_UID'], $_SESSION['USER_LOGGED']); ???????
@@ -79,6 +78,7 @@ try {
// g::pr($aFields);
// die;
switch ($aFields['APP_STATUS']) {
case 'DRAFT':
case 'TO_DO':
@@ -92,7 +92,7 @@ try {
$_SESSION['STEP_POSITION'] = 0;
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
exit;
exit();
}
/**
@@ -108,10 +108,8 @@ try {
$oDataset->next();
$aData = $oDataset->getRow();
if ( $aData['USR_UID'] != $_SESSION['USER_LOGGED'] &&
$aData['USR_UID'] != "" //distinct "" for selfservice
) {
if ($aData['USR_UID'] != $_SESSION['USER_LOGGED'] && $aData['USR_UID'] != "") //distinct "" for selfservice
{
//so we show just the resume
$_SESSION['alreadyDerivated'] = true;
//the case is paused show only the resume
@@ -122,11 +120,10 @@ try {
$_SESSION['STEP_POSITION'] = 0;
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
exit;
exit();
}
}
//proceed and try to open the case
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
@@ -148,7 +145,7 @@ try {
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
}
exit;
exit();
}
//if the current users is in the AppDelegation row, then open the case
@@ -171,11 +168,11 @@ try {
$sPage = $aNextStep['PAGE'];
G::header( 'location: ' . $sPage );
} else {
//when the case have another user or current user doesnt have rights to this selfservice,
//just view the case Resume
$_SESSION['APPLICATION'] = $sAppUid;
$_SESSION['INDEX'] = $iDelIndex;
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
@@ -203,3 +200,4 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
}

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
@@ -29,12 +28,12 @@ if( $RBAC->userCanAccess('PM_SUPERVISOR') != 1 )
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -60,7 +59,6 @@ $oCase = new Cases();
$sAppUid = $_GET['APP_UID'];
$iDelIndex = $_GET['DEL_INDEX'];
$_SESSION['APPLICATION'] = $_GET['APP_UID'];
$_SESSION['INDEX'] = $_GET['DEL_INDEX'];
@@ -75,5 +73,3 @@ $aNextStep = $oCase->getNextSupervisorStep($_SESSION['PROCESS'],0);
$sPage = "cases_StepToRevise?type=DYNAFORM&PRO_UID=" . $aFields['PRO_UID'] . "&DYN_UID=" . $aNextStep['UID'] . "&APP_UID=$sAppUid&DEL_INDEX=$iDelIndex&position=1"; //$aNextStep['PAGE'];
G::header( 'location: ' . $sPage );
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
@@ -51,7 +50,7 @@ try {
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$idProcess = (isset( $Fields['APP_DATA']['PROCESS'] )) ? $Fields['APP_DATA']['PROCESS'] : $_SESSION['PROCESS'];
$oProcess = new Process();
@@ -87,14 +86,7 @@ try {
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array );
}
$G_PUBLISH->AddContent('dynaform',
'xmlform',
$aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'],
'',
$Fields['APP_DATA'],
'',
'',
'view');
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
die( $oException->getMessage() );

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
@@ -28,12 +27,12 @@ try {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -77,18 +76,17 @@ $name = '';
}
$aUsers = $oTasks->getUsersOfTask( $aRow['TAS_UID'], 1 );
foreach($aUsers as $key => $value)
{
if($aRow['USR_UID']!=$value['USR_UID'])
{ if(!in_array($value['USR_UID'], $aUsrUid))
foreach ($aUsers as $key => $value) {
if ($aRow['USR_UID'] != $value['USR_UID']) {
if (! in_array( $value['USR_UID'], $aUsrUid ))
$aUsr[$value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME']] = $value;
}
}
ksort( $aUsr );
//$users='';
//$users='<select name="USERS"><option value="">Seleccione</option>';
foreach($aUsr as $key => $value)
{ $tpl->newBlock( "users" );
foreach ($aUsr as $key => $value) {
$tpl->newBlock( "users" );
$name = $value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME'] . ' (' . $value['USR_USERNAME'] . ')';
//$users=$users."<option value='".$value['USR_UID']."'>". $name ."</option>";
$tpl->assign( "USR_UID", $value['USR_UID'] );
@@ -96,8 +94,10 @@ $name = '';
}
//$users=$users.' </select>';
//$tpl->assign( "USERS", $users );
$oDataset->next();
}
$tpl->gotoBlock( '_ROOT' );
@@ -110,12 +110,11 @@ $name = '';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'template', '', '', '', $tpl );
G::RenderPage( 'publish', 'blank' );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
@@ -34,12 +33,12 @@ try {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -65,25 +64,24 @@ try {
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
///////////////////////
G::loadClass( 'configuration' );
$oConf = new Configurations;
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
$defaultOption = isset( $oConf->aConfig['format'] ) ? $oConf->aConfig['format'] : '';
$aUserInfo = array ();
$aUserInfo[] = array('USR_UID' => 'char','USER_FULLNAME' => 'char');
$aUserInfo[] = array ('USR_UID' => 'char','USER_FULLNAME' => 'char'
);
while ($oDataset->next()) {
$aRow1 = $oDataset->getRow();
$infoUser = G::getFormatUserList( $defaultOption, $aRow1 );
$aUserInfo[]=array(
'USR_UID' => $aRow1['USR_UID'],
'USER_FULLNAME' => $infoUser
$aUserInfo[] = array ('USR_UID' => $aRow1['USR_UID'],'USER_FULLNAME' => $infoUser
);
}
global $_DBArray;
$_DBArray['aUserInfo'] = $aUserInfo;
$_SESSION['_DBArray'] = $_DBArray;
//////////////////
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', $_GET );
$sUserToReassign = trim( $_GET['REASSIGN_USER'] );
@@ -117,26 +115,11 @@ try {
array_push( $aCasesList, $oDataset->getRow() );
}
$filedNames = Array (
"APP_UID",
"APP_NUMBER",
"APP_UPDATE_DATE",
"DEL_PRIORITY",
"DEL_INDEX",
"TAS_UID",
"DEL_INIT_DATE",
"DEL_FINISH_DATE",
"USR_UID",
"APP_STATUS",
"DEL_TASK_DUE_DATE",
"APP_CURRENT_USER",
"APP_TITLE",
"APP_PRO_TITLE",
"APP_TAS_TITLE",
"APP_DEL_PREVIOUS_USER",
$filedNames = Array ("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER"
);
$aCasesList = array_merge(Array($filedNames), $aCasesList);
$aCasesList = array_merge( Array ($filedNames
), $aCasesList );
// G::pr($aCasesList); die;
@@ -153,14 +136,15 @@ try {
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/reassignByUser.js' );
$G_PUBLISH->ROWS_PER_PAGE = 12;
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, Array('FROM_USR_UID'=>$sUserToReassign));
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, Array ('FROM_USR_UID' => $sUserToReassign
) );
}
G::RenderPage( 'publish', 'blank' );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>
<div id="publisherContent[10]" style="display: none"></div>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
@@ -28,12 +27,12 @@ try {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
//print_r($_POST); die;
@@ -53,8 +52,6 @@ try {
$Fields['USERS'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')';
G::LoadClass( 'case' );
$oCases = new Cases();
$aCases = $oCases->loadCase( $_POST['APP_UID'], $_POST['DEL_INDEX'] );
@@ -65,15 +62,14 @@ try {
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Reassign.xml', '', $Fields, '' );
G::RenderPage( 'publish', 'blank' );
//G::SendMessageText(G::LoadTranslation('ID_FINISHED'), 'info');
//G::header('Location: cases_List');
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Created on 19-03-2009
@@ -36,6 +35,5 @@ $aOD = $oOutputDocument->load($aFields['DOC_UID']);
$a = $_GET['a'];
$ext = strtolower( $aOD['OUT_DOC_GENERATE'] );
G::header( 'location: cases_ShowOutputDocument?a=' . $a . '&ext=' . $ext );
?>

View File

@@ -20,20 +20,18 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -62,7 +60,7 @@
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
die;
die();
}
if (isset( $aRow['APP_TYPE'] )) {
switch ($aRow['APP_TYPE']) {
@@ -116,6 +114,7 @@
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
G::RenderPage( 'publish', 'blank' );

View File

@@ -20,21 +20,19 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -44,11 +42,16 @@
/* GET , POST & $_SESSION Vars */
/* unset any variable, because we are starting a new case */
if (isset($_SESSION['APPLICATION'])) unset($_SESSION['APPLICATION']);
if (isset($_SESSION['PROCESS'])) unset($_SESSION['PROCESS']);
if (isset($_SESSION['TASK'])) unset($_SESSION['TASK']);
if (isset($_SESSION['INDEX'])) unset($_SESSION['INDEX']);
if (isset($_SESSION['STEP_POSITION'])) unset($_SESSION['STEP_POSITION']);
if (isset( $_SESSION['APPLICATION'] ))
unset( $_SESSION['APPLICATION'] );
if (isset( $_SESSION['PROCESS'] ))
unset( $_SESSION['PROCESS'] );
if (isset( $_SESSION['TASK'] ))
unset( $_SESSION['TASK'] );
if (isset( $_SESSION['INDEX'] ))
unset( $_SESSION['INDEX'] );
if (isset( $_SESSION['STEP_POSITION'] ))
unset( $_SESSION['STEP_POSITION'] );
/* Process */
try {
@@ -67,10 +70,9 @@
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
G::header( 'location: ' . $aNextStep['PAGE'] );
}
catch ( Exception $e ) {
} catch (Exception $e) {
$_SESSION['G_MESSAGE'] = $e->getMessage();
$_SESSION['G_MESSAGE_TYPE'] = 'error';
G::header( 'location: cases_New' );
}
?>

View File

@@ -20,14 +20,15 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//validate the data post
try {
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', array('<a href=\''.$_SERVER['HTTP_REFERER'].'\'>{1}</a>', G::LoadTranslation('ID_REOPEN'))));
throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('<a href=\'' . $_SERVER['HTTP_REFERER'] . '\'>{1}</a>',G::LoadTranslation( 'ID_REOPEN' )
) ) );
}
$oForm = new Form( $_SESSION["PROCESS"] . "/" . $_GET["UID"], PATH_DYNAFORM );
@@ -47,10 +48,8 @@ try {
#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 ();
@@ -83,7 +82,8 @@ try {
try {
$aData = $oAdditionalTables->load( $oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, true );
} catch (Exception $oError) {
$aData = array ('FIELDS' => array () );
$aData = array ('FIELDS' => array ()
);
}
$aKeys = array ();
$aAux = explode( '|', $oForm->fields[$oForm->fields[$sField]->pmconnection]->keys );
@@ -116,14 +116,12 @@ try {
} catch (Exception $oError) {
//Nothing
}
}
else {
} else {
try {
// assembling the field list in order to save the data ina new record of a pm table
if (empty( $newValues )) {
$newValues = $aValues;
}
else {
} else {
foreach ($aValues as $aValueKey => $aValueCont) {
if (trim( $newValues[$aValueKey] ) == '') {
$newValues[$aValueKey] = $aValueCont;
@@ -205,17 +203,13 @@ try {
$fieldName = null;
if (is_array( $arrayField[$i] )) {
if (isset($_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]]) &&
!empty($_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]])
) {
if (isset( $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]] ) && ! empty( $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]] )) {
$indocUid = $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]];
}
$fieldName = $arrayField[$i]["grdName"] . "_" . $arrayField[$i]["index"] . "_" . $arrayField[$i]["grdFieldName"];
} else {
if (isset($_POST["INPUTS"][$arrayField[$i]]) &&
!empty($_POST["INPUTS"][$arrayField[$i]])
) {
if (isset( $_POST["INPUTS"][$arrayField[$i]] ) && ! empty( $_POST["INPUTS"][$arrayField[$i]] )) {
$indocUid = $_POST["INPUTS"][$arrayField[$i]];
}
@@ -232,32 +226,10 @@ try {
//Get the Custom Folder ID (create if necessary)
$oFolder = new AppFolder();
$aFields = array (
"APP_UID" => $_SESSION["APPLICATION"],
"DEL_INDEX" => $_SESSION["INDEX"],
"USR_UID" => $_SESSION["USER_LOGGED"],
"DOC_UID" => $indocUid,
"APP_DOC_TYPE" => "INPUT",
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
"APP_DOC_COMMENT" => "",
"APP_DOC_TITLE" => "",
"APP_DOC_FILENAME" => $arrayFileName[$i],
"FOLDER_UID" => $oFolder->createFromPath($aID["INP_DOC_DESTINATION_PATH"]),
"APP_DOC_TAGS" => $oFolder->parseTags($aID["INP_DOC_TAGS"]),
"APP_DOC_FIELDNAME" => $fieldName
$aFields = array ("APP_UID" => $_SESSION["APPLICATION"],"DEL_INDEX" => $_SESSION["INDEX"],"USR_UID" => $_SESSION["USER_LOGGED"],"DOC_UID" => $indocUid,"APP_DOC_TYPE" => "INPUT","APP_DOC_CREATE_DATE" => date( "Y-m-d H:i:s" ),"APP_DOC_COMMENT" => "","APP_DOC_TITLE" => "","APP_DOC_FILENAME" => $arrayFileName[$i],"FOLDER_UID" => $oFolder->createFromPath( $aID["INP_DOC_DESTINATION_PATH"] ),"APP_DOC_TAGS" => $oFolder->parseTags( $aID["INP_DOC_TAGS"] ),"APP_DOC_FIELDNAME" => $fieldName
);
} else {
$aFields = array (
"APP_UID" => $_SESSION["APPLICATION"],
"DEL_INDEX" => $_SESSION["INDEX"],
"USR_UID" => $_SESSION["USER_LOGGED"],
"DOC_UID" => -1,
"APP_DOC_TYPE" => "ATTACHED",
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
"APP_DOC_COMMENT" => "",
"APP_DOC_TITLE" => "",
"APP_DOC_FILENAME" => $arrayFileName[$i],
"APP_DOC_FIELDNAME" => $fieldName
$aFields = array ("APP_UID" => $_SESSION["APPLICATION"],"DEL_INDEX" => $_SESSION["INDEX"],"USR_UID" => $_SESSION["USER_LOGGED"],"DOC_UID" => - 1,"APP_DOC_TYPE" => "ATTACHED","APP_DOC_CREATE_DATE" => date( "Y-m-d H:i:s" ),"APP_DOC_COMMENT" => "","APP_DOC_TITLE" => "","APP_DOC_FILENAME" => $arrayFileName[$i],"APP_DOC_FIELDNAME" => $fieldName
);
}
@@ -337,12 +309,12 @@ try {
G::header( 'location: ' . $aNextStep['PAGE'] );
}
catch (Exception $e) {
$G_PUBLISH = new Publisher;
} catch (Exception $e) {
$G_PUBLISH = new Publisher();
$aMessage = array ();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish', 'blank' );
die;
die();
}

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//validate the data post
$oForm = new Form( $_SESSION['PROCESS'] . '/' . $_GET['UID'], PATH_DYNAFORM );
@@ -54,4 +53,3 @@
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );

View File

@@ -20,10 +20,10 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//try {
//First review if there is no error with the uploaded document
if ((isset( $_FILES['form'] )) && ($_FILES['form']['error']['APP_DOC_FILENAME'] != 0)) {
$code = $_FILES['form']['error']['APP_DOC_FILENAME'];
@@ -57,16 +57,14 @@
G::SendMessageText( $message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die;
die();
}
$docUid = $_POST['form']['DOC_UID'];
$appDocUid = $_POST['form']['APP_DOC_UID'];
$docVersion = $_POST['form']['docVersion'];
$actionType = $_POST['form']['actionType'];
//load the variables
G::LoadClass( 'case' );
$oCase = new Cases();
@@ -76,6 +74,7 @@
#trigger debug routines...
//cleaning debug variables
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
@@ -97,7 +96,6 @@
//Execute after triggers - End
}
//save data
$aData = array ();
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
@@ -110,6 +108,7 @@
//save info
require_once ("classes/model/AppDocument.php");
require_once ('classes/model/AppFolder.php');
require_once ('classes/model/InputDocument.php');
@@ -117,10 +116,8 @@
$oInputDocument = new InputDocument();
$aID = $oInputDocument->load( $_GET['UID'] );
$oAppDocument = new AppDocument();
//Get the Custom Folder ID (create if necessary)
$oFolder = new AppFolder();
$folderId = $oFolder->createFromPath( $aID['INP_DOC_DESTINATION_PATH'] );
@@ -130,61 +127,27 @@
switch ($actionType) {
case "R": //replace
$aFields = array('APP_DOC_UID' => $appDocUid,
'APP_UID' => $_SESSION['APPLICATION'],
'DOC_VERSION' => $docVersion,
'DEL_INDEX' => $_SESSION['INDEX'],
'USR_UID' => $_SESSION['USER_LOGGED'],
'DOC_UID' => $docUid,
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
'APP_DOC_TITLE' => '',
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '',
'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags);
$aFields = array ('APP_DOC_UID' => $appDocUid,'APP_UID' => $_SESSION['APPLICATION'],'DOC_VERSION' => $docVersion,'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
);
$oAppDocument->update( $aFields );
break;
case "NV": //New Version
$aFields = array('APP_DOC_UID' => $appDocUid,
'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX'],
'USR_UID' => $_SESSION['USER_LOGGED'],
'DOC_UID' => $docUid,
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
'APP_DOC_TITLE' => '',
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '',
'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags);
$aFields = array ('APP_DOC_UID' => $appDocUid,'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
);
$oAppDocument->create( $aFields );
break;
default: //New
$aFields = array(
'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX'],
'USR_UID' => $_SESSION['USER_LOGGED'],
'DOC_UID' => $docUid,
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
'APP_DOC_TITLE' => '',
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '',
'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags);
$aFields = array ('APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
);
$oAppDocument->create( $aFields );
break;
}
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
@@ -202,14 +165,7 @@
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
$oData['APP_UID'] = $_SESSION['APPLICATION'];
$documentData = new uploadDocumentData (
$_SESSION['APPLICATION'],
$_SESSION['USER_LOGGED'],
$sPathName . $sFileName,
$aFields['APP_DOC_FILENAME'],
$sAppDocUid,
$iDocVersion
);
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $sPathName . $sFileName, $aFields['APP_DOC_FILENAME'], $sAppDocUid, $iDocVersion );
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
if ($uploadReturn) {
@@ -239,51 +195,48 @@
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
die;
die();
}
G::header( 'location: ' . $aNextStep['PAGE'] );
die;
}
else {
die();
} else {
if (isset( $_SERVER['HTTP_REFERER'] )) {
if ($_SERVER['HTTP_REFERER'] != '') {
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $_SERVER['HTTP_REFERER'];
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] . '&breakpoint=triggerdebug' );
die;
die();
}
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
die;
}
else {
die();
} else {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
die;
die();
}
G::header( 'location: ' . $aNextStep['PAGE'] );
die;
die();
}
}
else {
} else {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
die;
die();
}
G::header( 'location: ' . $aNextStep['PAGE'] );
die;
die();
}
}
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
@@ -295,3 +248,4 @@
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish' );
}*/

View File

@@ -16,18 +16,20 @@ if (! function_exists ( $_REQUEST ['action'] )) {
$functionName = $_REQUEST['action'];
//var_dump($functionName);
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
$functionName( $functionParams );
function searchSavedJob($schUid){
function searchSavedJob ($schUid)
{
}
function pluginsList(){
function pluginsList ()
{
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
$selectedPlugin = "";
if((isset($_REQUEST['plg_uid']))&&($_REQUEST['plg_uid']!="")) $selectedPlugin=$_REQUEST['plg_uid'];
if ((isset( $_REQUEST['plg_uid'] )) && ($_REQUEST['plg_uid'] != ""))
$selectedPlugin = $_REQUEST['plg_uid'];
if (! empty( $activePluginsForCaseScheduler )) {
echo '<select style="width: 300px;" name="form[CASE_SH_PLUGIN_UID]" id="form[CASE_SH_PLUGIN_UID]" class="module_app_input___gray" required="1" onChange="showPluginSelection(this.options[this.selectedIndex].value,getField(\'PRO_UID\').value)">';
echo "<option value=\"\">- Select -</option>";
@@ -36,16 +38,20 @@ if(!empty($activePluginsForCaseScheduler)){
$sNamespace = $caseSchedulerPluginDetail->sNamespace;
$optionId = $sNamespace . "--" . $sActionId;
$selectedOption = "";
if($selectedPlugin==$optionId) $selectedOption="selected";
if ($selectedPlugin == $optionId)
$selectedOption = "selected";
echo "<option value=\"$optionId\" $selectedOption>" . $sActionId . "</option>";
}
echo '</select>';
//G::pr($activePlugnsForCaseScheduler);
}
}
function pluginCaseSchedulerForm(){
if(!isset($_REQUEST ['selectedOption'])) die;
$G_PUBLISH = new Publisher;
function pluginCaseSchedulerForm ()
{
if (! isset( $_REQUEST['selectedOption'] ))
die();
$G_PUBLISH = new Publisher();
$params = explode( "--", $_REQUEST['selectedOption'] );
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
@@ -59,13 +65,13 @@ function pluginCaseSchedulerForm(){
//Render the form
if ((isset( $_REQUEST['sch_uid'] )) && ($_REQUEST['sch_uid'] != "")) {
//$oData=$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionGetFields, array("SCH_UID"=>$_REQUEST['sch_uid']) );
$oData=array("SCH_UID"=>$_REQUEST['sch_uid'],"PRO_UID"=>$_REQUEST['pro_uid']);
$oData = array ("SCH_UID" => $_REQUEST['sch_uid'],"PRO_UID" => $_REQUEST['pro_uid']
);
} else {
$oData=array("PRO_UID"=>$_REQUEST['pro_uid']);
$oData = array ("PRO_UID" => $_REQUEST['pro_uid']
);
}
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionForm, $oData );
}
}
?>

View File

@@ -1,10 +1,8 @@
<?php
//$oUserId = '2963666854afbb1cea372c4011254883';
$oUserId = $_POST['USR_UID'];
$process = isset( $_POST['PRO_UID'] ) ? $_POST['PRO_UID'] : $_SESSION['PROCESS'];
//echo '<select style="width: 300px;" readOnly name="form[PRO_UID]" id="form[PRO_UID]" class="module_app_input___gray" required="1" onChange="loadTasksDropdown(this.value,\''.$oUserId.'\');">';
require_once ("classes/model/TaskPeer.php");
require_once ("classes/model/ProcessPeer.php");
require_once ("classes/model/TaskUserPeer.php");
@@ -31,8 +29,5 @@ G::LoadClass ( 'Content' );
echo "<input name=\"form[PRO_UID]\" id=\"form[PRO_UID]\" type=\"hidden\" value=\"" . $row[0] . "\"></input>";
//var_dump($row);
}
//echo "</select>";
?>

View File

@@ -1,21 +1,18 @@
<select style="width: 300px;" name="form[TAS_UID]" id="form[TAS_UID]" class="module_app_input___gray" required="1">
<select style="width: 300px;" name="form[TAS_UID]" id="form[TAS_UID]"
class="module_app_input___gray" required="1">
<?php
//$oUserId = '2963666854afbb1cea372c4011254883';
//$oProcessId = '9977730834afd2a0deecaf3040551794';
$oUserId = $_POST['USR_UID'];
$oProcessId = $_POST['PRO_UID'];
G::LoadClass( 'case' );
$oCase = new Cases();
$startTasks = $oCase->getStartCases( $oUserId );
foreach ($startTasks as $task) {
if ((isset( $task['pro_uid'] )) && ($task['pro_uid'] == $oProcessId)) {
$taskValue = explode( '(', $task['value'] );
$tasksLastIndex = count( $taskValue ) - 1;
$taskValue = explode( ')', $taskValue[$tasksLastIndex] );
echo "<option value=\"" . $task['uid'] . "\">" . $taskValue[0] . "</option>";
}
}
@@ -23,3 +20,4 @@ foreach($startTasks as $task){
// echo "<option value=\"".$value."\">".$label."</option>";
?>
</select>

View File

@@ -20,24 +20,22 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* process_SchedulerValidate_User
* validates if the username and password are valid data and if the user assigned
* to the process and task has the rights and persmissions required to create a cron task
*/
$sWS_USER = trim( $_REQUEST['USERNAME'] );
$sWS_PASS = trim( $_REQUEST['PASSWORD'] );
if (G::is_https ())
if (G::is_https()) {
$http = 'https://';
else
} else {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new SoapClient( $endpoint );
@@ -69,3 +67,4 @@ if ($result->status_code == 0) {
}
die( G::json_encode( $result ) );

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $RBAC;
/*
@@ -53,4 +52,3 @@ switch ($RBAC->userCanAccess('PM_FACTORY'))
$oCaseScheduler->changeStatus( $_GET['SCH_UID'] );
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );

View File

@@ -39,15 +39,13 @@ switch ($RBAC->userCanAccess('PM_CASES'))
break;
}
*/
// print_r($_GET); print_r($_POST); die;
require_once 'classes/model/CaseScheduler.php';
$oCaseScheduler = new CaseScheduler();
if ( !isset($_GET['SCH_UID'] ) ) return;
if ( !isset($_GET['SCH_UID'] ) ) {
return;
}
$oCaseScheduler->remove($_GET['SCH_UID']);
/* Redirect */
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
@@ -47,23 +46,22 @@ try {
// $G_MAIN_MENU = 'processmaker';
// $G_ID_MENU_SELECTED = 'CASES';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
G::LoadClass( 'case' );
/* Prepare page before to show */
$oCaseScheduler = new CaseScheduler();
$aFields = $oCaseScheduler->load( $_GET['SCH_UID'] );
$aFields['UID_SCHEDULER'] = "scheduler";
// load according the scheduler option selected daily/weekly/monthly/one time
$nOpt = $aFields['SCH_OPTION'];
switch ($nOpt) {
case 1 : $aStartDay = explode('|', $aFields['SCH_DAYS_PERFORM_TASK']);
case 1:
$aStartDay = explode( '|', $aFields['SCH_DAYS_PERFORM_TASK'] );
if ($aStartDay[0] != 3) {
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
} else {
@@ -135,4 +133,3 @@ try {
die( $oException->getMessage() );
}
?>

View File

@@ -20,10 +20,11 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) {
return $RBAC_Response;
}
global $RBAC;
/*switch ($RBAC->userCanAccess('PM_USERS'))
{
@@ -39,7 +40,6 @@ global $RBAC;
break;
}*/
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
@@ -55,99 +55,15 @@ $sDelimiter = DBAdapter::getStringDelimiter();
//$oCaseScheduler->caseSchedulerCron();
// g::pr($aRows); die;
$fieldNames = Array(
'SCH_UID' => 'char',
'SCH_NAME' => 'char',
'PRO_UID' => 'char',
'TAS_UID' => 'char',
'SCH_TIME_NEXT_RUN' => 'char',
'SCH_LAST_RUN_TIME' => 'char',
'SCH_STATE' => 'char',
'SCH_LAST_STATE' => 'char',
'USR_UID' => 'char',
'SCH_OPTION' => 'char',
'SCH_START_TIME' => 'char',
'SCH_START_DATE' => 'char',
'SCH_DAYS_PERFORM_TASK' => 'char',
'SCH_EVERY_DAYS' => 'char',
'SCH_WEEK_DAYS' => 'char',
'SCH_START_DAY' => 'char',
'SCH_MONTHS' => 'char',
'SCH_END_DATE' => 'char',
'SCH_REPEAT_EVERY' => 'char',
'SCH_REPEAT_UNTIL' => 'char',
'SCH_REPEAT_STOP_IF_RUNNING' => 'char',
'PRO_PARENT' => 'char',
'PRO_TIME' => 'char',
'PRO_TIMEUNIT' => 'char',
'PRO_STATUS' => 'char',
'PRO_TYPE_DAY' => 'char',
'PRO_TYPE' => 'char',
'PRO_ASSIGNMENT' => 'char',
'PRO_SHOW_MAP' => 'char',
'PRO_SHOW_MESSAGE' => 'char',
'PRO_SUBPROCESS' => 'char',
'PRO_TRI_DELETED' => 'char',
'PRO_TRI_CANCELED' => 'char',
'PRO_TRI_PAUSED' => 'char',
'PRO_TRI_REASSIGNED' => 'char',
'PRO_SHOW_DELEGATE' => 'char',
'PRO_SHOW_DYNAFORM' => 'char',
'PRO_CATEGORY' => 'char',
'PRO_SUB_CATEGORY' => 'char',
'PRO_INDUSTRY' => 'char',
'PRO_UPDATE_DATE' => 'char',
'PRO_CREATE_DATE' => 'char',
'PRO_CREATE_USER' => 'char',
'PRO_HEIGHT' => 'char',
'PRO_WIDTH' => 'char',
'PRO_TITLE_X' => 'char',
'PRO_TITLE_Y' => 'char',
'PRO_DEBUG' => 'char',
'PRO_TITLE' => 'char',
'PRO_DESCRIPTION' => 'char',
'TAS_TYPE' => 'char',
'TAS_DURATION' => 'char',
'TAS_DELAY_TYPE' => 'char',
'TAS_TEMPORIZER' => 'char',
'TAS_TYPE_DAY' => 'char',
'TAS_TIMEUNIT' => 'char',
'TAS_ALERT' => 'char',
'TAS_PRIORITY_VARIABLE' => 'char',
'TAS_ASSIGN_TYPE' => 'char',
'TAS_ASSIGN_VARIABLE' => 'char',
'TAS_ASSIGN_LOCATION' => 'char',
'TAS_ASSIGN_LOCATION_ADHOC' => 'char',
'TAS_TRANSFER_FLY' => 'char',
'TAS_LAST_ASSIGNED' => 'char',
'TAS_USER' => 'char',
'TAS_CAN_UPLOAD' => 'char',
'TAS_VIEW_UPLOAD' => 'char',
'TAS_VIEW_ADDITIONAL_DOCUMENTATION' => 'char',
'TAS_CAN_CANCEL' => 'char',
'TAS_OWNER_APP' => 'char',
'STG_UID' => 'char',
'TAS_CAN_PAUSE' => 'char',
'TAS_CAN_SEND_MESSAGE' => 'char',
'TAS_CAN_DELETE_DOCS' => 'char',
'TAS_SELF_SERVICE' => 'char',
'TAS_START' => 'char',
'TAS_TO_LAST_USER' => 'char',
'TAS_SEND_LAST_EMAIL' => 'char',
'TAS_DERIVATION' => 'char',
'TAS_POSX' => 'char',
'TAS_POSY' => 'char',
'TAS_COLOR' => 'char',
'TAS_TITLE' => 'char',
'TAS_DESCRIPTION' => 'char',
'TAS_DEF_TITLE' => 'char',
'TAS_DEF_DESCRIPTION' => 'char',
'TAS_DEF_PROC_CODE' => 'char',
'TAS_DEF_MESSAGE' => 'char'
$fieldNames = Array ('SCH_UID' => 'char','SCH_NAME' => 'char','PRO_UID' => 'char','TAS_UID' => 'char','SCH_TIME_NEXT_RUN' => 'char','SCH_LAST_RUN_TIME' => 'char','SCH_STATE' => 'char','SCH_LAST_STATE' => 'char','USR_UID' => 'char','SCH_OPTION' => 'char','SCH_START_TIME' => 'char','SCH_START_DATE' => 'char','SCH_DAYS_PERFORM_TASK' => 'char','SCH_EVERY_DAYS' => 'char','SCH_WEEK_DAYS' => 'char','SCH_START_DAY' => 'char','SCH_MONTHS' => 'char','SCH_END_DATE' => 'char','SCH_REPEAT_EVERY' => 'char','SCH_REPEAT_UNTIL' => 'char','SCH_REPEAT_STOP_IF_RUNNING' => 'char','PRO_PARENT' => 'char','PRO_TIME' => 'char','PRO_TIMEUNIT' => 'char','PRO_STATUS' => 'char','PRO_TYPE_DAY' => 'char','PRO_TYPE' => 'char','PRO_ASSIGNMENT' => 'char','PRO_SHOW_MAP' => 'char','PRO_SHOW_MESSAGE' => 'char',
'PRO_SUBPROCESS' => 'char','PRO_TRI_DELETED' => 'char','PRO_TRI_CANCELED' => 'char','PRO_TRI_PAUSED' => 'char','PRO_TRI_REASSIGNED' => 'char','PRO_SHOW_DELEGATE' => 'char','PRO_SHOW_DYNAFORM' => 'char','PRO_CATEGORY' => 'char','PRO_SUB_CATEGORY' => 'char','PRO_INDUSTRY' => 'char','PRO_UPDATE_DATE' => 'char','PRO_CREATE_DATE' => 'char','PRO_CREATE_USER' => 'char','PRO_HEIGHT' => 'char','PRO_WIDTH' => 'char','PRO_TITLE_X' => 'char','PRO_TITLE_Y' => 'char','PRO_DEBUG' => 'char','PRO_TITLE' => 'char','PRO_DESCRIPTION' => 'char','TAS_TYPE' => 'char','TAS_DURATION' => 'char','TAS_DELAY_TYPE' => 'char','TAS_TEMPORIZER' => 'char','TAS_TYPE_DAY' => 'char','TAS_TIMEUNIT' => 'char','TAS_ALERT' => 'char','TAS_PRIORITY_VARIABLE' => 'char','TAS_ASSIGN_TYPE' => 'char',
'TAS_ASSIGN_VARIABLE' => 'char','TAS_ASSIGN_LOCATION' => 'char','TAS_ASSIGN_LOCATION_ADHOC' => 'char','TAS_TRANSFER_FLY' => 'char','TAS_LAST_ASSIGNED' => 'char','TAS_USER' => 'char','TAS_CAN_UPLOAD' => 'char','TAS_VIEW_UPLOAD' => 'char','TAS_VIEW_ADDITIONAL_DOCUMENTATION' => 'char','TAS_CAN_CANCEL' => 'char','TAS_OWNER_APP' => 'char','STG_UID' => 'char','TAS_CAN_PAUSE' => 'char','TAS_CAN_SEND_MESSAGE' => 'char','TAS_CAN_DELETE_DOCS' => 'char','TAS_SELF_SERVICE' => 'char','TAS_START' => 'char','TAS_TO_LAST_USER' => 'char','TAS_SEND_LAST_EMAIL' => 'char','TAS_DERIVATION' => 'char','TAS_POSX' => 'char','TAS_POSY' => 'char','TAS_COLOR' => 'char','TAS_TITLE' => 'char','TAS_DESCRIPTION' => 'char','TAS_DEF_TITLE' => 'char','TAS_DEF_DESCRIPTION' => 'char',
'TAS_DEF_PROC_CODE' => 'char','TAS_DEF_MESSAGE' => 'char'
);
$aRows = array_merge(Array($fieldNames), $aRows);
$aRows = array_merge( Array ($fieldNames
), $aRows );
//krumo ($aRows);
for ($j = 0; $j < count( $aRows ); $j ++) {
if ($aRows[$j]['SCH_STATE'] == 'PROCESSED') {
@@ -156,6 +72,7 @@ for($j=0;$j<count($aRows);$j++){
}
// g::pr($aRows); die;
global $_DBArray;
$_DBArray['cases_scheduler'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
@@ -168,9 +85,10 @@ $oCriteria->setDBArrayTable('cases_scheduler');
//krumo($_SESSION);
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->ROWS_PER_PAGE = 10;
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Scheduler_List', $oCriteria, array('CONFIRM' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_Scheduler_List', $oCriteria, array ('CONFIRM' => G::LoadTranslation( 'ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER' )
) );
$G_PUBLISH->oPropelTable->rowsPerPage = 10;
G::RenderPage( 'publishBlank', 'blank' );

View File

@@ -21,11 +21,11 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1)
return $RBAC_Response;
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' );
$c = new Configurations();
$configPage = $c->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
@@ -36,9 +36,8 @@ $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'cases/casesSchedulerLog', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesSchedulerLog' ); //adding a html file .html.
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign( 'CONFIG', $Config );
G::RenderPage( 'publish', 'extJs' );
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
@@ -58,14 +57,13 @@ try {
require_once ('classes/model/LogCasesScheduler.php');
}
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oCriteria = new Criteria( 'workflow' );
// var_dump(htmlspecialchars($_GET['WS_ROUTE']));
// var_dump(htmlentities($_GET['WS_ROUTE']));
$oCriteria->add(LogCasesSchedulerPeer::LOG_CASE_UID,$_REQUEST['LOG_CASE_UID']);
$oCriteria->add( LogCasesSchedulerPeer::LOG_CASE_UID, $_REQUEST['LOG_CASE_UID'] );
$result = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
$result->next();
$row = $result->getRow();
@@ -80,13 +78,10 @@ try {
$aFields['WS_ROUTE_CASE_STATUS'] = htmlentities( $row[9] );
//var_dump($aFields);
//$aFields = $_GET;
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_Log_Detail.xml', '', $aFields, '' );
G::RenderPage( 'publishBlank', 'blank' );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
@@ -65,7 +64,7 @@ $G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
G::LoadClass( 'case' );
$aFields['PHP_START_DATE'] = date( 'Y-m-d' );
@@ -81,11 +80,9 @@ $G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
*/
$oCaseScheduler = new CaseScheduler();
//$_DBArray['NewProcess'] = $oCaseScheduler->getProcessDescription();
//$_DBArray['NewTask'] = $oCaseScheduler->getTaskDescription();
// var_dump($oCaseScheduler->getAllProcess()); die;
$aFields['UID_SCHEDULER'] = "scheduler";
@@ -93,9 +90,7 @@ $G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_New.xml', '', $aFields, 'cases_Scheduler_Save' );
G::RenderPage( 'publishBlank', 'blank' );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
/*
@@ -40,7 +39,6 @@ try {
}
*/
require_once 'classes/model/CaseScheduler.php';
$oCaseScheduler = new CaseScheduler();
@@ -63,8 +61,6 @@ try {
$sOption = $_POST['form']['SCH_OPTION'];
$aData['SCH_OPTION'] = $sOption;
if ($_POST['form']['SCH_START_DATE'] != '') {
$sDateTmp = $_POST['form']['SCH_START_DATE'];
} else {
@@ -77,6 +73,7 @@ try {
$nActualTime = $_POST['form']['SCH_START_TIME']; // time();
// $nActualDate = date("Y-m-d H:i:s", $nActualTime);
$sValue = '';
$sDaysPerformTask = '';
$sWeeks = '';
@@ -92,7 +89,8 @@ try {
case '1': // Option 1
$sValue = $_POST['form']['SCH_DAYS_PERFORM_TASK'];
switch ($sValue) {
case '1' : $aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
case '1':
$aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
break;
case '2':
$aData['SCH_OPTION'] = '2';
@@ -161,7 +159,6 @@ try {
$sValue = $nStartDay;
break;
}
echo "<br>sOption: " . $sOption;
if (($sOption != '1') && ($sOption != '4') && ($sOption != '5')) {
@@ -215,7 +212,6 @@ try {
else
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
}
if ((isset( $_POST['form']['CASE_SH_PLUGIN_UID'] )) && ($_POST['form']['CASE_SH_PLUGIN_UID'] != "")) {
@@ -264,12 +260,10 @@ try {
// //End Adding
// }
G::header( 'location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID'] );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
/*
@@ -42,7 +41,6 @@ try {
require_once 'classes/model/CaseScheduler.php';
if (empty( $_POST )) {
die( 'The information sended is empty!' );
}
@@ -88,7 +86,8 @@ try {
case '1': // Option 1
$sValue = $_POST['form']['SCH_DAYS_PERFORM_TASK'];
switch ($sValue) {
case '1' : $aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
case '1':
$aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
break;
case '2':
$aData['SCH_OPTION'] = '2';
@@ -173,6 +172,7 @@ try {
}
// if the start date has changed then recalculate the next run time
// var_dump($recalculateTime);
// die();
$nActualTime = $_POST['form']['SCH_START_TIME'];
@@ -250,7 +250,6 @@ try {
else
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
}
// var_dump ($aData['SCH_TIME_NEXT_RUN']);
// die;
@@ -276,9 +275,7 @@ try {
G::header( 'location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID'] );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Created on 13-02-2008
@@ -31,11 +30,13 @@
require_once ("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
if(!isset($_GET['v'])){//Load last version of the document
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();
@@ -46,16 +47,13 @@ $ext = $info['extension'];
if (isset( $_GET['b'] )) {
if ($_GET['b'] == '0') {
$bDownload = false;
}
else {
} else {
$bDownload = true;
}
}
else {
} 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;
@@ -76,7 +74,7 @@ if(!$sw_file_exists){
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die;
die();
}
} else {
@@ -89,9 +87,3 @@ if(!$sw_file_exists){
}
}
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Created on 13-02-2008
@@ -37,12 +36,10 @@ $sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
}
else {
} else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
}
else {
} else {
$ext = $info['extension'];
}
}
@@ -74,7 +71,7 @@ if(!$sw_file_exists){
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die;
die();
}
} else {
@@ -87,4 +84,4 @@ if(!$sw_file_exists){
}
}
//G::streamFile ( $realPath, true);
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Created on 13-02-2008
@@ -32,12 +31,12 @@
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -50,12 +49,10 @@
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$ext = $info['extension'];
}
else {
} else {
if ($_GET['ext'] != '') {
$ext = $_GET['ext'];
}
else {
} else {
$ext = $info['extension'];
}
}
@@ -63,4 +60,3 @@
$realPath = PATH_DOCUMENT . $_SESSION['APPLICATION'] . '/outdocs/' . $info['basename'] . '.' . $ext;
G::streamFile( $realPath, true );
?>

View File

@@ -20,29 +20,26 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
if ( (int)$_SESSION['INDEX'] < 1 )
{
if ((int) $_SESSION['INDEX'] < 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
die;
die();
}
global $_DBArray;
if (! isset( $_DBArray )) {
@@ -53,7 +50,6 @@
G::LoadClass( 'case' );
G::LoadClass( 'derivation' );
/* GET , POST & $_SESSION Vars */
if (isset( $_GET['POSITION'] )) {
$_SESSION['STEP_POSITION'] = (int) $_GET['POSITION'];
@@ -73,7 +69,7 @@
/* Prepare page before to show */
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( '
var Cse = {};
@@ -102,18 +98,19 @@
#trigger debug routines...
if (isset( $oProcessFieds['PRO_DEBUG'] ) && $oProcessFieds['PRO_DEBUG']) { #here we must verify if is a debugg session
$_SESSION['TRIGGER_DEBUG']['ISSET'] = 1;
$_SESSION['PMDEBUGGER'] = true;
}
else {
} else {
$_SESSION['TRIGGER_DEBUG']['ISSET'] = 0;
$_SESSION['PMDEBUGGER'] = false;
}
//cleaning debug variables
if (! isset( $_GET['breakpoint'] )) {
if( isset($_SESSION['TRIGGER_DEBUG']['info']) ) unset($_SESSION['TRIGGER_DEBUG']['info']);
if (isset( $_SESSION['TRIGGER_DEBUG']['info'] ))
unset( $_SESSION['TRIGGER_DEBUG']['info'] );
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
@@ -137,8 +134,7 @@
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
$Fields['TAS_UID'] = $_SESSION['TASK'];
//Execute before triggers - End
}
else {
} else {
unset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] );
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
$Fields['TAS_UID'] = $_SESSION['TASK'];
@@ -161,22 +157,25 @@
}
#end trigger debug session.......
//$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List');
//Save data - Start
$oCase->updateCase( $_SESSION['APPLICATION'], $Fields );
//Save data - End
//Obtain previous and next step - Start
try {
$oCase = new Cases();
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
$aPreviousStep = $oCase->getPreviousStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
}
catch ( Exception $e ) {
} catch (Exception $e) {
}
//Obtain previous and next step - End
try {
//Add content content step - Start
$oApp = ApplicationPeer::retrieveByPK( $_SESSION['APPLICATION'] );
@@ -191,16 +190,14 @@
$noShowTitle = $oProcessFieds['PRO_SHOW_MESSAGE'];
}
switch ($_GET['TYPE'])
{
switch ($_GET['TYPE']) {
case 'DYNAFORM':
if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $array );
}
if (! $aPreviousStep) {
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
}
else {
} else {
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = $aPreviousStep['PAGE'];
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation( "ID_PREVIOUS_STEP" );
}
@@ -220,8 +217,10 @@
$oStep = new Step();
$oStep = $oStep->loadByProcessTaskPosition( $_SESSION['PROCESS'], $_SESSION['TASK'], $_GET['POSITION'] );
/** Added By erik 16-05-08
* Description: this was added for the additional database connections */
/**
* Added By erik 16-05-08
* Description: this was added for the additional database connections
*/
G::LoadClass( 'dbConnections' );
$oDbConnections = new dbConnections( $_SESSION['PROCESS'] );
$oDbConnections->loadAdditionalConnections();
@@ -239,8 +238,7 @@
if (! $aPreviousStep) {
$Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
$Fields['PREVIOUS_STEP_LABEL'] = '';
}
else {
} else {
$Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = $aPreviousStep['PAGE'];
$Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation( "ID_PREVIOUS_STEP" );
@@ -249,8 +247,7 @@
}
$Fields['NEXT_STEP'] = $aNextStep['PAGE'];
$Fields['NEXT_STEP_LABEL'] = G::loadTranslation( "ID_NEXT_STEP" );
switch ($_GET['ACTION'])
{
switch ($_GET['ACTION']) {
case 'ATTACH':
switch ($Fields['INP_DOC_FORM_NEEDED']) {
case 'REAL':
@@ -271,10 +268,13 @@
//START: If there is a Break Step registered from Plugin Similar as a Trigger debug
$oPluginRegistry = & PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT_BEFORE )) { //If a Plugin has registered a Break Page Evaluator
$oPluginRegistry->executeTriggers ( PM_UPLOAD_DOCUMENT_BEFORE , array('USR_UID'=>$_SESSION['USER_LOGGED']) );
$oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT_BEFORE, array ('USR_UID' => $_SESSION['USER_LOGGED']
) );
}
//END: If there is a Break Step registered from Plugin
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList', $oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['UID']), array_merge(array('DOC_UID'=>$_GET['UID']),$Fields));//$aFields
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList', $oCase->getInputDocumentsCriteria( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['UID'] ), array_merge( array ('DOC_UID' => $_GET['UID']
), $Fields ) ); //$aFields
//call plugin
//if ( $oPluginRegistry->existsTrigger ( PM_CASE_DOCUMENT_LIST ) ) {
@@ -286,9 +286,11 @@
//else
// $G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList', $oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['UID']), array_merge(array('DOC_UID'=>$_GET['UID']),$Fields));//$aFields
$oHeadPublisher = & headPublisher::getSingleton();
$titleDocument = "<h3>" . $Fields['INP_DOC_TITLE'] . "<br><small>" . G::LoadTranslation( 'ID_INPUT_DOCUMENT' ) . "</small></h3>";
if($Fields['INP_DOC_DESCRIPTION']) $titleDocument.= " ".str_replace("\n","",str_replace("'","\'",nl2br(htmlentities(utf8_decode($Fields['INP_DOC_DESCRIPTION'])))))."";
if ($Fields['INP_DOC_DESCRIPTION'])
$titleDocument .= " " . str_replace( "\n", "", str_replace( "'", "\'", nl2br( htmlentities( utf8_decode( $Fields['INP_DOC_DESCRIPTION'] ) ) ) ) ) . "";
$oHeadPublisher->addScriptCode( "documentName='{$titleDocument}';" );
break;
@@ -302,8 +304,7 @@
$oUser = new Users();
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
switch ($Fields['INP_DOC_FORM_NEEDED'])
{
switch ($Fields['INP_DOC_FORM_NEEDED']) {
case 'REAL':
$sXmlForm = 'cases/cases_ViewInputDocument2';
break;
@@ -324,25 +325,25 @@
case 'OUTPUT_DOCUMENT':
//$G_PUBLISH->AddContent('smarty', 'cases/cases_title', '', '', $array);
require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
$aOD = $oOutputDocument->load( $_GET['UID'] );
if (! $aPreviousStep) {
$aOD['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
}
else {
} else {
$aOD['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = $aPreviousStep['PAGE'];
$aOD['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation( "ID_PREVIOUS_STEP" );
}
$aOD['__DYNAFORM_OPTIONS']['NEXT_STEP'] = $aNextStep['PAGE'];
$aOD['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = G::loadTranslation( "ID_NEXT_STEP" );
switch ($_GET['ACTION'])
{
switch ($_GET['ACTION']) {
case 'GENERATE':
//START: If there is a Break Step registered from Plugin Similar as a Trigger debug
$oPluginRegistry = & PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT_BEFORE )) { //If a Plugin has registered a Break Page Evaluator
$oPluginRegistry->executeTriggers ( PM_UPLOAD_DOCUMENT_BEFORE , array('USR_UID'=>$_SESSION['USER_LOGGED']) );
$oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT_BEFORE, array ('USR_UID' => $_SESSION['USER_LOGGED']
) );
}
//END: If there is a Break Step registered from Plugin
@@ -360,6 +361,7 @@
//Get last Document Version and apply versioning if is enabled
$oAppDocument = new AppDocument();
$lastDocVersion = $oAppDocument->getLastDocVersion( $_GET['UID'], $_SESSION['APPLICATION'] );
@@ -367,6 +369,7 @@
// $lastDocVersion++;
//}
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( AppDocumentPeer::APP_UID, $_SESSION['APPLICATION'] );
//$oCriteria->add(AppDocumentPeer::DEL_INDEX, $_SESSION['INDEX']);
@@ -379,49 +382,24 @@
if (($aOD['OUT_DOC_VERSIONING']) && ($lastDocVersion != 0)) { //Create new Version of current output
$lastDocVersion ++;
if ($aRow = $oDataset->getRow()) {
$aFields = array('APP_DOC_UID' => $aRow['APP_DOC_UID'],
'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX'],
'DOC_UID' => $_GET['UID'],
'DOC_VERSION' => $lastDocVersion+1,
'USR_UID' => $_SESSION['USER_LOGGED'],
'APP_DOC_TYPE' => 'OUTPUT',
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_FILENAME' => $sFilename,
'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags);
$aFields = array ('APP_DOC_UID' => $aRow['APP_DOC_UID'],'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'DOC_UID' => $_GET['UID'],'DOC_VERSION' => $lastDocVersion + 1,'USR_UID' => $_SESSION['USER_LOGGED'],'APP_DOC_TYPE' => 'OUTPUT','APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_FILENAME' => $sFilename,'FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
);
$oAppDocument = new AppDocument();
$oAppDocument->create( $aFields );
$sDocUID = $aRow['APP_DOC_UID'];
}
} else { //No versioning so Update a current Output or Create new if no exist
if ($aRow = $oDataset->getRow()) { //Update
$aFields = array('APP_DOC_UID' => $aRow['APP_DOC_UID'],
'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX'],
'DOC_UID' => $_GET['UID'],
'DOC_VERSION' => $lastDocVersion,
'USR_UID' => $_SESSION['USER_LOGGED'],
'APP_DOC_TYPE' => 'OUTPUT',
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_FILENAME' => $sFilename,
'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags);
$aFields = array ('APP_DOC_UID' => $aRow['APP_DOC_UID'],'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'DOC_UID' => $_GET['UID'],'DOC_VERSION' => $lastDocVersion,'USR_UID' => $_SESSION['USER_LOGGED'],'APP_DOC_TYPE' => 'OUTPUT','APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_FILENAME' => $sFilename,'FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
);
$oAppDocument = new AppDocument();
$oAppDocument->update( $aFields );
$sDocUID = $aRow['APP_DOC_UID'];
} else { //create
if($lastDocVersion==0) $lastDocVersion++;
$aFields = array('APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX'],
'DOC_UID' => $_GET['UID'],
'DOC_VERSION' => $lastDocVersion,
'USR_UID' => $_SESSION['USER_LOGGED'],
'APP_DOC_TYPE' => 'OUTPUT',
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_FILENAME' => $sFilename,
'FOLDER_UID' => $folderId,
'APP_DOC_TAGS' => $fileTags);
if ($lastDocVersion == 0)
$lastDocVersion ++;
$aFields = array ('APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'DOC_UID' => $_GET['UID'],'DOC_VERSION' => $lastDocVersion,'USR_UID' => $_SESSION['USER_LOGGED'],'APP_DOC_TYPE' => 'OUTPUT','APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_FILENAME' => $sFilename,'FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
);
$oAppDocument = new AppDocument();
$aFields['APP_DOC_UID'] = $sDocUID = $oAppDocument->create( $aFields );
@@ -431,6 +409,7 @@
//$sFilename = ereg_replace('[^A-Za-z0-9_]', '_', G::replaceDataField($aOD['OUT_DOC_FILENAME'], $Fields['APP_DATA']));
//if ( $sFilename == '' ) $sFilename='_';
$sFilename = $aFields['APP_DOC_UID'] . "_" . $lastDocVersion;
$pathOutput = PATH_DOCUMENT . $_SESSION['APPLICATION'] . PATH_SEP . 'outdocs' . PATH_SEP;
@@ -440,6 +419,7 @@
$aProperties = array (); //maui
if (! isset( $aOD['OUT_DOC_MEDIA'] ))
$aOD['OUT_DOC_MEDIA'] = 'Letter';
if (! isset( $aOD['OUT_DOC_LEFT_MARGIN'] ))
@@ -452,12 +432,13 @@
$aOD['OUT_DOC_BOTTOM_MARGIN'] = '15';
$aProperties['media'] = $aOD['OUT_DOC_MEDIA'];
$aProperties['margins']=array('left' => $aOD['OUT_DOC_LEFT_MARGIN'], 'right' => $aOD['OUT_DOC_RIGHT_MARGIN'], 'top' => $aOD['OUT_DOC_TOP_MARGIN'], 'bottom' => $aOD['OUT_DOC_BOTTOM_MARGIN']);
$aProperties['margins'] = array ('left' => $aOD['OUT_DOC_LEFT_MARGIN'],'right' => $aOD['OUT_DOC_RIGHT_MARGIN'],'top' => $aOD['OUT_DOC_TOP_MARGIN'],'bottom' => $aOD['OUT_DOC_BOTTOM_MARGIN']
);
if ($aOD['OUT_DOC_PDF_SECURITY_ENABLED'] == '1') {
$aProperties['pdfSecurity']=array('openPassword'=>$aOD['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'],'ownerPassword'=>$aOD['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'],'permissions'=>$aOD['OUT_DOC_PDF_SECURITY_PERMISSIONS']);
$aProperties['pdfSecurity'] = array ('openPassword' => $aOD['OUT_DOC_PDF_SECURITY_OPEN_PASSWORD'],'ownerPassword' => $aOD['OUT_DOC_PDF_SECURITY_OWNER_PASSWORD'],'permissions' => $aOD['OUT_DOC_PDF_SECURITY_PERMISSIONS']
);
}
$oOutputDocument->generate( $_GET['UID'], $Fields['APP_DATA'], $pathOutput,
$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'],$aProperties );
$oOutputDocument->generate( $_GET['UID'], $Fields['APP_DATA'], $pathOutput, $sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean) $aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'], $aProperties );
//$sFilename, $aOD['OUT_DOC_TEMPLATE'], (boolean)$aOD['OUT_DOC_LANDSCAPE'], $aOD['OUT_DOC_GENERATE'] );
break;
case 'JRXML':
@@ -498,6 +479,7 @@
$xmlData .= "</dynaform>\n";
//$iSize = file_put_contents ( $javaOutput . 'addressBook.xml' , $xmlData );
G::LoadClass( 'javaBridgePM' );
$JBPM = new JavaBridgePM();
$JBPM->checkJavaExtension();
@@ -518,37 +500,30 @@
throw (new Exception( 'invalid output document' ));
}
//Execute after triggers - Start
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'OUTPUT_DOCUMENT', $_GET['UID'], 'AFTER', $Fields['APP_DATA'] );
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
$Fields['TAS_UID'] = $_SESSION['TASK'];
//Execute after triggers - End
//Save data - Start
$oCase->updateCase( $_SESSION['APPLICATION'], $Fields );
//Save data - End
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
$oPluginRegistry = & PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
$sPathName = PATH_DOCUMENT . $_SESSION['APPLICATION'] . PATH_SEP;
$oData['APP_UID'] = $_SESSION['APPLICATION'];
$oData['ATTACHMENT_FOLDER'] = true;
switch ($aOD['OUT_DOC_GENERATE']) {
case "BOTH":
$documentData = new uploadDocumentData (
$_SESSION['APPLICATION'],
$_SESSION['USER_LOGGED'],
$pathOutput . $sFilename . '.pdf',
$sFilenameOriginal. '.pdf',
$sDocUID,
$oAppDocument->getDocVersion()
);
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $pathOutput . $sFilename . '.pdf', $sFilenameOriginal . '.pdf', $sDocUID, $oAppDocument->getDocVersion() );
$documentData->sFileType = "PDF";
$documentData->bUseOutputFolder = true;
@@ -560,16 +535,7 @@
unlink( $pathOutput . $sFilename . '.pdf' );
}
$documentData = new uploadDocumentData (
$_SESSION['APPLICATION'],
$_SESSION['USER_LOGGED'],
$pathOutput . $sFilename . '.doc',
$sFilenameOriginal. '.doc',
$sDocUID,
$oAppDocument->getDocVersion()
);
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $pathOutput . $sFilename . '.doc', $sFilenameOriginal . '.doc', $sDocUID, $oAppDocument->getDocVersion() );
$documentData->sFileType = "DOC";
$documentData->bUseOutputFolder = true;
@@ -580,15 +546,7 @@
break;
case "PDF":
$documentData = new uploadDocumentData (
$_SESSION['APPLICATION'],
$_SESSION['USER_LOGGED'],
$pathOutput . $sFilename . '.pdf',
$sFilenameOriginal. '.pdf',
$sDocUID,
$oAppDocument->getDocVersion()
);
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $pathOutput . $sFilename . '.pdf', $sFilenameOriginal . '.pdf', $sDocUID, $oAppDocument->getDocVersion() );
$documentData->sFileType = "PDF";
$documentData->bUseOutputFolder = true;
@@ -598,14 +556,7 @@
}
break;
case "DOC":
$documentData = new uploadDocumentData (
$_SESSION['APPLICATION'],
$_SESSION['USER_LOGGED'],
$pathOutput . $sFilename . '.doc',
$sFilenameOriginal. '.doc',
$sDocUID,
$oAppDocument->getDocVersion()
);
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $pathOutput . $sFilename . '.doc', $sFilenameOriginal . '.doc', $sDocUID, $oAppDocument->getDocVersion() );
$documentData->sFileType = "DOC";
$documentData->bUseOutputFolder = true;
@@ -620,7 +571,7 @@
$outputNextStep = 'cases_Step?TYPE=OUTPUT_DOCUMENT&UID=' . $_GET['UID'] . '&POSITION=' . $_SESSION['STEP_POSITION'] . '&ACTION=VIEW&DOC=' . $sDocUID;
G::header( 'location: ' . $outputNextStep );
die;
die();
break;
case 'VIEW':
if ($noShowTitle == 0) {
@@ -657,7 +608,6 @@
$aFields['FILE2'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&v=' . $lastDocVersion . '&ext=pdf&random=' . rand() . '&PHPSESSID=' . @session_id();
if (is_array( $listing )) { //If exist in Plugin Document List
foreach ($listing as $folderitem) {
if (($folderitem->filename == $aFields['APP_DOC_UID']) && ($folderitem->type == 'DOC')) {
@@ -682,7 +632,6 @@
if ($aGields['OUT_DOC_GENERATE'] == 'PDF')
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ViewOutputDocument3', '', G::array_merges( $aOD, $aFields ), '' );
break;
}
break;
@@ -711,10 +660,7 @@
$aFields['TAS_TYPE_DAY'] = G::LoadTranslation( 'ID_COUNT_DAYS' );
$aFields['TAS_CALENDAR'] = G::LoadTranslation( 'ID_CALENDAR' );
$aFields['TASK'] = $oDerivation->prepareInformation(array(
'USER_UID' => $_SESSION['USER_LOGGED'],
'APP_UID' => $_SESSION['APPLICATION'],
'DEL_INDEX' => $_SESSION['INDEX']
$aFields['TASK'] = $oDerivation->prepareInformation( array ('USER_UID' => $_SESSION['USER_LOGGED'],'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX']
) );
if (empty( $aFields['TASK'] )) {
@@ -725,17 +671,16 @@
$aFields['PROCESS']['ROU_TYPE'] = $aFields['TASK'][1]['ROU_TYPE'];
$aFields['PROCESS']['ROU_FINISH_FLAG'] = false;
foreach ( $aFields['TASK'] as $sKey => &$aValues)
{
foreach ($aFields['TASK'] as $sKey => &$aValues) {
$sPriority = ''; //set priority value
if ($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_PRIORITY_VARIABLE'] != '') {
//TO DO: review this type of assignment
if (isset($aData['APP_DATA'][str_replace('@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_PRIORITY_VARIABLE'])]))
{
if (isset( $aData['APP_DATA'][str_replace( '@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_PRIORITY_VARIABLE'] )] )) {
$sPriority = $aData['APP_DATA'][str_replace( '@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_PRIORITY_VARIABLE'] )];
}
} //set priority value
$sTask = $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_UID'];
//TAS_UID has a hidden field to store the TAS_UID
@@ -760,15 +705,13 @@
break;
case 'MANUAL':
$Aux = array ();
foreach ($aValues['NEXT_TASK']['USER_ASSIGNED'] as $aUser)
{
foreach ($aValues['NEXT_TASK']['USER_ASSIGNED'] as $aUser) {
$Aux[$aUser['USR_UID']] = $aUser['USR_FULLNAME'];
}
asort( $Aux );
$sAux = '<select name="form[TASKS][' . $sKey . '][USR_UID]" id="form[TASKS][' . $sKey . '][USR_UID]">';
$sAux .= '<option value="" enabled>' . G::LoadTranslation( 'ID_SELECT' ) . '</option>';
foreach ($Aux as $key => $value)
{
foreach ($Aux as $key => $value) {
$sAux .= '<option value="' . $key . '">' . $value . '</option>';
}
$sAux .= '</select>';
@@ -783,79 +726,63 @@
//set TAS_MI_INSTANCE_VARIABLE value
$sMIinstanceVar = '';
if ($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE'] != '') {
if (isset($aData['APP_DATA'][str_replace('@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE'])]))
{
if (isset( $aData['APP_DATA'][str_replace( '@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE'] )] )) {
$sMIinstanceVar = $aData['APP_DATA'][str_replace( '@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE'] )];
if ($sMIinstanceVar > $cntInstanceUsers)
throw (new Exception( "Total Multiple Instance Task cannot be greater than number of users in the group." ));
else if ($sMIinstanceVar == 0)
throw (new Exception( "Total Multiple Instance Task cannot be zero." ));
}
else if(is_int((int)$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE']))
{
} else if (is_int( (int) $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE'] )) {
$sMIinstanceVar = $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_INSTANCE_VARIABLE'];
if ($sMIinstanceVar > $cntInstanceUsers)
throw (new Exception( "Total Multiple Instance Task cannot be greater than number of users in the group." ));
}
else
} else
throw (new Exception( "Total Multiple Instance Task variable doesn't have valid value." ));
}
else
} else
throw (new Exception( "Total Multiple Instance Task variable doesn't have valid value." ));
////set TAS_MI_INSTANCE_VARIABLE value
//set TAS_MI_COMPLETE_VARIABLE value
$sMIcompleteVar = '';
if ($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE'] != '') {
if (isset($aData['APP_DATA'][str_replace('@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE'])]))
{
if (isset( $aData['APP_DATA'][str_replace( '@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE'] )] )) {
$sMIcompleteVar = $aData['APP_DATA'][str_replace( '@@', '', $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE'] )];
//
if ($sMIcompleteVar > $sMIinstanceVar)
throw (new Exception( "Total Multiple Instance Task to complete cannot be greater than Total number of Instances." ));
}
else if(is_int((int)$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE']))
{
} else if (is_int( (int) $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE'] )) {
$sMIcompleteVar = $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_MI_COMPLETE_VARIABLE'];
if ($sMIcompleteVar > $sMIinstanceVar)
throw (new Exception( "Total Multiple Instance Task to complete cannot be greater than Total number of Instances." ));
}
else
} else
throw (new Exception( "Total Multiple Instance Task to complete variable doesn't have valid value." ));
}
else
} else
throw (new Exception( "Total Multiple Instance Task to complete variable doesn't have valid value." ));
//set TAS_MI_COMPLETE_VARIABLE value
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_NEXT'] = $aValues['NEXT_TASK']['TAS_ASSIGN_TYPE'];
//If the Users in the group is equal to the MI Instance variable then Show all the users without Dropdown
if($sMIinstanceVar == $cntInstanceUsers)
{
foreach ($aValues['NEXT_TASK']['USER_ASSIGNED'] as $key=>$aUser)
{
if ($sMIinstanceVar == $cntInstanceUsers) {
foreach ($aValues['NEXT_TASK']['USER_ASSIGNED'] as $key => $aUser) {
$hiddenName = "form[TASKS][" . $sKey . "][NEXT_TASK][USER_ASSIGNED][" . $key . "][USR_UID]";
$aFields['TASK'][$sKey]['NEXT_TASK']['USER_ASSIGNED'][$key]['USR_UID'] = $aUser['USR_FULLNAME'];
$aFields['TASK'][$sKey]['NEXT_TASK']['USER_ASSIGNED'][$key]['USR_HIDDEN_FIELD'] = '<input type="hidden" name="' . $hiddenName . '" id="' . $hiddenName . '" value="' . $aUser['USR_UID'] . '">';
}
}
//If the Users in the group is not equal to the MI Instance variable then Show Only count users in dropdown
else
{
} //If the Users in the group is not equal to the MI Instance variable then Show Only count users in dropdown
else {
$Aux = array ();
foreach ($aValues['NEXT_TASK']['USER_ASSIGNED'] as $aUser)
{
foreach ($aValues['NEXT_TASK']['USER_ASSIGNED'] as $aUser) {
$Aux[$aUser['USR_UID']] = $aUser['USR_FULLNAME'];
}
asort( $Aux );
$aAux = '<option value="" enabled>' . G::LoadTranslation( 'ID_SELECT' ) . '</option>';
foreach ($Aux as $akey => $value)
{
foreach ($Aux as $akey => $value) {
$aAux .= '<option value="' . $akey . '">' . $value . '</option>';
}
for($key=0; $key < $sMIinstanceVar; $key++)
{
for ($key = 0; $key < $sMIinstanceVar; $key ++) {
$hiddenName = "form[TASKS][" . $sKey . "][NEXT_TASK][USER_ASSIGNED][" . $key . "][USR_UID]";
$sAux = "<select name=$hiddenName id=$hiddenName";
$sAux .= $aAux;
@@ -881,8 +808,7 @@
{
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TRANSFER_FLY'] = strtolower( $aValues['NEXT_TASK']['TAS_TRANSFER_FLY'] );
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TRANSFER_HIDDEN_FLY'] = "<input type=hidden name='" . $hiddenName . "[NEXT_TASK][TAS_TRANSFER_HIDDEN_FLY]' id='" . $hiddenName . "[NEXT_TASK][TAS_TRANSFER_HIDDEN_FLY]' value=" . $aValues['NEXT_TASK']['TAS_TRANSFER_FLY'] . ">";
if($aValues['NEXT_TASK']['TAS_TRANSFER_FLY'] == 'true')
{
if ($aValues['NEXT_TASK']['TAS_TRANSFER_FLY'] == 'true') {
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_DURATION'] = '<input type="text" size="5" name="' . $hiddenName . '[NEXT_TASK][TAS_DURATION]" id="' . $hiddenName . '[NEXT_TASK][TAS_DURATION]" value="' . $aValues['NEXT_TASK']['TAS_DURATION'] . '">';
$hoursSelected = $daysSelected = '';
if ($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TIMEUNIT'] == 'HOURS')
@@ -917,10 +843,8 @@
$aCalendar['CALENDAR_NAME'] = 'DEFAULT';
$sAux = '<select name=' . $hiddenName . '[NEXT_TASK][TAS_CALENDAR] id= ' . $hiddenName . '[NEXT_TASK][TAS_CALENDAR] ';
$sAux .= "<option value='none'>-None-</option> ";
foreach($availableCalendar as $aCalendar)
{
if(is_array($aCalendar))
{
foreach ($availableCalendar as $aCalendar) {
if (is_array( $aCalendar )) {
$sAux .= "<option value='" . $aCalendar['CALENDAR_UID'] . "'>" . $aCalendar['CALENDAR_NAME'] . "</option> ";
}
}
@@ -929,7 +853,6 @@
}
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_ASSIGN_TYPE'] = '<input type="hidden" name="' . $hiddenName . '[TAS_ASSIGN_TYPE]" id="' . $hiddenName . '[TAS_ASSIGN_TYPE]" value="' . $aValues['NEXT_TASK']['TAS_ASSIGN_TYPE'] . '">';
if (isset( $aValues['NEXT_TASK']['TAS_DEF_PROC_CODE'] )) {
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_DEF_PROC_CODE'] = '<input type="hidden" name="' . $hiddenName . '[TAS_DEF_PROC_CODE]" id="' . $hiddenName . '[TAS_DEF_PROC_CODE]" value="' . $aValues['NEXT_TASK']['TAS_DEF_PROC_CODE'] . '">';
@@ -944,6 +867,7 @@
/**
* New Feature: Derivation Screen can be personalized
*
* @author Erik Amaru Ortiz <erik@colosa.com>
*/
$tplFile = 'cases/cases_ScreenDerivation';
@@ -954,8 +878,7 @@
if (! empty( $tasDerivationScreenTpl )) { //erik: first, verify if the task has a personalized template (for derivation screen)
$tplFile = $tasDerivationScreenTpl;
$tplFile = PATH_DATA_MAILTEMPLATES . $aFields['PROCESS']['PRO_UID'] . PATH_SEP . $tplFile;
}
else { //erik: verify if the process has a personalized template (for derivation screen)
} else { //erik: verify if the process has a personalized template (for derivation screen)
if (! empty( $aFields['PROCESS']['PRO_DERIVATION_SCREEN_TPL'] )) {
$tplFile = $aFields['PROCESS']['PRO_DERIVATION_SCREEN_TPL'];
$tplFile = PATH_DATA_MAILTEMPLATES . $aFields['PROCESS']['PRO_UID'] . PATH_SEP . $tplFile;
@@ -1000,16 +923,17 @@
if (class_exists( $sNamespace . "plugin" )) {
if (! $aPreviousStep) {
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
}
else {
} else {
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = $aPreviousStep['PAGE'];
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation( "ID_PREVIOUS_STEP" );
}
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = $aNextStep['PAGE'];
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = G::loadTranslation( "ID_NEXT_STEP" );
/** Added By erik date: 16-05-08
* Description: this was added for the additional database connections */
/**
* Added By erik date: 16-05-08
* Description: this was added for the additional database connections
*/
G::LoadClass( 'dbConnections' );
$oDbConnections = new dbConnections( $_SESSION['PROCESS'] );
$oDbConnections->loadAdditionalConnections();
@@ -1020,23 +944,22 @@
}" );
$G_PUBLISH->AddContent( 'content', $stepFilename );
}
else {
$aMessage['MESSAGE'] = G::loadTranslation('ID_EXTERNAL_STEP_MISSING', SYS_LANG, array("plugin"=>$sNamespace) );
} else {
$aMessage['MESSAGE'] = G::loadTranslation( 'ID_EXTERNAL_STEP_MISSING', SYS_LANG, array ("plugin" => $sNamespace
) );
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
}
break;
}
//Add content content step - End
}
catch ( Exception $e ) {
} catch (Exception $e) {
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
$aMessage = array ();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish', 'blank' );
die;
die();
}
$oHeadPublisher = & headPublisher::getSingleton();
@@ -1061,4 +984,3 @@
}' );
}

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
// die("first");
/* Permissions */
@@ -28,19 +27,19 @@ switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
if ((int) $_SESSION['INDEX'] < 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
die;
die();
}
/* Includes */
G::LoadClass( 'case' );
@@ -49,17 +48,17 @@ G::LoadClass('derivation');
/* GET , POST & $_SESSION Vars */
//$_SESSION['STEP_POSITION'] = (int)$_GET['POSITION'];
/* Menues */
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
/* Prepare page before to show */
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
@@ -108,20 +107,19 @@ if (isset($_GET['type'])) {
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
/** Added By erik
/**
* Added By erik
* date: 16-05-08
* Description: this was added for the additional database connections */
* Description: this was added for the additional database connections
*/
G::LoadClass( 'dbConnections' );
$oDbConnections = new dbConnections( $_SESSION['PROCESS'] );
$oDbConnections->loadAdditionalConnections();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
if ($_GET['DYN_UID'] != '') {
$_SESSION['CURRENT_DYN_UID'] = $_GET['DYN_UID'];
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '',
$Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID='.$_GET['DYN_UID']);
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] );
}
G::RenderPage( 'publish', 'blank' );
@@ -150,3 +148,4 @@ function setSelect()
}
}
</script>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//die("second");
/* Permissions */
@@ -28,19 +27,19 @@ switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
if ((int) $_SESSION['INDEX'] < 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
die;
die();
}
/* Includes */
G::LoadClass( 'case' );
@@ -49,17 +48,17 @@ G::LoadClass('derivation');
/* GET , POST & $_SESSION Vars */
//$_SESSION['STEP_POSITION'] = (int)$_GET['POSITION'];
/* Menues */
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
/* Prepare page before to show */
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
// Check if these code needs to be removed since the interface ar now moving to ExtJS
$oHeadPublisher->addScriptCode( '
@@ -88,7 +87,7 @@ $_SESSION['STEP_POSITION'] = (int)$_GET['position'];
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
if (! isset( $_GET['ex'] )) {
$_GET['ex'] = 0;
@@ -97,8 +96,7 @@ if (!isset($_GET['ex'])) {
if (! isset( $_GET['INP_DOC_UID'] )) {
G::LoadClass( 'case' );
$oCase = new Cases();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_InputdocsListToRevise',
$oCase->getInputDocumentsCriteriaToRevise($_SESSION['APPLICATION']), '');
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_InputdocsListToRevise', $oCase->getInputDocumentsCriteriaToRevise( $_SESSION['APPLICATION'] ), '' );
} else {
$oInputDocument = new InputDocument();
$Fields = $oInputDocument->load( $_GET['INP_DOC_UID'] );
@@ -122,9 +120,8 @@ if (!isset($_GET['INP_DOC_UID'])) {
$oHeadPublisher->addScriptCode( 'var documentName=\'Reviewing Input Document<br>' . $docName . '\';' );
// $G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', $Fields, 'cases_SupervisorSaveDocument?UID=' .
//$_GET['INP_DOC_UID'] . '&APP_UID=' . $_GET['APP_UID'] . '&position=' . $_GET['position']);
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocumentsToRevise', 'cases/cases_ToReviseInputdocsList',
$oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['INP_DOC_UID']),
array_merge(array('DOC_UID'=>$_GET['INP_DOC_UID']),$Fields));
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-inputDocumentsToRevise', 'cases/cases_ToReviseInputdocsList', $oCase->getInputDocumentsCriteria( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['INP_DOC_UID'] ), array_merge( array ('DOC_UID' => $_GET['INP_DOC_UID']
), $Fields ) );
//$aFields
// $G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList',
//$oCase->getInputDocumentsCriteria($_SESSION['APPLICATION']));//$aFields
@@ -153,3 +150,4 @@ function setSelect()
}
}
</script>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
@@ -28,12 +27,12 @@ switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -46,11 +45,10 @@ $G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
/* Prepare page before to show */
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
// check if the code for the addScriptCode is necessary since the interface is now based in ExtJs
$oHeadPublisher->addScriptCode( '
@@ -69,8 +67,7 @@ leimnud.event.add(window,"load",function(){
' );
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$oCase = new Cases();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_OutputdocsListToRevise',
$oCase->getOutputDocumentsCriteriaToRevise($_SESSION['APPLICATION']), '');
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_OutputdocsListToRevise', $oCase->getOutputDocumentsCriteriaToRevise( $_SESSION['APPLICATION'] ), '' );
G::RenderPage( 'publish', 'blank' );
if (! isset( $_GET['ex'] )) {
@@ -98,3 +95,4 @@ function setSelect()
}
}
</script>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
@@ -28,15 +27,8 @@
G::LoadClass( 'case' );
$oAppDocument = new AppDocument();
$aFields = array('APP_UID' => $_GET['APP_UID'],
'DEL_INDEX' => 100000,
'USR_UID' => $_SESSION['USER_LOGGED'],
'DOC_UID' => $_GET['UID'],
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
'APP_DOC_TITLE' => '',
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '');
$aFields = array ('APP_UID' => $_GET['APP_UID'],'DEL_INDEX' => 100000,'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $_GET['UID'],'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : ''
);
$oAppDocument->create( $aFields );
$sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
@@ -52,13 +44,7 @@
$oPluginRegistry = & PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
$oData['APP_UID'] = $_GET['APP_UID'];
$documentData = new uploadDocumentData (
$_GET['APP_UID'],
$_SESSION['USER_LOGGED'],
$sPathName . $sFileName,
$aFields['APP_DOC_FILENAME'],
$sAppDocUid
);
$documentData = new uploadDocumentData( $_GET['APP_UID'], $_SESSION['USER_LOGGED'], $sPathName . $sFileName, $aFields['APP_DOC_FILENAME'], $sAppDocUid );
$oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
unlink( $sPathName . $sFileName );
}
@@ -71,16 +57,16 @@
$aFields = $oCase->loadCase( $_GET['APP_UID'] );
$aNextStep = $oCase->getNextSupervisorStep( $aFields['PRO_UID'], $_GET['position'], 'INPUT_DOCUMENT' );
G::header( 'location: ' . 'cases_StepToReviseInputs?type=INPUT_DOCUMENT&INP_DOC_UID=' . $aNextStep['UID'] . '&position=' . $aNextStep['POSITION'] . '&APP_UID=' . $_GET['APP_UID'] . '&DEL_INDEX=' );
die;
}
else {
die();
} else {
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
die;
die();
}
} catch (Exception $e) {
/* Render Error page */
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish' );
}

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
@@ -28,19 +27,19 @@ switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
if ((int) $_SESSION['INDEX'] < 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
die;
die();
}
/* Includes */
G::LoadClass( 'case' );
@@ -49,6 +48,7 @@ G::LoadClass('derivation');
/* GET , POST & $_SESSION Vars */
//$_SESSION['STEP_POSITION'] = (int)$_GET['POSITION'];
/* Menues */
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
@@ -61,7 +61,7 @@ $Fields = $oCase->loadCase($_SESSION['APPLICATION']);
require_once 'classes/model/AppDocument.php';
require_once 'classes/model/Users.php';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load( $_GET['DOC'] );
@@ -77,6 +77,3 @@ $G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ViewInputDocumentToRev
G::RenderPage( 'publish' );
?>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
@@ -28,12 +27,12 @@ switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
@@ -46,11 +45,10 @@ $G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
/* Prepare page before to show */
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( '
@@ -89,12 +87,13 @@ switch ($aOD ['OUT_DOC_GENERATE']) {
break;
}
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ViewOutputDocumentToRevise', '', G::array_merges( $aOD, $aFields ), '' );
//
G::RenderPage( 'publish', 'blank' );
if(!isset($_GET['ex'])) $_GET['ex']=0;
if (! isset( $_GET['ex'] ))
$_GET['ex'] = 0;
?>
<script type="text/javascript">
@@ -117,3 +116,4 @@ function setSelect()
}
}
</script>

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
@@ -29,12 +28,12 @@ try {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
G::LoadClass( 'case' );
@@ -64,12 +63,12 @@ try {
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $sText;
$aMessage['URL'] = 'cases_ReassignByUser?REASSIGN_USER=' . $_POST['USR_UID'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage );
G::RenderPage( 'publish' );
}
catch (Exception $oException) {
} catch (Exception $oException) {
die( $oException->getMessage() );
}

View File

@@ -12,7 +12,12 @@ $pmTableFields = (isset($_POST['tableFields'])) ? G::json_decode($_POST['tableFi
// default parameters
//$pmTableName = 'Sender';
$pmTableFields = array(array('FLD_NAME'=>'APP_UID'),array('FLD_NAME'=>'CON_NAME'),array('FLD_NAME'=>'CON_ADDR'),array('FLD_NAME'=>'_cedula'));
$pmTableFields = array (array ('FLD_NAME' => 'APP_UID'
),array ('FLD_NAME' => 'CON_NAME'
),array ('FLD_NAME' => 'CON_ADDR'
),array ('FLD_NAME' => '_cedula'
)
);
// setting the data to assemble the table
$aData = array ();
@@ -37,24 +42,11 @@ foreach ($pmTableFields as $iRow => $aRow) {
foreach ($pmTableFields as $iRow => $aRow) {
$oFields->create(array('FLD_INDEX' => $iRow+1,
'ADD_TAB_UID' => $sAddTabUid,
'FLD_NAME' => $aRow['FLD_NAME'],
'FLD_DESCRIPTION' => isset($aRow['FLD_DESCRIPTION']) ? $aRow['FLD_DESCRIPTION'] : '',
'FLD_TYPE' => isset($aRow['FLD_TYPE']) ? $aRow['FLD_TYPE'] : 'VARCHAR',
'FLD_SIZE' => isset($aRow['FLD_SIZE']) ? $aRow['FLD_SIZE'] : '32',
'FLD_NULL' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),
'FLD_AUTO_INCREMENT' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),
'FLD_KEY' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0),
'FLD_FOREIGN_KEY' => ($aRow['FLD_FOREIGN_KEY'] == 'on' ? 1 : 0),
'FLD_FOREIGN_KEY_TABLE' => isset($aRow['FLD_FOREIGN_KEY_TABLE']) ? $aRow['FLD_FOREIGN_KEY_TABLE'] : ''));
$oFields->create( array ('FLD_INDEX' => $iRow + 1,'ADD_TAB_UID' => $sAddTabUid,'FLD_NAME' => $aRow['FLD_NAME'],'FLD_DESCRIPTION' => isset( $aRow['FLD_DESCRIPTION'] ) ? $aRow['FLD_DESCRIPTION'] : '','FLD_TYPE' => isset( $aRow['FLD_TYPE'] ) ? $aRow['FLD_TYPE'] : 'VARCHAR','FLD_SIZE' => isset( $aRow['FLD_SIZE'] ) ? $aRow['FLD_SIZE'] : '32','FLD_NULL' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),'FLD_AUTO_INCREMENT' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),'FLD_KEY' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0),'FLD_FOREIGN_KEY' => ($aRow['FLD_FOREIGN_KEY'] == 'on' ? 1 : 0),'FLD_FOREIGN_KEY_TABLE' => isset( $aRow['FLD_FOREIGN_KEY_TABLE'] ) ? $aRow['FLD_FOREIGN_KEY_TABLE'] : ''
) );
$aFields[] = array('sType' => isset($aRow['FLD_TYPE']) ? $aRow['FLD_TYPE'] : 'VARCHAR',
'iSize' => isset($aRow['FLD_SIZE']) ? $aRow['FLD_SIZE'] : '32',
'sFieldName' => $aRow['FLD_NAME'],
'bNull' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),
'bAI' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),
'bPrimaryKey' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0));
$aFields[] = array ('sType' => isset( $aRow['FLD_TYPE'] ) ? $aRow['FLD_TYPE'] : 'VARCHAR','iSize' => isset( $aRow['FLD_SIZE'] ) ? $aRow['FLD_SIZE'] : '32','sFieldName' => $aRow['FLD_NAME'],'bNull' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),'bAI' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),'bPrimaryKey' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0)
);
}
$oAdditionalTables->createTable( strtoupper( $pmTableName ), 'wf', $aFields );
@@ -64,7 +56,6 @@ require_once ( "classes/model/Application.php" );
require_once ("classes/model/AdditionalTables.php");
require_once ("classes/model/Fields.php");
$Criteria = new Criteria( 'workflow' );
$Criteria->addSelectColumn( ApplicationPeer::APP_UID );
$Criteria->addSelectColumn( ApplicationPeer::APP_DATA );
@@ -107,4 +98,3 @@ $direccion = 'direccion '. rand (1000,999999);
}
print "--$i--";
?>

View File

@@ -4,26 +4,26 @@ switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die;
die();
break;
}
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1)
return $RBAC_Response;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'cases/cases_toRevise' );
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_toReviseIn', '', '', array () );
G::RenderPage( "publish-treeview" );

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
require_once 'classes/model/LogCasesSchedulerPeer.php';
@@ -49,8 +48,7 @@ $oCriteria->addSelectColumn(LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS);
$oCriteria->addSelectColumn( LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS );
if ($filter != '') {
$c_or = $oCriteria->getNewCriterion(LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS,'%'.$filter.'%', Criteria::LIKE));
$c_or = $oCriteria->getNewCriterion( LogCasesSchedulerPeer::WS_CREATE_CASE_STATUS, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( LogCasesSchedulerPeer::WS_ROUTE_CASE_STATUS, '%' . $filter . '%', Criteria::LIKE ) );
$oCriteria->add( $c_or );
}
@@ -72,11 +70,10 @@ $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();
@@ -85,5 +82,5 @@ while( $oDataset->next() ) {
//$oLogCasesScheduler = new LogCasesScheduler();
//$arrData = $oLogCasesScheduler->getAll();
echo '{results: ' . $results . ', rows: ' . G::json_encode( $addTables ) . '}';

View File

@@ -22,6 +22,7 @@ foreach($aTriggers as $aTrigger) {
//$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' );
@@ -57,7 +58,6 @@ foreach($DEBUG_ERRORS as $error){
}
}
/*echo '{total:5, data:[
{name:"trigger1", execution_time:"after"},
{name:"trigger2", execution_time:"before"},
@@ -70,3 +70,4 @@ $triggersRet->total = count($triggersList);
$triggersRet->data = $triggersList;
echo G::json_encode( $triggersRet );

View File

@@ -28,13 +28,14 @@ switch ($request) {
foreach ($field as $row) {
if ($sw) {
foreach ($row as $key => $value) {
$response->headers[] = Array('name' => $key);
$response->columns[] = Array('header' => $key, 'width' => 100, 'dataIndex' => $key);
$response->headers[] = Array ('name' => $key
);
$response->columns[] = Array ('header' => $key,'width' => 100,'dataIndex' => $key
);
}
$sw = false;
}
$tmp = Array ();
foreach ($row as $key => $value) {
$tmp[] = $value;
@@ -43,12 +44,18 @@ switch ($request) {
}
} else {
if (is_object( $field )) {
$response->headers = Array(Array('name' => 'name'), Array('name' => 'value'));
$response->columns = Array(Array('header' => 'Property', 'width' => 100, 'dataIndex' => 'name'),
Array('header' => 'Value', 'width' => 100, 'dataIndex' => 'value'));
$response->headers = Array (Array ('name' => 'name'
),Array ('name' => 'value'
)
);
$response->columns = Array (Array ('header' => 'Property','width' => 100,'dataIndex' => 'name'
),Array ('header' => 'Value','width' => 100,'dataIndex' => 'value'
)
);
foreach ($field as $key => $value) {
$response->rows[] = Array($key, $value);
$response->rows[] = Array ($key,$value
);
}
}
}
@@ -67,7 +74,6 @@ switch ($request) {
$aVars = array_merge( $aFields['APP_DATA'], $aVars );
if (isset( $_POST['filter'] ) && $_POST['filter'] == 'dyn') {
$sysVars = array_keys( G::getSystemConstants() );
$varNames = array_keys( $aVars );

View File

@@ -20,10 +20,8 @@
*
* 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__ );
return $newFile;

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$RBAC->requirePermissions( 'PM_CASES' );
@@ -30,7 +29,7 @@ $G_ID_MENU_SELECTED = 'CASES';
$_POST['qs'] = isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] != '' ? '?' . $_SERVER['QUERY_STRING'] : '';
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'cases/cases_Load' );
G::RenderPage( 'publish' );

View File

@@ -20,21 +20,17 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
G::LoadClass( "configuration" );
$conf = new Configurations();
$oHeadPublisher = &headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( "cases/main", false ); //Adding a javascript file .js
$oHeadPublisher->addContent( "cases/main" ); //Adding a html file .html.
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
$memcache = &PMmemcached::getSingleton( SYS_SYS );

View File

@@ -20,10 +20,10 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
*
* @author Erik Amaru Ortiz <erik@colosa.com>
* @date Jan 3th, 2010
*/
@@ -40,18 +40,16 @@
if (is_null( $_GET['DEL_INDEX'] )) {
throw new Exception( G::LoadTranslation( 'ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER' ) );
}
}
else {
} else {
throw new Exception( "Application ID or Delegation Index is missing!. The System can't open the case." );
}
}
require_once ("classes/model/Step.php");
G::LoadClass( "configuration" );
G::LoadClass( "case" );
$oCase = new Cases();
$conf = new Configurations;
$conf = new Configurations();
$oHeadPublisher = & headPublisher::getSingleton();
@@ -67,8 +65,7 @@
if (! isset( $_GET['to_revise'] )) {
$script = 'cases_Open?';
}
else {
} else {
$script = 'cases_OpenToRevise?';
$delIndex = $_GET['DEL_INDEX'];
$appUid = $_GET['APP_UID'];
@@ -78,7 +75,7 @@
echo "<div id='toReviseTree'></div>";
}
$oStep = new Step;
$oStep = new Step();
$oStep = $oStep->loadByProcessTaskPosition( $case['PRO_UID'], $case['TAS_UID'], 1 );
$oHeadPublisher->assign( 'uri', $script . $uri );
@@ -87,7 +84,5 @@
$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

@@ -22,62 +22,19 @@ try {
$userUid = (isset( $_SESSION["USER_LOGGED"] ) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
$user = ($user == "CURRENT_USER") ? $userUid : $user;
if ((
$action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" ||
$action == "unassigned" || $action == "search"
)
&&
(($solrConf = System::solrEnv()) !== false)
) {
if (($action == "todo" || $action == "draft" || $action == "sent" || $action == "selfservice" || $action == "unassigned" || $action == "search") && (($solrConf = System::solrEnv()) !== false)) {
G::LoadClass( "AppSolr" );
$ApplicationSolrIndex = new AppSolr(
$solrConf["solr_enabled"],
$solrConf["solr_host"],
$solrConf["solr_instance"]
);
$ApplicationSolrIndex = new AppSolr( $solrConf["solr_enabled"], $solrConf["solr_host"], $solrConf["solr_instance"] );
$data = $ApplicationSolrIndex->getAppGridData(
$userUid,
$start,
$limit,
$action,
$filter,
$search,
$process,
$user,
$status,
$type,
$dateFrom,
$dateTo,
$callback,
$dir,
$sort
);
$data = $ApplicationSolrIndex->getAppGridData( $userUid, $start, $limit, $action, $filter, $search, $process, $user, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort );
$result = G::json_encode( $data );
} else {
G::LoadClass( "applications" );
$apps = new Applications();
$data = $apps->getAll(
$userUid,
$start,
$limit,
$action,
$filter,
$search,
$process,
$user,
$status,
$type,
$dateFrom,
$dateTo,
$callback,
$dir,
$sort,
$category
);
$data = $apps->getAll( $userUid, $start, $limit, $action, $filter, $search, $process, $user, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category );
$result = G::json_encode( $data );
}
@@ -85,7 +42,6 @@ try {
echo $result;
} catch (Exception $e) {
$msg = array ("error" => $e->getMessage() );
echo G::json_encode( $msg );
}

View File

@@ -5,7 +5,8 @@
$query = isset( $_POST['query'] ) ? $_POST['query'] : '';
//$action = isset($_GET['action']) ? $_GET['action'] : 'read';
$option = '';
if ( isset($_GET['t'] ) ) $option = $_GET['t'];
if (isset( $_GET['t'] ))
$option = $_GET['t'];
try {
G::LoadClass( "BasePeer" );
@@ -28,11 +29,13 @@
$Criteria->add( AppCacheViewPeer::APP_STATUS, "TO_DO", CRITERIA::EQUAL );
$Criteria->add( AppCacheViewPeer::USR_UID, $sUIDUserLogged );
//$totalCount = AppCacheViewPeer::doCount( $Criteria );
if ( isset($limit) ) $Criteria->setLimit( $limit );
if ( isset($start) ) $Criteria->setOffset( $start );
if (isset( $limit ))
$Criteria->setLimit( $limit );
if (isset( $start ))
$Criteria->setOffset( $start );
if ($sort != '') {
if ($dir == 'DESC')
@@ -58,10 +61,10 @@
print G::json_encode( $result );
}
catch ( Exception $e ) {
$G_PUBLISH = new Publisher;
} catch (Exception $e) {
$G_PUBLISH = new Publisher();
$aMessage['MESSAGE'] = $e->getMessage();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publish', 'blank' );
}

View File

@@ -21,7 +21,8 @@
// 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'] : '';
@@ -54,7 +55,8 @@
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']
}
}
}
@@ -63,7 +65,8 @@
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']);
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']
);
}
}
$oTmp = $aUsersInvolved;
@@ -71,27 +74,11 @@
array_push( $aCasesList, $aCase );
}
$filedNames = Array (
"APP_UID",
"APP_NUMBER",
"APP_UPDATE_DATE",
"DEL_PRIORITY",
"DEL_INDEX",
"TAS_UID",
"DEL_INIT_DATE",
"DEL_FINISH_DATE",
"USR_UID",
"APP_STATUS",
"DEL_TASK_DUE_DATE",
"APP_CURRENT_USER",
"APP_TITLE",
"APP_PRO_TITLE",
"APP_TAS_TITLE",
"APP_DEL_PREVIOUS_USER",
"USERS"
$filedNames = Array ("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER","USERS"
);
$aCasesList = array_merge(Array($filedNames), $aCasesList);
$aCasesList = array_merge( Array ($filedNames
), $aCasesList );
$rows = array ();
$i = $start;
for ($j = 0; $j < $limit; $j ++) {
@@ -108,3 +95,4 @@
$result['data'] = $rows;
//print the result in json format
print G::json_encode( $result );

View File

@@ -46,8 +46,7 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
foreach ($sortable_array as $k => $v) {
if ($query == '') {
$new_array[] = $array[$k];
}
else {
} else {
if (preg_match( "/" . $query . "/i", $array[$k]['userFullname'] )) {
$new_array[] = $array[$k];
}
@@ -58,6 +57,7 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
}
// $APP_UIDS = explode(',', $_POST['APP_UID']);
$appUid = isset( $_POST['application'] ) ? $_POST['application'] : '';
// $processUid = isset($_POST['process']) ? $_POST['process'] : '';
$TaskUid = isset( $_POST['task'] ) ? $_POST['task'] : '';
@@ -77,7 +77,7 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
$aUsersInvolved = Array ();
$aCaseGroups = $oTasks->getGroupsOfTask( $TaskUid, 1 );
$oConf = new Configurations;
$oConf = new Configurations();
$ConfEnv = $oConf->getFormats();
foreach ($aCaseGroups as $aCaseGroup) {
$aCaseUsers = $oGroups->getUsersOfGroup( $aCaseGroup['GRP_UID'] );
@@ -86,7 +86,8 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $aCaseUserRecord );
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $sCaseUser); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $sCaseUser
); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
}
@@ -97,7 +98,8 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
$aCaseUserRecord = $oUser->load( $aCaseUser['USR_UID'] );
$sCaseUser = G::getFormatUserList( $ConfEnv['format'], $aCaseUserRecord );
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $sCaseUser); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
$aUsersInvolved[] = array ('userUid' => $aCaseUser['USR_UID'],'userFullname' => $sCaseUser
); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
}
}
// $oTmp = new stdClass();

View File

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
$aData = G::json_decode( $_POST['data'] );
$appSelectedUids = array ();
@@ -65,13 +64,10 @@
$oCases->reassignCase( $aCase['APP_UID'], $aCase['DEL_INDEX'], ($aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED']), $data->APP_REASSIGN_USER_UID );
$currentCasesReassigned ++;
$casesReassignedCount ++;
$serverResponse[] = array ('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER,
'APP_TITLE' => $data->APP_TITLE,
'TAS_TITLE' => $data->APP_TAS_TITLE,
'REASSIGNED_CASES' => $currentCasesReassigned);
$serverResponse[] = array ('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER,'APP_TITLE' => $data->APP_TITLE,'TAS_TITLE' => $data->APP_TAS_TITLE,'REASSIGNED_CASES' => $currentCasesReassigned
);
}
}
else {
} else {
$oTmpReassignCriteria = $oCasesReassignList;
$oTmpReassignCriteria->add( AppCacheViewPeer::TAS_UID, $aData->TAS_UID );
$rs = AppCacheViewPeer::doSelectRS( $oTmpReassignCriteria );
@@ -90,8 +86,10 @@
$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

@@ -20,7 +20,6 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
@@ -41,13 +40,11 @@ try {
if ($_REQUEST['APP_UID'] == '' || $_REQUEST['DEL_INDEX'] == '' || $_REQUEST['DYN_UID'] == '') {
throw new Exception( G::LoadTranslation( 'ID_REQUIRED_FIELDS_ERROR' ) . ' (APP_UID, DEL_INDEX, DYN_UID)' );
}
G::LoadClass( 'case' );
$case = new Cases();
if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && $case->userParticipatedInCase( $_REQUEST['APP_UID'], $_SESSION['USER_LOGGED'] ) == 0) {
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
}
$applicationFields = $case->loadCase( $_REQUEST['APP_UID'], $_REQUEST['DEL_INDEX'] );
if (file_exists( PATH_DYNAFORM . $applicationFields['PRO_UID'] . PATH_SEP . $_REQUEST['DYN_UID'] . '.xml' )) {
@@ -66,15 +63,15 @@ try {
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $applicationFields['PRO_UID'] . '/' . $_REQUEST['DYN_UID'], '', $applicationFields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish', 'blank' );
}
else {
} else {
throw new Exception( G::LoadTranslation( 'INVALID_FILE' ) . ': ' . $_REQUEST['DYN_UID'] );
}
}
catch (Exception $error) {
} 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();
}