Merge remote branch 'upstream/master'

This commit is contained in:
jennylee
2012-10-18 14:38:52 -04:00
51 changed files with 3541 additions and 3661 deletions

View File

@@ -506,7 +506,6 @@ class XmlForm_Field
if ($e !== '') { if ($e !== '') {
$correct = false; $correct = false;
} }
//##,###.## --> ^...$ no parece pero no, o mejor si, donde # es \d?, en general todos //##,###.## --> ^...$ no parece pero no, o mejor si, donde # es \d?, en general todos
// es valida cuando no encuentra un caracter que no deberia estar, puede no terminar la mascara // es valida cuando no encuentra un caracter que no deberia estar, puede no terminar la mascara
// pero si sobran caracteres en el value entonces no se cumple la mascara. // pero si sobran caracteres en el value entonces no se cumple la mascara.
@@ -4246,7 +4245,6 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText
* $html .= '<input type="hidden" id="'.$idIsoDate.'" name="'.$idIsoDate.'" value="'.$valisoDate.'"/>'; * $html .= '<input type="hidden" id="'.$idIsoDate.'" name="'.$idIsoDate.'" value="'.$valisoDate.'"/>';
* * * *
*/ */
if ($this->gridFieldType == '') { if ($this->gridFieldType == '') {
$html .= $this->renderHint(); $html .= $this->renderHint();
} }

View File

@@ -1,10 +1,12 @@
<?php <?php
require_once 'classes/model/Application.php'; require_once 'classes/model/Application.php';
G::LoadClass( 'case' ); G::LoadClass( 'case' );
class adhocUserProxy extends HttpProxyController class adhocUserProxy extends HttpProxyController
{ {
//list of users into adhoc option //list of users into adhoc option
function adhocAssignUsersk($params){ function adhocAssignUsersk ($params)
{
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
G::LoadClass( 'tasks' ); G::LoadClass( 'tasks' );
@@ -43,15 +45,15 @@ class adhocUserProxy extends HttpProxyController
} }
//assign user adhoc //assign user adhoc
function reassignCase($params){ function reassignCase ($params)
{
$cases = new Cases(); $cases = new Cases();
$cases->reassignCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE'] ); $cases->reassignCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE'] );
$this->success = true; $this->success = true;
} }
//delete case adhoc //delete case adhoc
function deleteCase($params){ function deleteCase ($params)
{
$ainfoCase = array (); $ainfoCase = array ();
try { try {
$applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION']; $applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
@@ -70,4 +72,6 @@ class adhocUserProxy extends HttpProxyController
} }
} }
} //End adhocUserProxy }
//End adhocUserProxy

View File

@@ -1,6 +1,8 @@
<?php <?php
/** /**
* Admin controller * Admin controller
*
* @access public * @access public
*/ */
class Admin extends Controller class Admin extends Controller
@@ -31,8 +33,6 @@ class Admin extends Controller
$timeZones[] = array ($tz,$tz); $timeZones[] = array ($tz,$tz);
} }
$this->includeExtJS( 'admin/system' ); $this->includeExtJS( 'admin/system' );
//G::LoadClass('configuration'); //G::LoadClass('configuration');
@@ -65,10 +65,10 @@ class Admin extends Controller
G::RenderPage( 'publish', 'extJs' ); G::RenderPage( 'publish', 'extJs' );
} }
/** /**
* CALENDAR * CALENDAR
* getting default list * getting default list
*
* @param string $httpData->PRO_UID (opional) * @param string $httpData->PRO_UID (opional)
*/ */
public function calendarEdit ($httpData) public function calendarEdit ($httpData)
@@ -97,7 +97,7 @@ class Admin extends Controller
if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { // Copy Calendar if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { // Copy Calendar
$fields['CALENDAR_UID'] = G::GenerateUniqueID(); $fields['CALENDAR_UID'] = G::GenerateUniqueID();
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME']; $fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
$fields ['OLD_NAME'] = $fields['CALENDAR_NAME'];; $fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
} }
$c = new Configurations(); $c = new Configurations();
@@ -150,6 +150,7 @@ class Admin extends Controller
/** /**
* getting default list * getting default list
*
* @param string $httpData->PRO_UID (opional) * @param string $httpData->PRO_UID (opional)
*/ */
public function pmLogo ($httpData) public function pmLogo ($httpData)
@@ -180,5 +181,5 @@ class Admin extends Controller
//render content //render content
G::RenderPage( 'publish', 'extJs' ); G::RenderPage( 'publish', 'extJs' );
} }
} }

View File

@@ -1,6 +1,8 @@
<?php <?php
/** /**
* App controller * App controller
*
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com> * @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
* @herits Controller * @herits Controller
* @access public * @access public
@@ -8,8 +10,10 @@
class AppProxy extends HttpProxyController class AppProxy extends HttpProxyController
{ {
/** /**
* Get Notes List * Get Notes List
*
* @param int $httpData->start * @param int $httpData->start
* @param int $httpData->limit * @param int $httpData->limit
* @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION']) * @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION'])
@@ -21,8 +25,7 @@ class AppProxy extends HttpProxyController
if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") { if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
$appUid = $httpData->appUid; $appUid = $httpData->appUid;
} } else {
else {
if (isset( $_SESSION['APPLICATION'] )) { if (isset( $_SESSION['APPLICATION'] )) {
$appUid = $_SESSION['APPLICATION']; $appUid = $_SESSION['APPLICATION'];
} }
@@ -39,7 +42,8 @@ class AppProxy extends HttpProxyController
$respBlock = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'BLOCK' ); $respBlock = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'BLOCK' );
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) { if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
return array('totalCount' => 0, 'notes' => array(), 'noPerms' => 1); return array ('totalCount' => 0,'notes' => array (),'noPerms' => 1
);
} }
require_once ("classes/model/AppNotes.php"); require_once ("classes/model/AppNotes.php");
@@ -57,6 +61,7 @@ class AppProxy extends HttpProxyController
/** /**
* post Note Action * post Note Action
*
* @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION']) * @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION'])
* @return array containg the case notes * @return array containg the case notes
*/ */
@@ -65,8 +70,7 @@ class AppProxy extends HttpProxyController
//extract(getExtJSParams()); //extract(getExtJSParams());
if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") { if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
$appUid = $httpData->appUid; $appUid = $httpData->appUid;
} } else {
else {
$appUid = $_SESSION['APPLICATION']; $appUid = $_SESSION['APPLICATION'];
} }
@@ -116,6 +120,7 @@ class AppProxy extends HttpProxyController
/** /**
* request to open the case summary * request to open the case summary
*
* @param string $httpData->appUid * @param string $httpData->appUid
* @param string $httpData->delIndex * @param string $httpData->delIndex
* @return object bool $result->succes, string $result->message(is an exception was thrown), string $result->dynUid * @return object bool $result->succes, string $result->message(is an exception was thrown), string $result->dynUid
@@ -161,6 +166,7 @@ class AppProxy extends HttpProxyController
/** /**
* get the case summary data * get the case summary data
*
* @param string $httpData->appUid * @param string $httpData->appUid
* @param string $httpData->delIndex * @param string $httpData->delIndex
* @return array containg the case summary data * @return array containg the case summary data
@@ -181,8 +187,7 @@ class AppProxy extends HttpProxyController
unset( $_SESSION['_applicationFields'] ); unset( $_SESSION['_applicationFields'] );
$processData = $_SESSION['_processData']; $processData = $_SESSION['_processData'];
unset( $_SESSION['_processData'] ); unset( $_SESSION['_processData'] );
} } else {
else {
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex ); $applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
$process = new Process(); $process = new Process();
$processData = $process->load( $applicationFields['PRO_UID'] ); $processData = $process->load( $applicationFields['PRO_UID'] );
@@ -193,30 +198,43 @@ class AppProxy extends HttpProxyController
$taskData = $task->load( $applicationFields['TAS_UID'] ); $taskData = $task->load( $applicationFields['TAS_UID'] );
$currentUser = $applicationFields['CURRENT_USER'] != '' ? $applicationFields['CURRENT_USER'] : '[' . G::LoadTranslation( 'ID_UNASSIGNED' ) . ']'; $currentUser = $applicationFields['CURRENT_USER'] != '' ? $applicationFields['CURRENT_USER'] : '[' . G::LoadTranslation( 'ID_UNASSIGNED' ) . ']';
$data[] = array('label'=>$labels['PRO_TITLE'] , 'value' => $processData['PRO_TITLE'], 'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['PRO_TITLE'],'value' => $processData['PRO_TITLE'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['TITLE'] , 'value' => $applicationFields['TITLE'], 'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['APP_NUMBER'] , 'value' => $applicationFields['APP_NUMBER'], 'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['TITLE'],'value' => $applicationFields['TITLE'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['STATUS'] , 'value' => $applicationFields['STATUS'], 'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['APP_UID'] , 'value' => $applicationFields['APP_UID'], 'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['APP_NUMBER'],'value' => $applicationFields['APP_NUMBER'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['CREATOR'] , 'value' => $applicationFields['CREATOR'], 'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['CREATE_DATE'] , 'value' => $applicationFields['CREATE_DATE'],'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['STATUS'],'value' => $applicationFields['STATUS'],'section' => $labels['TITLE1']
$data[] = array('label'=>$labels['UPDATE_DATE'] , 'value' => $applicationFields['UPDATE_DATE'],'section'=>$labels['TITLE1']); );
$data[] = array('label'=>$labels['DESCRIPTION'] , 'value' => $applicationFields['DESCRIPTION'],'section'=>$labels['TITLE1']); $data[] = array ('label' => $labels['APP_UID'],'value' => $applicationFields['APP_UID'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['CREATOR'],'value' => $applicationFields['CREATOR'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['CREATE_DATE'],'value' => $applicationFields['CREATE_DATE'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['UPDATE_DATE'],'value' => $applicationFields['UPDATE_DATE'],'section' => $labels['TITLE1']
);
$data[] = array ('label' => $labels['DESCRIPTION'],'value' => $applicationFields['DESCRIPTION'],'section' => $labels['TITLE1']
);
// note added by krlos pacha carlos[at]colosa[dot]com // note added by krlos pacha carlos[at]colosa[dot]com
//getting this field if it doesn't exist. Related 7994 bug //getting this field if it doesn't exist. Related 7994 bug
$taskData['TAS_TITLE'] = (array_key_exists( 'TAS_TITLE', $taskData )) ? $taskData['TAS_TITLE'] : Content::Load( "TAS_TITLE", "", $applicationFields['TAS_UID'], SYS_LANG ); $taskData['TAS_TITLE'] = (array_key_exists( 'TAS_TITLE', $taskData )) ? $taskData['TAS_TITLE'] : Content::Load( "TAS_TITLE", "", $applicationFields['TAS_UID'], SYS_LANG );
$data[] = array('label'=>$labels['TAS_TITLE'] , 'value' => $taskData['TAS_TITLE'], 'section'=>$labels['TITLE2']); $data[] = array ('label' => $labels['TAS_TITLE'],'value' => $taskData['TAS_TITLE'],'section' => $labels['TITLE2']
$data[] = array('label'=>$labels['CURRENT_USER'] , 'value' => $currentUser, 'section'=>$labels['TITLE2']); );
$data[] = array('label'=>$labels['DEL_DELEGATE_DATE'] , 'value' => $applicationFields['DEL_DELEGATE_DATE'],'section'=>$labels['TITLE2']); $data[] = array ('label' => $labels['CURRENT_USER'],'value' => $currentUser,'section' => $labels['TITLE2']
$data[] = array('label'=>$labels['DEL_INIT_DATE'] , 'value' => $applicationFields['DEL_INIT_DATE'], 'section'=>$labels['TITLE2']); );
$data[] = array('label'=>$labels['DEL_TASK_DUE_DATE'] , 'value' => $applicationFields['DEL_TASK_DUE_DATE'],'section'=>$labels['TITLE2']); $data[] = array ('label' => $labels['DEL_DELEGATE_DATE'],'value' => $applicationFields['DEL_DELEGATE_DATE'],'section' => $labels['TITLE2']
$data[] = array('label'=>$labels['DEL_FINISH_DATE'] , 'value' => $applicationFields['DEL_FINISH_DATE'], 'section'=>$labels['TITLE2']); );
$data[] = array ('label' => $labels['DEL_INIT_DATE'],'value' => $applicationFields['DEL_INIT_DATE'],'section' => $labels['TITLE2']
);
$data[] = array ('label' => $labels['DEL_TASK_DUE_DATE'],'value' => $applicationFields['DEL_TASK_DUE_DATE'],'section' => $labels['TITLE2']
);
$data[] = array ('label' => $labels['DEL_FINISH_DATE'],'value' => $applicationFields['DEL_FINISH_DATE'],'section' => $labels['TITLE2']
);
//$data[] = array('label'=>$labels['DYN_UID'] , 'value' => $processData['PRO_DYNAFORMS']['PROCESS'];, 'section'=>$labels['DYN_UID']); //$data[] = array('label'=>$labels['DYN_UID'] , 'value' => $processData['PRO_DYNAFORMS']['PROCESS'];, 'section'=>$labels['DYN_UID']);
return $data; return $data;
} }
} }

View File

@@ -1,19 +1,14 @@
<?php <?php
class authSourceProxy extends HttpProxyController
{
function testingOption ($params)
{
class authSourceProxy extends HttpProxyController {
function testingOption($params){
/*global $RBAC; /*global $RBAC;
$fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS); $fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS);
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$data=array(); $data=array();
$aCommonFields = array('AUTH_SOURCE_UID', $aCommonFields = array('AUTH_SOURCE_UID',
'AUTH_SOURCE_NAME', 'AUTH_SOURCE_NAME',
'AUTH_SOURCE_PROVIDER', 'AUTH_SOURCE_PROVIDER',
@@ -27,7 +22,6 @@ class authSourceProxy extends HttpProxyController {
'AUTH_SOURCE_BASE_DN', 'AUTH_SOURCE_BASE_DN',
'AUTH_SOURCE_OBJECT_CLASSES', 'AUTH_SOURCE_OBJECT_CLASSES',
'AUTH_SOURCE_ATTRIBUTES'); 'AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array(); $aFields = $aData = array();
unset($params->PHPSESSID); unset($params->PHPSESSID);
@@ -53,27 +47,15 @@ class authSourceProxy extends HttpProxyController {
return $data; return $data;
} }
function saveAuthSources($params){ function saveAuthSources ($params)
{
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 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();
} }
$aCommonFields = array('AUTH_SOURCE_UID', $aCommonFields = array ('AUTH_SOURCE_UID','AUTH_SOURCE_NAME','AUTH_SOURCE_PROVIDER','AUTH_SOURCE_SERVER_NAME','AUTH_SOURCE_PORT','AUTH_SOURCE_ENABLED_TLS','AUTH_ANONYMOUS','AUTH_SOURCE_SEARCH_USER','AUTH_SOURCE_PASSWORD','AUTH_SOURCE_VERSION','AUTH_SOURCE_BASE_DN','AUTH_SOURCE_OBJECT_CLASSES','AUTH_SOURCE_ATTRIBUTES');
'AUTH_SOURCE_NAME',
'AUTH_SOURCE_PROVIDER',
'AUTH_SOURCE_SERVER_NAME',
'AUTH_SOURCE_PORT',
'AUTH_SOURCE_ENABLED_TLS',
'AUTH_ANONYMOUS',
'AUTH_SOURCE_SEARCH_USER',
'AUTH_SOURCE_PASSWORD',
'AUTH_SOURCE_VERSION',
'AUTH_SOURCE_BASE_DN',
'AUTH_SOURCE_OBJECT_CLASSES',
'AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array (); $aFields = $aData = array ();
@@ -81,22 +63,19 @@ class authSourceProxy extends HttpProxyController {
foreach ($params as $sField => $sValue) { foreach ($params as $sField => $sValue) {
if (in_array( $sField, $aCommonFields )) { if (in_array( $sField, $aCommonFields )) {
$aFields[$sField] = (($sField == 'AUTH_SOURCE_ENABLED_TLS' || $sField == 'AUTH_ANONYMOUS')) ? ($sValue == 'yes') ? 1 : 0 : $sValue; $aFields[$sField] = (($sField == 'AUTH_SOURCE_ENABLED_TLS' || $sField == 'AUTH_ANONYMOUS')) ? ($sValue == 'yes') ? 1 : 0 : $sValue;
} } else {
else {
$aData[$sField] = $sValue; $aData[$sField] = $sValue;
} }
} }
$aFields['AUTH_SOURCE_DATA'] = $aData; $aFields['AUTH_SOURCE_DATA'] = $aData;
if ($aFields['AUTH_SOURCE_UID'] == '') { if ($aFields['AUTH_SOURCE_UID'] == '') {
$RBAC->createAuthSource( $aFields ); $RBAC->createAuthSource( $aFields );
} } else {
else {
$RBAC->updateAuthSource( $aFields ); $RBAC->updateAuthSource( $aFields );
} }
$data = array (); $data = array ();
$data['success'] = true; $data['success'] = true;
return $data; return $data;
} //end saveAuthSoruces function } //end saveAuthSoruces function
} //end authSourceProxy class } //end authSourceProxy class

View File

@@ -24,15 +24,12 @@ function getLoadTreeMenuData ()
$oMenu->load( 'cases' ); $oMenu->load( 'cases' );
$oCases = new Cases(); $oCases = new Cases();
$aTypes = Array ('to_do','draft','cancelled','sent','paused','completed','selfservice' $aTypes = Array ('to_do','draft','cancelled','sent','paused','completed','selfservice');
//'to_revise', //'to_revise',
//'to_reassign' //'to_reassign'
; $aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice');
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice'
//'CASES_TO_REVISE'=>'to_revise', //'CASES_TO_REVISE'=>'to_revise',
//'CASES_TO_REASSIGN'=>'to_reassign' //'CASES_TO_REASSIGN'=>'to_reassign'
;
$list = array (); $list = array ();
$list['count'] = ' '; $list['count'] = ' ';
@@ -64,8 +61,7 @@ function getLoadTreeMenuData ()
$menuCases[$CurrentBlockID]['blockType'] = $oMenu->Types[$i]; $menuCases[$CurrentBlockID]['blockType'] = $oMenu->Types[$i];
$menuCases[$CurrentBlockID]['link'] = $oMenu->Options[$i]; $menuCases[$CurrentBlockID]['link'] = $oMenu->Options[$i];
} else { } else {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = Array ('label' => $oMenu->Labels[$i],'link' => $oMenu->Options[$i],'icon' => (isset( $oMenu->Icons[$i] ) && $oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'kcmdf.png' $menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = Array ('label' => $oMenu->Labels[$i],'link' => $oMenu->Options[$i],'icon' => (isset( $oMenu->Icons[$i] ) && $oMenu->Icons[$i] != '') ? $oMenu->Icons[$i] : 'kcmdf.png');
);
if (isset( $aTypesID[$oMenu->Id[$i]] )) { if (isset( $aTypesID[$oMenu->Id[$i]] )) {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]]['cases_count'] = $aCount[$aTypesID[$oMenu->Id[$i]]]['count']; $menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]]['cases_count'] = $aCount[$aTypesID[$oMenu->Id[$i]]]['count'];
@@ -131,8 +127,7 @@ function getProcess ()
$aTypesID['CASES_SELFSERVICE'] = 'selfservice'; $aTypesID['CASES_SELFSERVICE'] = 'selfservice';
//$aTypesID['CASES_TO_REVISE'] = 'to_revise'; //$aTypesID['CASES_TO_REVISE'] = 'to_revise';
//$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign'; //$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign';
$aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign' $aTypesID = Array ('CASES_INBOX' => 'to_do','CASES_DRAFT' => 'draft','CASES_CANCELLED' => 'cancelled','CASES_SENT' => 'sent','CASES_PAUSED' => 'paused','CASES_COMPLETED' => 'completed','CASES_SELFSERVICE' => 'selfservice','CASES_TO_REVISE' => 'to_revise','CASES_TO_REASSIGN' => 'to_reassign');
);
$aCount = $oCases->getAllCounters( Array ($aTypesID[$type] $aCount = $oCases->getAllCounters( Array ($aTypesID[$type]
), $userId, true ); ), $userId, true );
@@ -188,8 +183,7 @@ function getAllCounters ()
$aCount = $ApplicationSolrIndex->getCasesCount( $userUid ); $aCount = $ApplicationSolrIndex->getCasesCount( $userUid );
//get paused count //get paused count
$aCountMissing = $oAppCache->getAllCounters( array ('paused','completed','cancelled' $aCountMissing = $oAppCache->getAllCounters( array ('paused','completed','cancelled'), $userUid );
), $userUid );
$aCount = array_merge( $aCount, $aCountMissing ); $aCount = array_merge( $aCount, $aCountMissing );
} else { } else {

View File

@@ -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.
*
*/ */
$frm = $HTTP_GET_VARS; $frm = $HTTP_GET_VARS;
@@ -28,21 +27,24 @@
<h1>demo de buscador</h1> <h1>demo de buscador</h1>
<form method=post action="buscador2.php"> <form method=post action="buscador2.php">
<input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>" > <input type=hidden name=ticket value="<?php echo $frm['ticket'] ?>"> <input
<input type=hidden name=tipo value="<?php echo $frm['tipo'] ?>" > type=hidden name=tipo value="<?php echo $frm['tipo'] ?>">
Buscador tipo : <?php echo $frm['tipo'] ?><br> Buscador tipo : <?php echo $frm['tipo'] ?><br>
<table><tr><td> <table>
curso</td><td> <tr>
<select name=curso> <td>curso</td>
<td><select name=curso>
<option value="curso1">Curso 1</option> <option value="curso1">Curso 1</option>
<option value="curso2">Curso 2</option> <option value="curso2">Curso 2</option>
<option value="curso3">Curso 3</option> <option value="curso3">Curso 3</option>
<option value="curso4">Curso 4</4option> <option value="curso4">Curso 4</4option>
<option value="curso5">Curso 5</option>
</td></tr> <option value="curso5">Curso 5</option></td>
<tr><td colspan=2> </tr>
<input type=submit ></td></tr> <tr>
<td colspan=2><input type=submit></td>
</tr>
</table> </table>
</form> </form>
</body> </body>

View File

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

View File

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

View File

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

View File

@@ -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.
*
*/ */
G::LoadClass( 'xmlfield_InputPM' ); G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 ); $aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
@@ -30,19 +29,10 @@ foreach ( $aFields as $aField ) {
$sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>'; $sHTML .= '<option value="' . $_POST['sSymbol'] . $aField['sName'] . '">' . $_POST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
} }
$aRows[0] = Array ( $aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
'fieldname' => 'char',
'variable' => 'char',
'type' => 'type',
'label' => 'char'
); );
foreach ($aFields as $aField) { foreach ($aFields as $aField) {
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
} }
@@ -135,9 +125,9 @@ $cssTabs = "<div id=\"all\">
echo $sHTML; echo $sHTML;
echo $sStyle; echo $sStyle;
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
echo "<div id=\"processVariablesContent\">"; echo "<div id=\"processVariablesContent\">";
echo $cssTabs; echo $cssTabs;
G::LoadClass( 'ArrayPeer' ); G::LoadClass( 'ArrayPeer' );
@@ -159,4 +149,4 @@ $G_PUBLISH->AddContent('propeltable', 'paged-table', 'triggers/dynavars', $oCrit
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
echo "</div>"; echo "</div>";
?>

View File

@@ -20,64 +20,42 @@
* *
* 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.
*
*/ */
/** /**
* @author Gustavo Cruz gustavo-at-colosa.com * the varAjaxByType file as the varAjax.php handle the render of the diferent
* @param $_POST variables
* @desc the varAjaxByType file as the varAjax.php handle the render of the diferent
* types of dynaform variables there are 3 of them system, process, and the default * types of dynaform variables there are 3 of them system, process, and the default
* that show both system and process variables. * that show both system and process variables.
* uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the * uses almost the same variables passed to varsAjax, plus $_POST['type'] that is the
* type of the variables. Then it render a propel table with all the variables * type of the variables. Then it render a propel table with all the variables
* loaded for that type. * loaded for that type.
*
* @author Gustavo Cruz gustavo-at-colosa.com
* @param $_POST variables
*/ */
G::LoadClass( 'xmlfield_InputPM' ); G::LoadClass( 'xmlfield_InputPM' );
$aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 ); $aFields = getDynaformsVars( $_POST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
$aType = $_POST['type']; $aType = $_POST['type'];
$aRows[0] = Array ( $aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char'
'fieldname' => 'char',
'variable' => 'char',
'type' => 'type',
'label' => 'char'
); );
foreach ($aFields as $aField) { foreach ($aFields as $aField) {
switch ($aType) { switch ($aType) {
case "system": case "system":
if ($aField['sType'] == "system") { if ($aField['sType'] == "system") {
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.
$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
} }
break; break;
case "process": case "process":
if ($aField['sType'] != "system") { if ($aField['sType'] != "system") {
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.
$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
} }
break; break;
default: default:
$aRows[] = Array ( $aRows[] = Array ('fieldname' => $_POST['sFieldName'],'variable' => $_POST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_POST['sFieldName'] . '\',\'' . $_POST['sSymbol'] . $aField['sName'] . '\');">' . $_POST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
'fieldname' => $_POST['sFieldName'],
'variable' => $_POST['sSymbol'] . $aField['sName'],
'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\''.$_POST['sFieldName'].'\',\''
.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
'type' => $aField['sType'],
'label' => $aField['sLabel']
); );
break; break;
} }
@@ -86,12 +64,9 @@ foreach ( $aFields as $aField ) {
// Use and make a load translation variable call to the titles of the tabs // Use and make a load translation variable call to the titles of the tabs
$cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\"> $cssTabs = "<div id=\"" . strtolower( $_POST['type'] ) . "\">
<ul id=\"tabnav\"> <ul id=\"tabnav\">
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','".$_POST['sProcess']."','" <li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">All variables</a></li>
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">All variables</a></li> <li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">System</a></li>
<li class=\"system\"><a href=\"#\" onclick=\"changeVariables('system','".$_POST['sProcess']."','" <li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">System</a></li>
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','".$_POST['sProcess']."','"
.$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">Process</a></li>
</ul> </ul>
</div> </div>
"; ";
@@ -112,4 +87,3 @@ $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria ); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'triggers/dynavars', $oCriteria );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
?>

View File

@@ -20,14 +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.
*
*/ */
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 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();
} }
G::LoadClass( 'configuration' ); G::LoadClass( 'configuration' );
@@ -41,20 +40,21 @@ $G_ID_MENU_SELECTED = 'logs';
$G_ID_SUB_MENU_SELECTED = 'EVENT'; $G_ID_SUB_MENU_SELECTED = 'EVENT';
//get values for the comboBoxes //get values for the comboBoxes
$userUid = ( isset($_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '' ) ? $userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
$_SESSION['USER_LOGGED'] : null; $status = array (array ('',G::LoadTranslation( 'ID_ALL' )
$status = array( ),array ("PENDING",G::LoadTranslation( 'ID_OPEN' )
array('', G::LoadTranslation('ID_ALL')), ),array ("COMPLETED",G::LoadTranslation( 'ID_CLOSE' )
array("PENDING",G::LoadTranslation('ID_OPEN')), )
array("COMPLETED",G::LoadTranslation('ID_CLOSE'))); );
$type = array( $type = array (array ('',G::LoadTranslation( 'ID_ALL' )
array('', G::LoadTranslation('ID_ALL')), ),array ('SEND_MESSAGE',G::LoadTranslation( 'ID_EVENT_MESSAGE' )
array('SEND_MESSAGE',G::LoadTranslation('ID_EVENT_MESSAGE')), ),array ('EXECUTE_TRIGGER',G::LoadTranslation( 'ID_EVENT_TIMER' )
array('EXECUTE_TRIGGER',G::LoadTranslation('ID_EVENT_TIMER')), ),array ('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation( 'ID_EVENT_CONDITIONAL' )
array('EXECUTE_CONDITIONAL_TRIGGER',G::LoadTranslation('ID_EVENT_CONDITIONAL'))); )
);
$processes = getProcessArray( $userUid ); $processes = getProcessArray( $userUid );
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'events/eventList', false ); //adding a javascript file .js $oHeadPublisher->addExtJsScript( 'events/eventList', false ); //adding a javascript file .js
@@ -64,7 +64,8 @@ $oHeadPublisher->assign( 'typeValues', $type );
$oHeadPublisher->assign( 'statusValues', $status ); $oHeadPublisher->assign( 'statusValues', $status );
$oHeadPublisher->assign( 'processValues', $processes ); $oHeadPublisher->assign( 'processValues', $processes );
function getProcessArray ( $userUid ) { function getProcessArray ($userUid)
{
global $oAppCache; global $oAppCache;
require_once ("classes/model/AppCacheView.php"); require_once ("classes/model/AppCacheView.php");

View File

@@ -6,7 +6,6 @@ require_once 'classes/model/Content.php';
switch($req){ switch($req){
case 'showUsers': case 'showUsers':
/* /*
$sql = "SELECT USR_UID, USR_EMAIL, CONCAT(USR_FIRSTNAME, ' ' , USR_LASTNAME) AS USR_FULLNAME FROM USERS WHERE USR_STATUS = 'ACTIVE' AND USR_EMAIL <> ''"; $sql = "SELECT USR_UID, USR_EMAIL, CONCAT(USR_FIRSTNAME, ' ' , USR_LASTNAME) AS USR_FULLNAME FROM USERS WHERE USR_STATUS = 'ACTIVE' AND USR_EMAIL <> ''";
*/ */
@@ -40,7 +39,6 @@ switch($req){
G::LoadClass('ArrayPeer'); G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray'); $oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable'); $oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/usermailList', $oCriteria); $G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/usermailList', $oCriteria);
G::RenderPage('publish', 'raw'); G::RenderPage('publish', 'raw');
@@ -56,14 +54,12 @@ switch($req){
$GROUP_TITLE = strip_tags($group->getGrpTitle()); $GROUP_TITLE = strip_tags($group->getGrpTitle());
$aRows[] = array('GRP_UID'=>$UID, 'GROUP_TITLE'=>$GROUP_TITLE); $aRows[] = array('GRP_UID'=>$UID, 'GROUP_TITLE'=>$GROUP_TITLE);
} }
global $_DBArray; global $_DBArray;
$_DBArray['virtualtable'] = $aRows; $_DBArray['virtualtable'] = $aRows;
$_SESSION['_DBArray'] = $_DBArray; $_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer'); G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray'); $oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable'); $oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/groupmailList', $oCriteria); $G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/groupmailList', $oCriteria);
G::RenderPage('publish', 'raw'); G::RenderPage('publish', 'raw');
@@ -72,25 +68,21 @@ switch($req){
G::LoadClass('xmlfield_InputPM'); G::LoadClass('xmlfield_InputPM');
$dynaformFields = getDynaformsVars($_SESSION['PROCESS'], false, false); $dynaformFields = getDynaformsVars($_SESSION['PROCESS'], false, false);
$fields = array(array('id' => 'char', 'dynaform' => 'char', 'name' => 'char')); $fields = array(array('id' => 'char', 'dynaform' => 'char', 'name' => 'char'));
foreach ($dynaformFields as $dynaformField) { foreach ($dynaformFields as $dynaformField) {
$fields[] = array('id' => $dynaformField['sName'], $fields[] = array('id' => $dynaformField['sName'],
'name' => '<a href="#" style="color: black;" onclick="e.toAdd(\'' . $dynaformField['sName'] . '\', \'' . $dynaformField['sName'] . '\', \'dyn\');oPanel.remove();return false;">@#' . $dynaformField['sName'] . '</a>', 'label' => $dynaformField['sLabel']); 'name' => '<a href="#" style="color: black;" onclick="e.toAdd(\'' . $dynaformField['sName'] . '\', \'' . $dynaformField['sName'] . '\', \'dyn\');oPanel.remove();return false;">@#' . $dynaformField['sName'] . '</a>', 'label' => $dynaformField['sLabel']);
} }
global $_DBArray; global $_DBArray;
$_DBArray['virtualtable'] = $fields; $_DBArray['virtualtable'] = $fields;
$_SESSION['_DBArray'] = $_DBArray; $_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer'); G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray'); $oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('virtualtable'); $oCriteria->setDBArrayTable('virtualtable');
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/dynavarsList', $oCriteria); $G_PUBLISH->AddContent('propeltable', 'paged-table', 'events/dynavarsList', $oCriteria);
G::RenderPage('publish', 'raw'); G::RenderPage('publish', 'raw');
break; break;
case 'eventList': case 'eventList':
$start = (isset($_REQUEST['start']))? $_REQUEST['start'] : '0'; $start = (isset($_REQUEST['start']))? $_REQUEST['start'] : '0';
$limit = (isset($_REQUEST['limit']))? $_REQUEST['limit'] : '25'; $limit = (isset($_REQUEST['limit']))? $_REQUEST['limit'] : '25';
$proUid = (isset($_REQUEST['process']))? $_REQUEST['process'] : ''; $proUid = (isset($_REQUEST['process']))? $_REQUEST['process'] : '';
@@ -120,8 +112,7 @@ switch($req){
if ($sort != '') { if ($sort != '') {
if ($dir == 'ASC') { if ($dir == 'ASC') {
$criteria->addAscendingOrderByColumn($sort); $criteria->addAscendingOrderByColumn($sort);
} } else {
else {
$criteria->addDescendingOrderByColumn($sort); $criteria->addDescendingOrderByColumn($sort);
} }
} else { } else {
@@ -145,3 +136,4 @@ switch($req){
die(G::json_encode($response)); die(G::json_encode($response));
break; break;
} }

View File

@@ -20,19 +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.
*
*/ */
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
require_once 'classes/model/AppEvent.php'; require_once 'classes/model/AppEvent.php';
$oAppEvent = new AppEvent(); $oAppEvent = new AppEvent();
global $G_PUBLISH; global $G_PUBLISH;
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsListCompleted', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'COMPLETED', $_GET['EVN_TYPE'] ) ); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsListCompleted', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'COMPLETED', $_GET['EVN_TYPE'] ) );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );

View File

@@ -20,16 +20,16 @@
* *
* 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;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
$evnUid = $_POST['EVN_UID']; $evnUid = $_POST['EVN_UID'];
require_once 'classes/model/Event.php'; require_once 'classes/model/Event.php';
$oEvent = new Event(); $oEvent = new Event();
$oEvent->remove( $evnUid ); $oEvent->remove( $evnUid );

View File

@@ -20,13 +20,12 @@
* *
* 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;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
G::LoadClass( 'tasks' ); G::LoadClass( 'tasks' );
@@ -37,12 +36,10 @@ if (isset($_GET['EVN_UID'])) {
require_once 'classes/model/Event.php'; require_once 'classes/model/Event.php';
$oEvent = new Event(); $oEvent = new Event();
$aFields = $oEvent->load( $_GET['EVN_UID'] ); $aFields = $oEvent->load( $_GET['EVN_UID'] );
} } else {
else {
$aFields = array ('PRO_UID' => $_GET['PRO_UID'] ); $aFields = array ('PRO_UID' => $_GET['PRO_UID'] );
} }
if (! isset( $_SESSION['PROCESS'] )) { if (! isset( $_SESSION['PROCESS'] )) {
if (isset( $aFields['PRO_UID'] )) { if (isset( $aFields['PRO_UID'] )) {
$_SESSION['PROCESS'] = $aFields['PRO_UID']; $_SESSION['PROCESS'] = $aFields['PRO_UID'];
@@ -52,16 +49,14 @@ if (!isset($_SESSION['PROCESS'])){
$oTasks = new Tasks(); $oTasks = new Tasks();
$aAux1 = $oTasks->getAllTasks( $aFields['PRO_UID'] ); $aAux1 = $oTasks->getAllTasks( $aFields['PRO_UID'] );
$aTasks = array (); $aTasks = array ();
$aTasks[] = array('TAS_UID' => 'char', $aTasks[] = array ('TAS_UID' => 'char','TAS_TITLE' => 'char');
'TAS_TITLE' => 'char');
foreach ($aAux1 as $aAux2) { foreach ($aAux1 as $aAux2) {
if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') { if ($aAux2['TAS_TYPE'] != 'SUBPROCESS') {
$aTasks[] = array ('TAS_UID' => $aAux2['TAS_UID'],'TAS_TITLE' => $aAux2['TAS_TITLE'] ); $aTasks[] = array ('TAS_UID' => $aAux2['TAS_UID'],'TAS_TITLE' => $aAux2['TAS_TITLE'] );
} }
} }
$oProcessMap = new processMap( new DBConnection() );
$oProcessMap = new processMap(new DBConnection);
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] ); $aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
$aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char'); $aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
@@ -71,15 +66,14 @@ foreach($aTriggersList as $i=>$v){
$aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE']; $aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE'];
} }
$aTriggersList = array_merge(Array($aTriggersFileds), $aTriggersList); $aTriggersList = array_merge( Array ($aTriggersFileds, $aTriggersList ));
$_DBArray['tasks'] = $aTasks; $_DBArray['tasks'] = $aTasks;
$_DBArray['TMP_TRIGGERS'] = $aTriggersList; $_DBArray['TMP_TRIGGERS'] = $aTriggersList;
$_SESSION['_DBArray'] = $_DBArray; $_SESSION['_DBArray'] = $_DBArray;
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEdit', '', $aFields, '../events/eventsSave' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEdit', '', $aFields, '../events/eventsSave' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
?>

View File

@@ -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;
global $_DBArray; global $_DBArray;
@@ -28,14 +27,14 @@ global $_DBArray;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
if (isset( $_SESSION['EVN_UID'] )) { if (isset( $_SESSION['EVN_UID'] )) {
$evnUid = $_SESSION['EVN_UID']; $evnUid = $_SESSION['EVN_UID'];
unset( $_SESSION['EVN_UID'] ); unset( $_SESSION['EVN_UID'] );
} } else {
else
$evnUid = $_GET['EVN_UID']; $evnUid = $_GET['EVN_UID'];
}
require_once 'classes/model/Event.php'; require_once 'classes/model/Event.php';
require_once 'classes/model/Triggers.php'; require_once 'classes/model/Triggers.php';
@@ -49,7 +48,7 @@ $aTrigger = $oTrigger->load($aFields['TRI_UID']);
$hash = md5( $oTrigger->getTriWebbot() ); $hash = md5( $oTrigger->getTriWebbot() );
//var_dump($hash,$parameters->hash);die; //var_dump($hash,$parameters->hash);die;
//if the hash is different, the script was edited , so we will show the trigger editor. //if the hash is different, the script was edited , so we will show the trigger editor.
if ( ( isset($parameters->hash) && $hash <> $parameters->hash ) || $aFields['EVN_ACTION'] == 'EXECUTE_TRIGGER' || $aFields['EVN_ACTION'] == 'EXECUTE_CONDITIONAL_TRIGGER' ) { if ((isset( $parameters->hash ) && $hash != $parameters->hash) || $aFields['EVN_ACTION'] == 'EXECUTE_TRIGGER' || $aFields['EVN_ACTION'] == 'EXECUTE_CONDITIONAL_TRIGGER') {
$oTriggerParams = unserialize( $aTrigger['TRI_PARAM'] ); $oTriggerParams = unserialize( $aTrigger['TRI_PARAM'] );
// check again a hash, this time to check the trigger itself integrity // check again a hash, this time to check the trigger itself integrity
if ($oTriggerParams['hash'] != $hash) { if ($oTriggerParams['hash'] != $hash) {
@@ -58,14 +57,14 @@ if ( ( isset($parameters->hash) && $hash <> $parameters->hash ) || $aFields['EVN
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'triggers/triggersNarrowEdit', '', $aTrigger, '../events/triggersSave' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'triggers/triggersNarrowEdit', '', $aTrigger, '../events/triggersSave' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
die; die();
} else { } else {
// if not launch the wizard view. // if not launch the wizard view.
$triUid = $aFields['TRI_UID']; $triUid = $aFields['TRI_UID'];
$_GET = $oTriggerParams['params']; $_GET = $oTriggerParams['params'];
$_GET['TRI_UID'] = $triUid; $_GET['TRI_UID'] = $triUid;
require_once (PATH_METHODS . 'triggers/triggers_EditWizard.php'); require_once (PATH_METHODS . 'triggers/triggers_EditWizard.php');
die; die();
} }
} }
@@ -81,7 +80,6 @@ if(isset($parameters->TO)){
case 'usr': case 'usr':
require_once ('classes/model/Users.php'); require_once ('classes/model/Users.php');
$user = new Users(); $user = new Users();
if ($row[1] == '-1') { if ($row[1] == '-1') {
$value = '(Current Task User)'; $value = '(Current Task User)';
} else { } else {
@@ -89,31 +87,29 @@ if(isset($parameters->TO)){
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME']; $value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
} }
break; break;
case 'grp': case 'grp':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$group = new Groups(); $group = new Groups();
$rec = $group->load( $row[1] ); $rec = $group->load( $row[1] );
$value = strip_tags( $rec->getGrpTitle() ); $value = strip_tags( $rec->getGrpTitle() );
break; break;
case 'ext': case 'ext':
$value = htmlentities( $row[1] ); $value = htmlentities( $row[1] );
break; break;
case 'dyn': case 'dyn':
$value = htmlentities( '@#' . $row[1] ); $value = htmlentities( '@#' . $row[1] );
break; break;
default: default:
echo '->' . $row[0]; echo '->' . $row[0];
} }
$paramTO[] = Array('id'=>replaceQuotes($item), 'name'=>$value); $paramTO[] = Array ('id' => replaceQuotes( $item ),'name' => $value
);
} }
} else { } else {
$paramTO[] = Array('id'=>'char', 'name'=>'char'); $paramTO[] = Array ('id' => 'char','name' => 'char'
$paramTO[] = Array('id'=>'usr|-1', 'name'=>'(Current Task User)'); );
$paramTO[] = Array ('id' => 'usr|-1','name' => '(Current Task User)'
);
} }
$_DBArray['eventomsgto'] = $paramTO; $_DBArray['eventomsgto'] = $paramTO;
@@ -133,24 +129,21 @@ if(isset($parameters->CC)){
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME']; $value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
} }
break; break;
case 'grp': case 'grp':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$group = new Groups(); $group = new Groups();
$rec = $group->load( $row[1] ); $rec = $group->load( $row[1] );
$value = strip_tags( $rec->getGrpTitle() ); $value = strip_tags( $rec->getGrpTitle() );
break; break;
case 'ext': case 'ext':
$value = htmlentities( $row[1] ); $value = htmlentities( $row[1] );
break; break;
case 'dyn': case 'dyn':
$value = htmlentities( '@#' . $row[1] ); $value = htmlentities( '@#' . $row[1] );
break; break;
} }
$paramCC[] = Array('id'=>replaceQuotes($item), 'name'=>$value); $paramCC[] = Array ('id' => replaceQuotes( $item ),'name' => $value
);
} }
$_DBArray['eventomsgcc'] = $paramCC; $_DBArray['eventomsgcc'] = $paramCC;
@@ -175,19 +168,15 @@ if(isset($parameters->BCC)){
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME']; $value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
} }
break; break;
case 'grp': case 'grp':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$group = new Groups(); $group = new Groups();
$rec = $group->load( $row[1] ); $rec = $group->load( $row[1] );
$value = strip_tags( $rec->getGrpTitle() ); $value = strip_tags( $rec->getGrpTitle() );
break; break;
case 'ext': case 'ext':
$value = htmlentities( $row[1] ); $value = htmlentities( $row[1] );
break; break;
case 'dyn': case 'dyn':
$value = htmlentities( '@#' . $row[1] ); $value = htmlentities( '@#' . $row[1] );
break; break;
@@ -205,10 +194,8 @@ $aFields['EVN_MESSAGE_TO_CC'] = (isset($parameters->CC) ? $paramCC : '');
$aFields['EVN_MESSAGE_TO_BCC'] = (isset( $parameters->BCC ) ? $paramBCC : ''); $aFields['EVN_MESSAGE_TO_BCC'] = (isset( $parameters->BCC ) ? $paramBCC : '');
$aFields['EVN_MESSAGE_TEMPLATE'] = (isset( $parameters->TEMPLATE ) ? $parameters->TEMPLATE : ''); $aFields['EVN_MESSAGE_TEMPLATE'] = (isset( $parameters->TEMPLATE ) ? $parameters->TEMPLATE : '');
$aTemplates = array (); $aTemplates = array ();
$aTemplates[] = array('TEMPLATE1' => 'char', $aTemplates[] = array ('TEMPLATE1' => 'char','TEMPLATE2' => 'char');
'TEMPLATE2' => 'char');
$sDirectory = PATH_DATA_MAILTEMPLATES . $aFields['PRO_UID'] . PATH_SEP; $sDirectory = PATH_DATA_MAILTEMPLATES . $aFields['PRO_UID'] . PATH_SEP;
G::verifyPath( $sDirectory, true ); G::verifyPath( $sDirectory, true );
if (! file_exists( $sDirectory . 'alert_message.html' )) { if (! file_exists( $sDirectory . 'alert_message.html' )) {
@@ -217,22 +204,19 @@ if (!file_exists($sDirectory . 'alert_message.html')) {
$oDirectory = dir( $sDirectory ); $oDirectory = dir( $sDirectory );
while ($sObject = $oDirectory->read()) { while ($sObject = $oDirectory->read()) {
if (($sObject !== '.') && ($sObject !== '..') && ($sObject !== 'alert_message.html')) { if (($sObject !== '.') && ($sObject !== '..') && ($sObject !== 'alert_message.html')) {
$aTemplates[] = array('TEMPLATE1' => $sObject, $aTemplates[] = array ('TEMPLATE1' => $sObject,'TEMPLATE2' => $sObject);
'TEMPLATE2' => $sObject);
} }
} }
$_DBArray['templates'] = $aTemplates; $_DBArray['templates'] = $aTemplates;
$aTriggers[] = array('TRI_UID' => 'char', $aTriggers[] = array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
'TRI_TITLE' => 'char');
G::LoadClass( 'processMap' ); G::LoadClass( 'processMap' );
$oProcessMap = new ProcessMap(); $oProcessMap = new ProcessMap();
$oDataset = TriggersPeer::doSelectRS( $oProcessMap->getTriggersCriteria( $aFields['PRO_UID'] ) ); $oDataset = TriggersPeer::doSelectRS( $oProcessMap->getTriggersCriteria( $aFields['PRO_UID'] ) );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next(); $oDataset->next();
while ($aRow = $oDataset->getRow()) { while ($aRow = $oDataset->getRow()) {
$aTriggers[] = array('TRI_UID' => $aRow['TRI_UID'], $aTriggers[] = array ('TRI_UID' => $aRow['TRI_UID'],'TRI_TITLE' => $aRow['TRI_TITLE'] );
'TRI_TITLE' => $aRow['TRI_TITLE']);
$oDataset->next(); $oDataset->next();
} }
$_DBArray['triggers'] = $aTriggers; $_DBArray['triggers'] = $aTriggers;
@@ -244,6 +228,8 @@ $G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFi
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave'); //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave');
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
function replaceQuotes($aData){ function replaceQuotes ($aData)
{
return str_replace( '"', '&quote;', $aData ); return str_replace( '"', '&quote;', $aData );
} }

View File

@@ -20,13 +20,12 @@
* *
* 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;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
global $_DBArray; global $_DBArray;
@@ -45,7 +44,7 @@ foreach ($aAux1 as $aAux2) {
} }
} }
$oProcessMap = new processMap(new DBConnection); $oProcessMap = new processMap( new DBConnection() );
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] ); $aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
$aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char'); $aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char');

View File

@@ -20,13 +20,12 @@
* *
* 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;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
global $_DBArray; global $_DBArray;
@@ -39,7 +38,7 @@ $envUId = $oEvent->create($_POST);
$_SESSION['EVN_UID'] = $envUId; $_SESSION['EVN_UID'] = $envUId;
require_once ('eventsEditAction.php'); require_once ('eventsEditAction.php');
die; die();
/* /*
//this page is showing the parameters for setup email messages and triggers, //this page is showing the parameters for setup email messages and triggers,
@@ -81,3 +80,4 @@ $G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/events_EditAction', '', $_P
G::RenderPage('publish', 'raw'); G::RenderPage('publish', 'raw');
*/ */

View File

@@ -20,19 +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.
*
*/ */
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
require_once 'classes/model/AppEvent.php'; require_once 'classes/model/AppEvent.php';
$oAppEvent = new AppEvent(); $oAppEvent = new AppEvent();
global $G_PUBLISH; global $G_PUBLISH;
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE'] ) ); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'events/appEventsList', $oAppEvent->getAppEventsCriteria( $_GET['PRO_UID'], 'PENDING', $_GET['EVN_TYPE'] ) );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );

View File

@@ -20,26 +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.
*
*/ */
global $RBAC; global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP' ) != 1) { if ($RBAC->userCanAccess( 'PM_SETUP' ) != 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();
} }
$EVN_MESSAGE_TO_TO = isset( $_POST['form']['EVN_MESSAGE_TO_TO'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_TO'] ) : Array (); $EVN_MESSAGE_TO_TO = isset( $_POST['form']['EVN_MESSAGE_TO_TO'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_TO'] ) : Array ();
$EVN_MESSAGE_TO_CC = isset( $_POST['form']['EVN_MESSAGE_TO_CC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_CC'] ) : Array (); $EVN_MESSAGE_TO_CC = isset( $_POST['form']['EVN_MESSAGE_TO_CC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_CC'] ) : Array ();
$EVN_MESSAGE_TO_BCC = isset( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) : Array (); $EVN_MESSAGE_TO_BCC = isset( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) ? replaceQuotes( $_POST['form']['EVN_MESSAGE_TO_BCC'] ) : Array ();
if (isset( $_POST['form']['EVN_MESSAGE_SUBJECT'] )) { if (isset( $_POST['form']['EVN_MESSAGE_SUBJECT'] )) {
$_POST['form']['EVN_ACTION_PARAMETERS'] = array( $_POST['form']['EVN_ACTION_PARAMETERS'] = array ('SUBJECT' => $_POST['form']['EVN_MESSAGE_SUBJECT'],'TO' => $EVN_MESSAGE_TO_TO,'CC' => $EVN_MESSAGE_TO_CC,'BCC' => $EVN_MESSAGE_TO_BCC,'TEMPLATE' => $_POST['form']['EVN_MESSAGE_TEMPLATE']);
'SUBJECT' => $_POST['form']['EVN_MESSAGE_SUBJECT'],
'TO' => $EVN_MESSAGE_TO_TO,
'CC' => $EVN_MESSAGE_TO_CC,
'BCC' => $EVN_MESSAGE_TO_BCC,
'TEMPLATE' => $_POST['form']['EVN_MESSAGE_TEMPLATE']
);
unset( $_POST['form']['EVN_MESSAGE_SUBJECT'] ); unset( $_POST['form']['EVN_MESSAGE_SUBJECT'] );
unset( $_POST['form']['EVN_MESSAGE_TO_TO'] ); unset( $_POST['form']['EVN_MESSAGE_TO_TO'] );
@@ -54,8 +47,7 @@ $oEvent = new Event();
if ($_POST['form']['EVN_UID'] == '') { if ($_POST['form']['EVN_UID'] == '') {
//this is probably not used, because the creation of one Event is done directly in EventsNewAction //this is probably not used, because the creation of one Event is done directly in EventsNewAction
$oEvent->create( $_POST['form'] ); $oEvent->create( $_POST['form'] );
} } else {
else {
/* /*
*if($_POST['form']['EVN_ACTION'] == 'SEND_MESSAGE' && $ev->getTriUid() != trim($_POST['form']['TRI_UID']) ){ *if($_POST['form']['EVN_ACTION'] == 'SEND_MESSAGE' && $ev->getTriUid() != trim($_POST['form']['TRI_UID']) ){
$oEvnActionParameters = unserialize($ev->getEvnActionParameters()); $oEvnActionParameters = unserialize($ev->getEvnActionParameters());
@@ -63,15 +55,16 @@ else {
if( isset($oEvnActionParameters->TRI_UID) ){ if( isset($oEvnActionParameters->TRI_UID) ){
$_POST['form']['TRI_UID'] = $oEvnActionParameters->TRI_UID; $_POST['form']['TRI_UID'] = $oEvnActionParameters->TRI_UID;
} }
} }
*/ */
$oEvent->update( $_POST['form'] ); $oEvent->update( $_POST['form'] );
} }
function replaceQuotes($aData){ function replaceQuotes ($aData)
{
for ($i = 0; $i < sizeof( $aData ); $i ++) { for ($i = 0; $i < sizeof( $aData ); $i ++) {
$aData[$i] = str_replace( "&quote;", '"', $aData[$i] ); $aData[$i] = str_replace( "&quote;", '"', $aData[$i] );
} }
return $aData; return $aData;
} }

View File

@@ -5,15 +5,21 @@
//how many task, single task or multiple //how many task, single task or multiple
$t = isset( $_GET['t'] ) ? $_GET['t'] : 's'; $t = isset( $_GET['t'] ) ? $_GET['t'] : 's';
if ( $t != 's' ) $t = 'm'; if ($t != 's') {
$t = 'm';
}
//when occurs, after time elapses or when starting //when occurs, after time elapses or when starting
$o = isset( $_GET['o'] ) ? $_GET['o'] : 's'; $o = isset( $_GET['o'] ) ? $_GET['o'] : 's';
if ( $t != 's' ) $t = 'a'; if ($t != 's') {
$t = 'a';
}
//status //status
$s = isset( $_GET['s'] ) ? $_GET['s'] : 'a'; $s = isset( $_GET['s'] ) ? $_GET['s'] : 'a';
if ( $s != 'a' ) $s = 'i'; if ($s != 'a') {
$s = 'i';
}
//timeUnit //timeUnit
$timeunit = isset( $_GET['t'] ) ? $_GET['t'] : 'Days'; $timeunit = isset( $_GET['t'] ) ? $_GET['t'] : 'Days';
@@ -22,11 +28,9 @@
//estimated //estimated
$estimated = abs( isset( $_GET['e'] ) ? (($timeunit == 'Hours') ? round( $_GET['e'] / 24, 2 ) : $_GET['e']) : '1' ); $estimated = abs( isset( $_GET['e'] ) ? (($timeunit == 'Hours') ? round( $_GET['e'] / 24, 2 ) : $_GET['e']) : '1' );
//when //when
$when = isset( $_GET['w'] ) ? $_GET['w'] : '0'; $when = isset( $_GET['w'] ) ? $_GET['w'] : '0';
$im = imagecreate( $w, $h ); $im = imagecreate( $w, $h );
$bg = imagecolorallocate( $im, 0xFF, 0xFF, 0xFF ); $bg = imagecolorallocate( $im, 0xFF, 0xFF, 0xFF );
$fg = imagecolorallocate( $im, 0x00, 200, 0x00 ); $fg = imagecolorallocate( $im, 0x00, 200, 0x00 );
@@ -41,15 +45,18 @@
// $incM = $media/60; // $incM = $media/60;
// $mean = 60*$incM; // $mean = 60*$incM;
// $d = $varianza; // $d = $varianza;
// if ( $d == 0 ) $d = 0.0001; // if ( $d == 0 ) $d = 0.0001;
// $val1 = 1 / ( sqrt( 2*pi() *$d*$d )); // $val1 = 1 / ( sqrt( 2*pi() *$d*$d ));
// $val2 = -( pow($mean-$mean,2) )/ (pow($d,2)); // $val2 = -( pow($mean-$mean,2) )/ (pow($d,2));
// $y = $val1 * exp ( $val2 ); // $y = $val1 * exp ( $val2 );
// $incY = 80/$y; // $incY = 80/$y;
// $range = 90/ $d; // $range = 90/ $d;
// $offsetX = 100 - $mean; // $offsetX = 100 - $mean;
// $antY = null; // $antY = null;
@@ -63,7 +70,9 @@
// imageline($im, $x +$mean, $h , $x + $mean, $h-1, $red); // imageline($im, $x +$mean, $h , $x + $mean, $h-1, $red);
// } // }
function drawTask ( $im, $x1, $x2, $y, $h ) {
function drawTask ($im, $x1, $x2, $y, $h)
{
global $w; global $w;
$blue = imagecolorallocate( $im, 160, 160, 180 ); $blue = imagecolorallocate( $im, 160, 160, 180 );
$gray = imagecolorallocate( $im, 100, 100, 100 ); $gray = imagecolorallocate( $im, 100, 100, 100 );
@@ -78,9 +87,11 @@
imageline( $im, $i, $y - 10, $i, $y, $blue ); imageline( $im, $i, $y - 10, $i, $y, $blue );
} }
imagerectangle( $im, $x1, $y - 10, $x2, $y, $black ); imagerectangle( $im, $x1, $y - 10, $x2, $y, $black );
}; }
;
function smallTask ($im, $x1, $x2, $y ) { function smallTask ($im, $x1, $x2, $y)
{
$blue = imagecolorallocate( $im, 160, 160, 180 ); $blue = imagecolorallocate( $im, 160, 160, 180 );
$black = imagecolorallocate( $im, 0, 0, 0 ); $black = imagecolorallocate( $im, 0, 0, 0 );
@@ -90,7 +101,8 @@
imagerectangle( $im, $x1, $y - 9, $x2 - 1, $y, $black ); imagerectangle( $im, $x1, $y - 9, $x2 - 1, $y, $black );
} }
function drawMultipleTask ( $im, $x1, $x2, $y, $h ) { function drawMultipleTask ($im, $x1, $x2, $y, $h)
{
global $w; global $w;
$terca = ($x2 - $x1) / 3; $terca = ($x2 - $x1) / 3;
$blue = imagecolorallocate( $im, 160, 160, 180 ); $blue = imagecolorallocate( $im, 160, 160, 180 );
@@ -107,9 +119,11 @@
smallTask( $im, $x1 + 0 * $terca, $x1 + 1 * $terca, $y - 12 ); smallTask( $im, $x1 + 0 * $terca, $x1 + 1 * $terca, $y - 12 );
smallTask( $im, $x1 + 1 * $terca, $x1 + 2 * $terca, $y - 6 ); smallTask( $im, $x1 + 1 * $terca, $x1 + 2 * $terca, $y - 6 );
smallTask( $im, $x1 + 2 * $terca, $x1 + 3 * $terca, $y ); smallTask( $im, $x1 + 2 * $terca, $x1 + 3 * $terca, $y );
}; }
;
function drawTimerEvent ( $im, $x1, $y1, $h ) { function drawTimerEvent ($im, $x1, $y1, $h)
{
$blue = imagecolorallocate( $im, 160, 160, 180 ); $blue = imagecolorallocate( $im, 160, 160, 180 );
$red = imagecolorallocate( $im, 200, 100, 0 ); $red = imagecolorallocate( $im, 200, 100, 0 );
$gray = imagecolorallocate( $im, 100, 100, 100 ); $gray = imagecolorallocate( $im, 100, 100, 100 );
@@ -135,7 +149,6 @@
imageline( $im, $x1 - 1, $y1 + 1, $x1 + 1, $y1 - 5, $red ); imageline( $im, $x1 - 1, $y1 + 1, $x1 + 1, $y1 - 5, $red );
imageline( $im, $x1 - 1, $y1 + 1, $x1 + 3, $y1 + 1, $red ); imageline( $im, $x1 - 1, $y1 + 1, $x1 + 3, $y1 + 1, $red );
} }
imageline( $im, 15, $h - 19, $w - 15, $h - 19, $red ); imageline( $im, 15, $h - 19, $w - 15, $h - 19, $red );
@@ -147,20 +160,20 @@
$s = 'i'; $s = 'i';
header( "Content-Type: image/png" ); header( "Content-Type: image/png" );
imagepng( $im ); imagepng( $im );
die; die();
} }
if ( $t == 's' ) if ($t == 's') {
drawTask( $im, 80, 220, $h - 30, $h - 15 ); drawTask( $im, 80, 220, $h - 30, $h - 15 );
else } else {
drawMultipleTask( $im, 80, 220, $h - 30, $h - 15 ); drawMultipleTask( $im, 80, 220, $h - 30, $h - 15 );
}
//the zero //the zero
imagestring( $im, 3, 80 - 4, $h - 16, '0', $black ); imagestring( $im, 3, 80 - 4, $h - 16, '0', $black );
//the estimated //the estimated
imagestring( $im, 2, 220 - 4, $h - 16, $estimated, $black ); imagestring( $im, 2, 220 - 4, $h - 16, $estimated, $black );
//when is negative and the event occurs at starting, then this event never will occurs //when is negative and the event occurs at starting, then this event never will occurs
if ($when < 0 && $o == 's') { if ($when < 0 && $o == 's') {
$xTimer = 30; $xTimer = 30;
@@ -170,18 +183,21 @@
//when is negative and the event occurs after, then this event will occurs //when is negative and the event occurs after, then this event will occurs
if ($when < 0 && $o == 'a') { if ($when < 0 && $o == 'a') {
if ( abs($when) > abs($estimated) ) { //this event is before the start of the task, so will never occurs if (abs( $when ) > abs( $estimated )) {
//this event is before the start of the task, so will never occurs
$xTimer = 30; $xTimer = 30;
$sWhen = abs( $when ) - abs( $estimated ); $sWhen = abs( $when ) - abs( $estimated );
imagestring( $im, 2, $xTimer - 8, $h - 16, $sWhen, $black ); imagestring( $im, 2, $xTimer - 8, $h - 16, $sWhen, $black );
$s = 'i'; $s = 'i';
} }
if ( abs($when) < abs($estimated) ) { //this event is after the start of the task, drawing if (abs( $when ) < abs( $estimated )) {
//this event is after the start of the task, drawing
$xTimer = 170; $xTimer = 170;
$sWhen = $estimated + $when; $sWhen = $estimated + $when;
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black ); imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
} }
if ( abs($when) == abs($estimated) ) { //this event is exactly at starting if (abs( $when ) == abs( $estimated )) {
//this event is exactly at starting
$xTimer = 80; $xTimer = 80;
$sWhen = $estimated + $when; $sWhen = $estimated + $when;
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black ); imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
@@ -197,10 +213,15 @@
//when is positive and the event occurs starting, then this event will occurs //when is positive and the event occurs starting, then this event will occurs
if ($when > 0 && $o == 's') { if ($when > 0 && $o == 's') {
if ( abs($when) < abs($estimated) ) $xTimer = 140; if (abs( $when ) < abs( $estimated )) {
if ( abs($when) > abs($estimated) ) $xTimer = 270; $xTimer = 140;
if ( abs($when) == abs($estimated) ) $xTimer = 220; }
if (abs( $when ) > abs( $estimated )) {
$xTimer = 270;
}
if (abs( $when ) == abs( $estimated )) {
$xTimer = 220;
}
imagestring( $im, 2, $xTimer - 4, $h - 16, $when, $black ); imagestring( $im, 2, $xTimer - 4, $h - 16, $when, $black );
} }
@@ -214,4 +235,5 @@
header( "Content-Type: image/png" ); header( "Content-Type: image/png" );
imagepng( $im ); imagepng( $im );
die; die();

View File

@@ -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.
*
*/ */
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
return $RBAC_Response;
}
require_once ('classes/model/Triggers.php'); require_once ('classes/model/Triggers.php');
$oTrigger = new Triggers(); $oTrigger = new Triggers();
if ($_POST['form']['TRI_UID'] != '') if ($_POST['form']['TRI_UID'] != '') {
{
$oTrigger->load( $_POST['form']['TRI_UID'] ); $oTrigger->load( $_POST['form']['TRI_UID'] );
} } else {
else
{
$oTrigger->create( $_POST['form'] ); $oTrigger->create( $_POST['form'] );
$_POST['form']['TRI_UID'] = $oTrigger->getTriUid(); $_POST['form']['TRI_UID'] = $oTrigger->getTriUid();
} }
$oTrigger->update( $_POST['form'] ); $oTrigger->update( $_POST['form'] );
?>

View File

@@ -20,40 +20,39 @@
* *
* 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.
*
*/ */
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker'; $G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users'; $G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS'; $G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'GROUPS'; $G_ID_SUB_MENU_SELECTED = 'GROUPS';
$G_PUBLISH = new Publisher();
$G_PUBLISH = new Publisher;
G::LoadClass( 'configuration' ); G::LoadClass( 'configuration' );
$c = new Configurations(); $c = new Configurations();
@@ -67,4 +66,4 @@ $oHeadPublisher->addContent('groups/groupsList'); //adding a html file .html.
$oHeadPublisher->assign( 'CONFIG', $Config ); $oHeadPublisher->assign( 'CONFIG', $Config );
G::RenderPage( 'publish', 'extJs' ); G::RenderPage( 'publish', 'extJs' );
?>

View File

@@ -20,48 +20,47 @@
* *
* 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.
*
*/ */
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
$G_MAIN_MENU = 'processmaker'; $G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users'; $G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS'; $G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'GROUPS'; $G_ID_SUB_MENU_SELECTED = 'GROUPS';
$G_PUBLISH = new Publisher();
$G_PUBLISH = new Publisher;
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'groups/groupsMembers', false ); //adding a javascript file .js $oHeadPublisher->addExtJsScript( 'groups/groupsMembers', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'groups/groupsMembers' ); //adding a html file .html. $oHeadPublisher->addContent( 'groups/groupsMembers' ); //adding a html file .html.
$labels = G::getTranslations(Array('ID_GROUPS','ID_GROUP_NAME','ID_BACK','ID_ASSIGN_ALL_MEMBERS','ID_REMOVE_ALL_MEMBERS',
'ID_MSG_AJAX_FAILURE', 'ID_PROCESSING','ID_ENTER_SEARCH_TERM','ID_FIRST_NAME','ID_LAST_NAME','ID_USER_NAME','ID_AVAILABLE_MEMBERS','ID_ASSIGNED_MEMBERS')); $labels = G::getTranslations( Array ('ID_GROUPS','ID_GROUP_NAME','ID_BACK','ID_ASSIGN_ALL_MEMBERS','ID_REMOVE_ALL_MEMBERS','ID_MSG_AJAX_FAILURE','ID_PROCESSING','ID_ENTER_SEARCH_TERM','ID_FIRST_NAME','ID_LAST_NAME','ID_USER_NAME','ID_AVAILABLE_MEMBERS','ID_ASSIGNED_MEMBERS') );
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$oGroup = new Groupwf(); $oGroup = new Groupwf();
@@ -73,4 +72,4 @@ $groups['GRP_TITLE'] = $oGroup->getGrpTitle();
//$oHeadPublisher->assign('TRANSLATIONS', $labels); //$oHeadPublisher->assign('TRANSLATIONS', $labels);
$oHeadPublisher->assign( 'GROUPS', $groups ); $oHeadPublisher->assign( 'GROUPS', $groups );
G::RenderPage( 'publish', 'extJs' ); G::RenderPage( 'publish', 'extJs' );
?>

View File

@@ -20,32 +20,32 @@
* *
* 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.
*
*/ */
require_once ('classes/class.xmlfield_InputPM.php'); require_once ('classes/class.xmlfield_InputPM.php');
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$oGroups = new Groups(); $oGroups = new Groups();
$oGroup = new Groupwf(); $oGroup = new Groupwf();
@@ -55,3 +55,4 @@ if( $access != 1 ){
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table', 'groups/groups_AvailableUsers', $oGroups->getAvailableUsersCriteria( $_GET['UID'] ) ); $G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table', 'groups/groups_AvailableUsers', $oGroups->getAvailableUsersCriteria( $_GET['UID'] ) );
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_SelectUsers','', '','save' ); //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_SelectUsers','', '','save' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );

View File

@@ -20,14 +20,14 @@
* *
* 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_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadInclude( 'ajax' ); G::LoadInclude( 'ajax' );
$_POST['action'] = get_ajax_value( 'action' ); $_POST['action'] = get_ajax_value( 'action' );
switch ($_POST['action']) switch ($_POST['action']) {
{
case 'showUsers': case 'showUsers':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$oGroups = new Groups(); $oGroups = new Groups();
@@ -37,45 +37,34 @@ switch ($_POST['action'])
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE'])); //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $oGroups->getUsersGroupCriteria( $_POST['sGroupUID'] ), array ('GRP_UID' => $_POST['sGroupUID'],'GRP_NAME' => $aFields['GRP_TITLE']) ); $G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $oGroups->getUsersGroupCriteria( $_POST['sGroupUID'] ), array ('GRP_UID' => $_POST['sGroupUID'],'GRP_NAME' => $aFields['GRP_TITLE']) );
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "groupname=\"{$aFields["GRP_TITLE"]}\";" ); $oHeadPublisher->addScriptCode( "groupname=\"{$aFields["GRP_TITLE"]}\";" );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
break; break;
case 'assignUser': case 'assignUser':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$oGroup = new Groups(); $oGroup = new Groups();
$oGroup->addUserToGroup( $_POST['GRP_UID'], $_POST['USR_UID'] ); $oGroup->addUserToGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
break; break;
case 'assignAllUsers': case 'assignAllUsers':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$oGroup = new Groups(); $oGroup = new Groups();
$aUsers = explode( ',', $_POST['aUsers'] ); $aUsers = explode( ',', $_POST['aUsers'] );
for ($i = 0; $i < count( $aUsers ); $i ++) {
for($i=0; $i<count($aUsers); $i++)
{
$oGroup->addUserToGroup( $_POST['GRP_UID'], $aUsers[$i] ); $oGroup->addUserToGroup( $_POST['GRP_UID'], $aUsers[$i] );
} }
break; break;
case 'ofToAssignUser': case 'ofToAssignUser':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$oGroup = new Groups(); $oGroup = new Groups();
$oGroup->removeUserOfGroup( $_POST['GRP_UID'], $_POST['USR_UID'] ); $oGroup->removeUserOfGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
break; break;
case 'verifyGroupname': case 'verifyGroupname':
$_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' ); $_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' );
$_POST['sGroupname'] = get_ajax_value( 'sGroupname' ); $_POST['sGroupname'] = get_ajax_value( 'sGroupname' );
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname']) if ($_POST['sOriginalGroupname'] == $_POST['sGroupname']) {
{
echo '0'; echo '0';
} } else {
else
{
require_once 'classes/model/Groupwf.php'; require_once 'classes/model/Groupwf.php';
G::LoadClass( 'Groupswf' ); G::LoadClass( 'Groupswf' );
$oGroup = new Groupwf(); $oGroup = new Groupwf();
@@ -84,12 +73,9 @@ switch ($_POST['action'])
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next(); $oDataset->next();
$aRow = $oDataset->getRow(); $aRow = $oDataset->getRow();
if (!$aRow) if (! $aRow) {
{
echo '0'; echo '0';
} } else {
else
{
echo '1'; echo '1';
} }
} }
@@ -108,7 +94,9 @@ switch ($_POST['action'])
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : ''; $filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
global $RBAC; global $RBAC;
if ($limit == $start) $limit = $limit +$limit ; if ($limit == $start) {
$limit = $limit + $limit;
}
$tasks = new TaskUser(); $tasks = new TaskUser();
$aTask = $tasks->getCountAllTaksByGroups(); $aTask = $tasks->getCountAllTaksByGroups();
@@ -126,7 +114,9 @@ switch ($_POST['action'])
$arrData = array (); $arrData = array ();
foreach ($result as $results) { foreach ($result as $results) {
$totalRows ++; $totalRows ++;
$results['CON_VALUE'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $results['GRP_TITLE']); $results['CON_VALUE'] = str_replace( array ("<",">"
), array ("&lt;","&gt;"
), $results['GRP_TITLE'] );
$results['GRP_TASKS'] = isset( $aTask[$results['GRP_UID']] ) ? $aTask[$results['GRP_UID']] : 0; $results['GRP_TASKS'] = isset( $aTask[$results['GRP_UID']] ) ? $aTask[$results['GRP_UID']] : 0;
$results['GRP_USERS'] = isset( $aMembers[$results['GRP_UID']] ) ? $aMembers[$results['GRP_UID']] : 0; $results['GRP_USERS'] = isset( $aMembers[$results['GRP_UID']] ) ? $aMembers[$results['GRP_UID']] : 0;
$arrData[] = $results; $arrData[] = $results;
@@ -173,7 +163,9 @@ switch ($_POST['action'])
case 'deleteGroup': case 'deleteGroup':
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$group = new Groupwf(); $group = new Groupwf();
if (!isset($_POST['GRP_UID'])) return; if (! isset( $_POST['GRP_UID'] )) {
return;
}
$group->remove( urldecode( $_POST['GRP_UID'] ) ); $group->remove( urldecode( $_POST['GRP_UID'] ) );
require_once 'classes/model/TaskUser.php'; require_once 'classes/model/TaskUser.php';
$oProcess = new TaskUser(); $oProcess = new TaskUser();
@@ -205,10 +197,7 @@ switch ($_POST['action'])
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL ); $oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : ''; $filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
if ($filter != '') { if ($filter != '') {
$oCriteria->add( $oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
} }
$oDataset = UsersPeer::DoSelectRs( $oCriteria ); $oDataset = UsersPeer::DoSelectRs( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
@@ -229,10 +218,7 @@ switch ($_POST['action'])
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL ); $oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : ''; $filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
if ($filter != '') { if ($filter != '') {
$oCriteria->add( $oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
} }
$oCriteria->setOffset( $start ); $oCriteria->setOffset( $start );
$oCriteria->setLimit( $limit ); $oCriteria->setLimit( $limit );
@@ -281,10 +267,7 @@ switch ($_POST['action'])
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN ); $oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : ''; $filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
if ($filter != '') { if ($filter != '') {
$oCriteria->add( $oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
} }
$oDataset = UsersPeer::DoSelectRs( $oCriteria ); $oDataset = UsersPeer::DoSelectRs( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
@@ -303,10 +286,7 @@ switch ($_POST['action'])
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN ); $oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : ''; $filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
if ($filter != '') { if ($filter != '') {
$oCriteria->add( $oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
$oCriteria->getNewCriterion(UsersPeer::USR_USERNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_FIRSTNAME, '%'.$filter.'%', Criteria::LIKE)->addOr(
$oCriteria->getNewCriterion(UsersPeer::USR_LASTNAME, '%'.$filter.'%', Criteria::LIKE))));
} }
$oCriteria->setOffset( $start ); $oCriteria->setOffset( $start );
$oCriteria->setLimit( $limit ); $oCriteria->setLimit( $limit );
@@ -348,3 +328,4 @@ switch ($_POST['action'])
echo '{success: true}'; echo '{success: true}';
break; break;
} }

View File

@@ -20,37 +20,39 @@
* *
* 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.
*
*/ */
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$group = new Groupwf(); $group = new Groupwf();
if (!isset($_POST['GRP_UID'])) return; if (! isset( $_POST['GRP_UID'] )) {
return;
}
$group->remove( urldecode( $_POST['GRP_UID'] ) ); $group->remove( urldecode( $_POST['GRP_UID'] ) );
@@ -61,4 +63,3 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] ); $oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] );
TaskUserPeer::doDelete( $oCriteria ); TaskUserPeer::doDelete( $oCriteria );
?>

View File

@@ -20,32 +20,31 @@
* *
* 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.
*
*/ */
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
@@ -54,12 +53,9 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$group = new Groupwf(); $group = new Groupwf();
$GrpUid = (isset( $_GET['UID'] )) ? urldecode( $_GET['UID'] ) : ''; $GrpUid = (isset( $_GET['UID'] )) ? urldecode( $_GET['UID'] ) : '';
if ($GrpUid) if ($GrpUid) {
{
$aFields = $group->Load( $GrpUid ); $aFields = $group->Load( $GrpUid );
} } else {
else
{
$aFields = array (); $aFields = array ();
} }
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
@@ -67,4 +63,3 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
G::RenderPage( "publish", "raw" ); G::RenderPage( "publish", "raw" );
?>

View File

@@ -20,36 +20,36 @@
* *
* 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.
*
*/ */
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' ); //G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
$G_PUBLISH = new Publisher;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'groups/groups_Tree' ); $G_PUBLISH->AddContent( 'view', 'groups/groups_Tree' );
G::RenderPage( "publish-raw", "raw" ); G::RenderPage( "publish-raw", "raw" );
?>

View File

@@ -20,31 +20,31 @@
* *
* 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.
*
*/ */
$access = $RBAC->userCanAccess( 'PM_USERS' ); $access = $RBAC->userCanAccess( 'PM_USERS' );
if ($access != 1) { if ($access != 1) {
switch ($access) switch ($access) {
{
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;
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;
} }
} }
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
@@ -52,18 +52,14 @@ if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
$G_MENU_SELECTED = ''; $G_MENU_SELECTED = '';
$group = new Groupwf(); $group = new Groupwf();
if($_POST['form']['GRP_UID']==='') if ($_POST['form']['GRP_UID'] === '') {
{
$grpRow = $_POST['form']; $grpRow = $_POST['form'];
unset( $grpRow['GRP_UID'] ); unset( $grpRow['GRP_UID'] );
$group->create( $grpRow ); $group->create( $grpRow );
//$_POST['form']['GRP_UID']=$group->getGrpUid(); //$_POST['form']['GRP_UID']=$group->getGrpUid();
//$group->update($_POST['form']); //$group->update($_POST['form']);
} } else {
else
{
$group->update( $_POST['form'] ); $group->update( $_POST['form'] );
} }
?>

View File

@@ -20,10 +20,12 @@
* *
* 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_USERS"))!=1) return $RBAC_Response; if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
return $RBAC_Response;
}
G::LoadClass( 'groups' ); G::LoadClass( 'groups' );
$groups = new Groups; $groups = new Groups();
$groups->addUserToGroup( $_GET['GRP_UID'], $_POST['form']['USR_UID'] ); $groups->addUserToGroup( $_GET['GRP_UID'], $_POST['form']['USR_UID'] );

View File

@@ -13,6 +13,7 @@ BEGIN
DECLARE APP_DEL_PREVIOUS_USER VARCHAR(255); DECLARE APP_DEL_PREVIOUS_USER VARCHAR(255);
DECLARE APP_THREAD_STATUS VARCHAR(32); DECLARE APP_THREAD_STATUS VARCHAR(32);
SET @DEFAULT_LANG = '{lang}'; SET @DEFAULT_LANG = '{lang}';
SET @APP_CURRENT_USER = '';
SELECT APPLICATION.APP_NUMBER into @APP_NUMBER FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1; SELECT APPLICATION.APP_NUMBER into @APP_NUMBER FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_STATUS into @APP_STATUS FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1; SELECT APPLICATION.APP_STATUS into @APP_STATUS FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1; SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;

View File

@@ -13,6 +13,7 @@ BEGIN
DECLARE APP_DEL_PREVIOUS_USER VARCHAR(255); DECLARE APP_DEL_PREVIOUS_USER VARCHAR(255);
DECLARE APP_THREAD_STATUS VARCHAR(32); DECLARE APP_THREAD_STATUS VARCHAR(32);
SET @DEFAULT_LANG = '{lang}'; SET @DEFAULT_LANG = '{lang}';
SET @APP_CURRENT_USER = '';
SELECT APPLICATION.APP_NUMBER into @APP_NUMBER FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1; SELECT APPLICATION.APP_NUMBER into @APP_NUMBER FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_STATUS into @APP_STATUS FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1; SELECT APPLICATION.APP_STATUS into @APP_STATUS FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1; SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;

View File

@@ -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.
*
*/ */
/* /*
* Authentication for Case Tracker * Authentication for Case Tracker
@@ -31,7 +30,8 @@
if (! isset( $_POST['form'] )) { if (! isset( $_POST['form'] )) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', "error" ); G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', "error" );
G::header ("location: login.php");die; G::header( "location: login.php" );
die();
} }
try { try {
@@ -61,11 +61,10 @@ try {
if ($uid < 0) { if ($uid < 0) {
G::header( "location: login.php" ); G::header( "location: login.php" );
die; die();
} }
if(is_array($uid)) if (is_array( $uid )) {
{
require_once ("classes/model/CaseTracker.php"); require_once ("classes/model/CaseTracker.php");
require_once ("classes/model/CaseTrackerObject.php"); require_once ("classes/model/CaseTrackerObject.php");
$_SESSION['CASE'] = $case; $_SESSION['CASE'] = $case;
@@ -79,30 +78,24 @@ try {
$criteria->add( CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS'] ); $criteria->add( CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS'] );
$caseTracker = new CaseTracker(); $caseTracker = new CaseTracker();
if (CaseTrackerPeer::doCount( $criteria ) === 0) { if (CaseTrackerPeer::doCount( $criteria ) === 0) {
$permissionsCaseTracker = array('PRO_UID' => $_SESSION['PROCESS'], $permissionsCaseTracker = array ('PRO_UID' => $_SESSION['PROCESS'],'CT_MAP_TYPE' => 'PROCESSMAP','CT_DERIVATION_HISTORY' => 1,'CT_MESSAGE_HISTORY' => 1
'CT_MAP_TYPE' => 'PROCESSMAP', );
'CT_DERIVATION_HISTORY' => 1,
'CT_MESSAGE_HISTORY' => 1);
$caseTracker->create( $permissionsCaseTracker ); $caseTracker->create( $permissionsCaseTracker );
} }
$caseTracker = $cases->caseTrackerPermissions( $_SESSION['PROCESS'] ); $caseTracker = $cases->caseTrackerPermissions( $_SESSION['PROCESS'] );
if ($caseTracker['CT_MAP_TYPE']) { if ($caseTracker['CT_MAP_TYPE']) {
G::header( 'location: tracker_ViewMap' ); G::header( 'location: tracker_ViewMap' );
} } else {
else {
if ($caseTracker['DYNADOC']) { if ($caseTracker['DYNADOC']) {
G::header( "location: tracker_DynaDocs" ); G::header( "location: tracker_DynaDocs" );
} } else {
else {
if ($caseTracker['CT_DERIVATION_HISTORY']) { if ($caseTracker['CT_DERIVATION_HISTORY']) {
G::header( "location: tracker_History" ); G::header( "location: tracker_History" );
} } else {
else {
if ($caseTracker['CT_MESSAGE_HISTORY']) { if ($caseTracker['CT_MESSAGE_HISTORY']) {
G::header( "location: tracker_No" ); G::header( "location: tracker_No" );
} } else {
else {
G::header( "location: login.php" ); G::header( "location: login.php" );
G::SendTemporalMessage( 'ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error" ); G::SendTemporalMessage( 'ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error" );
} }
@@ -110,11 +103,11 @@ try {
} }
} }
} }
} } catch (Exception $e) {
catch ( Exception $e ) {
$aMessage['MESSAGE'] = $e->getMessage(); $aMessage['MESSAGE'] = $e->getMessage();
$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' ); G::RenderPage( 'publish' );
die; die();
} }

View File

@@ -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.
*
*/ */
/* /*
@@ -30,8 +29,7 @@
* *
*/ */
$G_PUBLISH = new Publisher();
$G_PUBLISH = new Publisher;
//echo G::generateUniqueNumber(); //echo G::generateUniqueNumber();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/login', '', '', SYS_URI . 'tracker/authentication.php' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/login', '', '', SYS_URI . 'tracker/authentication.php' );
@@ -39,7 +37,3 @@ G::RenderPage( "publish" );
session_destroy(); session_destroy();
session_start(); session_start();

View File

@@ -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 {
if (isset( $_POST['form']['action'] )) { if (isset( $_POST['form']['action'] )) {
@@ -60,7 +59,7 @@ try {
case 'editStagesMap': case 'editStagesMap':
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' ); $oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
$oTemplatePower->prepare(); $oTemplatePower->prepare();
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower ); $G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( ' $oHeadPublisher->addScriptCode( '
@@ -91,8 +90,7 @@ try {
$oInputDocument = new InputDocument(); $oInputDocument = new InputDocument();
if ($oAppDocument->Fields['DOC_UID'] != - 1) { if ($oAppDocument->Fields['DOC_UID'] != - 1) {
$Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] ); $Fields = $oInputDocument->load( $oAppDocument->Fields['DOC_UID'] );
} } else {
else {
$Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']); $Fields = array ('INP_DOC_FORM_NEEDED' => '','FILENAME' => $oAppDocument->Fields['APP_DOC_FILENAME']);
} }
$oCriteria = new Criteria( 'workflow' ); $oCriteria = new Criteria( 'workflow' );
@@ -107,8 +105,7 @@ try {
$oUser = new Users(); $oUser = new Users();
$aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] ); $aUser = $oUser->load( $oAppDocument->Fields['USR_UID'] );
$Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME']; $Fields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
switch ($Fields['INP_DOC_FORM_NEEDED']) switch ($Fields['INP_DOC_FORM_NEEDED']) {
{
case 'REAL': case 'REAL':
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2'; $sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
break; break;
@@ -137,8 +134,7 @@ try {
} }
} }
$G_PUBLISH = new Publisher();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
break; break;
@@ -169,7 +165,6 @@ try {
$aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand(); $aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
$aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand(); $aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
//If plugin and trigger are defined for listing //If plugin and trigger are defined for listing
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) { if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
$oPluginRegistry = & PMPluginRegistry::getSingleton(); $oPluginRegistry = & PMPluginRegistry::getSingleton();
@@ -182,8 +177,6 @@ try {
} }
} }
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
G::RenderPage( 'publish', 'raw' ); G::RenderPage( 'publish', 'raw' );
@@ -199,7 +192,9 @@ try {
PRIMARY KEY ( `STG_UID` ) PRIMARY KEY ( `STG_UID` )
);" ); );" );
$oStatement->executeQuery(); $oStatement->executeQuery();
/***************************************************************************************************************/ /**
* ************************************************************************************************************
*/
require_once 'classes/model/Stage.php'; require_once 'classes/model/Stage.php';
require_once 'classes/model/Process.php'; require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php'; require_once 'classes/model/Task.php';
@@ -305,16 +300,17 @@ try {
$aRow = $oDataset->getRow(); $aRow = $oDataset->getRow();
if ((int) $aRow['TIMES'] > 0) { if ((int) $aRow['TIMES'] > 0) {
$iStageNumber += 1; $iStageNumber += 1;
} } else {
else {
$bContinue = true; $bContinue = true;
} }
} }
$oStage = new Stage(); $oStage = new Stage();
$oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber; $oNewStage->label = G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber;
if($oData->position->x < 0) $oData->position->x *= -1; if ($oData->position->x < 0)
if($oData->position->y < 0) $oData->position->y *= -1; $oData->position->x *= - 1;
if ($oData->position->y < 0)
$oData->position->y *= - 1;
$oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) ); $oNewStage->uid = $oStage->create( array ('PRO_UID' => $oData->uid,'STG_TITLE' => $oNewStage->label,'STG_POSX' => $oData->position->x,'STG_POSY' => $oData->position->y,'STG_INDEX' => $iIndex) );
$oJSON = new Services_JSON(); $oJSON = new Services_JSON();
@@ -429,14 +425,12 @@ try {
$arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" ); $arrayField["sLabel3"] = G::LoadTranslation( "ID_PENDING_TASK" );
$arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" ); $arrayField["sLabel4"] = G::LoadTranslation( "ID_PARALLEL_TASK" );
$arrayField["tracker"] = 1; $arrayField["tracker"] = 1;
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField ); $G_PUBLISH->AddContent( "smarty", "cases/cases_Leyends", "", "", $arrayField );
G::RenderPage( "publish", "raw" ); G::RenderPage( "publish", "raw" );
break; break;
} }
} } catch (Exception $oException) {
catch (Exception $oException) {
die( $oException->getMessage() ); die( $oException->getMessage() );
} }
?>

View File

@@ -20,10 +20,8 @@
* *
* 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 (!isset($_SESSION['PROCESS'])) if (! isset( $_SESSION['PROCESS'] )) {
{
G::header( 'location: login' ); G::header( 'location: login' );
} }
try { try {
@@ -32,12 +30,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;
} }
require_once 'classes/model/CaseTrackerObject.php'; require_once 'classes/model/CaseTrackerObject.php';
@@ -47,8 +45,7 @@ try {
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave' ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave' );
G::RenderPage( 'publish-raw', 'raw' ); G::RenderPage( 'publish-raw', 'raw' );
} } catch (Exception $oException) {
catch (Exception $oException) {
die( $oException->getMessage() ); die( $oException->getMessage() );
} }
?>

View File

@@ -20,10 +20,8 @@
* *
* 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 (!isset($_SESSION['PROCESS'])) if (! isset( $_SESSION['PROCESS'] )) {
{
G::header( 'location: login' ); G::header( 'location: login' );
} }
try { try {
@@ -32,12 +30,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;
} }
require_once 'classes/model/CaseTrackerObject.php'; require_once 'classes/model/CaseTrackerObject.php';
@@ -50,8 +48,7 @@ try {
$aFields = $oCaseTrackerObject->load( $value['CTO_UID'] ); $aFields = $oCaseTrackerObject->load( $value['CTO_UID'] );
$aFields['CTO_CONDITION'] = $value['CTO_CONDITION']; $aFields['CTO_CONDITION'] = $value['CTO_CONDITION'];
$oCaseTrackerObject->update( $aFields ); $oCaseTrackerObject->update( $aFields );
} } catch (Exception $oException) {
catch (Exception $oException) {
die( $oException->getMessage() ); die( $oException->getMessage() );
} }
?>

View File

@@ -21,7 +21,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.
*
*/ */
/* /*
* dynaforms & documents for Case Tracker * dynaforms & documents for Case Tracker
@@ -63,11 +62,8 @@ $G_PUBLISH = new Publisher();
if ($noShowTitle == 0) { if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields ); $G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
} }
$G_PUBLISH->AddContent( 'propeltable', $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_DynaDocs', $oProcessMap->getCaseTrackerObjectsCriteria( $_SESSION['PROCESS'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
'paged-table', ) );
'tracker/tracker_DynaDocs',
$oProcessMap->getCaseTrackerObjectsCriteria($_SESSION['PROCESS']),
array('VIEW' => G::LoadTranslation('ID_VIEW')));
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );

View File

@@ -21,7 +21,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.
*
*/ */
/* /*
* Hystory case for Case Tracker * Hystory case for Case Tracker
@@ -61,10 +60,6 @@ $G_PUBLISH = new Publisher();
if ($noShowTitle == 0) { if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields ); $G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
} }
$G_PUBLISH->AddContent( 'propeltable', $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_TransferHistory', Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] ), array () );
'paged-table',
'tracker/tracker_TransferHistory',
Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']),
array());
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );

View File

@@ -21,7 +21,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.
*
*/ */
/* /*
* History messages for Case Tracker * History messages for Case Tracker
@@ -62,9 +61,7 @@ $G_PUBLISH = new Publisher();
if ($noShowTitle == 0) { if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields ); $G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
} }
$G_PUBLISH->AddContent( 'propeltable', $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Messages', Cases::getHistoryMessagesTracker( $_SESSION['APPLICATION'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
'paged-table', ) );
'tracker/tracker_Messages',
Cases::getHistoryMessagesTracker($_SESSION['APPLICATION']),
array('VIEW' => G::LoadTranslation('ID_VIEW')));
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );

View File

@@ -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.
*
*/ */
/* /*
@@ -29,8 +28,7 @@
* @author Everth S. Berrios Morales <everth@colosa.com> * @author Everth S. Berrios Morales <everth@colosa.com>
* *
*/ */
if (!isset($_SESSION['PROCESS'])) if (! isset( $_SESSION['PROCESS'] )) {
{
G::header( 'location: login' ); G::header( 'location: login' );
} }
$G_MAIN_MENU = 'caseTracker'; $G_MAIN_MENU = 'caseTracker';
@@ -43,3 +41,4 @@
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_MessagesView', '', $Fields ); $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_MessagesView', '', $Fields );
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );

View File

@@ -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.
*
*/ */
/* /*
@@ -29,13 +28,13 @@
* @author Everth S. Berrios Morales <everth@colosa.com> * @author Everth S. Berrios Morales <everth@colosa.com>
* *
*/ */
if (!isset($_SESSION['PROCESS'])) if (! isset( $_SESSION['PROCESS'] )) {
{
G::header( 'location: login' ); G::header( 'location: login' );
} }
$G_MAIN_MENU = 'caseTracker'; $G_MAIN_MENU = 'caseTracker';
//$G_ID_MENU_SELECTED = 'DYNADOC'; //$G_ID_MENU_SELECTED = 'DYNADOC';
G::LoadClass( 'processMap' ); G::LoadClass( 'processMap' );
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();

View File

@@ -20,13 +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.
*
*/ */
try { try {
if (!isset($_SESSION['PROCESS'])) if (! isset( $_SESSION['PROCESS'] )) {
{
G::header( 'location: login' ); G::header( 'location: login' );
} }
@@ -61,13 +59,11 @@ try {
// $array['PROCESS'] = G::LoadTranslation('ID_PROCESS'); // $array['PROCESS'] = G::LoadTranslation('ID_PROCESS');
$array['DATELABEL'] = G::LoadTranslation( 'DATE_LABEL' ); $array['DATELABEL'] = G::LoadTranslation( 'DATE_LABEL' );
$G_PUBLISH = new Publisher();
$G_PUBLISH = new Publisher;
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array ); $G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array );
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' ); $G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish', 'blank' ); G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) { } catch (Exception $oException) {
die( $oException->getMessage() ); die( $oException->getMessage() );
} }
@@ -102,3 +98,4 @@ try {
window.print(); window.print();
} catch(e){} } catch(e){}
</script> </script>

View File

@@ -14,3 +14,4 @@ if (!isset($sValue['CT_MESSAGE_HISTORY'])) {
require_once 'classes/model/CaseTracker.php'; require_once 'classes/model/CaseTracker.php';
$oCaseTracker = new CaseTracker(); $oCaseTracker = new CaseTracker();
$oCaseTracker->update( $sValue ); $oCaseTracker->update( $sValue );

View File

@@ -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.
*
*/ */
/* /*
@@ -30,8 +29,7 @@
* *
*/ */
if (!isset($_SESSION['PROCESS'])) if (! isset( $_SESSION['PROCESS'] )) {
{
G::header( 'location: login' ); G::header( 'location: login' );
} }
@@ -44,8 +42,7 @@
$G_ID_MENU_SELECTED = 'DYNADOC'; $G_ID_MENU_SELECTED = 'DYNADOC';
global $G_PUBLISH; global $G_PUBLISH;
switch ($_GET['CTO_TYPE_OBJ']) switch ($_GET['CTO_TYPE_OBJ']) {
{
case 'DYNAFORM': case 'DYNAFORM':
G::LoadClass( 'case' ); G::LoadClass( 'case' );
$oCase = new Cases(); $oCase = new Cases();
@@ -57,7 +54,7 @@
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW'] = '#'; $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW'] = '#';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW_ACTION'] = 'tracker_PrintView?CTO_UID_OBJ=' . $_GET['CTO_UID_OBJ'] . '&CTO_TYPE_OBJ=PRINT_PREVIEW'; $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW_ACTION'] = 'tracker_PrintView?CTO_UID_OBJ=' . $_GET['CTO_UID_OBJ'] . '&CTO_TYPE_OBJ=PRINT_PREVIEW';
$_SESSION['CTO_UID_OBJ'] = $_GET['CTO_UID_OBJ']; $_SESSION['CTO_UID_OBJ'] = $_GET['CTO_UID_OBJ'];
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' ); $G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
break; break;
@@ -70,7 +67,7 @@
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/tracker/tracker.js' ); $oHeadPublisher->addScriptFile( '/jscore/tracker/tracker.js' );
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Inputdocs', $c ); $G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Inputdocs', $c );
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
break; break;
@@ -89,4 +86,3 @@
break; break;
} }
?>

View File

@@ -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.
*
*/ */
require_once ("classes/model/AppDocumentPeer.php"); require_once ("classes/model/AppDocumentPeer.php");
@@ -41,16 +40,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;
@@ -71,7 +67,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 {
@@ -83,3 +79,4 @@ if(!$sw_file_exists){
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] ); G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
} }
} }

View File

@@ -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
@@ -36,12 +35,10 @@ $sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo( $oAppDocument->getAppDocFilename() ); $info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) { if (! isset( $_GET['ext'] )) {
$ext = $info['extension']; $ext = $info['extension'];
} } else {
else {
if ($_GET['ext'] != '') { if ($_GET['ext'] != '') {
$ext = $_GET['ext']; $ext = $_GET['ext'];
} } else {
else {
$ext = $info['extension']; $ext = $info['extension'];
} }
} }
@@ -73,7 +70,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 {
@@ -86,4 +83,4 @@ if(!$sw_file_exists){
} }
} }
//G::streamFile ( $realPath, true); //G::streamFile ( $realPath, true);
?>

View File

@@ -21,7 +21,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.
*
*/ */
/* /*
* Map for Case Tracker * Map for Case Tracker
@@ -66,7 +65,7 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' ); $aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' ); $oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
$oTemplatePower->prepare(); $oTemplatePower->prepare();
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
if ($noShowTitle == 0) { if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields ); $G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
} }
@@ -150,7 +149,7 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' ); $aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
$oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' ); $oTemplatePower = new TemplatePower( PATH_TPL . 'tracker/stages_Map.html' );
$oTemplatePower->prepare(); $oTemplatePower->prepare();
$G_PUBLISH = new Publisher; $G_PUBLISH = new Publisher();
if ($noShowTitle == 0) { if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields ); $G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
} }
@@ -178,3 +177,4 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
G::RenderPage( 'publish' ); G::RenderPage( 'publish' );
break; break;
} }