CODE STYLE Formating workflow/engine/methods/cases

Change format files in workflow/engine/methods/cases
This commit is contained in:
norahmollo
2012-10-18 15:42:36 +00:00
parent c1de21c87f
commit 2cb0b136d1
36 changed files with 3579 additions and 3856 deletions

View File

@@ -1,82 +1,74 @@
<?php
/**
* cases_CatchExecute.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
if (isset($_POST['form']['BTN_CANCEL'])) {
header ( "Location: ../cases/main");
die;
}
/* Includes */
G::LoadClass('case');
$oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
<?php
/**
* cases_CatchExecute.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
if (isset( $_POST['form']['BTN_CANCEL'] )) {
header( "Location: ../cases/main" );
die();
}
/* Includes */
G::LoadClass( 'case' );
$oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
//if there are no user in the delegation row, this case is still in selfservice
if ( $aDelegation['USR_UID'] == "" ) {
$oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] );
} else {
G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error');
}
$validation = (SYS_SKIN != 'uxs')? 'true' : 'false';
die('<script type="text/javascript">
if ('.$validation.') {
if ($aDelegation['USR_UID'] == "") {
$oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] );
} else {
G::SendMessageText( G::LoadTranslation( 'ID_CASE_ALREADY_DERIVATED' ), 'error' );
}
$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

@@ -1,95 +1,91 @@
<?php
/**
* cases_Resume.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
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';
$objProc = new Process();
$aProc = $objProc->load($Fields['PRO_UID' ] );
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
$aTask = $objTask->load($Fields['TAS_UID' ] );
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$Fields['STATUS'] .= ' ( '. G::LoadTranslation('ID_UNASSIGNED') . ' )';
<?php
/**
* cases_Resume.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
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';
$objProc = new Process();
$aProc = $objProc->load( $Fields['PRO_UID'] );
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
$aTask = $objTask->load( $Fields['TAS_UID'] );
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$Fields['STATUS'] .= ' ( ' . G::LoadTranslation( 'ID_UNASSIGNED' ) . ' )';
//now getting information about the PREVIOUS task. If is the first task then no preious, use 1
$oAppDel = new AppDelegation();
$oAppDel->Load($Fields['APP_UID'], ($Fields['DEL_PREVIOUS']==0 ? $Fields['DEL_PREVIOUS'] = 1 : $Fields['DEL_PREVIOUS']) );
$aAppDel = $oAppDel->toArray(BasePeer::TYPE_FIELDNAME);
try {
$oCurUser = new Users();
$oCurUser->load($aAppDel['USR_UID']);
$Fields['PREVIOUS_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
}
catch (Exception $oError) {
$Fields['PREVIOUS_USER'] = '';
}
$objTask = new Task();
$aTask = $objTask->load($aAppDel['TAS_UID' ] );
$Fields['PREVIOUS_TASK'] = $aTask['TAS_TITLE'];
$oAppDel = new AppDelegation();
$oAppDel->Load( $Fields['APP_UID'], ($Fields['DEL_PREVIOUS'] == 0 ? $Fields['DEL_PREVIOUS'] = 1 : $Fields['DEL_PREVIOUS']) );
$aAppDel = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME );
try {
$oCurUser = new Users();
$oCurUser->load( $aAppDel['USR_UID'] );
$Fields['PREVIOUS_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
} catch (Exception $oError) {
$Fields['PREVIOUS_USER'] = '';
}
$objTask = new Task();
$aTask = $objTask->load( $aAppDel['TAS_UID'] );
$Fields['PREVIOUS_TASK'] = $aTask['TAS_TITLE'];
//To enable information (dynaforms, steps) before claim a case
$_SESSION['bNoShowSteps'] = true;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'caseOptions';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = '_';
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode("
$_SESSION['bNoShowSteps'] = true;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'caseOptions';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = '_';
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "
if (typeof parent != 'undefined') {
if (parent.showCaseNavigatorPanel) {
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
}
}");
$oHeadPublisher->addScriptCode('
}" );
$oHeadPublisher->addScriptCode( '
var Cse = {};
Cse.panels = {};
var leimnud = new maborak();
@@ -100,11 +96,11 @@ $oHeadPublisher->addScriptCode('
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
leimnud.exec(leimnud.fix.memoryLeak);
');
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/cases/core/cases_Step.js');
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute');
G::RenderPage( 'publish', 'blank');
' );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute' );
G::RenderPage( 'publish', 'blank' );

View File

@@ -1,60 +1,57 @@
<?php
/**
* cases_Delete.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
<?php
/**
* cases_Delete.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
G::LoadClass( 'case' );
/* Process the info */
try {
$oCase = new Cases();
if (isset( $_POST['APP_UIDS'] )) {
$ids = explode( ',', $_POST['APP_UIDS'] );
foreach ($ids as $id)
$oCase->removeCase( $id );
if (count( $_POST['APP_UIDS'] ) > 1)
echo 'The Case was deleted successfully';
else
echo 'All Cases were deleted successfully';
}
} catch (Exception $e) {
echo $e->getMessage();
}
/* Includes */
G::LoadClass('case');
/* Process the info */
try{
$oCase = new Cases();
if( isset($_POST['APP_UIDS']) ){
$ids = explode(',', $_POST['APP_UIDS']);
foreach($ids as $id)
$oCase->removeCase($id);
if( count($_POST['APP_UIDS']) > 1)
echo 'The Case was deleted successfully';
else
echo 'All Cases were deleted successfully';
}
} catch(Exception $e){
echo $e->getMessage();
}

View File

@@ -1,63 +1,59 @@
<?php
/**
* cases_DeleteDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
require_once ( "classes/model/AppDocumentPeer.php" );
G::LoadClass('case');
<?php
/**
* cases_DeleteDocument.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
require_once ("classes/model/AppDocumentPeer.php");
G::LoadClass( 'case' );
/* GET , POST & $_SESSION Vars */
/* Process the info */
$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')
{
$aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1);
}
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']);
?>
$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') {
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
}
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

@@ -1,51 +1,50 @@
<?php
/**
* cases_DeleteDocumentToRevise.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
require_once ( "classes/model/AppDocumentPeer.php" );
G::LoadClass('case');
<?php
/**
* cases_DeleteDocumentToRevise.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
require_once ("classes/model/AppDocumentPeer.php");
G::LoadClass( 'case' );
/* GET , POST & $_SESSION Vars */
/* Process the info */
$oAppDocument = new AppDocument();
$oAppDocument->remove($_GET['DOC']);
/* Redirect */
G::header('location: ' . $_SERVER['HTTP_REFERER']);
$oAppDocument = new AppDocument();
$oAppDocument->remove( $_GET['DOC'] );
/* Redirect */
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,32 +1,32 @@
<?php
/**
* cases_NextStep.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($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']);
?>
<?php
/**
* cases_NextStep.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (($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'] );

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +1,75 @@
<?php
/**
* cases_Open.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
if( $RBAC->userCanAccess('PM_SUPERVISOR') != 1 )
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
case - 2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
default:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
G::LoadClass('case');
/* GET , POST & $_SESSION Vars */
if (isset($_SESSION['APPLICATION'])) {
unset($_SESSION['APPLICATION']);
}
if (isset($_SESSION['PROCESS'])) {
unset($_SESSION['PROCESS']);
}
if (isset($_SESSION['INDEX'])) {
unset($_SESSION['INDEX']);
}
if (isset($_SESSION['STEP_POSITION'])) {
unset($_SESSION['STEP_POSITION']);
}
/* Process the info */
$oCase = new Cases();
$sAppUid = $_GET['APP_UID'];
$iDelIndex = $_GET['DEL_INDEX'];
$_SESSION['APPLICATION'] = $_GET['APP_UID'];
$_SESSION['INDEX'] = $_GET['DEL_INDEX'];
$aFields = $oCase->loadCase($sAppUid, $iDelIndex);
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = $aFields['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
/* Redirect to next step */
$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);
?>
<?php
/**
* cases_Open.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
if ($RBAC->userCanAccess( 'PM_SUPERVISOR' ) != 1)
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
default:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
G::LoadClass( 'case' );
/* GET , POST & $_SESSION Vars */
if (isset( $_SESSION['APPLICATION'] )) {
unset( $_SESSION['APPLICATION'] );
}
if (isset( $_SESSION['PROCESS'] )) {
unset( $_SESSION['PROCESS'] );
}
if (isset( $_SESSION['INDEX'] )) {
unset( $_SESSION['INDEX'] );
}
if (isset( $_SESSION['STEP_POSITION'] )) {
unset( $_SESSION['STEP_POSITION'] );
}
/* Process the info */
$oCase = new Cases();
$sAppUid = $_GET['APP_UID'];
$iDelIndex = $_GET['DEL_INDEX'];
$_SESSION['APPLICATION'] = $_GET['APP_UID'];
$_SESSION['INDEX'] = $_GET['DEL_INDEX'];
$aFields = $oCase->loadCase( $sAppUid, $iDelIndex );
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = $aFields['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
/* Redirect to next step */
$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

@@ -1,104 +1,96 @@
<?php
/**
* Cases_PrintPreview.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
require_once 'classes/model/Dynaform.php';
require_once 'classes/model/Process.php';
$currentDynUid = '';
if (isset($_GET['DYNUIDPRINT']) && $_GET['DYNUIDPRINT'] != '') {
$currentDynUid = $_GET['DYNUIDPRINT'];
} elseif (isset($_SESSION['DYN_UID_PRINT'])) {
$currentDynUid = $_SESSION['DYN_UID_PRINT'];
} elseif (isset($_SESSION['CURRENT_DYN_UID'])) {
$currentDynUid = $_SESSION['CURRENT_DYN_UID'];
}
$oDynaform = new Dynaform();
$aDyn = $oDynaform->load($currentDynUid);
G::LoadClass('case');
$oCase = new Cases();
if (isset($_SESSION['APPLICATION'])) {
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
$Fields['APP_DATA'] = array_merge($Fields['APP_DATA'], G::getSystemConstants());
} else {
$Fields['APP_DATA'] = Array();
}
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher;
$idProcess = (isset($Fields['APP_DATA']['PROCESS'])) ? $Fields['APP_DATA']['PROCESS'] : $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load($idProcess);
$sProcess = $oProcess->getProTitle();
$noShowTitle = 0;
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
<?php
/**
* Cases_PrintPreview.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
require_once 'classes/model/Dynaform.php';
require_once 'classes/model/Process.php';
$currentDynUid = '';
if (isset( $_GET['DYNUIDPRINT'] ) && $_GET['DYNUIDPRINT'] != '') {
$currentDynUid = $_GET['DYNUIDPRINT'];
} elseif (isset( $_SESSION['DYN_UID_PRINT'] )) {
$currentDynUid = $_SESSION['DYN_UID_PRINT'];
} elseif (isset( $_SESSION['CURRENT_DYN_UID'] )) {
$currentDynUid = $_SESSION['CURRENT_DYN_UID'];
}
$oDynaform = new Dynaform();
$aDyn = $oDynaform->load( $currentDynUid );
G::LoadClass( 'case' );
$oCase = new Cases();
if (isset( $_SESSION['APPLICATION'] )) {
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], G::getSystemConstants() );
} else {
$Fields['APP_DATA'] = Array ();
}
$G_MAIN_MENU = 'processmaker';
$G_ID_MENU_SELECTED = 'USERS';
$G_PUBLISH = new Publisher();
$idProcess = (isset( $Fields['APP_DATA']['PROCESS'] )) ? $Fields['APP_DATA']['PROCESS'] : $_SESSION['PROCESS'];
$oProcess = new Process();
$aProcessFieds = $oProcess->load( $idProcess );
$sProcess = $oProcess->getProTitle();
$noShowTitle = 0;
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
}
//Add content content step - Start
if (isset($_SESSION['APPLICATION'])) {
$array['CASE'] = G::LoadTranslation('ID_CASE');
$array['USER'] = G::LoadTranslation('ID_USER');
$array['WORKSPACE'] = G::LoadTranslation('ID_WORKSPACE');
$array['APP_NUMBER'] = $Fields['APP_NUMBER'];
$array['APP_TITLE'] = $Fields['TITLE'];
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
$array['DATEPRINT'] = date('Y-m-d H:m:s');
}
$array['APP_PROCESS'] = $sProcess;
if (isset($Fields['TITLE']) && strlen($Fields['TITLE']) > 0) {
$array['TITLE'] = G::LoadTranslation('ID_TITLE');
} else {
$array['TITLE'] = '';
}
$array['PROCESS'] = G::LoadTranslation('ID_PROCESS');
$array['DATELABEL'] = G::LoadTranslation('DATE_LABEL');
$aDyn['DYN_UID'] = $currentDynUid;
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::RenderPage('publish', 'blank');
} catch (Exception $oException) {
die($oException->getMessage());
}
if (isset( $_SESSION['APPLICATION'] )) {
$array['CASE'] = G::LoadTranslation( 'ID_CASE' );
$array['USER'] = G::LoadTranslation( 'ID_USER' );
$array['WORKSPACE'] = G::LoadTranslation( 'ID_WORKSPACE' );
$array['APP_NUMBER'] = $Fields['APP_NUMBER'];
$array['APP_TITLE'] = $Fields['TITLE'];
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
$array['DATEPRINT'] = date( 'Y-m-d H:m:s' );
}
$array['APP_PROCESS'] = $sProcess;
if (isset( $Fields['TITLE'] ) && strlen( $Fields['TITLE'] ) > 0) {
$array['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
} else {
$array['TITLE'] = '';
}
$array['PROCESS'] = G::LoadTranslation( 'ID_PROCESS' );
$array['DATELABEL'] = G::LoadTranslation( 'DATE_LABEL' );
$aDyn['DYN_UID'] = $currentDynUid;
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::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}
?>
<script>
@@ -129,5 +121,5 @@ try {
window.print();
} catch(e){}
</script>
</script>

View File

@@ -1,121 +1,120 @@
<?php
/**
* cases_Reassign.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_REASSIGNCASE')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
G::LoadSystem('templatePower');
$tpl = new TemplatePower(PATH_TPL ."cases/cases_Reassign.html");
$tpl->prepare();
require_once 'classes/model/AppDelegation.php';
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::APP_UID, $_GET['APP_UID']);
$oCriteria->add(AppDelegationPeer::DEL_INDEX, $_GET['DEL_INDEX']);
$oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null);
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$c=0;
G::LoadClass('tasks');
$oTasks=new Tasks();
G::LoadClass('groups');
$oGroups = new Groups();
require_once 'classes/model/Users.php';
$oUser = new Users();
$name = '';
while ($aRow = $oDataset->getRow()) {
$c++;
$aUsr=array();
$aUsrUid=array();
$aAux1 = $oTasks->getGroupsOfTask($aRow['TAS_UID'], 1);
foreach ($aAux1 as $value1) {
$aAux2 = $oGroups->getUsersOfGroup($value1['GRP_UID']);
foreach ($aAux2 as $value2) {
if($aRow['USR_UID']!=$value2['USR_UID']) {
if(!in_array($value2['USR_UID'], $aUsrUid)) {//var_dump($aRow['USR_UID'], $value2['USR_UID']);echo '<br /><br />';
$aAux = $oUser->load($value2['USR_UID']);
$aUsr[$aAux['USR_FIRSTNAME'] . ' ' . $aAux['USR_LASTNAME']] = $aAux;
$aUsrUid[]=$value2['USR_UID'];
}
}
}
}
$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))
$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" );
$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'] );
$tpl->assign( "USERS", $name );
}
//$users=$users.' </select>';
//$tpl->assign( "USERS", $users );
$oDataset->next();
}
$tpl->gotoBlock('_ROOT');
$tpl->assign( "US", $name );
$tpl->assign( "ID_NO_REASSIGN", '-');
$tpl->assign( "APP_UID", $_GET['APP_UID']);
$tpl->assign( "DEL_INDEX", $_GET['DEL_INDEX']);
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('template', '', '', '', $tpl);
G::RenderPage('publish', 'blank');
}
catch (Exception $oException) {
die($oException->getMessage());
}
?>
<?php
/**
* cases_Reassign.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_REASSIGNCASE' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
G::LoadSystem( 'templatePower' );
$tpl = new TemplatePower( PATH_TPL . "cases/cases_Reassign.html" );
$tpl->prepare();
require_once 'classes/model/AppDelegation.php';
$oCriteria = new Criteria( 'workflow' );
$oCriteria->add( AppDelegationPeer::APP_UID, $_GET['APP_UID'] );
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $_GET['DEL_INDEX'] );
$oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null );
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$c = 0;
G::LoadClass( 'tasks' );
$oTasks = new Tasks();
G::LoadClass( 'groups' );
$oGroups = new Groups();
require_once 'classes/model/Users.php';
$oUser = new Users();
$name = '';
while ($aRow = $oDataset->getRow()) {
$c ++;
$aUsr = array ();
$aUsrUid = array ();
$aAux1 = $oTasks->getGroupsOfTask( $aRow['TAS_UID'], 1 );
foreach ($aAux1 as $value1) {
$aAux2 = $oGroups->getUsersOfGroup( $value1['GRP_UID'] );
foreach ($aAux2 as $value2) {
if ($aRow['USR_UID'] != $value2['USR_UID']) {
if (! in_array( $value2['USR_UID'], $aUsrUid )) { //var_dump($aRow['USR_UID'], $value2['USR_UID']);echo '<br /><br />';
$aAux = $oUser->load( $value2['USR_UID'] );
$aUsr[$aAux['USR_FIRSTNAME'] . ' ' . $aAux['USR_LASTNAME']] = $aAux;
$aUsrUid[] = $value2['USR_UID'];
}
}
}
}
$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 ))
$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" );
$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'] );
$tpl->assign( "USERS", $name );
}
//$users=$users.' </select>';
//$tpl->assign( "USERS", $users );
$oDataset->next();
}
$tpl->gotoBlock( '_ROOT' );
$tpl->assign( "US", $name );
$tpl->assign( "ID_NO_REASSIGN", '-' );
$tpl->assign( "APP_UID", $_GET['APP_UID'] );
$tpl->assign( "DEL_INDEX", $_GET['DEL_INDEX'] );
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'template', '', '', '', $tpl );
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,79 +1,75 @@
<?php
/**
*cases_Reassign_save.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_REASSIGNCASE')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
//print_r($_POST); die;
G::LoadClass('case');
$oCase = new Cases();
if ($_POST['USERS'] != '') {
$oCase->reassignCase($_POST['APP_UID'], $_POST['DEL_INDEX'], $_SESSION['USER_LOGGED'], $_POST['USERS']);
}
require_once 'classes/model/Users.php';
$oUser = new Users();
$aUser = $oUser->load($_POST['USERS']);
$Fields=array();
$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'] );
$Fields['APP_NUMBER']=$aCases['APP_NUMBER'];
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$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) {
die($oException->getMessage());
}
?>
<?php
/**
* cases_Reassign_save.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_REASSIGNCASE' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
//print_r($_POST); die;
G::LoadClass( 'case' );
$oCase = new Cases();
if ($_POST['USERS'] != '') {
$oCase->reassignCase( $_POST['APP_UID'], $_POST['DEL_INDEX'], $_SESSION['USER_LOGGED'], $_POST['USERS'] );
}
require_once 'classes/model/Users.php';
$oUser = new Users();
$aUser = $oUser->load( $_POST['USERS'] );
$Fields = array ();
$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'] );
$Fields['APP_NUMBER'] = $aCases['APP_NUMBER'];
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
$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) {
die( $oException->getMessage() );
}

View File

@@ -1,10 +1,10 @@
<?php
/**
* cases_Redirect.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -12,15 +12,14 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/*
* Created on 19-03-2009
@@ -29,13 +28,12 @@
*/
require_once 'classes/model/AppDocument.php';
$oAppDocument = new AppDocument();
$aFields = $oAppDocument->load($_GET['a']);
$aFields = $oAppDocument->load( $_GET['a'] );
require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
$aOD = $oOutputDocument->load($aFields['DOC_UID']);
$a = $_GET['a'];
$ext = strtolower($aOD['OUT_DOC_GENERATE']);
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
$a = $_GET['a'];
$ext = strtolower( $aOD['OUT_DOC_GENERATE'] );
G::header( 'location: cases_ShowOutputDocument?a=' . $a . '&ext=' . $ext );
G::header('location: cases_ShowOutputDocument?a='.$a.'&ext='.$ext );
?>

View File

@@ -1,97 +1,95 @@
<?php
/**
* cases_Resume.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
<?php
/**
* cases_Resume.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
G::LoadClass( 'case' );
/* GET , POST & $_SESSION Vars */
/* Includes */
G::LoadClass('case');
/* GET , POST & $_SESSION Vars */
/* Menues */
$_SESSION['bNoShowSteps'] = true;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'caseOptions';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = '_';
/* Prepare page before to show */
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
$participated = $oCase->userParticipatedInCase($_GET['APP_UID'], $_SESSION['USER_LOGGED']);
if ($RBAC->userCanAccess('PM_ALLCASES') < 0 && $participated == 0) {
/* Menues */
$_SESSION['bNoShowSteps'] = true;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'caseOptions';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = '_';
/* Prepare page before to show */
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
$participated = $oCase->userParticipatedInCase( $_GET['APP_UID'], $_SESSION['USER_LOGGED'] );
if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && $participated == 0) {
/*if (strtoupper($Fields['APP_STATUS']) != 'COMPLETED') {
$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'SHOW_MESSAGE');
}*/
$aMessage['MESSAGE'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
G::RenderPage('publishBlank', 'blank');
die;
}
if (isset($aRow['APP_TYPE'])) {
switch ($aRow['APP_TYPE']) {
case 'PAUSE':
$Fields['STATUS'] = ucfirst(strtolower(G::LoadTranslation('ID_PAUSED')));
break;
case 'CANCEL':
$Fields['STATUS'] = ucfirst(strtolower(G::LoadTranslation('ID_CANCELLED')));
break;
}
}*/
$aMessage['MESSAGE'] = G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
die();
}
if (isset( $aRow['APP_TYPE'] )) {
switch ($aRow['APP_TYPE']) {
case 'PAUSE':
$Fields['STATUS'] = ucfirst( strtolower( G::LoadTranslation( 'ID_PAUSED' ) ) );
break;
case 'CANCEL':
$Fields['STATUS'] = ucfirst( strtolower( G::LoadTranslation( 'ID_CANCELLED' ) ) );
break;
}
//$Fields['STATUS'] = $aRow['APP_TYPE'];
}
$actions = 'false';
if( $_GET['action'] == 'paused')
$actions = 'true';
/* Render page */
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptCode("
}
$actions = 'false';
if ($_GET['action'] == 'paused')
$actions = 'true';
/* Render page */
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "
if (typeof parent != 'undefined') {
if (parent.showCaseNavigatorPanel) {
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
}
}");
$oHeadPublisher->addScriptCode('
}" );
$oHeadPublisher->addScriptCode( '
var Cse = {};
Cse.panels = {};
var leimnud = new maborak();
@@ -102,20 +100,21 @@
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
leimnud.exec(leimnud.fix.memoryLeak);
');
require_once 'classes/model/Process.php';
$objProc = new Process();
$aProc = $objProc->load($Fields['PRO_UID' ] );
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
$aTask = $objTask->load($Fields['TAS_UID' ] );
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/cases/core/cases_Step.js');
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '');
G::RenderPage( 'publish', 'blank');
' );
require_once 'classes/model/Process.php';
$objProc = new Process();
$aProc = $objProc->load( $Fields['PRO_UID'] );
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
$aTask = $objTask->load( $Fields['TAS_UID'] );
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
G::RenderPage( 'publish', 'blank' );

View File

@@ -1,76 +1,78 @@
<?php
/**
* cases_Save.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/* Permissions */
switch ($RBAC->userCanAccess('PM_CASES'))
{
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
<?php
/**
* cases_Save.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
break;
}
/* Includes */
G::LoadClass( 'case' );
/* GET , POST & $_SESSION Vars */
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
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']);
/* Process */
try {
$oCase = new Cases();
$aData = $oCase->startCase( $_POST['form']['TAS_UID'], $_SESSION['USER_LOGGED'] );
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
$_SESSION['INDEX'] = $aData['INDEX'];
$_SESSION['PROCESS'] = $aData['PROCESS'];
$_SESSION['TASK'] = $_POST['form']['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
$_SESSION['CASES_REFRESH'] = true;
$oCase = new Cases();
$aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
G::header('location: ' . $aNextStep['PAGE']);
}
catch ( Exception $e ) {
$_SESSION['G_MESSAGE'] = $e->getMessage();
$_SESSION['G_MESSAGE_TYPE'] = 'error';
G::header('location: cases_New' );
}
?>
/* 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'] );
/* Process */
try {
$oCase = new Cases();
$aData = $oCase->startCase( $_POST['form']['TAS_UID'], $_SESSION['USER_LOGGED'] );
$_SESSION['APPLICATION'] = $aData['APPLICATION'];
$_SESSION['INDEX'] = $aData['INDEX'];
$_SESSION['PROCESS'] = $aData['PROCESS'];
$_SESSION['TASK'] = $_POST['form']['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
$_SESSION['CASES_REFRESH'] = true;
$oCase = new Cases();
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
G::header( 'location: ' . $aNextStep['PAGE'] );
} catch (Exception $e) {
$_SESSION['G_MESSAGE'] = $e->getMessage();
$_SESSION['G_MESSAGE_TYPE'] = 'error';
G::header( 'location: cases_New' );
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +1,55 @@
<?php
/**
* cases_SaveData.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
//validate the data post
$oForm = new Form($_SESSION['PROCESS']. '/' . $_GET['UID'], PATH_DYNAFORM);
$oForm->validatePost();
<?php
/**
* cases_SaveData.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
//validate the data post
$oForm = new Form( $_SESSION['PROCESS'] . '/' . $_GET['UID'], PATH_DYNAFORM );
$oForm->validatePost();
/* Includes */
G::LoadClass( 'case' );
//load the variables
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], $_POST['form'] );
//save data
$aData = array ();
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
$aData['APP_PROC_STATUS'] = $Fields['APP_PROC_STATUS'];
$aData['APP_DATA'] = $Fields['APP_DATA'];
$aData['DEL_INDEX'] = $_SESSION['INDEX'];
$aData['TAS_UID'] = $_SESSION['TASK'];
$aData['CURRENT_DYNAFORM'] = $_GET['UID'];
$aData['PRO_UID'] = $Fields['PRO_UID'];
$aData['USER_UID'] = $_SESSION['USER_LOGGED'];
$aData['APP_STATUS'] = $Fields['APP_STATUS'];
//$aData = $oCase->loadCase( $_SESSION['APPLICATION'] );
$oCase->updateCase( $_SESSION['APPLICATION'], $aData );
//go to the next step
$aNextStep = $oCase->getNextSupervisorStep( $_SESSION['PROCESS'], $_SESSION['STEP_POSITION'] );
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
/* Includes */
G::LoadClass('case');
//load the variables
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], $_POST['form']);
//save data
$aData = array();
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
$aData['APP_PROC_STATUS'] = $Fields['APP_PROC_STATUS'];
$aData['APP_DATA'] = $Fields['APP_DATA'];
$aData['DEL_INDEX'] = $_SESSION['INDEX'];
$aData['TAS_UID'] = $_SESSION['TASK'];
$aData['CURRENT_DYNAFORM'] = $_GET['UID'];
$aData['PRO_UID'] = $Fields['PRO_UID'];
$aData['USER_UID'] = $_SESSION['USER_LOGGED'];
$aData['APP_STATUS'] = $Fields['APP_STATUS'];
//$aData = $oCase->loadCase( $_SESSION['APPLICATION'] );
$oCase->updateCase( $_SESSION['APPLICATION'], $aData );
//go to the next step
$aNextStep = $oCase->getNextSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION']);
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
G::header('location: cases_StepToRevise?DYN_UID='.$aNextStep['UID'].'&APP_UID='.$_SESSION['APPLICATION'].'&DEL_INDEX='.$_SESSION['INDEX']);

File diff suppressed because it is too large Load Diff

View File

@@ -1,71 +1,77 @@
<?php
if (! isset ( $_REQUEST ['action'] )) {
$return ['success'] = 'failure';
$return ['message'] = 'You may request an action';
print G::json_encode ( $return );
die ();
}
if (! function_exists ( $_REQUEST ['action'] )) {
$return ['success'] = 'failure';
$return ['message'] = 'The requested action doesn\'t exists';
print G::json_encode ( $return );
die ();
}
$functionName = $_REQUEST ['action'];
<?php
if (! isset( $_REQUEST['action'] )) {
$return['success'] = 'failure';
$return['message'] = 'You may request an action';
print G::json_encode( $return );
die();
}
if (! function_exists( $_REQUEST['action'] )) {
$return['success'] = 'failure';
$return['message'] = 'The requested action doesn\'t exists';
print G::json_encode( $return );
die();
}
$functionName = $_REQUEST['action'];
//var_dump($functionName);
$functionParams = isset($_REQUEST ['params'] ) ? $_REQUEST ['params'] : array ();
$functionName ( $functionParams );
function searchSavedJob($schUid){
}
function pluginsList(){
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler=$oPluginRegistry->getCaseSchedulerPlugins();
$selectedPlugin="";
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>";
foreach($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail){
$sActionId=$caseSchedulerPluginDetail->sActionId;
$sNamespace=$caseSchedulerPluginDetail->sNamespace;
$optionId=$sNamespace."--".$sActionId;
$selectedOption="";
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;
$params=explode("--",$_REQUEST ['selectedOption']);
$oPluginRegistry =& PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler=$oPluginRegistry->getCaseSchedulerPlugins();
foreach($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail){
if(($caseSchedulerPluginDetail->sNamespace==$params[0])&&($caseSchedulerPluginDetail->sActionId==$params[1])){
$caseSchedulerSelected=$caseSchedulerPluginDetail;
}
}
if((isset($caseSchedulerSelected))&&(is_object($caseSchedulerSelected))){
//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']);
}else{
$oData=array("PRO_UID"=>$_REQUEST['pro_uid']);
}
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionForm, $oData );
}
}
?>
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
$functionName( $functionParams );
function searchSavedJob ($schUid)
{
}
function pluginsList ()
{
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
$selectedPlugin = "";
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>";
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail) {
$sActionId = $caseSchedulerPluginDetail->sActionId;
$sNamespace = $caseSchedulerPluginDetail->sNamespace;
$optionId = $sNamespace . "--" . $sActionId;
$selectedOption = "";
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();
$params = explode( "--", $_REQUEST['selectedOption'] );
$oPluginRegistry = & PMPluginRegistry::getSingleton();
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPluginDetail) {
if (($caseSchedulerPluginDetail->sNamespace == $params[0]) && ($caseSchedulerPluginDetail->sActionId == $params[1])) {
$caseSchedulerSelected = $caseSchedulerPluginDetail;
}
}
if ((isset( $caseSchedulerSelected )) && (is_object( $caseSchedulerSelected ))) {
//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']
);
} else {
$oData = array ("PRO_UID" => $_REQUEST['pro_uid']
);
}
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionForm, $oData );
}
}

View File

@@ -1,38 +1,33 @@
<?php
<?php
//$oUserId = '2963666854afbb1cea372c4011254883';
$oUserId = $_POST['USR_UID'];
$process = isset($_POST['PRO_UID'])?$_POST['PRO_UID']:$_SESSION['PROCESS'];
$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");
G::LoadClass ( 'Content' );
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn(ProcessPeer::PRO_UID);
$oCriteria->setDistinct();
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
$oCriteria->addJoin(ProcessPeer::PRO_UID, TaskPeer::PRO_UID, Criteria::LEFT_JOIN);
$oCriteria->addJoin(ProcessPeer::PRO_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
$oCriteria->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$oCriteria->add(TaskUserPeer::USR_UID, $oUserId);
$oCriteria->add(TaskPeer::TAS_START, 'true');
$oCriteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE');
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
$oCriteria->addAnd(ProcessPeer::PRO_UID, $process);
$resultSet = TaskUserPeer::doSelectRS($oCriteria);
while ($resultSet->next()){
$row = $resultSet->getRow();
echo $row[1];
echo "<input name=\"form[PRO_UID]\" id=\"form[PRO_UID]\" type=\"hidden\" value=\"".$row[0]."\"></input>";
require_once ("classes/model/TaskPeer.php");
require_once ("classes/model/ProcessPeer.php");
require_once ("classes/model/TaskUserPeer.php");
G::LoadClass( 'Content' );
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( ProcessPeer::PRO_UID );
$oCriteria->setDistinct();
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
$oCriteria->addJoin( ProcessPeer::PRO_UID, TaskPeer::PRO_UID, Criteria::LEFT_JOIN );
$oCriteria->addJoin( ProcessPeer::PRO_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN );
$oCriteria->addJoin( TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN );
$oCriteria->add( TaskUserPeer::USR_UID, $oUserId );
$oCriteria->add( TaskPeer::TAS_START, 'true' );
$oCriteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE' );
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
$oCriteria->addAnd( ProcessPeer::PRO_UID, $process );
$resultSet = TaskUserPeer::doSelectRS( $oCriteria );
while ($resultSet->next()) {
$row = $resultSet->getRow();
echo $row[1];
echo "<input name=\"form[PRO_UID]\" id=\"form[PRO_UID]\" type=\"hidden\" value=\"" . $row[0] . "\"></input>";
//var_dump($row);
}
//echo "</select>";
?>
}
//echo "</select>";

View File

@@ -1,25 +1,23 @@
<select style="width: 300px;" name="form[TAS_UID]" id="form[TAS_UID]" class="module_app_input___gray" required="1">
<?php
<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');
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>";
}
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>";
}
}
//print_r($startTasks);
// echo "<option value=\"".$value."\">".$label."</option>";
?>
</select>
</select>

View File

@@ -1,71 +1,70 @@
<?php
/**
* cases_SchedulerValidateUser.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
/**
* 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 ())
$http = 'https://';
else
$http = 'http://';
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new SoapClient ( $endpoint );
$user = $sWS_USER;
$pass = $sWS_PASS;
$params = array('userid' => $user, 'password' => $pass);
$result = $client->__SoapCall('login', array($params));
if ($result->status_code == 0) {
if (!class_exists('Users')) {
require ("classes/model/UsersPeer.php");
}
$oCriteria = new Criteria('workflow');
$oCriteria->addSelectColumn('USR_UID');
$oCriteria->add(UsersPeer::USR_USERNAME, $sWS_USER);
$resultSet = UsersPeer::doSelectRS($oCriteria);
$resultSet->next();
$user_id = $resultSet->getRow();
$result->message = $user_id[0];
G::LoadClass('case');
$caseInstance = new Cases();
if (!$caseInstance->canStartCase($result->message, $_REQUEST['PRO_UID'])) {
$result->status_code = -1000;
$result->message = G::LoadTranslation('ID_USER_CASES_NOT_START');
}
}
die(G::json_encode($result));
<?php
/**
* cases_SchedulerValidateUser.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/**
* 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()) {
$http = 'https://';
} else {
$http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@$client = new SoapClient( $endpoint );
$user = $sWS_USER;
$pass = $sWS_PASS;
$params = array ('userid' => $user,'password' => $pass);
$result = $client->__SoapCall( 'login', array ($params) );
if ($result->status_code == 0) {
if (! class_exists( 'Users' )) {
require ("classes/model/UsersPeer.php");
}
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( 'USR_UID' );
$oCriteria->add( UsersPeer::USR_USERNAME, $sWS_USER );
$resultSet = UsersPeer::doSelectRS( $oCriteria );
$resultSet->next();
$user_id = $resultSet->getRow();
$result->message = $user_id[0];
G::LoadClass( 'case' );
$caseInstance = new Cases();
if (! $caseInstance->canStartCase( $result->message, $_REQUEST['PRO_UID'] )) {
$result->status_code = - 1000;
$result->message = G::LoadTranslation( 'ID_USER_CASES_NOT_START' );
}
}
die( G::json_encode( $result ) );

View File

@@ -1,28 +1,27 @@
<?php
/**
* cases_Scheduler_ChangeStatus.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
global $RBAC;
<?php
/**
* cases_Scheduler_ChangeStatus.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
/*
switch ($RBAC->userCanAccess('PM_FACTORY'))
{
@@ -37,20 +36,19 @@ switch ($RBAC->userCanAccess('PM_FACTORY'))
die;
break;
}
*/
/*
/*
G::LoadClass('cases_Scheduler');
$oCases_Scheduler= new Cases_Scheduler();
$oCases_Scheduler->changeStatus ( $_GET['SCH_UID'] );
G::header('location: ' . $_SERVER['HTTP_REFERER']);
*/
require_once 'classes/model/CaseScheduler.php';
require_once 'classes/model/CaseScheduler.php';
// G::LoadClass('CaseScheduler');
$oCaseScheduler= new CaseScheduler();
$oCaseScheduler->changeStatus ( $_GET['SCH_UID'] );
G::header('location: ' . $_SERVER['HTTP_REFERER']);
$oCaseScheduler = new CaseScheduler();
$oCaseScheduler->changeStatus( $_GET['SCH_UID'] );
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );

View File

@@ -1,10 +1,10 @@
<?php
/**
* cases_Scheduler_Delete.php
*
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
@@ -14,13 +14,13 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*
*/
/* Permissions */
@@ -39,15 +39,13 @@ switch ($RBAC->userCanAccess('PM_CASES'))
break;
}
*/
// print_r($_GET); print_r($_POST); die;
// print_r($_GET); print_r($_POST); die;
require_once 'classes/model/CaseScheduler.php';
$oCaseScheduler = new CaseScheduler();
if ( !isset($_GET['SCH_UID'] ) ) return;
$oCaseScheduler->remove($_GET['SCH_UID']);
require_once 'classes/model/CaseScheduler.php';
$oCaseScheduler = new CaseScheduler();
if ( !isset($_GET['SCH_UID'] ) ) {
return;
}
$oCaseScheduler->remove($_GET['SCH_UID']);
/* Redirect */
?>

View File

@@ -1,31 +1,30 @@
<?php
/**
* cases_SchedulerNew.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
try {
global $RBAC;
/*
<?php
/**
* cases_SchedulerNew.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
try {
global $RBAC;
/*
switch ($RBAC->userCanAccess('PM_FACTORY'))
{
case -2:
@@ -39,100 +38,98 @@ try {
die;
break;
}
*/
require_once 'classes/model/CaseScheduler.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
// $G_MAIN_MENU = 'processmaker';
// $G_ID_MENU_SELECTED = 'CASES';
$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']);
if($aStartDay[0] != 3) {
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
} else {
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
$aFields['SCH_DAYS_PERFORM_TASK_OPT_3'] = $aStartDay[1];
}
break;
case 2 :
$aFields['SCH_WEEK_DAYS_2'] = $aFields['SCH_WEEK_DAYS'];
break;
case 3 : // $nStartDay = $aFields['SCH_START_DAY'];
$aStartDay = explode('|', $aFields['SCH_START_DAY']);
if($aStartDay[0] == 1){
$aFields['SCH_START_DAY_OPT_1'] = $aStartDay[1];
} else {
$aFields['SCH_START_DAY_OPT_2_WEEKS'] = $aStartDay[1];
$aFields['SCH_START_DAY_OPT_2_DAYS_WEEK'] = $aStartDay[2];
}
$aFields['SCH_START_DAY'] = $aStartDay[0];
$aFields['SCH_MONTHS_2'] = $aFields['SCH_MONTHS'];
$aFields['SCH_MONTHS_3'] = $aFields['SCH_MONTHS'];
break;
case 4 :
break;
}
$aFields['SCH_START_TIME'] = date('H:i' , strtotime($aFields['SCH_START_TIME']));
$aFields['PREV_SCH_START_TIME'] = $aFields['SCH_START_TIME'];
$aFields['SCH_START_DATE'] = date('Y-m-d', strtotime($aFields['SCH_START_DATE']));
$aFields['PREV_SCH_START_DATE'] = $aFields['SCH_START_DATE'];
if(!empty($aFields['SCH_END_DATE'])){
$aFields['SCH_END_DATE'] = date('Y-m-d', strtotime($aFields['SCH_END_DATE']));
$aFields['PREV_SCH_END_DATE'] = date('Y-m-d', strtotime($aFields['SCH_END_DATE']));
}
if($aFields['SCH_REPEAT_STOP_IF_RUNNING']==0 || $aFields['SCH_REPEAT_STOP_IF_RUNNING']==null){
$aFields['SCH_REPEAT_STOP_IF_RUNNING']=null;
}else {
$aFields['SCH_REPEAT_STOP_IF_RUNNING']='On';
}
$aFields['SCH_USER_NAME'] = $aFields['SCH_DEL_USER_NAME'];
$aFields['SCH_USER_PASSWORD'] = 'DefaultPM';
$aFields['SCH_USER_UID'] = $aFields['SCH_DEL_USER_UID'];
$aFields['SCH_START_DATE'] = date ("Y-m-d",strtotime($aFields['SCH_START_DATE']));
// validating if any of the advanced fields is non empty
// var_dump($aFields['SCH_END_DATE']);
// var_dump($aFields['SCH_REPEAT_EVERY']);
// die();
if ($aFields['SCH_END_DATE']!=NULL||trim($aFields['SCH_REPEAT_EVERY'])!=''){
$aFields['SCH_ADVANCED'] = 'true';
} else {
$aFields['SCH_ADVANCED'] = 'false';
}
$aFields['PRO_UID_TMP'] = isset($_GET['PRO_UID'])?$_GET['PRO_UID']:$_SESSION['PROCESS'];
$aFields['PHP_START_DATE'] = date('Y-m-d');
$aFields['PHP_END_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 5));
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Scheduler_Edit.xml', '', $aFields, 'cases_Scheduler_Update');
G::RenderPage('publishBlank','blank');
} catch (Exception $oException) {
die($oException->getMessage());
}
?>
*/
require_once 'classes/model/CaseScheduler.php';
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
// $G_MAIN_MENU = 'processmaker';
// $G_ID_MENU_SELECTED = 'CASES';
$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'] );
if ($aStartDay[0] != 3) {
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
} else {
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
$aFields['SCH_DAYS_PERFORM_TASK_OPT_3'] = $aStartDay[1];
}
break;
case 2:
$aFields['SCH_WEEK_DAYS_2'] = $aFields['SCH_WEEK_DAYS'];
break;
case 3: // $nStartDay = $aFields['SCH_START_DAY'];
$aStartDay = explode( '|', $aFields['SCH_START_DAY'] );
if ($aStartDay[0] == 1) {
$aFields['SCH_START_DAY_OPT_1'] = $aStartDay[1];
} else {
$aFields['SCH_START_DAY_OPT_2_WEEKS'] = $aStartDay[1];
$aFields['SCH_START_DAY_OPT_2_DAYS_WEEK'] = $aStartDay[2];
}
$aFields['SCH_START_DAY'] = $aStartDay[0];
$aFields['SCH_MONTHS_2'] = $aFields['SCH_MONTHS'];
$aFields['SCH_MONTHS_3'] = $aFields['SCH_MONTHS'];
break;
case 4:
break;
}
$aFields['SCH_START_TIME'] = date( 'H:i', strtotime( $aFields['SCH_START_TIME'] ) );
$aFields['PREV_SCH_START_TIME'] = $aFields['SCH_START_TIME'];
$aFields['SCH_START_DATE'] = date( 'Y-m-d', strtotime( $aFields['SCH_START_DATE'] ) );
$aFields['PREV_SCH_START_DATE'] = $aFields['SCH_START_DATE'];
if (! empty( $aFields['SCH_END_DATE'] )) {
$aFields['SCH_END_DATE'] = date( 'Y-m-d', strtotime( $aFields['SCH_END_DATE'] ) );
$aFields['PREV_SCH_END_DATE'] = date( 'Y-m-d', strtotime( $aFields['SCH_END_DATE'] ) );
}
if ($aFields['SCH_REPEAT_STOP_IF_RUNNING'] == 0 || $aFields['SCH_REPEAT_STOP_IF_RUNNING'] == null) {
$aFields['SCH_REPEAT_STOP_IF_RUNNING'] = null;
} else {
$aFields['SCH_REPEAT_STOP_IF_RUNNING'] = 'On';
}
$aFields['SCH_USER_NAME'] = $aFields['SCH_DEL_USER_NAME'];
$aFields['SCH_USER_PASSWORD'] = 'DefaultPM';
$aFields['SCH_USER_UID'] = $aFields['SCH_DEL_USER_UID'];
$aFields['SCH_START_DATE'] = date( "Y-m-d", strtotime( $aFields['SCH_START_DATE'] ) );
// validating if any of the advanced fields is non empty
// var_dump($aFields['SCH_END_DATE']);
// var_dump($aFields['SCH_REPEAT_EVERY']);
// die();
if ($aFields['SCH_END_DATE'] != NULL || trim( $aFields['SCH_REPEAT_EVERY'] ) != '') {
$aFields['SCH_ADVANCED'] = 'true';
} else {
$aFields['SCH_ADVANCED'] = 'false';
}
$aFields['PRO_UID_TMP'] = isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : $_SESSION['PROCESS'];
$aFields['PHP_START_DATE'] = date( 'Y-m-d' );
$aFields['PHP_END_DATE'] = date( 'Y-m-d', mktime( 0, 0, 0, date( 'm' ), date( 'd' ), date( 'Y' ) + 5 ) );
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_Edit.xml', '', $aFields, 'cases_Scheduler_Update' );
G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) {
die( $oException->getMessage() );
}

View File

@@ -1,30 +1,31 @@
<?php
/**
* cases_Scheduler_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
global $RBAC;
<?php
/**
* cases_Scheduler_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) {
return $RBAC_Response;
}
global $RBAC;
/*switch ($RBAC->userCanAccess('PM_USERS'))
{
case -2:
@@ -37,140 +38,57 @@ global $RBAC;
G::header('location: ../login/login');
die;
break;
}*/
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
require_once 'classes/model/CaseScheduler.php';
$process = isset($_GET['PRO_UID'])?$_GET['PRO_UID']:$_SESSION['PROCESS'];
$sDelimiter = DBAdapter::getStringDelimiter();
$oCaseScheduler = new CaseScheduler();
$aRows = $oCaseScheduler->getAllByProcess($process);
//$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'
);
$aRows = array_merge(Array($fieldNames), $aRows);
//krumo ($aRows);
for($j=0;$j<count($aRows);$j++){
if ($aRows[$j]['SCH_STATE'] == 'PROCESSED'){
$aRows[$j]['SCH_TIME_NEXT_RUN'] = '';
}
}
}*/
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
require_once 'classes/model/CaseScheduler.php';
$process = isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : $_SESSION['PROCESS'];
$sDelimiter = DBAdapter::getStringDelimiter();
$oCaseScheduler = new CaseScheduler();
$aRows = $oCaseScheduler->getAllByProcess( $process );
//$oCaseScheduler->caseSchedulerCron();
// g::pr($aRows); die;
global $_DBArray;
$_DBArray['cases_scheduler'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('cases_scheduler');
$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 );
//krumo ($aRows);
for ($j = 0; $j < count( $aRows ); $j ++) {
if ($aRows[$j]['SCH_STATE'] == 'PROCESSED') {
$aRows[$j]['SCH_TIME_NEXT_RUN'] = '';
}
}
// g::pr($aRows); die;
global $_DBArray;
$_DBArray['cases_scheduler'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass( 'ArrayPeer' );
$oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable( 'cases_scheduler' );
//krumo ($oCriteria);
//var_dump ($oCriteria);
//$oCriteria->add('PRO_UID', $_SESSION['PROCESS']);
//krumo($_SESSION);
$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->oPropelTable->rowsPerPage = 10;
G::RenderPage('publishBlank', 'blank');
$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->oPropelTable->rowsPerPage = 10;
G::RenderPage( 'publishBlank', 'blank' );

View File

@@ -1,44 +1,43 @@
<?php
/**
* cases_Scheduler_Log.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
$G_PUBLISH = new Publisher;
G::LoadClass('configuration');
$c = new Configurations();
$configPage = $c->getConfiguration('casesSchedulerLogList', 'pageSize','',$_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$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);
G::RenderPage('publish', 'extJs');
?>
<?php
/**
* cases_Scheduler_Log.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2010 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1)
return $RBAC_Response;
$G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' );
$c = new Configurations();
$configPage = $c->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$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 );
G::RenderPage( 'publish', 'extJs' );

Some files were not shown because too many files have changed in this diff Show More