CODE STYLE Formating workflow/engine/methods/cases
Change format files in workflow/engine/methods/cases
This commit is contained in:
@@ -20,29 +20,25 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isset( $_POST['form']['BTN_CANCEL'] )) {
|
if (isset( $_POST['form']['BTN_CANCEL'] )) {
|
||||||
header( "Location: ../cases/main" );
|
header( "Location: ../cases/main" );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
@@ -67,16 +63,12 @@ $validation = (SYS_SKIN != 'uxs')? 'true' : 'false';
|
|||||||
die( '<script type="text/javascript">
|
die( '<script type="text/javascript">
|
||||||
if (' . $validation . ') {
|
if (' . $validation . ') {
|
||||||
if (window.parent.frames.length != 0) {
|
if (window.parent.frames.length != 0) {
|
||||||
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] .
|
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
|
||||||
'&action=unassigned";
|
|
||||||
} else {
|
} else {
|
||||||
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
|
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
|
||||||
$_SESSION['INDEX'] . '&action=unassigned";
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' .
|
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
|
||||||
$_SESSION['INDEX'] . '&action=unassigned";
|
|
||||||
}
|
}
|
||||||
</script>'
|
</script>' );
|
||||||
);
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,20 +20,18 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +41,6 @@ G::LoadClass('case');
|
|||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
|
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
|
||||||
|
|
||||||
|
|
||||||
/* Render page */
|
/* Render page */
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
@@ -67,8 +64,7 @@ try {
|
|||||||
$oCurUser = new Users();
|
$oCurUser = new Users();
|
||||||
$oCurUser->load( $aAppDel['USR_UID'] );
|
$oCurUser->load( $aAppDel['USR_UID'] );
|
||||||
$Fields['PREVIOUS_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
|
$Fields['PREVIOUS_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
|
||||||
}
|
} catch (Exception $oError) {
|
||||||
catch (Exception $oError) {
|
|
||||||
$Fields['PREVIOUS_USER'] = '';
|
$Fields['PREVIOUS_USER'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +100,7 @@ $oHeadPublisher->addScriptCode('
|
|||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
|
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute' );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
|
|
||||||
|
|||||||
@@ -20,20 +20,18 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,4 +55,3 @@ try{
|
|||||||
echo $e->getMessage();
|
echo $e->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,20 +20,18 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,16 +46,14 @@ $oAppDocument = new AppDocument();
|
|||||||
$oAppDocument->remove( $_GET['DOC'] );
|
$oAppDocument->remove( $_GET['DOC'] );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
|
$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List' );
|
||||||
if ($_GET['TYPE'] == 'INPUT')
|
if ($_GET['TYPE'] == 'INPUT') {
|
||||||
{
|
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
||||||
}
|
}
|
||||||
if ($_GET['TYPE'] == 'OUTPUT')
|
if ($_GET['TYPE'] == 'OUTPUT') {
|
||||||
{
|
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||||
}
|
}
|
||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||||
|
|
||||||
/* Redirect */
|
/* Redirect */
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,20 +20,18 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,3 +47,4 @@ $oAppDocument->remove($_GET['DOC']);
|
|||||||
|
|
||||||
/* Redirect */
|
/* Redirect */
|
||||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||||
|
|
||||||
|
|||||||
@@ -20,22 +20,19 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,14 +80,10 @@ try {
|
|||||||
|
|
||||||
$oCase->updateCase( $_SESSION['APPLICATION'], $appFields ); //Save data
|
$oCase->updateCase( $_SESSION['APPLICATION'], $appFields ); //Save data
|
||||||
|
|
||||||
|
|
||||||
//derivate case
|
//derivate case
|
||||||
$oDerivation = new Derivation();
|
$oDerivation = new Derivation();
|
||||||
$aCurrentDerivation = array(
|
$aCurrentDerivation = array ('APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'APP_STATUS' => $sStatus,'TAS_UID' => $_SESSION['TASK'],'ROU_TYPE' => $_POST['form']['ROU_TYPE']
|
||||||
'APP_UID' => $_SESSION['APPLICATION'],
|
|
||||||
'DEL_INDEX' => $_SESSION['INDEX'],
|
|
||||||
'APP_STATUS' => $sStatus,
|
|
||||||
'TAS_UID' => $_SESSION['TASK'],
|
|
||||||
'ROU_TYPE' => $_POST['form']['ROU_TYPE']
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$oDerivation->derivate( $aCurrentDerivation, $_POST['form']['TASKS'] );
|
$oDerivation->derivate( $aCurrentDerivation, $_POST['form']['TASKS'] );
|
||||||
@@ -100,6 +93,7 @@ try {
|
|||||||
if (sizeof( $triggers ) > 0) {
|
if (sizeof( $triggers ) > 0) {
|
||||||
$appFields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'ASSIGN_TASK', - 2, 'AFTER', $appFields['APP_DATA'] ); //Execute triggers after derivation
|
$appFields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'ASSIGN_TASK', - 2, 'AFTER', $appFields['APP_DATA'] ); //Execute triggers after derivation
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof( $triggers );
|
$_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof( $triggers );
|
||||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = 'AFTER';
|
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = 'AFTER';
|
||||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||||
@@ -121,6 +115,7 @@ try {
|
|||||||
}
|
}
|
||||||
// Send notifications - End
|
// Send notifications - End
|
||||||
|
|
||||||
|
|
||||||
// Events - Start
|
// Events - Start
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
|
|
||||||
@@ -137,8 +132,7 @@ try {
|
|||||||
if (! $multipleDelegation) {
|
if (! $multipleDelegation) {
|
||||||
$aCurrentAppDel = $oCurrentAppDel->toArray( BasePeer::TYPE_FIELDNAME );
|
$aCurrentAppDel = $oCurrentAppDel->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
$oEvent->createAppEvents( $aCurrentAppDel['PRO_UID'], $aCurrentAppDel['APP_UID'], $aCurrentAppDel['DEL_INDEX'], $aCurrentAppDel['TAS_UID'] );
|
$oEvent->createAppEvents( $aCurrentAppDel['PRO_UID'], $aCurrentAppDel['APP_UID'], $aCurrentAppDel['DEL_INDEX'], $aCurrentAppDel['TAS_UID'] );
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// else we need to check every task and create the events if it have any
|
// else we need to check every task and create the events if it have any
|
||||||
foreach ($_POST['form']['TASKS'] as $taskDelegated) {
|
foreach ($_POST['form']['TASKS'] as $taskDelegated) {
|
||||||
$aCurrentAppDel = $oCurrentAppDel->toArray( BasePeer::TYPE_FIELDNAME );
|
$aCurrentAppDel = $oCurrentAppDel->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
@@ -152,16 +146,14 @@ try {
|
|||||||
if (isset( $_SESSION['user_experience'] )) {
|
if (isset( $_SESSION['user_experience'] )) {
|
||||||
$aNextStep['PAGE'] = 'casesListExtJsRedirector?ux=' . $_SESSION['user_experience'];
|
$aNextStep['PAGE'] = 'casesListExtJsRedirector?ux=' . $_SESSION['user_experience'];
|
||||||
$debuggerAvailable = false;
|
$debuggerAvailable = false;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$aNextStep['PAGE'] = 'casesListExtJsRedirector';
|
$aNextStep['PAGE'] = 'casesListExtJsRedirector';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset( $_SESSION['PMDEBUGGER'] ) && $_SESSION['PMDEBUGGER'] && $debuggerAvailable) {
|
if (isset( $_SESSION['PMDEBUGGER'] ) && $_SESSION['PMDEBUGGER'] && $debuggerAvailable) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
||||||
$loc = 'cases_Step?' . 'breakpoint=triggerdebug';
|
$loc = 'cases_Step?' . 'breakpoint=triggerdebug';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$loc = $aNextStep['PAGE'];
|
$loc = $aNextStep['PAGE'];
|
||||||
}
|
}
|
||||||
//Triggers After
|
//Triggers After
|
||||||
@@ -169,7 +161,7 @@ try {
|
|||||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET'] == 1) {
|
if ($_SESSION['TRIGGER_DEBUG']['ISSET'] == 1) {
|
||||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
|
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
|
||||||
$oTemplatePower->prepare();
|
$oTemplatePower->prepare();
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$_POST['NextStep'] = $loc;
|
$_POST['NextStep'] = $loc;
|
||||||
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameLoader' );
|
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameLoader' );
|
||||||
@@ -183,11 +175,11 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
G::header( "location: $loc" );
|
G::header( "location: $loc" );
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch ( Exception $e ) {
|
|
||||||
$aMessage = array ();
|
$aMessage = array ();
|
||||||
$aMessage['MESSAGE'] = $e->getMessage() . '<br>' . $e->getTraceAsString();
|
$aMessage['MESSAGE'] = $e->getMessage() . '<br>' . $e->getTraceAsString();
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,17 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cases list (Refactored)
|
* Cases list (Refactored)
|
||||||
* By Erik A. O. <erik@colosa.com, aortiz.erik@gmail.com>
|
* By Erik A.
|
||||||
|
* O. <erik@colosa.com, aortiz.erik@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_CASES"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_CASES" )) != 1)
|
||||||
|
return $RBAC_Response;
|
||||||
|
|
||||||
/* Includes */
|
/* Includes */
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
@@ -37,19 +38,19 @@ G::LoadClass('configuration');
|
|||||||
|
|
||||||
// $_GET['l'] has the type of cases list like todo,pause,cancel, all
|
// $_GET['l'] has the type of cases list like todo,pause,cancel, all
|
||||||
|
|
||||||
|
|
||||||
$conf = new Configurations();
|
$conf = new Configurations();
|
||||||
if (! isset( $_GET['l'] )) {
|
if (! isset( $_GET['l'] )) {
|
||||||
$confCasesList = $conf->loadObject( 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
|
$confCasesList = $conf->loadObject( 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
|
||||||
if (is_array( $confCasesList )) {
|
if (is_array( $confCasesList )) {
|
||||||
$sTypeList = $confCasesList['sTypeList'];
|
$sTypeList = $confCasesList['sTypeList'];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sTypeList = 'to_do';
|
$sTypeList = 'to_do';
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sTypeList = $_GET['l'];
|
$sTypeList = $_GET['l'];
|
||||||
$confCasesList=array('sTypeList'=>$sTypeList);
|
$confCasesList = array ('sTypeList' => $sTypeList
|
||||||
|
);
|
||||||
$conf->saveObject( $confCasesList, 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
|
$conf->saveObject( $confCasesList, 'ProcessMaker', 'cases_List', '', $_SESSION['USER_LOGGED'], '' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +59,9 @@ $_SESSION['CASES_MENU_OPTION'] = $sTypeList;
|
|||||||
|
|
||||||
$oCases = new Cases();
|
$oCases = new Cases();
|
||||||
|
|
||||||
/** here we verify if there is a any case with a unpause on this day*/
|
/**
|
||||||
|
* here we verify if there is a any case with a unpause on this day
|
||||||
|
*/
|
||||||
if ($sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
|
if ($sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused') {
|
||||||
$oCases->ThrowUnpauseDaemon( date( 'Y-m-d' ) );
|
$oCases->ThrowUnpauseDaemon( date( 'Y-m-d' ) );
|
||||||
}
|
}
|
||||||
@@ -70,7 +73,6 @@ if( $sTypeList === 'to_do' or $sTypeList === 'draft' or $sTypeList === 'paused')
|
|||||||
|
|
||||||
$aAdditionalFilter = Array ();
|
$aAdditionalFilter = Array ();
|
||||||
|
|
||||||
|
|
||||||
if (isset( $_GET['PROCESS_UID'] ) and $_GET['PROCESS_UID'] != "0" && $_GET['PROCESS_UID'] != "") {
|
if (isset( $_GET['PROCESS_UID'] ) and $_GET['PROCESS_UID'] != "0" && $_GET['PROCESS_UID'] != "") {
|
||||||
$PRO_UID = $_GET['PROCESS_UID'];
|
$PRO_UID = $_GET['PROCESS_UID'];
|
||||||
$aAdditionalFilter['PRO_UID'] = $PRO_UID;
|
$aAdditionalFilter['PRO_UID'] = $PRO_UID;
|
||||||
@@ -92,16 +94,12 @@ if( isset($_GET['MINE']) and $_GET['MINE'] == "1" ){
|
|||||||
$aAdditionalFilter['MINE'] = $_GET['MINE'];
|
$aAdditionalFilter['MINE'] = $_GET['MINE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch ($sTypeList) {
|
switch ($sTypeList) {
|
||||||
case 'to_do':
|
case 'to_do':
|
||||||
if (defined( 'ENABLE_CASE_LIST_OPTIMIZATION' )) {
|
if (defined( 'ENABLE_CASE_LIST_OPTIMIZATION' )) {
|
||||||
$aCriteria = $oCases->prepareCriteriaForToDo( $sUIDUserLogged );
|
$aCriteria = $oCases->prepareCriteriaForToDo( $sUIDUserLogged );
|
||||||
$xmlfile = 'cases/cases_ListTodoNew';
|
$xmlfile = 'cases/cases_ListTodoNew';
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
list ($aCriteria, $xmlfile) = $oCases->getConditionCasesList( $sTypeList, $sUIDUserLogged, true, $aAdditionalFilter );
|
list ($aCriteria, $xmlfile) = $oCases->getConditionCasesList( $sTypeList, $sUIDUserLogged, true, $aAdditionalFilter );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -140,34 +138,30 @@ if( !isset($_GET['PROCESS_UID']) ) {
|
|||||||
$_DBArray = $_SESSION['_DBArray'];
|
$_DBArray = $_SESSION['_DBArray'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Render page */
|
/* Render page */
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->ROWS_PER_PAGE = 12;
|
$G_PUBLISH->ROWS_PER_PAGE = 12;
|
||||||
|
|
||||||
if ($sTypeList == 'to_reassign') {
|
if ($sTypeList == 'to_reassign') {
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', array ('REASSIGN_BY' => 1 ) );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', array ('REASSIGN_BY' => 1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$aData = Array(
|
$aData = Array ('PROCESS_FILTER' => $PRO_UID,'APP_STATUS_FILTER' => (isset( $_GET['APP_STATUS_FILTER'] ) ? $_GET['APP_STATUS_FILTER'] : '0')
|
||||||
'PROCESS_FILTER'=>$PRO_UID,
|
|
||||||
'APP_STATUS_FILTER'=>(isset($_GET['APP_STATUS_FILTER'])?$_GET['APP_STATUS_FILTER']:'0')
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', $xmlfile, $aCriteria, $aData );
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', $xmlfile, $aCriteria, $aData );
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
|
|
||||||
|
function InAssocArray ($a, $k, $v)
|
||||||
|
{
|
||||||
function InAssocArray($a, $k, $v){
|
|
||||||
foreach ($a as $item) {
|
foreach ($a as $item) {
|
||||||
if( isset($item[$k]) && $v == $item[$k]) return true;
|
if (isset( $item[$k] ) && $v == $item[$k])
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -181,7 +175,5 @@ function InAssocArray($a, $k, $v){
|
|||||||
parent.PANEL_EAST_OPEN = false;
|
parent.PANEL_EAST_OPEN = false;
|
||||||
if(parent.refreshCountFolders) parent.refreshCountFolders();
|
if(parent.refreshCountFolders) parent.refreshCountFolders();
|
||||||
}catch(e){}
|
}catch(e){}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cases_New.php
|
* cases_New.php
|
||||||
*
|
*
|
||||||
@@ -20,10 +21,10 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
//we're looking for the type of view
|
//we're looking for the type of view
|
||||||
function putTypeView(){
|
function putTypeView ()
|
||||||
|
{
|
||||||
require_once 'classes/model/Configuration.php';
|
require_once 'classes/model/Configuration.php';
|
||||||
$oConfiguration = new Configuration();
|
$oConfiguration = new Configuration();
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
@@ -41,18 +42,17 @@
|
|||||||
$_GET['change'] = (isset( $_GET['change'] )) ? $_GET['change'] : putTypeView();
|
$_GET['change'] = (isset( $_GET['change'] )) ? $_GET['change'] : putTypeView();
|
||||||
|
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,16 +71,14 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
|
|||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$bCanStart = $oCase->canStartCase( $_SESSION['USER_LOGGED'] );
|
$bCanStart = $oCase->canStartCase( $_SESSION['USER_LOGGED'] );
|
||||||
if ($bCanStart)
|
if ($bCanStart) {
|
||||||
{
|
|
||||||
$aFields['LANG'] = SYS_LANG;
|
$aFields['LANG'] = SYS_LANG;
|
||||||
$aFields['USER'] = $_SESSION['USER_LOGGED'];
|
$aFields['USER'] = $_SESSION['USER_LOGGED'];
|
||||||
$sXmlForm = 'cases/cases_New.xml';
|
$sXmlForm = 'cases/cases_New.xml';
|
||||||
//$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
|
//$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
|
||||||
$_DBArray['NewCase'] = $oCase->getStartCasesPerType( $_SESSION['USER_LOGGED'], $_GET['change'] );
|
$_DBArray['NewCase'] = $oCase->getStartCasesPerType( $_SESSION['USER_LOGGED'], $_GET['change'] );
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$sXmlForm = 'cases/cases_CannotInitiateCase.xml';
|
$sXmlForm = 'cases/cases_CannotInitiateCase.xml';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,8 +108,7 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
|
|||||||
$oConfig = new Configuration();
|
$oConfig = new Configuration();
|
||||||
$oConfig->create( $aData );
|
$oConfig->create( $aData );
|
||||||
$listType = 'dropdown';
|
$listType = 'dropdown';
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$oConfiguration = new Configuration();
|
$oConfiguration = new Configuration();
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add( ConfigurationPeer::CFG_UID, 'StartNewCase' );
|
$oCriteria->add( ConfigurationPeer::CFG_UID, 'StartNewCase' );
|
||||||
@@ -134,7 +131,7 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Render page */
|
/* Render page */
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$aFields['CHANGE_LINK'] = G::LoadTranslation( 'ID_CHANGE_VIEW' );
|
$aFields['CHANGE_LINK'] = G::LoadTranslation( 'ID_CHANGE_VIEW' );
|
||||||
|
|
||||||
if (isset( $aMessage )) {
|
if (isset( $aMessage )) {
|
||||||
@@ -144,12 +141,14 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
|
|||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save' );
|
||||||
|
|
||||||
if ($listType == 'link') {
|
if ($listType == 'link') {
|
||||||
if ($bCanStart) $sXmlForm = 'cases/cases_NewRadioGroup.xml';
|
if ($bCanStart)
|
||||||
|
$sXmlForm = 'cases/cases_NewRadioGroup.xml';
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save' );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($listType == 'category') {
|
if ($listType == 'category') {
|
||||||
if ($bCanStart) $sXmlForm = 'cases/cases_NewCategory.xml';
|
if ($bCanStart)
|
||||||
|
$sXmlForm = 'cases/cases_NewCategory.xml';
|
||||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_NewCategory' );
|
$G_PUBLISH->AddContent( 'view', 'cases/cases_NewCategory' );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,3 +159,4 @@ $_GET['change']=(isset($_GET['change']))?$_GET['change']:putTypeView();
|
|||||||
parent.outerLayout.hide('east');
|
parent.outerLayout.hide('east');
|
||||||
parent.PANEL_EAST_OPEN = false;
|
parent.PANEL_EAST_OPEN = false;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_CASES"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_CASES" )) != 1)
|
||||||
|
return $RBAC_Response;
|
||||||
//go to the next step
|
//go to the next step
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
|
||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
@@ -57,14 +56,14 @@ try {
|
|||||||
if (is_null( $_GET['APP_UID'] )) {
|
if (is_null( $_GET['APP_UID'] )) {
|
||||||
G::SendMessageText( G::LoadTranslation( 'ID_CASE_DOES_NOT_EXISTS' ), 'info' );
|
G::SendMessageText( G::LoadTranslation( 'ID_CASE_DOES_NOT_EXISTS' ), 'info' );
|
||||||
G::header( 'location: casesListExtJs' );
|
G::header( 'location: casesListExtJs' );
|
||||||
exit;
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the application exists but the
|
//if the application exists but the
|
||||||
if (is_null( $_GET['DEL_INDEX'] )) {
|
if (is_null( $_GET['DEL_INDEX'] )) {
|
||||||
G::SendMessageText( G::LoadTranslation( 'ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER' ), 'info' );
|
G::SendMessageText( G::LoadTranslation( 'ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER' ), 'info' );
|
||||||
G::header( 'location: casesListExtJs' );
|
G::header( 'location: casesListExtJs' );
|
||||||
exit;
|
exit();
|
||||||
}
|
}
|
||||||
//wrong implemented, need refactored
|
//wrong implemented, need refactored
|
||||||
//$participated = $oCase->userParticipatedInCase($_GET['APP_UID'], $_SESSION['USER_LOGGED']); ???????
|
//$participated = $oCase->userParticipatedInCase($_GET['APP_UID'], $_SESSION['USER_LOGGED']); ???????
|
||||||
@@ -79,6 +78,7 @@ try {
|
|||||||
// g::pr($aFields);
|
// g::pr($aFields);
|
||||||
// die;
|
// die;
|
||||||
|
|
||||||
|
|
||||||
switch ($aFields['APP_STATUS']) {
|
switch ($aFields['APP_STATUS']) {
|
||||||
case 'DRAFT':
|
case 'DRAFT':
|
||||||
case 'TO_DO':
|
case 'TO_DO':
|
||||||
@@ -92,7 +92,7 @@ try {
|
|||||||
$_SESSION['STEP_POSITION'] = 0;
|
$_SESSION['STEP_POSITION'] = 0;
|
||||||
|
|
||||||
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
||||||
exit;
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,10 +108,8 @@ try {
|
|||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aData = $oDataset->getRow();
|
$aData = $oDataset->getRow();
|
||||||
|
|
||||||
|
if ($aData['USR_UID'] != $_SESSION['USER_LOGGED'] && $aData['USR_UID'] != "") //distinct "" for selfservice
|
||||||
if ( $aData['USR_UID'] != $_SESSION['USER_LOGGED'] &&
|
{
|
||||||
$aData['USR_UID'] != "" //distinct "" for selfservice
|
|
||||||
) {
|
|
||||||
//so we show just the resume
|
//so we show just the resume
|
||||||
$_SESSION['alreadyDerivated'] = true;
|
$_SESSION['alreadyDerivated'] = true;
|
||||||
//the case is paused show only the resume
|
//the case is paused show only the resume
|
||||||
@@ -122,11 +120,10 @@ try {
|
|||||||
$_SESSION['STEP_POSITION'] = 0;
|
$_SESSION['STEP_POSITION'] = 0;
|
||||||
|
|
||||||
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
||||||
exit;
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//proceed and try to open the case
|
//proceed and try to open the case
|
||||||
$oAppDelegation = new AppDelegation();
|
$oAppDelegation = new AppDelegation();
|
||||||
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
|
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
|
||||||
@@ -148,7 +145,7 @@ try {
|
|||||||
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
require_once (PATH_METHODS . 'cases' . PATH_SEP . 'cases_Resume.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
exit;
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the current users is in the AppDelegation row, then open the case
|
//if the current users is in the AppDelegation row, then open the case
|
||||||
@@ -171,11 +168,11 @@ try {
|
|||||||
$sPage = $aNextStep['PAGE'];
|
$sPage = $aNextStep['PAGE'];
|
||||||
G::header( 'location: ' . $sPage );
|
G::header( 'location: ' . $sPage );
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//when the case have another user or current user doesnt have rights to this selfservice,
|
//when the case have another user or current user doesnt have rights to this selfservice,
|
||||||
//just view the case Resume
|
//just view the case Resume
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['APPLICATION'] = $sAppUid;
|
$_SESSION['APPLICATION'] = $sAppUid;
|
||||||
$_SESSION['INDEX'] = $iDelIndex;
|
$_SESSION['INDEX'] = $iDelIndex;
|
||||||
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
|
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
|
||||||
@@ -203,3 +200,4 @@ try {
|
|||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
|
|
||||||
@@ -29,12 +28,12 @@ if( $RBAC->userCanAccess('PM_SUPERVISOR') != 1 )
|
|||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +59,6 @@ $oCase = new Cases();
|
|||||||
$sAppUid = $_GET['APP_UID'];
|
$sAppUid = $_GET['APP_UID'];
|
||||||
$iDelIndex = $_GET['DEL_INDEX'];
|
$iDelIndex = $_GET['DEL_INDEX'];
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['APPLICATION'] = $_GET['APP_UID'];
|
$_SESSION['APPLICATION'] = $_GET['APP_UID'];
|
||||||
$_SESSION['INDEX'] = $_GET['DEL_INDEX'];
|
$_SESSION['INDEX'] = $_GET['DEL_INDEX'];
|
||||||
|
|
||||||
@@ -75,5 +73,3 @@ $aNextStep = $oCase->getNextSupervisorStep($_SESSION['PROCESS'],0);
|
|||||||
$sPage = "cases_StepToRevise?type=DYNAFORM&PRO_UID=" . $aFields['PRO_UID'] . "&DYN_UID=" . $aNextStep['UID'] . "&APP_UID=$sAppUid&DEL_INDEX=$iDelIndex&position=1"; //$aNextStep['PAGE'];
|
$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 );
|
G::header( 'location: ' . $sPage );
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@@ -51,7 +50,7 @@ try {
|
|||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_ID_MENU_SELECTED = 'USERS';
|
$G_ID_MENU_SELECTED = 'USERS';
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
$idProcess = (isset( $Fields['APP_DATA']['PROCESS'] )) ? $Fields['APP_DATA']['PROCESS'] : $_SESSION['PROCESS'];
|
$idProcess = (isset( $Fields['APP_DATA']['PROCESS'] )) ? $Fields['APP_DATA']['PROCESS'] : $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
@@ -87,14 +86,7 @@ try {
|
|||||||
if ($noShowTitle == 0) {
|
if ($noShowTitle == 0) {
|
||||||
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array );
|
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent('dynaform',
|
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
|
||||||
'xmlform',
|
|
||||||
$aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'],
|
|
||||||
'',
|
|
||||||
$Fields['APP_DATA'],
|
|
||||||
'',
|
|
||||||
'',
|
|
||||||
'view');
|
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
} catch (Exception $oException) {
|
} catch (Exception $oException) {
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
@@ -28,12 +27,12 @@ try {
|
|||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,18 +76,17 @@ $name = '';
|
|||||||
}
|
}
|
||||||
|
|
||||||
$aUsers = $oTasks->getUsersOfTask( $aRow['TAS_UID'], 1 );
|
$aUsers = $oTasks->getUsersOfTask( $aRow['TAS_UID'], 1 );
|
||||||
foreach($aUsers as $key => $value)
|
foreach ($aUsers as $key => $value) {
|
||||||
{
|
if ($aRow['USR_UID'] != $value['USR_UID']) {
|
||||||
if($aRow['USR_UID']!=$value['USR_UID'])
|
if (! in_array( $value['USR_UID'], $aUsrUid ))
|
||||||
{ if(!in_array($value['USR_UID'], $aUsrUid))
|
|
||||||
$aUsr[$value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME']] = $value;
|
$aUsr[$value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME']] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ksort( $aUsr );
|
ksort( $aUsr );
|
||||||
//$users='';
|
//$users='';
|
||||||
//$users='<select name="USERS"><option value="">Seleccione</option>';
|
//$users='<select name="USERS"><option value="">Seleccione</option>';
|
||||||
foreach($aUsr as $key => $value)
|
foreach ($aUsr as $key => $value) {
|
||||||
{ $tpl->newBlock( "users" );
|
$tpl->newBlock( "users" );
|
||||||
$name = $value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME'] . ' (' . $value['USR_USERNAME'] . ')';
|
$name = $value['USR_FIRSTNAME'] . ' ' . $value['USR_LASTNAME'] . ' (' . $value['USR_USERNAME'] . ')';
|
||||||
//$users=$users."<option value='".$value['USR_UID']."'>". $name ."</option>";
|
//$users=$users."<option value='".$value['USR_UID']."'>". $name ."</option>";
|
||||||
$tpl->assign( "USR_UID", $value['USR_UID'] );
|
$tpl->assign( "USR_UID", $value['USR_UID'] );
|
||||||
@@ -96,8 +94,10 @@ $name = '';
|
|||||||
}
|
}
|
||||||
//$users=$users.' </select>';
|
//$users=$users.' </select>';
|
||||||
|
|
||||||
|
|
||||||
//$tpl->assign( "USERS", $users );
|
//$tpl->assign( "USERS", $users );
|
||||||
|
|
||||||
|
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
$tpl->gotoBlock( '_ROOT' );
|
$tpl->gotoBlock( '_ROOT' );
|
||||||
@@ -110,12 +110,11 @@ $name = '';
|
|||||||
$G_SUB_MENU = 'cases';
|
$G_SUB_MENU = 'cases';
|
||||||
$G_ID_MENU_SELECTED = 'CASES';
|
$G_ID_MENU_SELECTED = 'CASES';
|
||||||
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
|
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'template', '', '', '', $tpl );
|
$G_PUBLISH->AddContent( 'template', '', '', '', $tpl );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
|
|
||||||
}
|
} catch (Exception $oException) {
|
||||||
catch (Exception $oException) {
|
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,12 +33,12 @@ try {
|
|||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,25 +64,24 @@ try {
|
|||||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
///////////////////////
|
///////////////////////
|
||||||
G::loadClass( 'configuration' );
|
G::loadClass( 'configuration' );
|
||||||
$oConf = new Configurations;
|
$oConf = new Configurations();
|
||||||
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
|
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
|
||||||
|
|
||||||
$defaultOption = isset( $oConf->aConfig['format'] ) ? $oConf->aConfig['format'] : '';
|
$defaultOption = isset( $oConf->aConfig['format'] ) ? $oConf->aConfig['format'] : '';
|
||||||
$aUserInfo = array ();
|
$aUserInfo = array ();
|
||||||
$aUserInfo[] = array('USR_UID' => 'char','USER_FULLNAME' => 'char');
|
$aUserInfo[] = array ('USR_UID' => 'char','USER_FULLNAME' => 'char'
|
||||||
|
);
|
||||||
while ($oDataset->next()) {
|
while ($oDataset->next()) {
|
||||||
$aRow1 = $oDataset->getRow();
|
$aRow1 = $oDataset->getRow();
|
||||||
$infoUser = G::getFormatUserList( $defaultOption, $aRow1 );
|
$infoUser = G::getFormatUserList( $defaultOption, $aRow1 );
|
||||||
$aUserInfo[]=array(
|
$aUserInfo[] = array ('USR_UID' => $aRow1['USR_UID'],'USER_FULLNAME' => $infoUser
|
||||||
'USR_UID' => $aRow1['USR_UID'],
|
|
||||||
'USER_FULLNAME' => $infoUser
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['aUserInfo'] = $aUserInfo;
|
$_DBArray['aUserInfo'] = $aUserInfo;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
//////////////////
|
//////////////////
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', $_GET );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', $_GET );
|
||||||
|
|
||||||
$sUserToReassign = trim( $_GET['REASSIGN_USER'] );
|
$sUserToReassign = trim( $_GET['REASSIGN_USER'] );
|
||||||
@@ -117,26 +115,11 @@ try {
|
|||||||
array_push( $aCasesList, $oDataset->getRow() );
|
array_push( $aCasesList, $oDataset->getRow() );
|
||||||
}
|
}
|
||||||
|
|
||||||
$filedNames = Array (
|
$filedNames = Array ("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER"
|
||||||
"APP_UID",
|
|
||||||
"APP_NUMBER",
|
|
||||||
"APP_UPDATE_DATE",
|
|
||||||
"DEL_PRIORITY",
|
|
||||||
"DEL_INDEX",
|
|
||||||
"TAS_UID",
|
|
||||||
"DEL_INIT_DATE",
|
|
||||||
"DEL_FINISH_DATE",
|
|
||||||
"USR_UID",
|
|
||||||
"APP_STATUS",
|
|
||||||
"DEL_TASK_DUE_DATE",
|
|
||||||
"APP_CURRENT_USER",
|
|
||||||
"APP_TITLE",
|
|
||||||
"APP_PRO_TITLE",
|
|
||||||
"APP_TAS_TITLE",
|
|
||||||
"APP_DEL_PREVIOUS_USER",
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$aCasesList = array_merge(Array($filedNames), $aCasesList);
|
$aCasesList = array_merge( Array ($filedNames
|
||||||
|
), $aCasesList );
|
||||||
|
|
||||||
// G::pr($aCasesList); die;
|
// G::pr($aCasesList); die;
|
||||||
|
|
||||||
@@ -153,14 +136,15 @@ try {
|
|||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( '/jscore/cases/reassignByUser.js' );
|
$oHeadPublisher->addScriptFile( '/jscore/cases/reassignByUser.js' );
|
||||||
$G_PUBLISH->ROWS_PER_PAGE = 12;
|
$G_PUBLISH->ROWS_PER_PAGE = 12;
|
||||||
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, Array('FROM_USR_UID'=>$sUserToReassign));
|
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, Array ('FROM_USR_UID' => $sUserToReassign
|
||||||
|
) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
}
|
} catch (Exception $oException) {
|
||||||
catch (Exception $oException) {
|
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="publisherContent[10]" style="display: none"></div>
|
<div id="publisherContent[10]" style="display: none"></div>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
@@ -28,12 +27,12 @@ try {
|
|||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//print_r($_POST); die;
|
//print_r($_POST); die;
|
||||||
@@ -53,8 +52,6 @@ try {
|
|||||||
|
|
||||||
$Fields['USERS'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')';
|
$Fields['USERS'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oCases = new Cases();
|
$oCases = new Cases();
|
||||||
$aCases = $oCases->loadCase( $_POST['APP_UID'], $_POST['DEL_INDEX'] );
|
$aCases = $oCases->loadCase( $_POST['APP_UID'], $_POST['DEL_INDEX'] );
|
||||||
@@ -65,15 +62,14 @@ try {
|
|||||||
$G_SUB_MENU = 'cases';
|
$G_SUB_MENU = 'cases';
|
||||||
$G_ID_MENU_SELECTED = 'CASES';
|
$G_ID_MENU_SELECTED = 'CASES';
|
||||||
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
|
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Reassign.xml', '', $Fields, '' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Reassign.xml', '', $Fields, '' );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
//G::SendMessageText(G::LoadTranslation('ID_FINISHED'), 'info');
|
//G::SendMessageText(G::LoadTranslation('ID_FINISHED'), 'info');
|
||||||
//G::header('Location: cases_List');
|
//G::header('Location: cases_List');
|
||||||
|
|
||||||
}
|
|
||||||
catch (Exception $oException) {
|
} catch (Exception $oException) {
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Created on 19-03-2009
|
* Created on 19-03-2009
|
||||||
@@ -36,6 +35,5 @@ $aOD = $oOutputDocument->load($aFields['DOC_UID']);
|
|||||||
$a = $_GET['a'];
|
$a = $_GET['a'];
|
||||||
$ext = strtolower( $aOD['OUT_DOC_GENERATE'] );
|
$ext = strtolower( $aOD['OUT_DOC_GENERATE'] );
|
||||||
|
|
||||||
|
|
||||||
G::header( 'location: cases_ShowOutputDocument?a=' . $a . '&ext=' . $ext );
|
G::header( 'location: cases_ShowOutputDocument?a=' . $a . '&ext=' . $ext );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,20 +20,18 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +60,7 @@
|
|||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
if (isset( $aRow['APP_TYPE'] )) {
|
if (isset( $aRow['APP_TYPE'] )) {
|
||||||
switch ($aRow['APP_TYPE']) {
|
switch ($aRow['APP_TYPE']) {
|
||||||
@@ -116,6 +114,7 @@
|
|||||||
|
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
|
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
|
|
||||||
|
|||||||
@@ -20,21 +20,19 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/* Permissions */
|
/* Permissions */
|
||||||
switch ($RBAC->userCanAccess('PM_CASES'))
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
{
|
|
||||||
case - 2:
|
case - 2:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case - 1:
|
case - 1:
|
||||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
G::header( 'location: ../login/login' );
|
G::header( 'location: ../login/login' );
|
||||||
die;
|
die();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,11 +42,16 @@
|
|||||||
/* GET , POST & $_SESSION Vars */
|
/* GET , POST & $_SESSION Vars */
|
||||||
|
|
||||||
/* unset any variable, because we are starting a new case */
|
/* unset any variable, because we are starting a new case */
|
||||||
if (isset($_SESSION['APPLICATION'])) unset($_SESSION['APPLICATION']);
|
if (isset( $_SESSION['APPLICATION'] ))
|
||||||
if (isset($_SESSION['PROCESS'])) unset($_SESSION['PROCESS']);
|
unset( $_SESSION['APPLICATION'] );
|
||||||
if (isset($_SESSION['TASK'])) unset($_SESSION['TASK']);
|
if (isset( $_SESSION['PROCESS'] ))
|
||||||
if (isset($_SESSION['INDEX'])) unset($_SESSION['INDEX']);
|
unset( $_SESSION['PROCESS'] );
|
||||||
if (isset($_SESSION['STEP_POSITION'])) unset($_SESSION['STEP_POSITION']);
|
if (isset( $_SESSION['TASK'] ))
|
||||||
|
unset( $_SESSION['TASK'] );
|
||||||
|
if (isset( $_SESSION['INDEX'] ))
|
||||||
|
unset( $_SESSION['INDEX'] );
|
||||||
|
if (isset( $_SESSION['STEP_POSITION'] ))
|
||||||
|
unset( $_SESSION['STEP_POSITION'] );
|
||||||
|
|
||||||
/* Process */
|
/* Process */
|
||||||
try {
|
try {
|
||||||
@@ -67,10 +70,9 @@
|
|||||||
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
||||||
|
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch ( Exception $e ) {
|
|
||||||
$_SESSION['G_MESSAGE'] = $e->getMessage();
|
$_SESSION['G_MESSAGE'] = $e->getMessage();
|
||||||
$_SESSION['G_MESSAGE_TYPE'] = 'error';
|
$_SESSION['G_MESSAGE_TYPE'] = 'error';
|
||||||
G::header( 'location: cases_New' );
|
G::header( 'location: cases_New' );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,14 +20,15 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
//validate the data post
|
//validate the data post
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
|
if ($_GET['APP_UID'] !== $_SESSION['APPLICATION']) {
|
||||||
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', array('<a href=\''.$_SERVER['HTTP_REFERER'].'\'>{1}</a>', G::LoadTranslation('ID_REOPEN'))));
|
throw new Exception( G::LoadTranslation( 'ID_INVALID_APPLICATION_ID_MSG', array ('<a href=\'' . $_SERVER['HTTP_REFERER'] . '\'>{1}</a>',G::LoadTranslation( 'ID_REOPEN' )
|
||||||
|
) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$oForm = new Form( $_SESSION["PROCESS"] . "/" . $_GET["UID"], PATH_DYNAFORM );
|
$oForm = new Form( $_SESSION["PROCESS"] . "/" . $_GET["UID"], PATH_DYNAFORM );
|
||||||
@@ -47,10 +48,8 @@ try {
|
|||||||
#here we must verify if is a debug session
|
#here we must verify if is a debug session
|
||||||
$trigger_debug_session = $_SESSION['TRIGGER_DEBUG']['ISSET']; #here we must verify if is a debugg session
|
$trigger_debug_session = $_SESSION['TRIGGER_DEBUG']['ISSET']; #here we must verify if is a debugg session
|
||||||
|
|
||||||
|
|
||||||
#trigger debug routines...
|
#trigger debug routines...
|
||||||
|
|
||||||
|
|
||||||
//cleaning debug variables
|
//cleaning debug variables
|
||||||
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
||||||
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
||||||
@@ -83,7 +82,8 @@ try {
|
|||||||
try {
|
try {
|
||||||
$aData = $oAdditionalTables->load( $oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, true );
|
$aData = $oAdditionalTables->load( $oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, true );
|
||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
$aData = array ('FIELDS' => array () );
|
$aData = array ('FIELDS' => array ()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
$aKeys = array ();
|
$aKeys = array ();
|
||||||
$aAux = explode( '|', $oForm->fields[$oForm->fields[$sField]->pmconnection]->keys );
|
$aAux = explode( '|', $oForm->fields[$oForm->fields[$sField]->pmconnection]->keys );
|
||||||
@@ -116,14 +116,12 @@ try {
|
|||||||
} catch (Exception $oError) {
|
} catch (Exception $oError) {
|
||||||
//Nothing
|
//Nothing
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
try {
|
try {
|
||||||
// assembling the field list in order to save the data ina new record of a pm table
|
// assembling the field list in order to save the data ina new record of a pm table
|
||||||
if (empty( $newValues )) {
|
if (empty( $newValues )) {
|
||||||
$newValues = $aValues;
|
$newValues = $aValues;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
foreach ($aValues as $aValueKey => $aValueCont) {
|
foreach ($aValues as $aValueKey => $aValueCont) {
|
||||||
if (trim( $newValues[$aValueKey] ) == '') {
|
if (trim( $newValues[$aValueKey] ) == '') {
|
||||||
$newValues[$aValueKey] = $aValueCont;
|
$newValues[$aValueKey] = $aValueCont;
|
||||||
@@ -205,17 +203,13 @@ try {
|
|||||||
$fieldName = null;
|
$fieldName = null;
|
||||||
|
|
||||||
if (is_array( $arrayField[$i] )) {
|
if (is_array( $arrayField[$i] )) {
|
||||||
if (isset($_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]]) &&
|
if (isset( $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]] ) && ! empty( $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]] )) {
|
||||||
!empty($_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]])
|
|
||||||
) {
|
|
||||||
$indocUid = $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]];
|
$indocUid = $_POST["INPUTS"][$arrayField[$i]["grdName"]][$arrayField[$i]["grdFieldName"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
$fieldName = $arrayField[$i]["grdName"] . "_" . $arrayField[$i]["index"] . "_" . $arrayField[$i]["grdFieldName"];
|
$fieldName = $arrayField[$i]["grdName"] . "_" . $arrayField[$i]["index"] . "_" . $arrayField[$i]["grdFieldName"];
|
||||||
} else {
|
} else {
|
||||||
if (isset($_POST["INPUTS"][$arrayField[$i]]) &&
|
if (isset( $_POST["INPUTS"][$arrayField[$i]] ) && ! empty( $_POST["INPUTS"][$arrayField[$i]] )) {
|
||||||
!empty($_POST["INPUTS"][$arrayField[$i]])
|
|
||||||
) {
|
|
||||||
$indocUid = $_POST["INPUTS"][$arrayField[$i]];
|
$indocUid = $_POST["INPUTS"][$arrayField[$i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,32 +226,10 @@ try {
|
|||||||
//Get the Custom Folder ID (create if necessary)
|
//Get the Custom Folder ID (create if necessary)
|
||||||
$oFolder = new AppFolder();
|
$oFolder = new AppFolder();
|
||||||
|
|
||||||
$aFields = array (
|
$aFields = array ("APP_UID" => $_SESSION["APPLICATION"],"DEL_INDEX" => $_SESSION["INDEX"],"USR_UID" => $_SESSION["USER_LOGGED"],"DOC_UID" => $indocUid,"APP_DOC_TYPE" => "INPUT","APP_DOC_CREATE_DATE" => date( "Y-m-d H:i:s" ),"APP_DOC_COMMENT" => "","APP_DOC_TITLE" => "","APP_DOC_FILENAME" => $arrayFileName[$i],"FOLDER_UID" => $oFolder->createFromPath( $aID["INP_DOC_DESTINATION_PATH"] ),"APP_DOC_TAGS" => $oFolder->parseTags( $aID["INP_DOC_TAGS"] ),"APP_DOC_FIELDNAME" => $fieldName
|
||||||
"APP_UID" => $_SESSION["APPLICATION"],
|
|
||||||
"DEL_INDEX" => $_SESSION["INDEX"],
|
|
||||||
"USR_UID" => $_SESSION["USER_LOGGED"],
|
|
||||||
"DOC_UID" => $indocUid,
|
|
||||||
"APP_DOC_TYPE" => "INPUT",
|
|
||||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
|
||||||
"APP_DOC_COMMENT" => "",
|
|
||||||
"APP_DOC_TITLE" => "",
|
|
||||||
"APP_DOC_FILENAME" => $arrayFileName[$i],
|
|
||||||
"FOLDER_UID" => $oFolder->createFromPath($aID["INP_DOC_DESTINATION_PATH"]),
|
|
||||||
"APP_DOC_TAGS" => $oFolder->parseTags($aID["INP_DOC_TAGS"]),
|
|
||||||
"APP_DOC_FIELDNAME" => $fieldName
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$aFields = array (
|
$aFields = array ("APP_UID" => $_SESSION["APPLICATION"],"DEL_INDEX" => $_SESSION["INDEX"],"USR_UID" => $_SESSION["USER_LOGGED"],"DOC_UID" => - 1,"APP_DOC_TYPE" => "ATTACHED","APP_DOC_CREATE_DATE" => date( "Y-m-d H:i:s" ),"APP_DOC_COMMENT" => "","APP_DOC_TITLE" => "","APP_DOC_FILENAME" => $arrayFileName[$i],"APP_DOC_FIELDNAME" => $fieldName
|
||||||
"APP_UID" => $_SESSION["APPLICATION"],
|
|
||||||
"DEL_INDEX" => $_SESSION["INDEX"],
|
|
||||||
"USR_UID" => $_SESSION["USER_LOGGED"],
|
|
||||||
"DOC_UID" => -1,
|
|
||||||
"APP_DOC_TYPE" => "ATTACHED",
|
|
||||||
"APP_DOC_CREATE_DATE" => date("Y-m-d H:i:s"),
|
|
||||||
"APP_DOC_COMMENT" => "",
|
|
||||||
"APP_DOC_TITLE" => "",
|
|
||||||
"APP_DOC_FILENAME" => $arrayFileName[$i],
|
|
||||||
"APP_DOC_FIELDNAME" => $fieldName
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -337,12 +309,12 @@ try {
|
|||||||
|
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
|
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch (Exception $e) {
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$aMessage = array ();
|
$aMessage = array ();
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publish', 'blank' );
|
G::RenderPage( 'publish', 'blank' );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
//validate the data post
|
//validate the data post
|
||||||
$oForm = new Form( $_SESSION['PROCESS'] . '/' . $_GET['UID'], PATH_DYNAFORM );
|
$oForm = new Form( $_SESSION['PROCESS'] . '/' . $_GET['UID'], PATH_DYNAFORM );
|
||||||
@@ -54,4 +53,3 @@
|
|||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||||
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
|
G::header( 'location: cases_StepToRevise?DYN_UID=' . $aNextStep['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] );
|
||||||
|
|
||||||
|
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
//try {
|
//try {
|
||||||
|
|
||||||
|
|
||||||
//First review if there is no error with the uploaded document
|
//First review if there is no error with the uploaded document
|
||||||
if ((isset( $_FILES['form'] )) && ($_FILES['form']['error']['APP_DOC_FILENAME'] != 0)) {
|
if ((isset( $_FILES['form'] )) && ($_FILES['form']['error']['APP_DOC_FILENAME'] != 0)) {
|
||||||
$code = $_FILES['form']['error']['APP_DOC_FILENAME'];
|
$code = $_FILES['form']['error']['APP_DOC_FILENAME'];
|
||||||
@@ -57,16 +57,14 @@
|
|||||||
G::SendMessageText( $message, "ERROR" );
|
G::SendMessageText( $message, "ERROR" );
|
||||||
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
||||||
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$docUid = $_POST['form']['DOC_UID'];
|
$docUid = $_POST['form']['DOC_UID'];
|
||||||
$appDocUid = $_POST['form']['APP_DOC_UID'];
|
$appDocUid = $_POST['form']['APP_DOC_UID'];
|
||||||
$docVersion = $_POST['form']['docVersion'];
|
$docVersion = $_POST['form']['docVersion'];
|
||||||
$actionType = $_POST['form']['actionType'];
|
$actionType = $_POST['form']['actionType'];
|
||||||
|
|
||||||
|
|
||||||
//load the variables
|
//load the variables
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
@@ -76,6 +74,7 @@
|
|||||||
|
|
||||||
#trigger debug routines...
|
#trigger debug routines...
|
||||||
|
|
||||||
|
|
||||||
//cleaning debug variables
|
//cleaning debug variables
|
||||||
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = Array ();
|
||||||
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
|
||||||
@@ -97,7 +96,6 @@
|
|||||||
//Execute after triggers - End
|
//Execute after triggers - End
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//save data
|
//save data
|
||||||
$aData = array ();
|
$aData = array ();
|
||||||
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
||||||
@@ -110,6 +108,7 @@
|
|||||||
|
|
||||||
//save info
|
//save info
|
||||||
|
|
||||||
|
|
||||||
require_once ("classes/model/AppDocument.php");
|
require_once ("classes/model/AppDocument.php");
|
||||||
require_once ('classes/model/AppFolder.php');
|
require_once ('classes/model/AppFolder.php');
|
||||||
require_once ('classes/model/InputDocument.php');
|
require_once ('classes/model/InputDocument.php');
|
||||||
@@ -117,10 +116,8 @@
|
|||||||
$oInputDocument = new InputDocument();
|
$oInputDocument = new InputDocument();
|
||||||
$aID = $oInputDocument->load( $_GET['UID'] );
|
$aID = $oInputDocument->load( $_GET['UID'] );
|
||||||
|
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
|
|
||||||
|
|
||||||
//Get the Custom Folder ID (create if necessary)
|
//Get the Custom Folder ID (create if necessary)
|
||||||
$oFolder = new AppFolder();
|
$oFolder = new AppFolder();
|
||||||
$folderId = $oFolder->createFromPath( $aID['INP_DOC_DESTINATION_PATH'] );
|
$folderId = $oFolder->createFromPath( $aID['INP_DOC_DESTINATION_PATH'] );
|
||||||
@@ -130,61 +127,27 @@
|
|||||||
|
|
||||||
switch ($actionType) {
|
switch ($actionType) {
|
||||||
case "R": //replace
|
case "R": //replace
|
||||||
$aFields = array('APP_DOC_UID' => $appDocUid,
|
$aFields = array ('APP_DOC_UID' => $appDocUid,'APP_UID' => $_SESSION['APPLICATION'],'DOC_VERSION' => $docVersion,'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
|
||||||
'APP_UID' => $_SESSION['APPLICATION'],
|
);
|
||||||
'DOC_VERSION' => $docVersion,
|
|
||||||
'DEL_INDEX' => $_SESSION['INDEX'],
|
|
||||||
'USR_UID' => $_SESSION['USER_LOGGED'],
|
|
||||||
'DOC_UID' => $docUid,
|
|
||||||
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
|
|
||||||
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
|
|
||||||
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
|
|
||||||
'APP_DOC_TITLE' => '',
|
|
||||||
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '',
|
|
||||||
'FOLDER_UID' => $folderId,
|
|
||||||
'APP_DOC_TAGS' => $fileTags);
|
|
||||||
|
|
||||||
|
|
||||||
$oAppDocument->update( $aFields );
|
$oAppDocument->update( $aFields );
|
||||||
break;
|
break;
|
||||||
case "NV": //New Version
|
case "NV": //New Version
|
||||||
|
|
||||||
|
|
||||||
$aFields = array('APP_DOC_UID' => $appDocUid,
|
$aFields = array ('APP_DOC_UID' => $appDocUid,'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
|
||||||
'APP_UID' => $_SESSION['APPLICATION'],
|
);
|
||||||
'DEL_INDEX' => $_SESSION['INDEX'],
|
|
||||||
'USR_UID' => $_SESSION['USER_LOGGED'],
|
|
||||||
'DOC_UID' => $docUid,
|
|
||||||
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
|
|
||||||
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
|
|
||||||
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
|
|
||||||
'APP_DOC_TITLE' => '',
|
|
||||||
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '',
|
|
||||||
'FOLDER_UID' => $folderId,
|
|
||||||
'APP_DOC_TAGS' => $fileTags);
|
|
||||||
|
|
||||||
$oAppDocument->create( $aFields );
|
$oAppDocument->create( $aFields );
|
||||||
break;
|
break;
|
||||||
default: //New
|
default: //New
|
||||||
$aFields = array(
|
$aFields = array ('APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'],'USR_UID' => $_SESSION['USER_LOGGED'],'DOC_UID' => $docUid,'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],'APP_DOC_CREATE_DATE' => date( 'Y-m-d H:i:s' ),'APP_DOC_COMMENT' => isset( $_POST['form']['APP_DOC_COMMENT'] ) ? $_POST['form']['APP_DOC_COMMENT'] : '','APP_DOC_TITLE' => '','APP_DOC_FILENAME' => isset( $_FILES['form']['name']['APP_DOC_FILENAME'] ) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '','FOLDER_UID' => $folderId,'APP_DOC_TAGS' => $fileTags
|
||||||
'APP_UID' => $_SESSION['APPLICATION'],
|
);
|
||||||
'DEL_INDEX' => $_SESSION['INDEX'],
|
|
||||||
'USR_UID' => $_SESSION['USER_LOGGED'],
|
|
||||||
'DOC_UID' => $docUid,
|
|
||||||
'APP_DOC_TYPE' => $_POST['form']['APP_DOC_TYPE'],
|
|
||||||
'APP_DOC_CREATE_DATE' => date('Y-m-d H:i:s'),
|
|
||||||
'APP_DOC_COMMENT' => isset($_POST['form']['APP_DOC_COMMENT']) ? $_POST['form']['APP_DOC_COMMENT'] : '',
|
|
||||||
'APP_DOC_TITLE' => '',
|
|
||||||
'APP_DOC_FILENAME' => isset($_FILES['form']['name']['APP_DOC_FILENAME']) ? $_FILES['form']['name']['APP_DOC_FILENAME'] : '',
|
|
||||||
'FOLDER_UID' => $folderId,
|
|
||||||
'APP_DOC_TAGS' => $fileTags);
|
|
||||||
|
|
||||||
|
|
||||||
$oAppDocument->create( $aFields );
|
$oAppDocument->create( $aFields );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
$iDocVersion = $oAppDocument->getDocVersion();
|
$iDocVersion = $oAppDocument->getDocVersion();
|
||||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||||
@@ -202,14 +165,7 @@
|
|||||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT ) && class_exists( 'uploadDocumentData' )) {
|
||||||
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
$triggerDetail = $oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||||
$oData['APP_UID'] = $_SESSION['APPLICATION'];
|
$oData['APP_UID'] = $_SESSION['APPLICATION'];
|
||||||
$documentData = new uploadDocumentData (
|
$documentData = new uploadDocumentData( $_SESSION['APPLICATION'], $_SESSION['USER_LOGGED'], $sPathName . $sFileName, $aFields['APP_DOC_FILENAME'], $sAppDocUid, $iDocVersion );
|
||||||
$_SESSION['APPLICATION'],
|
|
||||||
$_SESSION['USER_LOGGED'],
|
|
||||||
$sPathName . $sFileName,
|
|
||||||
$aFields['APP_DOC_FILENAME'],
|
|
||||||
$sAppDocUid,
|
|
||||||
$iDocVersion
|
|
||||||
);
|
|
||||||
|
|
||||||
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
|
$uploadReturn = $oPluginRegistry->executeTriggers( PM_UPLOAD_DOCUMENT, $documentData );
|
||||||
if ($uploadReturn) {
|
if ($uploadReturn) {
|
||||||
@@ -239,51 +195,48 @@
|
|||||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
|
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
die;
|
die();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (isset( $_SERVER['HTTP_REFERER'] )) {
|
if (isset( $_SERVER['HTTP_REFERER'] )) {
|
||||||
if ($_SERVER['HTTP_REFERER'] != '') {
|
if ($_SERVER['HTTP_REFERER'] != '') {
|
||||||
|
|
||||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $_SERVER['HTTP_REFERER'];
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $_SERVER['HTTP_REFERER'];
|
||||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] . '&breakpoint=triggerdebug' );
|
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] . '&breakpoint=triggerdebug' );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||||
die;
|
die();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||||
|
|
||||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
|
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] - 1 );
|
||||||
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
$_SESSION['STEP_POSITION'] = $aNextStep['POSITION'];
|
||||||
|
|
||||||
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
|
||||||
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
|
G::header( 'location: ' . $aNextStep['PAGE'] . '&breakpoint=triggerdebug' );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
G::header( 'location: ' . $aNextStep['PAGE'] );
|
G::header( 'location: ' . $aNextStep['PAGE'] );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
||||||
@@ -295,3 +248,4 @@
|
|||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|||||||
@@ -16,18 +16,20 @@ if (! function_exists ( $_REQUEST ['action'] )) {
|
|||||||
$functionName = $_REQUEST['action'];
|
$functionName = $_REQUEST['action'];
|
||||||
//var_dump($functionName);
|
//var_dump($functionName);
|
||||||
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
|
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
|
||||||
|
|
||||||
$functionName( $functionParams );
|
$functionName( $functionParams );
|
||||||
|
|
||||||
function searchSavedJob($schUid){
|
function searchSavedJob ($schUid)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pluginsList(){
|
function pluginsList ()
|
||||||
|
{
|
||||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||||
$selectedPlugin = "";
|
$selectedPlugin = "";
|
||||||
if((isset($_REQUEST['plg_uid']))&&($_REQUEST['plg_uid']!="")) $selectedPlugin=$_REQUEST['plg_uid'];
|
if ((isset( $_REQUEST['plg_uid'] )) && ($_REQUEST['plg_uid'] != ""))
|
||||||
|
$selectedPlugin = $_REQUEST['plg_uid'];
|
||||||
if (! empty( $activePluginsForCaseScheduler )) {
|
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 '<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>";
|
echo "<option value=\"\">- Select -</option>";
|
||||||
@@ -36,16 +38,20 @@ if(!empty($activePluginsForCaseScheduler)){
|
|||||||
$sNamespace = $caseSchedulerPluginDetail->sNamespace;
|
$sNamespace = $caseSchedulerPluginDetail->sNamespace;
|
||||||
$optionId = $sNamespace . "--" . $sActionId;
|
$optionId = $sNamespace . "--" . $sActionId;
|
||||||
$selectedOption = "";
|
$selectedOption = "";
|
||||||
if($selectedPlugin==$optionId) $selectedOption="selected";
|
if ($selectedPlugin == $optionId)
|
||||||
|
$selectedOption = "selected";
|
||||||
echo "<option value=\"$optionId\" $selectedOption>" . $sActionId . "</option>";
|
echo "<option value=\"$optionId\" $selectedOption>" . $sActionId . "</option>";
|
||||||
}
|
}
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
//G::pr($activePlugnsForCaseScheduler);
|
//G::pr($activePlugnsForCaseScheduler);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function pluginCaseSchedulerForm(){
|
|
||||||
if(!isset($_REQUEST ['selectedOption'])) die;
|
function pluginCaseSchedulerForm ()
|
||||||
$G_PUBLISH = new Publisher;
|
{
|
||||||
|
if (! isset( $_REQUEST['selectedOption'] ))
|
||||||
|
die();
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
$params = explode( "--", $_REQUEST['selectedOption'] );
|
$params = explode( "--", $_REQUEST['selectedOption'] );
|
||||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||||
@@ -59,13 +65,13 @@ function pluginCaseSchedulerForm(){
|
|||||||
//Render the form
|
//Render the form
|
||||||
if ((isset( $_REQUEST['sch_uid'] )) && ($_REQUEST['sch_uid'] != "")) {
|
if ((isset( $_REQUEST['sch_uid'] )) && ($_REQUEST['sch_uid'] != "")) {
|
||||||
//$oData=$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionGetFields, array("SCH_UID"=>$_REQUEST['sch_uid']) );
|
//$oData=$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionGetFields, array("SCH_UID"=>$_REQUEST['sch_uid']) );
|
||||||
$oData=array("SCH_UID"=>$_REQUEST['sch_uid'],"PRO_UID"=>$_REQUEST['pro_uid']);
|
$oData = array ("SCH_UID" => $_REQUEST['sch_uid'],"PRO_UID" => $_REQUEST['pro_uid']
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$oData=array("PRO_UID"=>$_REQUEST['pro_uid']);
|
$oData = array ("PRO_UID" => $_REQUEST['pro_uid']
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionForm, $oData );
|
$oPluginRegistry->executeMethod( $caseSchedulerPluginDetail->sNamespace, $caseSchedulerPluginDetail->sActionForm, $oData );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
//$oUserId = '2963666854afbb1cea372c4011254883';
|
//$oUserId = '2963666854afbb1cea372c4011254883';
|
||||||
$oUserId = $_POST['USR_UID'];
|
$oUserId = $_POST['USR_UID'];
|
||||||
$process = isset( $_POST['PRO_UID'] ) ? $_POST['PRO_UID'] : $_SESSION['PROCESS'];
|
$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.'\');">';
|
//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/TaskPeer.php");
|
||||||
require_once ("classes/model/ProcessPeer.php");
|
require_once ("classes/model/ProcessPeer.php");
|
||||||
require_once ("classes/model/TaskUserPeer.php");
|
require_once ("classes/model/TaskUserPeer.php");
|
||||||
@@ -31,8 +29,5 @@ G::LoadClass ( 'Content' );
|
|||||||
echo "<input name=\"form[PRO_UID]\" id=\"form[PRO_UID]\" type=\"hidden\" value=\"" . $row[0] . "\"></input>";
|
echo "<input name=\"form[PRO_UID]\" id=\"form[PRO_UID]\" type=\"hidden\" value=\"" . $row[0] . "\"></input>";
|
||||||
//var_dump($row);
|
//var_dump($row);
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo "</select>";
|
//echo "</select>";
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,18 @@
|
|||||||
<select style="width: 300px;" name="form[TAS_UID]" id="form[TAS_UID]" class="module_app_input___gray" required="1">
|
<select style="width: 300px;" name="form[TAS_UID]" id="form[TAS_UID]"
|
||||||
|
class="module_app_input___gray" required="1">
|
||||||
<?php
|
<?php
|
||||||
//$oUserId = '2963666854afbb1cea372c4011254883';
|
//$oUserId = '2963666854afbb1cea372c4011254883';
|
||||||
//$oProcessId = '9977730834afd2a0deecaf3040551794';
|
//$oProcessId = '9977730834afd2a0deecaf3040551794';
|
||||||
$oUserId = $_POST['USR_UID'];
|
$oUserId = $_POST['USR_UID'];
|
||||||
$oProcessId = $_POST['PRO_UID'];
|
$oProcessId = $_POST['PRO_UID'];
|
||||||
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$startTasks = $oCase->getStartCases( $oUserId );
|
$startTasks = $oCase->getStartCases( $oUserId );
|
||||||
|
|
||||||
foreach ($startTasks as $task) {
|
foreach ($startTasks as $task) {
|
||||||
if ((isset( $task['pro_uid'] )) && ($task['pro_uid'] == $oProcessId)) {
|
if ((isset( $task['pro_uid'] )) && ($task['pro_uid'] == $oProcessId)) {
|
||||||
$taskValue = explode( '(', $task['value'] );
|
$taskValue = explode( '(', $task['value'] );
|
||||||
$tasksLastIndex = count( $taskValue ) - 1;
|
$tasksLastIndex = count( $taskValue ) - 1;
|
||||||
$taskValue = explode( ')', $taskValue[$tasksLastIndex] );
|
$taskValue = explode( ')', $taskValue[$tasksLastIndex] );
|
||||||
|
|
||||||
echo "<option value=\"" . $task['uid'] . "\">" . $taskValue[0] . "</option>";
|
echo "<option value=\"" . $task['uid'] . "\">" . $taskValue[0] . "</option>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,3 +20,4 @@ foreach($startTasks as $task){
|
|||||||
// echo "<option value=\"".$value."\">".$label."</option>";
|
// echo "<option value=\"".$value."\">".$label."</option>";
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -20,24 +20,22 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* process_SchedulerValidate_User
|
* process_SchedulerValidate_User
|
||||||
* validates if the username and password are valid data and if the user assigned
|
* 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
|
* to the process and task has the rights and persmissions required to create a cron task
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$sWS_USER = trim( $_REQUEST['USERNAME'] );
|
$sWS_USER = trim( $_REQUEST['USERNAME'] );
|
||||||
$sWS_PASS = trim( $_REQUEST['PASSWORD'] );
|
$sWS_PASS = trim( $_REQUEST['PASSWORD'] );
|
||||||
|
|
||||||
if (G::is_https ())
|
if (G::is_https()) {
|
||||||
$http = 'https://';
|
$http = 'https://';
|
||||||
else
|
} else {
|
||||||
$http = 'http://';
|
$http = 'http://';
|
||||||
|
}
|
||||||
|
|
||||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||||
@$client = new SoapClient( $endpoint );
|
@$client = new SoapClient( $endpoint );
|
||||||
@@ -69,3 +67,4 @@ if ($result->status_code == 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
die( G::json_encode( $result ) );
|
die( G::json_encode( $result ) );
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
/*
|
/*
|
||||||
@@ -53,4 +52,3 @@ switch ($RBAC->userCanAccess('PM_FACTORY'))
|
|||||||
$oCaseScheduler->changeStatus( $_GET['SCH_UID'] );
|
$oCaseScheduler->changeStatus( $_GET['SCH_UID'] );
|
||||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||||
|
|
||||||
|
|
||||||
@@ -39,15 +39,13 @@ switch ($RBAC->userCanAccess('PM_CASES'))
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// print_r($_GET); print_r($_POST); die;
|
// print_r($_GET); print_r($_POST); die;
|
||||||
|
|
||||||
|
|
||||||
require_once 'classes/model/CaseScheduler.php';
|
require_once 'classes/model/CaseScheduler.php';
|
||||||
$oCaseScheduler = new CaseScheduler();
|
$oCaseScheduler = new CaseScheduler();
|
||||||
if ( !isset($_GET['SCH_UID'] ) ) return;
|
if ( !isset($_GET['SCH_UID'] ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$oCaseScheduler->remove($_GET['SCH_UID']);
|
$oCaseScheduler->remove($_GET['SCH_UID']);
|
||||||
|
|
||||||
|
|
||||||
/* Redirect */
|
/* Redirect */
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
@@ -47,23 +46,22 @@ try {
|
|||||||
|
|
||||||
// $G_MAIN_MENU = 'processmaker';
|
// $G_MAIN_MENU = 'processmaker';
|
||||||
// $G_ID_MENU_SELECTED = 'CASES';
|
// $G_ID_MENU_SELECTED = 'CASES';
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
|
|
||||||
/* Prepare page before to show */
|
/* Prepare page before to show */
|
||||||
|
|
||||||
|
|
||||||
$oCaseScheduler = new CaseScheduler();
|
$oCaseScheduler = new CaseScheduler();
|
||||||
$aFields = $oCaseScheduler->load( $_GET['SCH_UID'] );
|
$aFields = $oCaseScheduler->load( $_GET['SCH_UID'] );
|
||||||
|
|
||||||
|
|
||||||
$aFields['UID_SCHEDULER'] = "scheduler";
|
$aFields['UID_SCHEDULER'] = "scheduler";
|
||||||
|
|
||||||
// load according the scheduler option selected daily/weekly/monthly/one time
|
// load according the scheduler option selected daily/weekly/monthly/one time
|
||||||
$nOpt = $aFields['SCH_OPTION'];
|
$nOpt = $aFields['SCH_OPTION'];
|
||||||
switch ($nOpt) {
|
switch ($nOpt) {
|
||||||
case 1 : $aStartDay = explode('|', $aFields['SCH_DAYS_PERFORM_TASK']);
|
case 1:
|
||||||
|
$aStartDay = explode( '|', $aFields['SCH_DAYS_PERFORM_TASK'] );
|
||||||
if ($aStartDay[0] != 3) {
|
if ($aStartDay[0] != 3) {
|
||||||
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
|
$aFields['SCH_DAYS_PERFORM_TASK'] = $aStartDay[0];
|
||||||
} else {
|
} else {
|
||||||
@@ -135,4 +133,3 @@ try {
|
|||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,10 +20,11 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) {
|
||||||
|
return $RBAC_Response;
|
||||||
|
}
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
/*switch ($RBAC->userCanAccess('PM_USERS'))
|
/*switch ($RBAC->userCanAccess('PM_USERS'))
|
||||||
{
|
{
|
||||||
@@ -39,7 +40,6 @@ global $RBAC;
|
|||||||
break;
|
break;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_SUB_MENU = 'cases';
|
$G_SUB_MENU = 'cases';
|
||||||
|
|
||||||
@@ -55,99 +55,15 @@ $sDelimiter = DBAdapter::getStringDelimiter();
|
|||||||
//$oCaseScheduler->caseSchedulerCron();
|
//$oCaseScheduler->caseSchedulerCron();
|
||||||
// g::pr($aRows); die;
|
// g::pr($aRows); die;
|
||||||
|
|
||||||
$fieldNames = Array(
|
|
||||||
'SCH_UID' => 'char',
|
$fieldNames = Array ('SCH_UID' => 'char','SCH_NAME' => 'char','PRO_UID' => 'char','TAS_UID' => 'char','SCH_TIME_NEXT_RUN' => 'char','SCH_LAST_RUN_TIME' => 'char','SCH_STATE' => 'char','SCH_LAST_STATE' => 'char','USR_UID' => 'char','SCH_OPTION' => 'char','SCH_START_TIME' => 'char','SCH_START_DATE' => 'char','SCH_DAYS_PERFORM_TASK' => 'char','SCH_EVERY_DAYS' => 'char','SCH_WEEK_DAYS' => 'char','SCH_START_DAY' => 'char','SCH_MONTHS' => 'char','SCH_END_DATE' => 'char','SCH_REPEAT_EVERY' => 'char','SCH_REPEAT_UNTIL' => 'char','SCH_REPEAT_STOP_IF_RUNNING' => 'char','PRO_PARENT' => 'char','PRO_TIME' => 'char','PRO_TIMEUNIT' => 'char','PRO_STATUS' => 'char','PRO_TYPE_DAY' => 'char','PRO_TYPE' => 'char','PRO_ASSIGNMENT' => 'char','PRO_SHOW_MAP' => 'char','PRO_SHOW_MESSAGE' => 'char',
|
||||||
'SCH_NAME' => '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',
|
||||||
'PRO_UID' => '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_UID' => 'char',
|
'TAS_DEF_PROC_CODE' => 'char','TAS_DEF_MESSAGE' => '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 = array_merge(Array($fieldNames), $aRows);
|
), $aRows );
|
||||||
//krumo ($aRows);
|
//krumo ($aRows);
|
||||||
for ($j = 0; $j < count( $aRows ); $j ++) {
|
for ($j = 0; $j < count( $aRows ); $j ++) {
|
||||||
if ($aRows[$j]['SCH_STATE'] == 'PROCESSED') {
|
if ($aRows[$j]['SCH_STATE'] == 'PROCESSED') {
|
||||||
@@ -156,6 +72,7 @@ for($j=0;$j<count($aRows);$j++){
|
|||||||
}
|
}
|
||||||
// g::pr($aRows); die;
|
// g::pr($aRows); die;
|
||||||
|
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['cases_scheduler'] = $aRows;
|
$_DBArray['cases_scheduler'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
@@ -168,9 +85,10 @@ $oCriteria->setDBArrayTable('cases_scheduler');
|
|||||||
//krumo($_SESSION);
|
//krumo($_SESSION);
|
||||||
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->ROWS_PER_PAGE = 10;
|
$G_PUBLISH->ROWS_PER_PAGE = 10;
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_Scheduler_List', $oCriteria, array('CONFIRM' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_Scheduler_List', $oCriteria, array ('CONFIRM' => G::LoadTranslation( 'ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER' )
|
||||||
|
) );
|
||||||
$G_PUBLISH->oPropelTable->rowsPerPage = 10;
|
$G_PUBLISH->oPropelTable->rowsPerPage = 10;
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_LOGIN"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1)
|
||||||
|
return $RBAC_Response;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
G::LoadClass( 'configuration' );
|
G::LoadClass( 'configuration' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$configPage = $c->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
$configPage = $c->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
@@ -36,9 +36,8 @@ $oHeadPublisher =& headPublisher::getSingleton();
|
|||||||
$oHeadPublisher->addExtJsScript( 'cases/casesSchedulerLog', false ); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'cases/casesSchedulerLog', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent( 'cases/casesSchedulerLog' ); //adding a html file .html.
|
$oHeadPublisher->addContent( 'cases/casesSchedulerLog' ); //adding a html file .html.
|
||||||
|
|
||||||
$oHeadPublisher->assign('CONFIG', $Config);
|
|
||||||
|
|
||||||
|
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||||
|
|
||||||
G::RenderPage( 'publish', 'extJs' );
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
@@ -58,14 +57,13 @@ try {
|
|||||||
require_once ('classes/model/LogCasesScheduler.php');
|
require_once ('classes/model/LogCasesScheduler.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
$oCriteria = new Criteria( 'workflow' );
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
// var_dump(htmlspecialchars($_GET['WS_ROUTE']));
|
// var_dump(htmlspecialchars($_GET['WS_ROUTE']));
|
||||||
// var_dump(htmlentities($_GET['WS_ROUTE']));
|
// var_dump(htmlentities($_GET['WS_ROUTE']));
|
||||||
|
|
||||||
$oCriteria->add(LogCasesSchedulerPeer::LOG_CASE_UID,$_REQUEST['LOG_CASE_UID']);
|
|
||||||
|
|
||||||
|
$oCriteria->add( LogCasesSchedulerPeer::LOG_CASE_UID, $_REQUEST['LOG_CASE_UID'] );
|
||||||
$result = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
|
$result = LogCasesSchedulerPeer::doSelectRS( $oCriteria );
|
||||||
$result->next();
|
$result->next();
|
||||||
$row = $result->getRow();
|
$row = $result->getRow();
|
||||||
@@ -80,13 +78,10 @@ try {
|
|||||||
$aFields['WS_ROUTE_CASE_STATUS'] = htmlentities( $row[9] );
|
$aFields['WS_ROUTE_CASE_STATUS'] = htmlentities( $row[9] );
|
||||||
//var_dump($aFields);
|
//var_dump($aFields);
|
||||||
//$aFields = $_GET;
|
//$aFields = $_GET;
|
||||||
|
|
||||||
|
|
||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_Log_Detail.xml', '', $aFields, '' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_Log_Detail.xml', '', $aFields, '' );
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
|
|
||||||
}
|
} catch (Exception $oException) {
|
||||||
catch (Exception $oException) {
|
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
@@ -65,7 +64,7 @@ $G_SUB_MENU = 'cases';
|
|||||||
$G_ID_MENU_SELECTED = 'CASES';
|
$G_ID_MENU_SELECTED = 'CASES';
|
||||||
$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
|
$G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
G::LoadClass( 'case' );
|
G::LoadClass( 'case' );
|
||||||
$aFields['PHP_START_DATE'] = date( 'Y-m-d' );
|
$aFields['PHP_START_DATE'] = date( 'Y-m-d' );
|
||||||
@@ -81,11 +80,9 @@ $G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
|
|||||||
$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
|
$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$oCaseScheduler = new CaseScheduler();
|
$oCaseScheduler = new CaseScheduler();
|
||||||
//$_DBArray['NewProcess'] = $oCaseScheduler->getProcessDescription();
|
//$_DBArray['NewProcess'] = $oCaseScheduler->getProcessDescription();
|
||||||
//$_DBArray['NewTask'] = $oCaseScheduler->getTaskDescription();
|
//$_DBArray['NewTask'] = $oCaseScheduler->getTaskDescription();
|
||||||
|
|
||||||
// var_dump($oCaseScheduler->getAllProcess()); die;
|
// var_dump($oCaseScheduler->getAllProcess()); die;
|
||||||
|
|
||||||
$aFields['UID_SCHEDULER'] = "scheduler";
|
$aFields['UID_SCHEDULER'] = "scheduler";
|
||||||
@@ -93,9 +90,7 @@ $G_ID_SUB_MENU_SELECTED = 'CASES_SCHEDULER';
|
|||||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_New.xml', '', $aFields, 'cases_Scheduler_Save' );
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Scheduler_New.xml', '', $aFields, 'cases_Scheduler_Save' );
|
||||||
G::RenderPage( 'publishBlank', 'blank' );
|
G::RenderPage( 'publishBlank', 'blank' );
|
||||||
|
|
||||||
|
} catch (Exception $oException) {
|
||||||
}
|
|
||||||
catch (Exception $oException) {
|
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
/*
|
/*
|
||||||
@@ -40,7 +39,6 @@ try {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
require_once 'classes/model/CaseScheduler.php';
|
require_once 'classes/model/CaseScheduler.php';
|
||||||
$oCaseScheduler = new CaseScheduler();
|
$oCaseScheduler = new CaseScheduler();
|
||||||
|
|
||||||
@@ -63,8 +61,6 @@ try {
|
|||||||
$sOption = $_POST['form']['SCH_OPTION'];
|
$sOption = $_POST['form']['SCH_OPTION'];
|
||||||
$aData['SCH_OPTION'] = $sOption;
|
$aData['SCH_OPTION'] = $sOption;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($_POST['form']['SCH_START_DATE'] != '') {
|
if ($_POST['form']['SCH_START_DATE'] != '') {
|
||||||
$sDateTmp = $_POST['form']['SCH_START_DATE'];
|
$sDateTmp = $_POST['form']['SCH_START_DATE'];
|
||||||
} else {
|
} else {
|
||||||
@@ -77,6 +73,7 @@ try {
|
|||||||
$nActualTime = $_POST['form']['SCH_START_TIME']; // time();
|
$nActualTime = $_POST['form']['SCH_START_TIME']; // time();
|
||||||
// $nActualDate = date("Y-m-d H:i:s", $nActualTime);
|
// $nActualDate = date("Y-m-d H:i:s", $nActualTime);
|
||||||
|
|
||||||
|
|
||||||
$sValue = '';
|
$sValue = '';
|
||||||
$sDaysPerformTask = '';
|
$sDaysPerformTask = '';
|
||||||
$sWeeks = '';
|
$sWeeks = '';
|
||||||
@@ -92,7 +89,8 @@ try {
|
|||||||
case '1': // Option 1
|
case '1': // Option 1
|
||||||
$sValue = $_POST['form']['SCH_DAYS_PERFORM_TASK'];
|
$sValue = $_POST['form']['SCH_DAYS_PERFORM_TASK'];
|
||||||
switch ($sValue) {
|
switch ($sValue) {
|
||||||
case '1' : $aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
|
case '1':
|
||||||
|
$aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
$aData['SCH_OPTION'] = '2';
|
$aData['SCH_OPTION'] = '2';
|
||||||
@@ -161,7 +159,6 @@ try {
|
|||||||
$sValue = $nStartDay;
|
$sValue = $nStartDay;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "<br>sOption: " . $sOption;
|
echo "<br>sOption: " . $sOption;
|
||||||
if (($sOption != '1') && ($sOption != '4') && ($sOption != '5')) {
|
if (($sOption != '1') && ($sOption != '4') && ($sOption != '5')) {
|
||||||
@@ -215,7 +212,6 @@ try {
|
|||||||
else
|
else
|
||||||
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
|
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((isset( $_POST['form']['CASE_SH_PLUGIN_UID'] )) && ($_POST['form']['CASE_SH_PLUGIN_UID'] != "")) {
|
if ((isset( $_POST['form']['CASE_SH_PLUGIN_UID'] )) && ($_POST['form']['CASE_SH_PLUGIN_UID'] != "")) {
|
||||||
@@ -264,12 +260,10 @@ try {
|
|||||||
// //End Adding
|
// //End Adding
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
G::header( 'location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID'] );
|
G::header( 'location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID'] );
|
||||||
|
|
||||||
|
} catch (Exception $oException) {
|
||||||
}
|
|
||||||
catch (Exception $oException) {
|
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
/*
|
/*
|
||||||
@@ -42,7 +41,6 @@ try {
|
|||||||
|
|
||||||
require_once 'classes/model/CaseScheduler.php';
|
require_once 'classes/model/CaseScheduler.php';
|
||||||
|
|
||||||
|
|
||||||
if (empty( $_POST )) {
|
if (empty( $_POST )) {
|
||||||
die( 'The information sended is empty!' );
|
die( 'The information sended is empty!' );
|
||||||
}
|
}
|
||||||
@@ -88,7 +86,8 @@ try {
|
|||||||
case '1': // Option 1
|
case '1': // Option 1
|
||||||
$sValue = $_POST['form']['SCH_DAYS_PERFORM_TASK'];
|
$sValue = $_POST['form']['SCH_DAYS_PERFORM_TASK'];
|
||||||
switch ($sValue) {
|
switch ($sValue) {
|
||||||
case '1' : $aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
|
case '1':
|
||||||
|
$aData['SCH_DAYS_PERFORM_TASK'] = $_POST['form']['SCH_DAYS_PERFORM_TASK'] . '|1';
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
$aData['SCH_OPTION'] = '2';
|
$aData['SCH_OPTION'] = '2';
|
||||||
@@ -173,6 +172,7 @@ try {
|
|||||||
}
|
}
|
||||||
// if the start date has changed then recalculate the next run time
|
// if the start date has changed then recalculate the next run time
|
||||||
|
|
||||||
|
|
||||||
// var_dump($recalculateTime);
|
// var_dump($recalculateTime);
|
||||||
// die();
|
// die();
|
||||||
$nActualTime = $_POST['form']['SCH_START_TIME'];
|
$nActualTime = $_POST['form']['SCH_START_TIME'];
|
||||||
@@ -250,7 +250,6 @@ try {
|
|||||||
else
|
else
|
||||||
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
|
$aData['SCH_REPEAT_EVERY'] = $_POST['form']['SCH_REPEAT_EVERY'];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// var_dump ($aData['SCH_TIME_NEXT_RUN']);
|
// var_dump ($aData['SCH_TIME_NEXT_RUN']);
|
||||||
// die;
|
// die;
|
||||||
@@ -276,9 +275,7 @@ try {
|
|||||||
|
|
||||||
G::header( 'location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID'] );
|
G::header( 'location: cases_Scheduler_List?PRO_UID=' . $_POST['form']['PRO_UID'] );
|
||||||
|
|
||||||
|
} catch (Exception $oException) {
|
||||||
}
|
|
||||||
catch (Exception $oException) {
|
|
||||||
die( $oException->getMessage() );
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Created on 13-02-2008
|
* Created on 13-02-2008
|
||||||
@@ -31,11 +30,13 @@
|
|||||||
require_once ("classes/model/AppDocumentPeer.php");
|
require_once ("classes/model/AppDocumentPeer.php");
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
if(!isset($_GET['v'])){//Load last version of the document
|
if (! isset( $_GET['v'] )) {
|
||||||
|
//Load last version of the document
|
||||||
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
|
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
|
||||||
} else {
|
} else {
|
||||||
$docVersion = $_GET['v'];
|
$docVersion = $_GET['v'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
|
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
@@ -46,16 +47,13 @@ $ext = $info['extension'];
|
|||||||
if (isset( $_GET['b'] )) {
|
if (isset( $_GET['b'] )) {
|
||||||
if ($_GET['b'] == '0') {
|
if ($_GET['b'] == '0') {
|
||||||
$bDownload = false;
|
$bDownload = false;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$bDownload = true;
|
$bDownload = true;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$bDownload = true;
|
$bDownload = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
|
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '_' . $iDocVersion . '.' . $ext;
|
||||||
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext;
|
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/' . $sAppDocUid . '.' . $ext;
|
||||||
$sw_file_exists = false;
|
$sw_file_exists = false;
|
||||||
@@ -76,7 +74,7 @@ if(!$sw_file_exists){
|
|||||||
G::SendMessageText( $error_message, "ERROR" );
|
G::SendMessageText( $error_message, "ERROR" );
|
||||||
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
|
||||||
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
|
||||||
die;
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -89,9 +87,3 @@ if(!$sw_file_exists){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -12,7 +12,12 @@ $pmTableFields = (isset($_POST['tableFields'])) ? G::json_decode($_POST['tableFi
|
|||||||
|
|
||||||
// default parameters
|
// default parameters
|
||||||
//$pmTableName = 'Sender';
|
//$pmTableName = 'Sender';
|
||||||
$pmTableFields = array(array('FLD_NAME'=>'APP_UID'),array('FLD_NAME'=>'CON_NAME'),array('FLD_NAME'=>'CON_ADDR'),array('FLD_NAME'=>'_cedula'));
|
$pmTableFields = array (array ('FLD_NAME' => 'APP_UID'
|
||||||
|
),array ('FLD_NAME' => 'CON_NAME'
|
||||||
|
),array ('FLD_NAME' => 'CON_ADDR'
|
||||||
|
),array ('FLD_NAME' => '_cedula'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
// setting the data to assemble the table
|
// setting the data to assemble the table
|
||||||
$aData = array ();
|
$aData = array ();
|
||||||
@@ -37,24 +42,11 @@ foreach ($pmTableFields as $iRow => $aRow) {
|
|||||||
|
|
||||||
foreach ($pmTableFields as $iRow => $aRow) {
|
foreach ($pmTableFields as $iRow => $aRow) {
|
||||||
|
|
||||||
$oFields->create(array('FLD_INDEX' => $iRow+1,
|
$oFields->create( array ('FLD_INDEX' => $iRow + 1,'ADD_TAB_UID' => $sAddTabUid,'FLD_NAME' => $aRow['FLD_NAME'],'FLD_DESCRIPTION' => isset( $aRow['FLD_DESCRIPTION'] ) ? $aRow['FLD_DESCRIPTION'] : '','FLD_TYPE' => isset( $aRow['FLD_TYPE'] ) ? $aRow['FLD_TYPE'] : 'VARCHAR','FLD_SIZE' => isset( $aRow['FLD_SIZE'] ) ? $aRow['FLD_SIZE'] : '32','FLD_NULL' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),'FLD_AUTO_INCREMENT' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),'FLD_KEY' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0),'FLD_FOREIGN_KEY' => ($aRow['FLD_FOREIGN_KEY'] == 'on' ? 1 : 0),'FLD_FOREIGN_KEY_TABLE' => isset( $aRow['FLD_FOREIGN_KEY_TABLE'] ) ? $aRow['FLD_FOREIGN_KEY_TABLE'] : ''
|
||||||
'ADD_TAB_UID' => $sAddTabUid,
|
) );
|
||||||
'FLD_NAME' => $aRow['FLD_NAME'],
|
|
||||||
'FLD_DESCRIPTION' => isset($aRow['FLD_DESCRIPTION']) ? $aRow['FLD_DESCRIPTION'] : '',
|
|
||||||
'FLD_TYPE' => isset($aRow['FLD_TYPE']) ? $aRow['FLD_TYPE'] : 'VARCHAR',
|
|
||||||
'FLD_SIZE' => isset($aRow['FLD_SIZE']) ? $aRow['FLD_SIZE'] : '32',
|
|
||||||
'FLD_NULL' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),
|
|
||||||
'FLD_AUTO_INCREMENT' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),
|
|
||||||
'FLD_KEY' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0),
|
|
||||||
'FLD_FOREIGN_KEY' => ($aRow['FLD_FOREIGN_KEY'] == 'on' ? 1 : 0),
|
|
||||||
'FLD_FOREIGN_KEY_TABLE' => isset($aRow['FLD_FOREIGN_KEY_TABLE']) ? $aRow['FLD_FOREIGN_KEY_TABLE'] : ''));
|
|
||||||
|
|
||||||
$aFields[] = array('sType' => isset($aRow['FLD_TYPE']) ? $aRow['FLD_TYPE'] : 'VARCHAR',
|
$aFields[] = array ('sType' => isset( $aRow['FLD_TYPE'] ) ? $aRow['FLD_TYPE'] : 'VARCHAR','iSize' => isset( $aRow['FLD_SIZE'] ) ? $aRow['FLD_SIZE'] : '32','sFieldName' => $aRow['FLD_NAME'],'bNull' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),'bAI' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),'bPrimaryKey' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0)
|
||||||
'iSize' => isset($aRow['FLD_SIZE']) ? $aRow['FLD_SIZE'] : '32',
|
);
|
||||||
'sFieldName' => $aRow['FLD_NAME'],
|
|
||||||
'bNull' => ($aRow['FLD_NULL'] == 'on' ? 1 : 0),
|
|
||||||
'bAI' => ($aRow['FLD_AUTO_INCREMENT'] == 'on' ? 1 : 0),
|
|
||||||
'bPrimaryKey' => ($aRow['FLD_KEY'] == 'on' ? 1 : 0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$oAdditionalTables->createTable( strtoupper( $pmTableName ), 'wf', $aFields );
|
$oAdditionalTables->createTable( strtoupper( $pmTableName ), 'wf', $aFields );
|
||||||
@@ -64,7 +56,6 @@ require_once ( "classes/model/Application.php" );
|
|||||||
require_once ("classes/model/AdditionalTables.php");
|
require_once ("classes/model/AdditionalTables.php");
|
||||||
require_once ("classes/model/Fields.php");
|
require_once ("classes/model/Fields.php");
|
||||||
|
|
||||||
|
|
||||||
$Criteria = new Criteria( 'workflow' );
|
$Criteria = new Criteria( 'workflow' );
|
||||||
$Criteria->addSelectColumn( ApplicationPeer::APP_UID );
|
$Criteria->addSelectColumn( ApplicationPeer::APP_UID );
|
||||||
$Criteria->addSelectColumn( ApplicationPeer::APP_DATA );
|
$Criteria->addSelectColumn( ApplicationPeer::APP_DATA );
|
||||||
@@ -107,4 +98,3 @@ $direccion = 'direccion '. rand (1000,999999);
|
|||||||
}
|
}
|
||||||
print "--$i--";
|
print "--$i--";
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user