CODE STYLE Formating workflow/engine/methods/cases
Change format files in workflow/engine/methods/cases
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
*
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com>
|
||||
* @date Jan 3th, 2010
|
||||
*/
|
||||
@@ -34,39 +34,37 @@ require_once 'classes/model/AppThread.php';
|
||||
require_once 'classes/model/AppDelay.php';
|
||||
require_once 'classes/model/Process.php';
|
||||
require_once 'classes/model/Task.php';
|
||||
G::LoadClass('case');
|
||||
G::LoadClass( 'case' );
|
||||
|
||||
$action = $_REQUEST['action'];
|
||||
unset($_REQUEST['action']);
|
||||
unset( $_REQUEST['action'] );
|
||||
$ajax = new Ajax();
|
||||
$ajax->$action($_REQUEST);
|
||||
$ajax->$action( $_REQUEST );
|
||||
|
||||
class Ajax
|
||||
{
|
||||
function getCaseMenu($params)
|
||||
|
||||
function getCaseMenu ($params)
|
||||
{
|
||||
|
||||
G::LoadClass("configuration");
|
||||
G::LoadClass("case");
|
||||
G::LoadClass( "configuration" );
|
||||
G::LoadClass( "case" );
|
||||
global $G_TMP_MENU;
|
||||
global $sStatus;
|
||||
$sStatus = $params['app_status'];
|
||||
$oCase = new Cases();
|
||||
$conf = new Configurations;
|
||||
$conf = new Configurations();
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load('caseOptions');
|
||||
$oMenu->load( 'caseOptions' );
|
||||
|
||||
$menuOptions = Array();
|
||||
foreach( $oMenu->Options as $i => $action ) {
|
||||
$option = Array(
|
||||
'id' => $oMenu->Id[$i],
|
||||
'label' => $oMenu->Labels[$i],
|
||||
'action' => $action
|
||||
$menuOptions = Array ();
|
||||
foreach ($oMenu->Options as $i => $action) {
|
||||
$option = Array ('id' => $oMenu->Id[$i],'label' => $oMenu->Labels[$i],'action' => $action
|
||||
);
|
||||
|
||||
switch($option['id']) {
|
||||
switch ($option['id']) {
|
||||
case 'STEPS':
|
||||
$option['options'] = Array();
|
||||
$option['options'] = Array ();
|
||||
break;
|
||||
case 'ACTIONS':
|
||||
$option['options'] = $this->getActionOptions();
|
||||
@@ -78,21 +76,20 @@ class Ajax
|
||||
$menuOptions[] = $option;
|
||||
}
|
||||
|
||||
echo G::json_encode($menuOptions);
|
||||
echo G::json_encode( $menuOptions );
|
||||
}
|
||||
|
||||
|
||||
function steps()
|
||||
function steps ()
|
||||
{
|
||||
G::LoadClass('applications');
|
||||
G::LoadClass( 'applications' );
|
||||
$applications = new Applications();
|
||||
|
||||
$proUid = isset($_SESSION['PROCESS']) ? $_SESSION['PROCESS'] : '';
|
||||
$tasUid = isset($_SESSION['TASK']) ? $_SESSION['TASK'] : '';
|
||||
$appUid = isset($_SESSION['APPLICATION']) ? $_SESSION['APPLICATION'] : '';
|
||||
$index = isset($_SESSION['INDEX']) ? $_SESSION['INDEX'] : '';
|
||||
$steps = $applications->getSteps($appUid, $index, $tasUid, $proUid);
|
||||
$list = array();
|
||||
$proUid = isset( $_SESSION['PROCESS'] ) ? $_SESSION['PROCESS'] : '';
|
||||
$tasUid = isset( $_SESSION['TASK'] ) ? $_SESSION['TASK'] : '';
|
||||
$appUid = isset( $_SESSION['APPLICATION'] ) ? $_SESSION['APPLICATION'] : '';
|
||||
$index = isset( $_SESSION['INDEX'] ) ? $_SESSION['INDEX'] : '';
|
||||
$steps = $applications->getSteps( $appUid, $index, $tasUid, $proUid );
|
||||
$list = array ();
|
||||
|
||||
foreach ($steps as $step) {
|
||||
$item['id'] = $item['idtodraw'] = $step['id'];
|
||||
@@ -122,92 +119,109 @@ class Ajax
|
||||
$list[] = $item;
|
||||
}
|
||||
|
||||
echo G::json_encode($list);
|
||||
echo G::json_encode( $list );
|
||||
}
|
||||
|
||||
function getInformationOptions()
|
||||
function getInformationOptions ()
|
||||
{
|
||||
$options = Array();
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_PROCESS_MAP'), 'fn'=>'processMap');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_PROCESS_INFORMATION'), 'fn'=>'processInformation');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_TASK_INFORMATION'), 'fn'=>'taskInformation');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_CASE_HISTORY'), 'fn'=>'caseHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_HISTORY_MESSAGE_CASE'), 'fn'=>'messageHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_DYNAFORMS'), 'fn'=>'dynaformHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_UPLOADED_DOCUMENTS'), 'fn'=>'uploadedDocuments');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_GENERATED_DOCUMENTS'), 'fn'=>'generatedDocuments');
|
||||
$options = Array ();
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_PROCESS_MAP' ),'fn' => 'processMap'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_PROCESS_INFORMATION' ),'fn' => 'processInformation'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_TASK_INFORMATION' ),'fn' => 'taskInformation'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_CASE_HISTORY' ),'fn' => 'caseHistory'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_HISTORY_MESSAGE_CASE' ),'fn' => 'messageHistory'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_DYNAFORMS' ),'fn' => 'dynaformHistory'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_UPLOADED_DOCUMENTS' ),'fn' => 'uploadedDocuments'
|
||||
);
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_GENERATED_DOCUMENTS' ),'fn' => 'generatedDocuments'
|
||||
);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
function getActionOptions()
|
||||
function getActionOptions ()
|
||||
{
|
||||
$APP_UID = $_SESSION['APPLICATION'];
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c = new Criteria( 'workflow' );
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn( AppThreadPeer::APP_THREAD_PARENT );
|
||||
$c->add(AppThreadPeer::APP_UID, $APP_UID );
|
||||
$c->add(AppThreadPeer::APP_THREAD_STATUS , 'OPEN' );
|
||||
$cant = AppThreadPeer::doCount($c);
|
||||
$c->add( AppThreadPeer::APP_UID, $APP_UID );
|
||||
$c->add( AppThreadPeer::APP_THREAD_STATUS, 'OPEN' );
|
||||
$cant = AppThreadPeer::doCount( $c );
|
||||
|
||||
$oCase = new Cases();
|
||||
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
|
||||
|
||||
GLOBAL $RBAC;
|
||||
|
||||
$options = Array();
|
||||
$options = Array ();
|
||||
|
||||
switch($aFields['APP_STATUS'])
|
||||
{
|
||||
switch ($aFields['APP_STATUS']) {
|
||||
case 'DRAFT':
|
||||
if( ! AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX']) ) {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_PAUSED_CASE'), 'fn'=>'setUnpauseCaseDate');
|
||||
if (! AppDelay::isPaused( $_SESSION['APPLICATION'], $_SESSION['INDEX'] )) {
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_PAUSED_CASE' ),'fn' => 'setUnpauseCaseDate'
|
||||
);
|
||||
} else {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_UNPAUSE'), 'fn'=>'unpauseCase');
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_UNPAUSE' ),'fn' => 'unpauseCase'
|
||||
);
|
||||
}
|
||||
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_DELETE'), 'fn'=>'deleteCase');
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_DELETE' ),'fn' => 'deleteCase'
|
||||
);
|
||||
|
||||
if( $RBAC->userCanAccess('PM_REASSIGNCASE')==1 ) {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_REASSIGN'), 'fn'=>'getUsersToReassign');
|
||||
if ($RBAC->userCanAccess( 'PM_REASSIGNCASE' ) == 1) {
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_REASSIGN' ),'fn' => 'getUsersToReassign'
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'TO_DO':
|
||||
if( ! AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX']) ) {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_PAUSED_CASE'), 'fn'=>'setUnpauseCaseDate');
|
||||
if (! AppDelay::isPaused( $_SESSION['APPLICATION'], $_SESSION['INDEX'] )) {
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_PAUSED_CASE' ),'fn' => 'setUnpauseCaseDate'
|
||||
);
|
||||
if ($cant == 1) {
|
||||
if($RBAC->userCanAccess('PM_CANCELCASE')==1)
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase');
|
||||
if ($RBAC->userCanAccess( 'PM_CANCELCASE' ) == 1)
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_CANCEL' ),'fn' => 'cancelCase'
|
||||
);
|
||||
else
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_CANCEL'), 'fn'=>'cancelCase', 'hide'=>'hiden');
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_CANCEL' ),'fn' => 'cancelCase','hide' => 'hiden'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_UNPAUSE' ),'fn' => 'unpauseCase'
|
||||
);
|
||||
}
|
||||
else {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_UNPAUSE'), 'fn'=>'unpauseCase');
|
||||
}
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE')==1) {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_REASSIGN'), 'fn'=>'getUsersToReassign');
|
||||
if ($RBAC->userCanAccess( 'PM_REASSIGNCASE' ) == 1) {
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_REASSIGN' ),'fn' => 'getUsersToReassign'
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'CANCELLED':
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_REACTIVATE'), 'fn'=>'reactivateCase');
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_REACTIVATE' ),'fn' => 'reactivateCase'
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
if( $_SESSION['TASK'] != '-1' ) {
|
||||
if ($_SESSION['TASK'] != '-1') {
|
||||
$oTask = new Task();
|
||||
$aTask = $oTask->load($_SESSION['TASK']);
|
||||
$aTask = $oTask->load( $_SESSION['TASK'] );
|
||||
if ($aTask['TAS_TYPE'] == 'ADHOC') {
|
||||
$options[] = Array('text'=>G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn'=>'adhocAssignmentUsers');
|
||||
$options[] = Array ('text' => G::LoadTranslation( 'ID_ADHOC_ASSIGNMENT' ),'fn' => 'adhocAssignmentUsers'
|
||||
);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
function processMap()
|
||||
function processMap ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
global $G_CONTENT;
|
||||
@@ -215,18 +229,17 @@ class Ajax
|
||||
global $G_TABLE;
|
||||
global $RBAC;
|
||||
|
||||
G::LoadClass('processMap');
|
||||
G::LoadClass( 'processMap' );
|
||||
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
|
||||
|
||||
//$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
||||
window.onload = function(){
|
||||
var pb=leimnud.dom.capture("tag.body 0");
|
||||
Pm=new processmap();
|
||||
@@ -304,138 +317,144 @@ class Ajax
|
||||
oLeyendsPanel.addContent(rpc.xmlhttp.responseText);
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
}');
|
||||
}' );
|
||||
|
||||
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
}
|
||||
|
||||
function getProcessInformation()
|
||||
function getProcessInformation ()
|
||||
{
|
||||
$process = new Process();
|
||||
$processData = $process->load($_SESSION['PROCESS']);
|
||||
$processData = $process->load( $_SESSION['PROCESS'] );
|
||||
require_once 'classes/model/Users.php';
|
||||
$user = new Users();
|
||||
try {
|
||||
$userData = $user->load($processData['PRO_CREATE_USER']);
|
||||
$userData = $user->load( $processData['PRO_CREATE_USER'] );
|
||||
$processData['PRO_AUTHOR'] = $userData['USR_FIRSTNAME'] . ' ' . $userData['USR_LASTNAME'];
|
||||
} catch ( Exception $oError ) {
|
||||
} catch (Exception $oError) {
|
||||
$processData['PRO_AUTHOR'] = '(USER DELETED)';
|
||||
}
|
||||
|
||||
$processData['PRO_CREATE_DATE'] = date('F j, Y', strtotime($processData['PRO_CREATE_DATE']));
|
||||
$processData['PRO_CREATE_DATE'] = date( 'F j, Y', strtotime( $processData['PRO_CREATE_DATE'] ) );
|
||||
|
||||
print(G::json_encode($processData));
|
||||
print (G::json_encode( $processData )) ;
|
||||
}
|
||||
|
||||
function getTaskInformation()
|
||||
function getTaskInformation ()
|
||||
{
|
||||
$task = new Task();
|
||||
if($_SESSION['TASK']=='-1')
|
||||
if ($_SESSION['TASK'] == '-1')
|
||||
$_SESSION['TASK'] = $_SESSION['CURRENT_TASK'];
|
||||
$taskData = $task->getDelegatedTaskData($_SESSION['TASK'], $_SESSION['APPLICATION'], $_SESSION['INDEX']);
|
||||
$taskData = $task->getDelegatedTaskData( $_SESSION['TASK'], $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
|
||||
|
||||
print(G::json_encode($taskData));
|
||||
print (G::json_encode( $taskData )) ;
|
||||
}
|
||||
|
||||
function caseHistory() {
|
||||
function caseHistory ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/caseHistory'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/caseHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/caseHistory' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function messageHistory() {
|
||||
function messageHistory ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseMessageHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseMessageHistory'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/caseMessageHistory', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/caseMessageHistory' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function dynaformHistory() {
|
||||
function dynaformHistory ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/caseHistoryDynaformPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/caseHistoryDynaformPage' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function uploadedDocuments() {
|
||||
function uploadedDocuments ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesUploadedDocumentsPage' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function uploadedDocumentsSummary() {
|
||||
function uploadedDocumentsSummary ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesUploadedDocumentsPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesUploadedDocumentsPage' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function generatedDocuments() {
|
||||
function generatedDocuments ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesGenerateDocumentPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesGenerateDocumentPage' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function generatedDocumentsSummary() {
|
||||
function generatedDocumentsSummary ()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
G::loadClass('configuration');
|
||||
G::loadClass( 'configuration' );
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$conf = new Configurations;
|
||||
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent ('cases/casesGenerateDocumentPage'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
G::RenderPage('publish', 'extJs');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesGenerateDocumentPage' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
}
|
||||
|
||||
function cancelCase()
|
||||
function cancelCase ()
|
||||
{
|
||||
$oCase = new Cases();
|
||||
$multiple = false;
|
||||
|
||||
if( isset($_POST['APP_UID']) && isset($_POST['DEL_INDEX']) ) {
|
||||
if (isset( $_POST['APP_UID'] ) && isset( $_POST['DEL_INDEX'] )) {
|
||||
$APP_UID = $_POST['APP_UID'];
|
||||
$DEL_INDEX = $_POST['DEL_INDEX'];
|
||||
|
||||
$appUids = explode(',', $APP_UID);
|
||||
$delIndexes = explode(',', $DEL_INDEX);
|
||||
if( count($appUids) > 1 && count($delIndexes) > 1 )
|
||||
$appUids = explode( ',', $APP_UID );
|
||||
$delIndexes = explode( ',', $DEL_INDEX );
|
||||
if (count( $appUids ) > 1 && count( $delIndexes ) > 1)
|
||||
$multiple = true;
|
||||
} else if( isset($_POST['sApplicationUID']) && isset($_POST['iIndex']) ){
|
||||
} else if (isset( $_POST['sApplicationUID'] ) && isset( $_POST['iIndex'] )) {
|
||||
$APP_UID = $_POST['sApplicationUID'];
|
||||
$DEL_INDEX = $_POST['iIndex'];
|
||||
} else {
|
||||
@@ -445,63 +464,63 @@ class Ajax
|
||||
|
||||
// Save the note pause reason
|
||||
if ($_POST['NOTE_REASON'] != '') {
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
$appNotes = new AppNotes();
|
||||
$noteContent = addslashes($_POST['NOTE_REASON']);
|
||||
$appNotes->postNewNote($APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_POST['NOTIFY_PAUSE']);
|
||||
$noteContent = addslashes( $_POST['NOTE_REASON'] );
|
||||
$appNotes->postNewNote( $APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_POST['NOTIFY_PAUSE'] );
|
||||
}
|
||||
// End save
|
||||
|
||||
if( $multiple ) {
|
||||
foreach($appUids as $i=>$appUid)
|
||||
$oCase->cancelCase($appUid, $delIndexes[$i], $_SESSION['USER_LOGGED']);
|
||||
|
||||
if ($multiple) {
|
||||
foreach ($appUids as $i => $appUid)
|
||||
$oCase->cancelCase( $appUid, $delIndexes[$i], $_SESSION['USER_LOGGED'] );
|
||||
} else
|
||||
$oCase->cancelCase($APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED']);
|
||||
$oCase->cancelCase( $APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'] );
|
||||
}
|
||||
|
||||
function getUsersToReassign()
|
||||
function getUsersToReassign ()
|
||||
{
|
||||
$case = new Cases();
|
||||
$result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED']);
|
||||
$result->data = $case->getUsersToReassign( $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
|
||||
|
||||
print G::json_encode($result);
|
||||
print G::json_encode( $result );
|
||||
|
||||
}
|
||||
|
||||
function reassignCase()
|
||||
function reassignCase ()
|
||||
{
|
||||
$cases = new Cases();
|
||||
$user = new Users();
|
||||
$app = new Application();
|
||||
|
||||
$TO_USR_UID = $_POST['USR_UID'];
|
||||
try{
|
||||
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
|
||||
$caseData = $app->load($_SESSION['APPLICATION']);
|
||||
$userData = $user->load($TO_USR_UID);
|
||||
try {
|
||||
$cases->reassignCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID );
|
||||
$caseData = $app->load( $_SESSION['APPLICATION'] );
|
||||
$userData = $user->load( $TO_USR_UID );
|
||||
//print_r($caseData);
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
$data['USER'] = $userData['USR_LASTNAME'].' '. $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
||||
$data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME']; //TODO change with the farmated username from environment conf
|
||||
$result->status = 0;
|
||||
$result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
|
||||
} catch(Exception $e){
|
||||
$result->msg = G::LoadTranslation( 'ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data );
|
||||
} catch (Exception $e) {
|
||||
$result->status = 1;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
print G::json_encode($result);
|
||||
print G::json_encode( $result );
|
||||
}
|
||||
|
||||
|
||||
function pauseCase()
|
||||
function pauseCase ()
|
||||
{
|
||||
try{
|
||||
try {
|
||||
$unpauseDate = $_REQUEST['unpauseDate'];
|
||||
$oCase = new Cases();
|
||||
if( isset($_POST['APP_UID']) && isset($_POST['DEL_INDEX']) ) {
|
||||
if (isset( $_POST['APP_UID'] ) && isset( $_POST['DEL_INDEX'] )) {
|
||||
$APP_UID = $_POST['APP_UID'];
|
||||
$DEL_INDEX = $_POST['DEL_INDEX'];
|
||||
} else if( isset($_POST['sApplicationUID']) && isset($_POST['iIndex']) ){
|
||||
} else if (isset( $_POST['sApplicationUID'] ) && isset( $_POST['iIndex'] )) {
|
||||
$APP_UID = $_POST['sApplicationUID'];
|
||||
$DEL_INDEX = $_POST['iIndex'];
|
||||
} else {
|
||||
@@ -511,94 +530,96 @@ class Ajax
|
||||
|
||||
// Save the note pause reason
|
||||
if ($_REQUEST['NOTE_REASON'] != '') {
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
$appNotes = new AppNotes();
|
||||
$noteContent = addslashes($_REQUEST['NOTE_REASON']);
|
||||
$appNotes->postNewNote($APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_REQUEST['NOTIFY_PAUSE']);
|
||||
$noteContent = addslashes( $_REQUEST['NOTE_REASON'] );
|
||||
$appNotes->postNewNote( $APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_REQUEST['NOTIFY_PAUSE'] );
|
||||
}
|
||||
// End save
|
||||
|
||||
$oCase->pauseCase($APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'], $unpauseDate);
|
||||
|
||||
$oCase->pauseCase( $APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'], $unpauseDate );
|
||||
$app = new Application();
|
||||
$caseData = $app->load($APP_UID);
|
||||
$caseData = $app->load( $APP_UID );
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
$data['UNPAUSE_DATE'] = $unpauseDate;
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_PAUSED_SUCCESSFULLY', SYS_LANG, $data);
|
||||
} catch(Exception $e) {
|
||||
$result->msg = G::LoadTranslation( 'ID_CASE_PAUSED_SUCCESSFULLY', SYS_LANG, $data );
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
echo G::json_encode($result);
|
||||
echo G::json_encode( $result );
|
||||
}
|
||||
|
||||
function unpauseCase()
|
||||
function unpauseCase ()
|
||||
{
|
||||
try{
|
||||
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$delIndex = (isset($_POST['DEL_INDEX'])) ? $_POST['DEL_INDEX'] : $_SESSION['INDEX'];
|
||||
try {
|
||||
$applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$delIndex = (isset( $_POST['DEL_INDEX'] )) ? $_POST['DEL_INDEX'] : $_SESSION['INDEX'];
|
||||
$oCase = new Cases();
|
||||
$oCase->unpauseCase($applicationUID, $delIndex, $_SESSION['USER_LOGGED']);
|
||||
$oCase->unpauseCase( $applicationUID, $delIndex, $_SESSION['USER_LOGGED'] );
|
||||
|
||||
$app = new Application();
|
||||
$caseData = $app->load($applicationUID);
|
||||
$caseData = $app->load( $applicationUID );
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_UNPAUSED_SUCCESSFULLY', SYS_LANG, $data);
|
||||
} catch(Exception $e) {
|
||||
$result->msg = G::LoadTranslation( 'ID_CASE_UNPAUSED_SUCCESSFULLY', SYS_LANG, $data );
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
print G::json_encode($result);
|
||||
print G::json_encode( $result );
|
||||
}
|
||||
|
||||
function deleteCase() {
|
||||
try{
|
||||
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$app = new Application();
|
||||
$caseData = $app->load($applicationUID);
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
|
||||
$oCase = new Cases();
|
||||
$oCase->removeCase($applicationUID);
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
print G::json_encode($result);
|
||||
}
|
||||
|
||||
function reactivateCase()
|
||||
function deleteCase ()
|
||||
{
|
||||
try{
|
||||
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$delIndex = (isset($_POST['DEL_INDEX'])) ? $_POST['DEL_INDEX'] : $_SESSION['INDEX'];
|
||||
try {
|
||||
$applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$app = new Application();
|
||||
$caseData = $app->load($applicationUID);
|
||||
$caseData = $app->load( $applicationUID );
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
|
||||
$oCase = new Cases();
|
||||
$oCase->reactivateCase($applicationUID, $delIndex, $_SESSION['USER_LOGGED']);
|
||||
$oCase->removeCase( $applicationUID );
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, $data);
|
||||
} catch(Exception $e) {
|
||||
$result->msg = G::LoadTranslation( 'ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data );
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
print G::json_encode( $result );
|
||||
}
|
||||
|
||||
function reactivateCase ()
|
||||
{
|
||||
try {
|
||||
$applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||
$delIndex = (isset( $_POST['DEL_INDEX'] )) ? $_POST['DEL_INDEX'] : $_SESSION['INDEX'];
|
||||
$app = new Application();
|
||||
$caseData = $app->load( $applicationUID );
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
|
||||
$oCase = new Cases();
|
||||
$oCase->reactivateCase( $applicationUID, $delIndex, $_SESSION['USER_LOGGED'] );
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation( 'ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, $data );
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
|
||||
print G::json_encode($result);
|
||||
print G::json_encode( $result );
|
||||
}
|
||||
|
||||
function changeLogTab(){
|
||||
try{
|
||||
function changeLogTab ()
|
||||
{
|
||||
try {
|
||||
global $G_PUBLISH;
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
|
||||
@@ -606,27 +627,28 @@ class Ajax
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode("_",$idHistory );
|
||||
$_REQUEST["PRO_UID"]= $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"]= $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"]= $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"]= "";
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode( "_", $idHistory );
|
||||
$_REQUEST["PRO_UID"] = $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"] = $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"] = $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"] = "";
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html {
|
||||
color:black !important;
|
||||
}
|
||||
body {
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="javascript">
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="javascript">
|
||||
function ajaxPostRequest(url, callback_function, id){
|
||||
var d = new Date();
|
||||
var time = d.getTime();
|
||||
@@ -735,26 +757,25 @@ class Ajax
|
||||
ajaxPostRequest(url, 'showDynaformHistoryGetNomDynaform_RSP');
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
|
||||
$result->success = true;
|
||||
$result->msg = G::LoadTranslation('ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, "success");
|
||||
}
|
||||
catch(Exception $e){
|
||||
$result->msg = G::LoadTranslation( 'ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, "success" );
|
||||
} catch (Exception $e) {
|
||||
$result->success = false;
|
||||
$result->msg = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
function dynaformViewFromHistory()
|
||||
function dynaformViewFromHistory ()
|
||||
{
|
||||
?>
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
@@ -777,20 +798,20 @@ class Ajax
|
||||
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$FieldsHistory = unserialize($_SESSION["HISTORY_DATA"]);
|
||||
$FieldsHistory = unserialize( $_SESSION["HISTORY_DATA"] );
|
||||
$Fields["APP_DATA"] = $FieldsHistory[$_POST["HISTORY_ID"]]; //isset($FieldsHistory[$_POST["HISTORY_ID"]])? $FieldsHistory[$_POST["HISTORY_ID"]] : "";
|
||||
$Fields["APP_DATA"]["__DYNAFORM_OPTIONS"]["PREVIOUS_STEP_LABEL"] = "";
|
||||
$Fields["APP_DATA"]["__DYNAFORM_OPTIONS"]["NEXT_STEP_LABEL"] = "";
|
||||
$Fields["APP_DATA"]["__DYNAFORM_OPTIONS"]["NEXT_STEP"] = "#";
|
||||
$Fields["APP_DATA"]["__DYNAFORM_OPTIONS"]["NEXT_ACTION"] = "return false;";
|
||||
$G_PUBLISH->AddContent("dynaform", "xmlform", $_SESSION["PROCESS"] . "/" . $_POST["DYN_UID"], "", $Fields["APP_DATA"], "", "", "view");
|
||||
?>
|
||||
$G_PUBLISH->AddContent( "dynaform", "xmlform", $_SESSION["PROCESS"] . "/" . $_POST["DYN_UID"], "", $Fields["APP_DATA"], "", "", "view" );
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
?>
|
||||
|
||||
function loadForm_<?php echo $G_FORM->id; ?>(parametro1)
|
||||
{
|
||||
@@ -798,24 +819,24 @@ class Ajax
|
||||
</script>
|
||||
|
||||
<?php
|
||||
G::RenderPage("publish", "raw");
|
||||
?>
|
||||
G::RenderPage( "publish", "raw" );
|
||||
?>
|
||||
|
||||
<style type="text/css">
|
||||
html {
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
?>
|
||||
|
||||
function loadForm_<?php echo $G_FORM->id; ?>(parametro1)
|
||||
{
|
||||
@@ -825,3 +846,4 @@ class Ajax
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,71 +20,66 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
if ($actionAjax == 'historyGridList_JXP') {
|
||||
|
||||
|
||||
|
||||
if($actionAjax=='historyGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
G::LoadClass( 'case' );
|
||||
G::LoadClass( "BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$c = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
$c = Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] );
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
$aProcesses = Array ();
|
||||
|
||||
|
||||
$rs = GulliverBasePeer::doSelectRs ($c);
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
$rs = GulliverBasePeer::doSelectRs( $c );
|
||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$rs->next();
|
||||
for($j=0;$j< $rs->getRecordCount() ;$j++) {
|
||||
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
|
||||
$result = $rs->getRow();
|
||||
$result["ID_HISTORY"] = $result["PRO_UID"].'_'.$result["APP_UID"].'_'.$result["TAS_UID"];
|
||||
$result["ID_HISTORY"] = $result["PRO_UID"] . '_' . $result["APP_UID"] . '_' . $result["TAS_UID"];
|
||||
$aProcesses[] = $result;
|
||||
$rs->next();
|
||||
}
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r = G::verifyPath( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = 2;
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
echo G::json_encode( $r );
|
||||
}
|
||||
|
||||
if($actionAjax=='historyGridListChangeLogPanelBody_JXP'){
|
||||
if ($actionAjax == 'historyGridListChangeLogPanelBody_JXP') {
|
||||
//!dataInput
|
||||
$idHistory = $_REQUEST["idHistory"];
|
||||
//!dataInput
|
||||
|
||||
|
||||
//!dataSytem
|
||||
$idHistoryArray = explode("*",$idHistory );
|
||||
$_REQUEST["PRO_UID"]= $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"]= $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"]= $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"]= "";
|
||||
$idHistoryArray = explode( "*", $idHistory );
|
||||
$_REQUEST["PRO_UID"] = $idHistoryArray[0];
|
||||
$_REQUEST["APP_UID"] = $idHistoryArray[1];
|
||||
$_REQUEST["TAS_UID"] = $idHistoryArray[2];
|
||||
$_REQUEST["DYN_UID"] = "";
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
<table bgcolor="white" height=100% width=100%>
|
||||
<tr>
|
||||
<td height=99% >
|
||||
<div style="width:100%; overflow-y: scroll; overflow-x: hidden; max-height: 310px;_height:310px;height:310px; visibility: inherit;" >
|
||||
<td height=99%>
|
||||
<div
|
||||
style="width: 100%; overflow-y: scroll; overflow-x: hidden; max-height: 310px; _height: 310px; height: 310px; visibility: inherit;">
|
||||
|
||||
<?php
|
||||
require_once 'classes/model/AppHistory.php';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
G::RenderPage('publish', 'raw');
|
||||
?>
|
||||
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -98,42 +93,25 @@
|
||||
<tr>
|
||||
<td height=30 valign=top>
|
||||
|
||||
<table align=center cellspacing="0" class="x-btn x-btn-noicon" id="ext-comp-1043" style="width: 75px;margin-top:0px;">
|
||||
<table align=center cellspacing="0" class="x-btn x-btn-noicon"
|
||||
id="ext-comp-1043" style="width: 75px; margin-top: 0px;">
|
||||
<tbody class="x-btn-small x-btn-icon-small-left">
|
||||
<tr>
|
||||
<td class="x-btn-tl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-tc">
|
||||
</td>
|
||||
<td class="x-btn-tr">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-tl"><i> </i></td>
|
||||
<td class="x-btn-tc"></td>
|
||||
<td class="x-btn-tr"><i> </i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-ml">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-mc">
|
||||
<em unselectable="on" class="">
|
||||
<button type="button" id="ext-gen105" class=" x-btn-text">
|
||||
OK
|
||||
</button>
|
||||
</em>
|
||||
</td>
|
||||
<td class="x-btn-mr">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-ml"><i> </i></td>
|
||||
<td class="x-btn-mc"><em unselectable="on" class="">
|
||||
<button type="button" id="ext-gen105" class=" x-btn-text">OK</button>
|
||||
</em></td>
|
||||
<td class="x-btn-mr"><i> </i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="x-btn-bl">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-bc">
|
||||
</td>
|
||||
<td class="x-btn-br">
|
||||
<i> </i>
|
||||
</td>
|
||||
<td class="x-btn-bl"><i> </i></td>
|
||||
<td class="x-btn-bc"></td>
|
||||
<td class="x-btn-br"><i> </i></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -142,11 +120,9 @@
|
||||
</table>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if($actionAjax=="showDynaformHistoryGetNomDynaform_JXP"){
|
||||
if ($actionAjax == "showDynaformHistoryGetNomDynaform_JXP") {
|
||||
require_once 'classes/model/ContentPeer.php';
|
||||
|
||||
//!dataInput
|
||||
@@ -158,26 +134,24 @@
|
||||
$dynTitle = '';
|
||||
|
||||
$c = new Criteria();
|
||||
$c0 = $c->getNewCriterion(ContentPeer::CON_ID,$idDin);
|
||||
$c1 = $c->getNewCriterion(ContentPeer::CON_CATEGORY,'DYN_TITLE');
|
||||
$c0->addAnd($c1);
|
||||
$c->add($c0);
|
||||
$contentObjeto = ContentPeer::doSelectOne($c);
|
||||
$c0 = $c->getNewCriterion( ContentPeer::CON_ID, $idDin );
|
||||
$c1 = $c->getNewCriterion( ContentPeer::CON_CATEGORY, 'DYN_TITLE' );
|
||||
$c0->addAnd( $c1 );
|
||||
$c->add( $c0 );
|
||||
$contentObjeto = ContentPeer::doSelectOne( $c );
|
||||
|
||||
|
||||
if(is_object($contentObjeto)){
|
||||
if (is_object( $contentObjeto )) {
|
||||
$dynTitle = $contentObjeto->getConValue();
|
||||
}
|
||||
|
||||
$md5Hash = md5($idDin.$dynDate);
|
||||
|
||||
$md5Hash = md5( $idDin . $dynDate );
|
||||
|
||||
//assign task
|
||||
$result = new stdClass;
|
||||
$result = new stdClass();
|
||||
$result->dynTitle = $dynTitle;
|
||||
$result->md5Hash = $md5Hash;
|
||||
|
||||
echo G::json_encode($result);
|
||||
echo G::json_encode( $result );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,57 +20,51 @@
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*
|
||||
*/
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax'])?$_REQUEST['actionAjax']: null;
|
||||
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
|
||||
|
||||
if ($actionAjax == 'messageHistoryGridList_JXP') {
|
||||
|
||||
|
||||
|
||||
if($actionAjax=='messageHistoryGridList_JXP'){
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass("BasePeer" );
|
||||
G::LoadClass( 'case' );
|
||||
G::LoadClass( "BasePeer" );
|
||||
|
||||
global $G_PUBLISH;
|
||||
$oCase = new Cases();
|
||||
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt($_SESSION['APPLICATION']);
|
||||
$appMessageArray = $oCase->getHistoryMessagesTrackerExt( $_SESSION['APPLICATION'] );
|
||||
|
||||
$result = new stdClass();
|
||||
$aProcesses = Array();
|
||||
$aProcesses = Array ();
|
||||
|
||||
$totalCount = 0;
|
||||
foreach( $appMessageArray as $index => $value){
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'].'_'.$appMessageArray[$index]['APP_MSG_UID'];
|
||||
foreach ($appMessageArray as $index => $value) {
|
||||
$appMessageArray[$index]['ID_MESSAGE'] = $appMessageArray[$index]['APP_UID'] . '_' . $appMessageArray[$index]['APP_MSG_UID'];
|
||||
$aProcesses[] = $appMessageArray[$index];
|
||||
$totalCount++;
|
||||
$totalCount ++;
|
||||
}
|
||||
|
||||
|
||||
$newDir = '/tmp/test/directory';
|
||||
$r = G::verifyPath ( $newDir );
|
||||
$r = G::verifyPath( $newDir );
|
||||
$r->data = $aProcesses;
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
echo G::json_encode( $r );
|
||||
}
|
||||
if ($actionAjax == 'showHistoryMessage') {
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
echo G::json_encode($r);
|
||||
}
|
||||
if($actionAjax=='showHistoryMessage'){
|
||||
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html{
|
||||
color:black !important;
|
||||
}
|
||||
body{
|
||||
color:black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
body {
|
||||
color: black !important;
|
||||
}
|
||||
</style>
|
||||
<script language="Javascript">
|
||||
//!Code that simulated reload library javascript maborak
|
||||
var leimnud = {};
|
||||
leimnud.exec = "";
|
||||
@@ -86,7 +80,7 @@
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
|
||||
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
|
||||
@@ -95,111 +89,87 @@
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
|
||||
|
||||
|
||||
?>
|
||||
<script language="javascript">
|
||||
?>
|
||||
<script language="javascript">
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
?>
|
||||
function loadForm_<?php echo $G_FORM->id;?>(parametro1){
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
}
|
||||
|
||||
if($actionAjax=='sendMailMessage_JXP'){
|
||||
if ($actionAjax == 'sendMailMessage_JXP') {
|
||||
//!dataSystem
|
||||
$errorMessage = "";
|
||||
try{
|
||||
try {
|
||||
//!dataInput
|
||||
$_POST['APP_UID'] = $_REQUEST['APP_UID'];
|
||||
$_POST['APP_MSG_UID'] = $_REQUEST['APP_MSG_UID'];
|
||||
|
||||
|
||||
G::LoadClass('case');
|
||||
G::LoadClass( 'case' );
|
||||
$oCase = new Cases();
|
||||
|
||||
|
||||
require_once 'classes/model/Configuration.php';
|
||||
G::LoadClass('spool');
|
||||
G::LoadClass( 'spool' );
|
||||
|
||||
$oCase = new Cases();
|
||||
$data = $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']);
|
||||
$data = $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] );
|
||||
//print_r($data);
|
||||
|
||||
|
||||
$oConfiguration = new Configuration();
|
||||
$sDelimiter = DBAdapter::getStringDelimiter();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ConfigurationPeer::CFG_UID, 'Emails');
|
||||
$oCriteria->add(ConfigurationPeer::OBJ_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::PRO_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::USR_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::APP_UID, '');
|
||||
if(ConfigurationPeer::doCount($oCriteria) == 0) {
|
||||
$oConfiguration->create(array('CFG_UID'=>'Emails', 'OBJ_UID'=>'', 'CFG_VALUE'=>'', 'PRO_UID'=>'', 'USR_UID'=>'', 'APP_UID'=>''));
|
||||
$aConfiguration = array();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( ConfigurationPeer::CFG_UID, 'Emails' );
|
||||
$oCriteria->add( ConfigurationPeer::OBJ_UID, '' );
|
||||
$oCriteria->add( ConfigurationPeer::PRO_UID, '' );
|
||||
$oCriteria->add( ConfigurationPeer::USR_UID, '' );
|
||||
$oCriteria->add( ConfigurationPeer::APP_UID, '' );
|
||||
if (ConfigurationPeer::doCount( $oCriteria ) == 0) {
|
||||
$oConfiguration->create( array ('CFG_UID' => 'Emails','OBJ_UID' => '','CFG_VALUE' => '','PRO_UID' => '','USR_UID' => '','APP_UID' => ''
|
||||
) );
|
||||
$aConfiguration = array ();
|
||||
} else {
|
||||
$aConfiguration = $oConfiguration->load('Emails', '', '', '', '');
|
||||
if($aConfiguration['CFG_VALUE'] != '') {
|
||||
$aConfiguration = unserialize($aConfiguration['CFG_VALUE']);
|
||||
$aConfiguration = $oConfiguration->load( 'Emails', '', '', '', '' );
|
||||
if ($aConfiguration['CFG_VALUE'] != '') {
|
||||
$aConfiguration = unserialize( $aConfiguration['CFG_VALUE'] );
|
||||
} else {
|
||||
$aConfiguration = array();
|
||||
$aConfiguration = array ();
|
||||
}
|
||||
}
|
||||
$passwd = $aConfiguration['MESS_PASSWORD'];
|
||||
$passwdDec = G::decrypt($passwd,'EMAILENCRYPT');
|
||||
$auxPass = explode('hash:', $passwdDec);
|
||||
if (count($auxPass) > 1) {
|
||||
if (count($auxPass) == 2) {
|
||||
$passwdDec = G::decrypt( $passwd, 'EMAILENCRYPT' );
|
||||
$auxPass = explode( 'hash:', $passwdDec );
|
||||
if (count( $auxPass ) > 1) {
|
||||
if (count( $auxPass ) == 2) {
|
||||
$passwd = $auxPass[1];
|
||||
} else {
|
||||
array_shift($auxPass);
|
||||
$passwd = implode('', $auxPass);
|
||||
array_shift( $auxPass );
|
||||
$passwd = implode( '', $auxPass );
|
||||
}
|
||||
}
|
||||
$aConfiguration['MESS_PASSWORD'] = $passwd;
|
||||
|
||||
|
||||
$oSpool = new spoolRun();
|
||||
$oSpool->setConfig(array(
|
||||
'MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],
|
||||
'MESS_SERVER' => $aConfiguration['MESS_SERVER'],
|
||||
'MESS_PORT' => $aConfiguration['MESS_PORT'],
|
||||
'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],
|
||||
'MESS_PASSWORD' => $passwd,
|
||||
'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||
));
|
||||
$oSpool->setConfig( array ('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],'MESS_SERVER' => $aConfiguration['MESS_SERVER'],'MESS_PORT' => $aConfiguration['MESS_PORT'],'MESS_ACCOUNT' => $aConfiguration['MESS_ACCOUNT'],'MESS_PASSWORD' => $passwd,'SMTPAuth' => $aConfiguration['MESS_RAUTH']
|
||||
) );
|
||||
|
||||
$oSpool->create(array(
|
||||
'msg_uid' => $data['MSG_UID'],
|
||||
'app_uid' => $data['APP_UID'],
|
||||
'del_index' => $data['DEL_INDEX'],
|
||||
'app_msg_type' => $data['APP_MSG_TYPE'],
|
||||
'app_msg_subject'=> $data['APP_MSG_SUBJECT'],
|
||||
'app_msg_from' => $data['APP_MSG_FROM'],
|
||||
'app_msg_to' => $data['APP_MSG_TO'],
|
||||
'app_msg_body' => $data['APP_MSG_BODY'],
|
||||
'app_msg_cc' => $data['APP_MSG_CC'],
|
||||
'app_msg_bcc' => $data['APP_MSG_BCC'],
|
||||
'app_msg_attach'=> $data['APP_MSG_ATTACH'],
|
||||
'app_msg_template'=>$data['APP_MSG_TEMPLATE'],
|
||||
'app_msg_status'=> 'pending'
|
||||
));
|
||||
$oSpool->create( array ('msg_uid' => $data['MSG_UID'],'app_uid' => $data['APP_UID'],'del_index' => $data['DEL_INDEX'],'app_msg_type' => $data['APP_MSG_TYPE'],'app_msg_subject' => $data['APP_MSG_SUBJECT'],'app_msg_from' => $data['APP_MSG_FROM'],'app_msg_to' => $data['APP_MSG_TO'],'app_msg_body' => $data['APP_MSG_BODY'],'app_msg_cc' => $data['APP_MSG_CC'],'app_msg_bcc' => $data['APP_MSG_BCC'],'app_msg_attach' => $data['APP_MSG_ATTACH'],'app_msg_template' => $data['APP_MSG_TEMPLATE'],'app_msg_status' => 'pending'
|
||||
) );
|
||||
$oSpool->sendMail();
|
||||
|
||||
}
|
||||
catch(Exception $e){
|
||||
} catch (Exception $e) {
|
||||
|
||||
$errorMessage = $e->getMessage();
|
||||
}
|
||||
|
||||
echo $errorMessage;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +1,38 @@
|
||||
<?php
|
||||
if (!isset($_REQUEST ['action'])) {
|
||||
$res ['success'] = 'failure';
|
||||
$res ['message'] = 'You may request an action';
|
||||
print G::json_encode($res);
|
||||
die ();
|
||||
if (! isset( $_REQUEST['action'] )) {
|
||||
$res['success'] = 'failure';
|
||||
$res['message'] = 'You may request an action';
|
||||
print G::json_encode( $res );
|
||||
die();
|
||||
}
|
||||
if (!function_exists($_REQUEST ['action'])) {
|
||||
$res ['success'] = 'failure';
|
||||
$res ['message'] = 'The requested action does not exist';
|
||||
header("Content-Type: application/json");
|
||||
print G::json_encode($res);
|
||||
die ();
|
||||
if (! function_exists( $_REQUEST['action'] )) {
|
||||
$res['success'] = 'failure';
|
||||
$res['message'] = 'The requested action does not exist';
|
||||
header( "Content-Type: application/json" );
|
||||
print G::json_encode( $res );
|
||||
die();
|
||||
}
|
||||
|
||||
$functionName = $_REQUEST ['action'];
|
||||
$functionParams = isset($_REQUEST ['params']) ? $_REQUEST ['params'] : array();
|
||||
$functionName = $_REQUEST['action'];
|
||||
$functionParams = isset( $_REQUEST['params'] ) ? $_REQUEST['params'] : array ();
|
||||
|
||||
$functionName($functionParams);
|
||||
$functionName( $functionParams );
|
||||
|
||||
function getExtJSParams() {
|
||||
$validParams = array('callback' => '', 'dir' => 'DESC', 'sort' => '', 'start' => 0, 'limit' => 25, 'filter' => '', 'search' => '', 'action' => '', 'xaction' => '', 'data' => '', 'status' => '', 'query' => '', 'fields' => "");
|
||||
$result = array();
|
||||
function getExtJSParams ()
|
||||
{
|
||||
$validParams = array ('callback' => '','dir' => 'DESC','sort' => '','start' => 0,'limit' => 25,'filter' => '','search' => '','action' => '','xaction' => '','data' => '','status' => '','query' => '','fields' => ""
|
||||
);
|
||||
$result = array ();
|
||||
foreach ($validParams as $paramName => $paramDefault) {
|
||||
$result[$paramName] = isset($_REQUEST[$paramName]) ? $_REQUEST[$paramName] : isset($_REQUEST[$paramName]) ? $_REQUEST[$paramName] : $paramDefault;
|
||||
$result[$paramName] = isset( $_REQUEST[$paramName] ) ? $_REQUEST[$paramName] : isset( $_REQUEST[$paramName] ) ? $_REQUEST[$paramName] : $paramDefault;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
function sendJsonResultGeneric($response, $callback) {
|
||||
header("Content-Type: application/json");
|
||||
$finalResponse = G::json_encode($response);
|
||||
function sendJsonResultGeneric ($response, $callback)
|
||||
{
|
||||
header( "Content-Type: application/json" );
|
||||
$finalResponse = G::json_encode( $response );
|
||||
if ($callback != '') {
|
||||
print $callback . "($finalResponse);";
|
||||
} else {
|
||||
@@ -37,36 +40,37 @@ function sendJsonResultGeneric($response, $callback) {
|
||||
}
|
||||
}
|
||||
|
||||
function getNotesList() {
|
||||
extract(getExtJSParams());
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
if ((isset($_REQUEST['appUid'])) && (trim($_REQUEST['appUid']) != "")) {
|
||||
function getNotesList ()
|
||||
{
|
||||
extract( getExtJSParams() );
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
if ((isset( $_REQUEST['appUid'] )) && (trim( $_REQUEST['appUid'] ) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : "";
|
||||
$usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
|
||||
$appNotes = new AppNotes();
|
||||
$response = $appNotes->getNotesList($appUid, '', $start, $limit);
|
||||
sendJsonResultGeneric($response['array'], $callback);
|
||||
$response = $appNotes->getNotesList( $appUid, '', $start, $limit );
|
||||
sendJsonResultGeneric( $response['array'], $callback );
|
||||
}
|
||||
|
||||
function postNote() {
|
||||
extract(getExtJSParams());
|
||||
if ((isset($_REQUEST['appUid'])) && (trim($_REQUEST['appUid']) != "")) {
|
||||
function postNote ()
|
||||
{
|
||||
extract( getExtJSParams() );
|
||||
if ((isset( $_REQUEST['appUid'] )) && (trim( $_REQUEST['appUid'] ) != "")) {
|
||||
$appUid = $_REQUEST['appUid'];
|
||||
} else {
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
}
|
||||
$usrUid = (isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : "";
|
||||
require_once ( "classes/model/AppNotes.php" );
|
||||
$usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
|
||||
$noteContent=addslashes($_POST['noteText']);
|
||||
$noteContent = addslashes( $_POST['noteText'] );
|
||||
|
||||
$appNotes=new AppNotes();
|
||||
$response=$appNotes->postNewNote($appUid, $usrUid, $noteContent);
|
||||
$appNotes = new AppNotes();
|
||||
$response = $appNotes->postNewNote( $appUid, $usrUid, $noteContent );
|
||||
|
||||
sendJsonResultGeneric($response, $callback);
|
||||
sendJsonResultGeneric( $response, $callback );
|
||||
}
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,40 +23,37 @@
|
||||
* by The Answer
|
||||
*/
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'cases';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_ADVANCEDSEARCH';
|
||||
$G_PUBLISH = new Publisher;
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'cases';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_ADVANCEDSEARCH';
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
global $RBAC;
|
||||
$permisse = $RBAC->userCanAccess('PM_ALLCASES');
|
||||
$userlogged = $_SESSION['USER_LOGGED'];
|
||||
global $RBAC;
|
||||
$permisse = $RBAC->userCanAccess( 'PM_ALLCASES' );
|
||||
$userlogged = $_SESSION['USER_LOGGED'];
|
||||
|
||||
require_once ( "classes/model/ProcessUser.php" );
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PU_UID);
|
||||
$oCriteria->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
$oCriteria->add(ProcessUserPeer::USR_UID, $userlogged);
|
||||
$oCriteria->add(ProcessUserPeer::PU_TYPE, "SUPERVISOR");
|
||||
require_once ("classes/model/ProcessUser.php");
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( ProcessUserPeer::PU_UID );
|
||||
$oCriteria->addSelectColumn( ProcessUserPeer::PRO_UID );
|
||||
$oCriteria->add( ProcessUserPeer::USR_UID, $userlogged );
|
||||
$oCriteria->add( ProcessUserPeer::PU_TYPE, "SUPERVISOR" );
|
||||
|
||||
$oDataset = ProcessUserPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$oDataset = ProcessUserPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
|
||||
$aSupervisor = array();
|
||||
while ($aRow = $oDataset->getRow())
|
||||
{
|
||||
$aSupervisor = array ();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aSupervisor[] = $aRow['PRO_UID'];
|
||||
$oDataset->next();
|
||||
}
|
||||
}
|
||||
|
||||
G::LoadClass( 'case' );
|
||||
$oCases = new Cases();
|
||||
|
||||
G::LoadClass('case');
|
||||
$oCases = new Cases();
|
||||
|
||||
if (isset($_POST['form']))
|
||||
{
|
||||
if (isset( $_POST['form'] )) {
|
||||
$fields['CASE_NUMBER'] = $_POST['form']['CASE_NUMBER'];
|
||||
$fields['PROCESS'] = $_POST['form']['PROCESS'];
|
||||
$fields['TASKS'] = $_POST['form']['TASKS'];
|
||||
@@ -66,20 +63,19 @@
|
||||
$fields['LAST_MODIFICATION_T'] = $_POST['form']['LAST_MODIFICATION_T'];
|
||||
$fields['APP_STATUS'] = $_POST['form']['APP_STATUS'];
|
||||
|
||||
$Criteria = $oCases->getAdvancedSearch($fields['CASE_NUMBER'], $fields['PROCESS'], $fields['TASKS'], $fields['CURRENT_USER'], $fields['SENT_BY'], $fields['LAST_MODIFICATION_F'], $fields['LAST_MODIFICATION_T'], $fields['APP_STATUS'], $permisse, $userlogged, $aSupervisor);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_advancedSearchFilter', '', $fields);
|
||||
}
|
||||
else
|
||||
{
|
||||
$Criteria = $oCases->getAdvancedSearch( $fields['CASE_NUMBER'], $fields['PROCESS'], $fields['TASKS'], $fields['CURRENT_USER'], $fields['SENT_BY'], $fields['LAST_MODIFICATION_F'], $fields['LAST_MODIFICATION_T'], $fields['APP_STATUS'], $permisse, $userlogged, $aSupervisor );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_advancedSearchFilter', '', $fields );
|
||||
} else {
|
||||
//list($Criteria,$xmlform) = $oCases->getConditionCasesList('gral');
|
||||
$Criteria = $oCases->getAdvancedSearch('', '', '', '', '', '', '', '', $permisse, $userlogged, $aSupervisor);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_advancedSearchFilter');
|
||||
}
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_advancedSearch', $Criteria);
|
||||
$Criteria = $oCases->getAdvancedSearch( '', '', '', '', '', '', '', '', $permisse, $userlogged, $aSupervisor );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_advancedSearchFilter' );
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_advancedSearch', $Criteria );
|
||||
|
||||
G::RenderPage('publish', 'blank');
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
?>
|
||||
<script>
|
||||
parent.outerLayout.hide('east');
|
||||
parent.PANEL_EAST_OPEN = false;
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user