Merge remote branch 'upstream/master'
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,73 +1,77 @@
|
|||||||
<?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' );
|
||||||
$oTasks = new Tasks();
|
$oTasks = new Tasks();
|
||||||
$aAux = $oTasks->getGroupsOfTask($_SESSION['TASK'], 2);
|
$aAux = $oTasks->getGroupsOfTask( $_SESSION['TASK'], 2 );
|
||||||
$aAdhocUsers = array();
|
$aAdhocUsers = array ();
|
||||||
$oGroups = new Groups();
|
$oGroups = new Groups();
|
||||||
foreach($aAux as $aGroup) {
|
foreach ($aAux as $aGroup) {
|
||||||
$aUsers = $oGroups->getUsersOfGroup($aGroup['GRP_UID']);
|
$aUsers = $oGroups->getUsersOfGroup( $aGroup['GRP_UID'] );
|
||||||
foreach($aUsers as $aUser) {
|
foreach ($aUsers as $aUser) {
|
||||||
if($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
|
if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
|
||||||
$aAdhocUsers[] = $aUser['USR_UID'];
|
$aAdhocUsers[] = $aUser['USR_UID'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$aAux = $oTasks->getUsersOfTask($_SESSION['TASK'], 2);
|
$aAux = $oTasks->getUsersOfTask( $_SESSION['TASK'], 2 );
|
||||||
foreach($aAux as $aUser) {
|
foreach ($aAux as $aUser) {
|
||||||
if($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
|
if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
|
||||||
$aAdhocUsers[] = $aUser['USR_UID'];
|
$aAdhocUsers[] = $aUser['USR_UID'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||||
$oCriteria->add(UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN);
|
$oCriteria->add( UsersPeer::USR_UID, $aAdhocUsers, Criteria::IN );
|
||||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$aData=array();
|
$aData = array ();
|
||||||
while ($oDataset->next()){
|
while ($oDataset->next()) {
|
||||||
$aData[] = $oDataset->getRow();
|
$aData[] = $oDataset->getRow();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->data = $aData;
|
$this->data = $aData;
|
||||||
|
|
||||||
}
|
|
||||||
//assign user adhoc
|
|
||||||
function reassignCase($params){
|
|
||||||
|
|
||||||
$cases = new Cases();
|
|
||||||
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE']);
|
|
||||||
$this->success = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
//delete case adhoc
|
|
||||||
function deleteCase($params){
|
|
||||||
$ainfoCase = array();
|
|
||||||
try{
|
|
||||||
$applicationUID = (isset($_POST['APP_UID'])) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
|
||||||
$app = new Application();
|
|
||||||
$caseData = $app->load($applicationUID);
|
|
||||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
|
||||||
|
|
||||||
$oCase = new Cases();
|
|
||||||
$oCase->removeCase($applicationUID);
|
|
||||||
|
|
||||||
$this->success = true;
|
|
||||||
$this->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
|
|
||||||
} catch(Exception $e) {
|
|
||||||
$this->success = false;
|
|
||||||
$this->msg = $e->getMessage();
|
|
||||||
}
|
}
|
||||||
}
|
//assign user adhoc
|
||||||
|
function reassignCase ($params)
|
||||||
|
{
|
||||||
|
$cases = new Cases();
|
||||||
|
$cases->reassignCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE'] );
|
||||||
|
$this->success = true;
|
||||||
|
}
|
||||||
|
//delete case adhoc
|
||||||
|
function deleteCase ($params)
|
||||||
|
{
|
||||||
|
$ainfoCase = array ();
|
||||||
|
try {
|
||||||
|
$applicationUID = (isset( $_POST['APP_UID'] )) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
|
||||||
|
$app = new Application();
|
||||||
|
$caseData = $app->load( $applicationUID );
|
||||||
|
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||||
|
|
||||||
|
$oCase = new Cases();
|
||||||
|
$oCase->removeCase( $applicationUID );
|
||||||
|
|
||||||
|
$this->success = true;
|
||||||
|
$this->msg = G::LoadTranslation( 'ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data );
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$this->success = false;
|
||||||
|
$this->msg = $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//End adhocUserProxy
|
||||||
|
|
||||||
} //End adhocUserProxy
|
|
||||||
|
|||||||
@@ -1,184 +1,185 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Admin controller
|
* Admin controller
|
||||||
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
class Admin extends Controller
|
class Admin extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* UX - User experience
|
* UX - User experience
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public $debug = true;
|
public $debug = true;
|
||||||
|
|
||||||
public function system()
|
public function system ()
|
||||||
{
|
{
|
||||||
require_once PATH_CONTROLLERS . 'main.php';
|
require_once PATH_CONTROLLERS . 'main.php';
|
||||||
G::loadClass('system');
|
G::loadClass( 'system' );
|
||||||
$skinsList = System::getSkingList();
|
$skinsList = System::getSkingList();
|
||||||
$skins = array();
|
$skins = array ();
|
||||||
$timeZonesList = System::getAllTimeZones();
|
$timeZonesList = System::getAllTimeZones();
|
||||||
$timeZonesList = array_keys($timeZonesList);
|
$timeZonesList = array_keys( $timeZonesList );
|
||||||
$mainController = new Main();
|
$mainController = new Main();
|
||||||
$languagesList = $mainController->getLanguagesList();
|
$languagesList = $mainController->getLanguagesList();
|
||||||
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
|
$sysConf = System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
|
||||||
|
|
||||||
foreach ($skinsList['skins'] as $skin) {
|
foreach ($skinsList['skins'] as $skin) {
|
||||||
$skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']);
|
$skins[] = array ($skin['SKIN_FOLDER_ID'],$skin['SKIN_NAME']);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($timeZonesList as $tz) {
|
||||||
|
$timeZones[] = array ($tz,$tz);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->includeExtJS( 'admin/system' );
|
||||||
|
//G::LoadClass('configuration');
|
||||||
|
|
||||||
|
// $c = new Configurations();
|
||||||
|
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||||
|
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
|
$this->setJSVar( 'skinsList', $skins );
|
||||||
|
$this->setJSVar( 'languagesList', $languagesList );
|
||||||
|
$this->setJSVar( 'timeZonesList', $timeZones );
|
||||||
|
$this->setJSVar( 'sysConf', $sysConf );
|
||||||
|
|
||||||
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($timeZonesList as $tz) {
|
public function uxList ()
|
||||||
$timeZones[] = array($tz, $tz);
|
{
|
||||||
|
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
||||||
|
$this->includeExtJS( 'admin/uxUsersList' );
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
|
||||||
|
$c = new Configurations();
|
||||||
|
$configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
|
$this->setJSVar( 'CONFIG', $Config );
|
||||||
|
$this->setJSVar( 'FORMATS', $c->getFormats() );
|
||||||
|
$this->setJSVar( 'uxTypes', AdminProxy::getUxTypesList( 'list' ) );
|
||||||
|
|
||||||
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CALENDAR
|
||||||
|
* getting default list
|
||||||
|
*
|
||||||
|
* @param string $httpData->PRO_UID (opional)
|
||||||
|
*/
|
||||||
|
public function calendarEdit ($httpData)
|
||||||
|
{
|
||||||
|
global $RBAC;
|
||||||
|
//$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
G::LoadClass( 'calendar' );
|
||||||
|
|
||||||
|
$CalendarUid = str_replace( '"', '', isset( $_GET['id'] ) ? $_GET['id'] : G::GenerateUniqueID() );
|
||||||
|
$calendarObj = new calendar();
|
||||||
|
|
||||||
$this->includeExtJS('admin/system');
|
if ((isset( $_GET['id'] )) && ($_GET['id'] != "")) {
|
||||||
//G::LoadClass('configuration');
|
$fields = $calendarObj->getCalendarInfoE( $CalendarUid );
|
||||||
|
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
|
||||||
|
}
|
||||||
|
if (! isset( $fields['CALENDAR_UID'] )) { //For a new Calendar
|
||||||
|
$fields['CALENDAR_UID'] = $CalendarUid;
|
||||||
|
$fields['OLD_NAME'] = '';
|
||||||
|
|
||||||
// $c = new Configurations();
|
//Default Business Hour
|
||||||
// $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_DAY'] = 7;
|
||||||
// $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_START'] = "09:00";
|
||||||
|
$fields['BUSINESS_DAY'][1]['CALENDAR_BUSINESS_END'] = "17:00";
|
||||||
|
}
|
||||||
|
if ((isset( $_GET['cp'] )) && ($_GET['cp'] == 1)) { // Copy Calendar
|
||||||
|
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
|
||||||
|
$fields['CALENDAR_NAME'] = G::LoadTranslation( "ID_COPY_OF" ) . " " . $fields['CALENDAR_NAME'];
|
||||||
|
$fields['OLD_NAME'] = $fields['CALENDAR_NAME'];
|
||||||
|
}
|
||||||
|
|
||||||
$this->setJSVar('skinsList', $skins);
|
$c = new Configurations();
|
||||||
$this->setJSVar('languagesList', $languagesList);
|
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$this->setJSVar('timeZonesList', $timeZones);
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
$this->setJSVar('sysConf', $sysConf);
|
|
||||||
|
|
||||||
G::RenderPage('publish', 'extJs');
|
$this->includeExtJS( 'admin/calendarEdit' );
|
||||||
}
|
$this->setView( 'admin/calendarEdit' );
|
||||||
|
$businessDayArray = array ();
|
||||||
|
|
||||||
public function uxList()
|
for ($i = 0; $i < sizeof( $fields['BUSINESS_DAY'] ); $i ++) {
|
||||||
{
|
$businessDayArray[$i] = $fields['BUSINESS_DAY'][$i + 1];
|
||||||
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
}
|
||||||
$this->includeExtJS('admin/uxUsersList');
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
|
|
||||||
$c = new Configurations();
|
$fields['BUSINESS_DAY'] = $businessDayArray;
|
||||||
$configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
//validating if the calendar is new, it means that we don't have the $_GET array
|
||||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
$fields['HOLIDAY'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $fields['HOLIDAY'] : array ();
|
||||||
|
$holidayArray = array ();
|
||||||
|
for ($i = 0; $i < sizeof( $fields['HOLIDAY'] ); $i ++) {
|
||||||
|
$holidayArray[$i] = $fields['HOLIDAY'][$i + 1];
|
||||||
|
|
||||||
$this->setJSVar('CONFIG', $Config);
|
}
|
||||||
$this->setJSVar('FORMATS', $c->getFormats());
|
|
||||||
$this->setJSVar('uxTypes', AdminProxy::getUxTypesList('list'));
|
|
||||||
|
|
||||||
G::RenderPage('publish', 'extJs');
|
$_GET['id'] = (isset( $_GET['id'] ) && $_GET['id'] != '') ? $_GET['id'] : '';
|
||||||
}
|
$fields['HOLIDAY'] = $holidayArray;
|
||||||
|
$fields['NEWCALENDAR'] = 'NO';
|
||||||
|
if (isset( $_GET['id'] ) && $_GET['id'] == '') {
|
||||||
|
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
|
||||||
|
$fields['NEWCALENDAR'] = 'YES';
|
||||||
|
}
|
||||||
|
$this->setJSVar( 'CALENDAR_UID', $fields['CALENDAR_UID'] );
|
||||||
|
$this->setJSVar( 'fields', $fields );
|
||||||
|
|
||||||
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
/**
|
|
||||||
* CALENDAR
|
|
||||||
* getting default list
|
|
||||||
* @param string $httpData->PRO_UID (opional)
|
|
||||||
*/
|
|
||||||
public function calendarEdit($httpData)
|
|
||||||
{
|
|
||||||
global $RBAC;
|
|
||||||
//$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
G::LoadClass('calendar');
|
|
||||||
|
|
||||||
$CalendarUid = str_replace ( '"', '', isset ( $_GET ['id'] ) ? $_GET ['id'] : G::GenerateUniqueID () );
|
|
||||||
$calendarObj = new calendar ( );
|
|
||||||
|
|
||||||
if ((isset ( $_GET ['id'] )) && ($_GET ['id'] != "")) {
|
|
||||||
$fields = $calendarObj->getCalendarInfoE ( $CalendarUid );
|
|
||||||
$fields ['OLD_NAME'] = $fields['CALENDAR_NAME'];
|
|
||||||
}
|
|
||||||
if (!isset($fields['CALENDAR_UID'])) { //For a new Calendar
|
|
||||||
$fields ['CALENDAR_UID'] = $CalendarUid;
|
|
||||||
$fields ['OLD_NAME'] = '';
|
|
||||||
|
|
||||||
//Default Business Hour
|
|
||||||
$fields ['BUSINESS_DAY'] [1] ['CALENDAR_BUSINESS_DAY'] = 7;
|
|
||||||
$fields ['BUSINESS_DAY'] [1] ['CALENDAR_BUSINESS_START'] = "09:00";
|
|
||||||
$fields ['BUSINESS_DAY'] [1] ['CALENDAR_BUSINESS_END'] = "17:00";
|
|
||||||
}
|
|
||||||
if ((isset ( $_GET ['cp'] )) && ($_GET ['cp'] == 1)) { // Copy Calendar
|
|
||||||
$fields ['CALENDAR_UID'] = G::GenerateUniqueID ();
|
|
||||||
$fields ['CALENDAR_NAME'] = G::LoadTranslation ( "ID_COPY_OF" ) . " " . $fields ['CALENDAR_NAME'];
|
|
||||||
$fields ['OLD_NAME'] = $fields['CALENDAR_NAME'];;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$c = new Configurations();
|
/**
|
||||||
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
* getting email configuration
|
||||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
* @autor Alvaro <alvaro@colosa.com>
|
||||||
|
*/
|
||||||
|
public function emails ()
|
||||||
|
{
|
||||||
|
global $RBAC;
|
||||||
|
|
||||||
$this->includeExtJS('admin/calendarEdit');
|
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||||
$this->setView('admin/calendarEdit');
|
$this->includeExtJS( 'admin/emails' );
|
||||||
$businessDayArray = array();
|
//render content
|
||||||
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
for($i=0;$i<sizeof($fields['BUSINESS_DAY']);$i++) {
|
|
||||||
$businessDayArray[$i] = $fields['BUSINESS_DAY'][$i+1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields['BUSINESS_DAY'] = $businessDayArray;
|
/**
|
||||||
//validating if the calendar is new, it means that we don't have the $_GET array
|
* getting default list
|
||||||
$fields['HOLIDAY']=(isset ( $_GET['id'] )&&$_GET['id']!='')?$fields['HOLIDAY']:array();
|
*
|
||||||
$holidayArray = array();
|
* @param string $httpData->PRO_UID (opional)
|
||||||
for($i=0;$i<sizeof($fields['HOLIDAY']);$i++) {
|
*/
|
||||||
$holidayArray[$i] = $fields['HOLIDAY'][$i+1];
|
public function pmLogo ($httpData)
|
||||||
|
{
|
||||||
|
global $RBAC;
|
||||||
|
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||||
|
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
$c = new Configurations();
|
||||||
|
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
|
$this->includeExtJS( 'admin/pmLogo' );
|
||||||
|
$this->setView( 'admin/pmLogo' );
|
||||||
|
|
||||||
|
//assigning js variables
|
||||||
|
$this->setJSVar( 'FORMATS', $c->getFormats() );
|
||||||
|
$this->setJSVar( 'CONFIG', $Config );
|
||||||
|
$this->setJSVar( 'PRO_UID', isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : false );
|
||||||
|
|
||||||
|
if (isset( $_SESSION['_cache_pmtables'] )) {
|
||||||
|
unset( $_SESSION['_cache_pmtables'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset( $_SESSION['ADD_TAB_UID'] )) {
|
||||||
|
unset( $_SESSION['ADD_TAB_UID'] );
|
||||||
|
}
|
||||||
|
//render content
|
||||||
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$_GET ['id']= (isset ( $_GET['id'] )&&$_GET['id']!='')?$_GET['id']:'';
|
|
||||||
$fields['HOLIDAY'] = $holidayArray;
|
|
||||||
$fields['NEWCALENDAR'] = 'NO';
|
|
||||||
if(isset ( $_GET['id'] )&&$_GET['id']=='') {
|
|
||||||
$fields['CALENDAR_UID'] = G::GenerateUniqueID();
|
|
||||||
$fields['NEWCALENDAR'] = 'YES';
|
|
||||||
}
|
|
||||||
$this->setJSVar('CALENDAR_UID',$fields['CALENDAR_UID']);
|
|
||||||
$this->setJSVar('fields',$fields);
|
|
||||||
|
|
||||||
G::RenderPage('publish', 'extJs');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getting email configuration
|
|
||||||
* @autor Alvaro <alvaro@colosa.com>
|
|
||||||
*/
|
|
||||||
public function emails()
|
|
||||||
{
|
|
||||||
global $RBAC;
|
|
||||||
|
|
||||||
$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
|
||||||
$this->includeExtJS('admin/emails');
|
|
||||||
//render content
|
|
||||||
G::RenderPage('publish', 'extJs');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* getting default list
|
|
||||||
* @param string $httpData->PRO_UID (opional)
|
|
||||||
*/
|
|
||||||
public function pmLogo($httpData)
|
|
||||||
{
|
|
||||||
global $RBAC;
|
|
||||||
$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
|
||||||
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
$c = new Configurations();
|
|
||||||
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
|
||||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
|
||||||
|
|
||||||
$this->includeExtJS('admin/pmLogo');
|
|
||||||
$this->setView('admin/pmLogo');
|
|
||||||
|
|
||||||
//assigning js variables
|
|
||||||
$this->setJSVar('FORMATS', $c->getFormats());
|
|
||||||
$this->setJSVar('CONFIG', $Config);
|
|
||||||
$this->setJSVar('PRO_UID', isset($_GET['PRO_UID'])? $_GET['PRO_UID'] : false);
|
|
||||||
|
|
||||||
if (isset($_SESSION['_cache_pmtables'])) {
|
|
||||||
unset($_SESSION['_cache_pmtables']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_SESSION['ADD_TAB_UID'])) {
|
|
||||||
unset($_SESSION['ADD_TAB_UID']);
|
|
||||||
}
|
|
||||||
//render content
|
|
||||||
G::RenderPage('publish', 'extJs');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,215 +10,231 @@
|
|||||||
|
|
||||||
class AppProxy extends HttpProxyController
|
class AppProxy extends HttpProxyController
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Get Notes List
|
|
||||||
* @param int $httpData->start
|
|
||||||
* @param int $httpData->limit
|
|
||||||
* @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION'])
|
|
||||||
* @return array containg the case notes
|
|
||||||
*/
|
|
||||||
function getNotesList($httpData)
|
|
||||||
{
|
|
||||||
$appUid = null;
|
|
||||||
|
|
||||||
if (isset($httpData->appUid) && trim($httpData->appUid) != "") {
|
/**
|
||||||
$appUid = $httpData->appUid;
|
* Get Notes List
|
||||||
}
|
*
|
||||||
else {
|
* @param int $httpData->start
|
||||||
if (isset($_SESSION['APPLICATION'])) {
|
* @param int $httpData->limit
|
||||||
$appUid = $_SESSION['APPLICATION'];
|
* @param string $httpData->appUid (optionalif it is not passed try use $_SESSION['APPLICATION'])
|
||||||
}
|
* @return array containg the case notes
|
||||||
}
|
*/
|
||||||
|
function getNotesList ($httpData)
|
||||||
|
{
|
||||||
|
$appUid = null;
|
||||||
|
|
||||||
G::LoadClass('case');
|
if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
|
||||||
$case = new Cases();
|
$appUid = $httpData->appUid;
|
||||||
|
} else {
|
||||||
$proUid = ($httpData->pro == '') ? $_SESSION['PROCESS'] : $httpData->pro;
|
if (isset( $_SESSION['APPLICATION'] )) {
|
||||||
$tasUid = ($httpData->tas == '') ? $_SESSION['TASK'] : $httpData->tas;
|
$appUid = $_SESSION['APPLICATION'];
|
||||||
$usrUid = $_SESSION['USER_LOGGED'];
|
}
|
||||||
|
|
||||||
$respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'VIEW');
|
|
||||||
$respBlock = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'BLOCK');
|
|
||||||
|
|
||||||
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
|
|
||||||
return array('totalCount' => 0, 'notes' => array(), 'noPerms' => 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once ( "classes/model/AppNotes.php" );
|
|
||||||
|
|
||||||
if (!isset($appUid)) {
|
|
||||||
throw new Exception('Can\'t resolve the Apllication ID for this request.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$usrUid = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : "";
|
|
||||||
$appNotes = new AppNotes();
|
|
||||||
$response = $appNotes->getNotesList($appUid, '', $httpData->start, $httpData->limit);
|
|
||||||
|
|
||||||
return $response['array'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* post Note Action
|
|
||||||
* @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION'])
|
|
||||||
* @return array containg the case notes
|
|
||||||
*/
|
|
||||||
function postNote($httpData)
|
|
||||||
{
|
|
||||||
//extract(getExtJSParams());
|
|
||||||
if (isset($httpData->appUid) && trim($httpData->appUid) != "") {
|
|
||||||
$appUid = $httpData->appUid;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$appUid = $_SESSION['APPLICATION'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($appUid)) {
|
|
||||||
throw new Exception('Can\'t resolve the Apllication ID for this request.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$usrUid = (isset($_SESSION['USER_LOGGED'])) ? $_SESSION['USER_LOGGED'] : "";
|
|
||||||
require_once ( "classes/model/AppNotes.php" );
|
|
||||||
|
|
||||||
$appNotes = new AppNotes();
|
|
||||||
$noteContent = addslashes($httpData->noteText);
|
|
||||||
|
|
||||||
$result = $appNotes->postNewNote($appUid, $usrUid, $noteContent, false);
|
|
||||||
|
|
||||||
//Disabling the controller response because we handle a special behavior
|
|
||||||
$this->setSendResponse(false);
|
|
||||||
|
|
||||||
//Send the response to client
|
|
||||||
@ini_set('implicit_flush', 1);
|
|
||||||
ob_start();
|
|
||||||
echo G::json_encode($result);
|
|
||||||
@ob_flush();
|
|
||||||
@flush();
|
|
||||||
@ob_end_flush();
|
|
||||||
ob_implicit_flush(1);
|
|
||||||
|
|
||||||
//Send notification in background
|
|
||||||
if (intval($httpData->swSendMail) == 1) {
|
|
||||||
G::LoadClass("case");
|
|
||||||
|
|
||||||
$oCase = new Cases();
|
|
||||||
|
|
||||||
$p = $oCase->getUsersParticipatedInCase($appUid);
|
|
||||||
$noteRecipientsList = array();
|
|
||||||
|
|
||||||
foreach ($p["array"] as $key => $userParticipated) {
|
|
||||||
$noteRecipientsList[] = $key;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$noteRecipients = implode(",", $noteRecipientsList);
|
G::LoadClass( 'case' );
|
||||||
$noteContent = stripslashes($noteContent);
|
$case = new Cases();
|
||||||
|
|
||||||
$appNotes->sendNoteNotification($appUid, $usrUid, $noteContent, $noteRecipients);
|
$proUid = ($httpData->pro == '') ? $_SESSION['PROCESS'] : $httpData->pro;
|
||||||
}
|
$tasUid = ($httpData->tas == '') ? $_SESSION['TASK'] : $httpData->tas;
|
||||||
}
|
$usrUid = $_SESSION['USER_LOGGED'];
|
||||||
|
|
||||||
/**
|
$respView = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'VIEW' );
|
||||||
* request to open the case summary
|
$respBlock = $case->getAllObjectsFrom( $proUid, $appUid, $tasUid, $usrUid, 'BLOCK' );
|
||||||
* @param string $httpData->appUid
|
|
||||||
* @param string $httpData->delIndex
|
|
||||||
* @return object bool $result->succes, string $result->message(is an exception was thrown), string $result->dynUid
|
|
||||||
*/
|
|
||||||
function requestOpenSummary($httpData)
|
|
||||||
{
|
|
||||||
global $RBAC;
|
|
||||||
$this->success = true;
|
|
||||||
$this->dynUid = '';
|
|
||||||
|
|
||||||
switch ($RBAC->userCanAccess('PM_CASES')) {
|
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
|
||||||
case -2:
|
return array ('totalCount' => 0,'notes' => array (),'noPerms' => 1
|
||||||
throw new Exception(G::LoadTranslation('ID_USER_HAVENT_RIGHTS_SYSTEM'));
|
);
|
||||||
break;
|
}
|
||||||
case -1:
|
|
||||||
throw new Exception(G::LoadTranslation('ID_USER_HAVENT_RIGHTS_PAGE'));
|
require_once ("classes/model/AppNotes.php");
|
||||||
break;
|
|
||||||
|
if (! isset( $appUid )) {
|
||||||
|
throw new Exception( 'Can\'t resolve the Apllication ID for this request.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$usrUid = isset( $_SESSION['USER_LOGGED'] ) ? $_SESSION['USER_LOGGED'] : "";
|
||||||
|
$appNotes = new AppNotes();
|
||||||
|
$response = $appNotes->getNotesList( $appUid, '', $httpData->start, $httpData->limit );
|
||||||
|
|
||||||
|
return $response['array'];
|
||||||
}
|
}
|
||||||
|
|
||||||
G::LoadClass('case');
|
/**
|
||||||
$case = new Cases();
|
* post Note Action
|
||||||
|
*
|
||||||
|
* @param string $httpData->appUid (optional, if it is not passed try use $_SESSION['APPLICATION'])
|
||||||
|
* @return array containg the case notes
|
||||||
|
*/
|
||||||
|
function postNote ($httpData)
|
||||||
|
{
|
||||||
|
//extract(getExtJSParams());
|
||||||
|
if (isset( $httpData->appUid ) && trim( $httpData->appUid ) != "") {
|
||||||
|
$appUid = $httpData->appUid;
|
||||||
|
} else {
|
||||||
|
$appUid = $_SESSION['APPLICATION'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($RBAC->userCanAccess('PM_ALLCASES') < 0 && $case->userParticipatedInCase($httpData->appUid, $_SESSION['USER_LOGGED']) == 0) {
|
if (! isset( $appUid )) {
|
||||||
throw new Exception(G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED'));
|
throw new Exception( 'Can\'t resolve the Apllication ID for this request.' );
|
||||||
|
}
|
||||||
|
|
||||||
|
$usrUid = (isset( $_SESSION['USER_LOGGED'] )) ? $_SESSION['USER_LOGGED'] : "";
|
||||||
|
require_once ("classes/model/AppNotes.php");
|
||||||
|
|
||||||
|
$appNotes = new AppNotes();
|
||||||
|
$noteContent = addslashes( $httpData->noteText );
|
||||||
|
|
||||||
|
$result = $appNotes->postNewNote( $appUid, $usrUid, $noteContent, false );
|
||||||
|
|
||||||
|
//Disabling the controller response because we handle a special behavior
|
||||||
|
$this->setSendResponse( false );
|
||||||
|
|
||||||
|
//Send the response to client
|
||||||
|
@ini_set( 'implicit_flush', 1 );
|
||||||
|
ob_start();
|
||||||
|
echo G::json_encode( $result );
|
||||||
|
@ob_flush();
|
||||||
|
@flush();
|
||||||
|
@ob_end_flush();
|
||||||
|
ob_implicit_flush( 1 );
|
||||||
|
|
||||||
|
//Send notification in background
|
||||||
|
if (intval( $httpData->swSendMail ) == 1) {
|
||||||
|
G::LoadClass( "case" );
|
||||||
|
|
||||||
|
$oCase = new Cases();
|
||||||
|
|
||||||
|
$p = $oCase->getUsersParticipatedInCase( $appUid );
|
||||||
|
$noteRecipientsList = array ();
|
||||||
|
|
||||||
|
foreach ($p["array"] as $key => $userParticipated) {
|
||||||
|
$noteRecipientsList[] = $key;
|
||||||
|
}
|
||||||
|
|
||||||
|
$noteRecipients = implode( ",", $noteRecipientsList );
|
||||||
|
$noteContent = stripslashes( $noteContent );
|
||||||
|
|
||||||
|
$appNotes->sendNoteNotification( $appUid, $usrUid, $noteContent, $noteRecipients );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$applicationFields = $case->loadCase($httpData->appUid, $httpData->delIndex);
|
/**
|
||||||
$process = new Process();
|
* request to open the case summary
|
||||||
$processData = $process->load($applicationFields['PRO_UID']);
|
*
|
||||||
|
* @param string $httpData->appUid
|
||||||
|
* @param string $httpData->delIndex
|
||||||
|
* @return object bool $result->succes, string $result->message(is an exception was thrown), string $result->dynUid
|
||||||
|
*/
|
||||||
|
function requestOpenSummary ($httpData)
|
||||||
|
{
|
||||||
|
global $RBAC;
|
||||||
|
$this->success = true;
|
||||||
|
$this->dynUid = '';
|
||||||
|
|
||||||
if (isset($processData['PRO_DYNAFORMS']['PROCESS'])) {
|
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
|
||||||
$this->dynUid = $processData['PRO_DYNAFORMS']['PROCESS'];
|
case - 2:
|
||||||
|
throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_SYSTEM' ) );
|
||||||
|
break;
|
||||||
|
case - 1:
|
||||||
|
throw new Exception( G::LoadTranslation( 'ID_USER_HAVENT_RIGHTS_PAGE' ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
G::LoadClass( 'case' );
|
||||||
|
$case = new Cases();
|
||||||
|
|
||||||
|
if ($RBAC->userCanAccess( 'PM_ALLCASES' ) < 0 && $case->userParticipatedInCase( $httpData->appUid, $_SESSION['USER_LOGGED'] ) == 0) {
|
||||||
|
throw new Exception( G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
|
||||||
|
$process = new Process();
|
||||||
|
$processData = $process->load( $applicationFields['PRO_UID'] );
|
||||||
|
|
||||||
|
if (isset( $processData['PRO_DYNAFORMS']['PROCESS'] )) {
|
||||||
|
$this->dynUid = $processData['PRO_DYNAFORMS']['PROCESS'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['_applicationFields'] = $applicationFields;
|
||||||
|
$_SESSION['_processData'] = $processData;
|
||||||
|
$_SESSION['APPLICATION'] = $httpData->appUid;
|
||||||
|
$_SESSION['INDEX'] = $httpData->delIndex;
|
||||||
|
$_SESSION['PROCESS'] = $applicationFields['PRO_UID'];
|
||||||
|
$_SESSION['TASK'] = $applicationFields['TAS_UID'];
|
||||||
|
$_SESSION['STEP_POSITION'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION['_applicationFields'] = $applicationFields;
|
/**
|
||||||
$_SESSION['_processData'] = $processData;
|
* get the case summary data
|
||||||
$_SESSION['APPLICATION'] = $httpData->appUid;
|
*
|
||||||
$_SESSION['INDEX'] = $httpData->delIndex;
|
* @param string $httpData->appUid
|
||||||
$_SESSION['PROCESS'] = $applicationFields['PRO_UID'];
|
* @param string $httpData->delIndex
|
||||||
$_SESSION['TASK'] = $applicationFields['TAS_UID'];
|
* @return array containg the case summary data
|
||||||
$_SESSION['STEP_POSITION'] = '';
|
*/
|
||||||
}
|
function getSummary ($httpData)
|
||||||
|
{
|
||||||
|
$labels = array ();
|
||||||
|
$form = new Form( 'cases/cases_Resume', PATH_XMLFORM, SYS_LANG );
|
||||||
|
G::LoadClass( 'case' );
|
||||||
|
$case = new Cases();
|
||||||
|
|
||||||
/**
|
foreach ($form->fields as $fieldName => $field) {
|
||||||
* get the case summary data
|
$labels[$fieldName] = $field->label;
|
||||||
* @param string $httpData->appUid
|
}
|
||||||
* @param string $httpData->delIndex
|
|
||||||
* @return array containg the case summary data
|
|
||||||
*/
|
|
||||||
function getSummary($httpData)
|
|
||||||
{
|
|
||||||
$labels = array();
|
|
||||||
$form = new Form('cases/cases_Resume', PATH_XMLFORM, SYS_LANG);
|
|
||||||
G::LoadClass('case');
|
|
||||||
$case = new Cases();
|
|
||||||
|
|
||||||
foreach($form->fields as $fieldName => $field) {
|
if (isset( $_SESSION['_applicationFields'] ) && $_SESSION['_processData']) {
|
||||||
$labels[$fieldName] = $field->label;
|
$applicationFields = $_SESSION['_applicationFields'];
|
||||||
|
unset( $_SESSION['_applicationFields'] );
|
||||||
|
$processData = $_SESSION['_processData'];
|
||||||
|
unset( $_SESSION['_processData'] );
|
||||||
|
} else {
|
||||||
|
$applicationFields = $case->loadCase( $httpData->appUid, $httpData->delIndex );
|
||||||
|
$process = new Process();
|
||||||
|
$processData = $process->load( $applicationFields['PRO_UID'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = array ();
|
||||||
|
$task = new Task();
|
||||||
|
$taskData = $task->load( $applicationFields['TAS_UID'] );
|
||||||
|
$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['TITLE'],'value' => $applicationFields['TITLE'],'section' => $labels['TITLE1']
|
||||||
|
);
|
||||||
|
$data[] = array ('label' => $labels['APP_NUMBER'],'value' => $applicationFields['APP_NUMBER'],'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['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
|
||||||
|
//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 );
|
||||||
|
|
||||||
|
$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['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']);
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SESSION['_applicationFields']) && $_SESSION['_processData']) {
|
|
||||||
$applicationFields = $_SESSION['_applicationFields'];
|
|
||||||
unset($_SESSION['_applicationFields']);
|
|
||||||
$processData = $_SESSION['_processData'];
|
|
||||||
unset($_SESSION['_processData']);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$applicationFields = $case->loadCase($httpData->appUid, $httpData->delIndex);
|
|
||||||
$process = new Process();
|
|
||||||
$processData = $process->load($applicationFields['PRO_UID']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = array();
|
|
||||||
$task = new Task();
|
|
||||||
$taskData = $task->load($applicationFields['TAS_UID']);
|
|
||||||
$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['TITLE'] , 'value' => $applicationFields['TITLE'], 'section'=>$labels['TITLE1']);
|
|
||||||
$data[] = array('label'=>$labels['APP_NUMBER'] , 'value' => $applicationFields['APP_NUMBER'], '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['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
|
|
||||||
//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);
|
|
||||||
|
|
||||||
$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['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']);
|
|
||||||
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,102 +1,81 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
class authSourceProxy extends HttpProxyController
|
||||||
|
{
|
||||||
|
|
||||||
|
function testingOption ($params)
|
||||||
|
{
|
||||||
|
/*global $RBAC;
|
||||||
|
$fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS);
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$data=array();
|
||||||
|
$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');
|
||||||
|
$aFields = $aData = array();
|
||||||
|
|
||||||
|
unset($params->PHPSESSID);
|
||||||
|
foreach ($params as $sField => $sValue) {
|
||||||
class authSourceProxy extends HttpProxyController {
|
if (in_array($sField, $aCommonFields)) {
|
||||||
|
$aFields[$sField] = (($sField=='AUTH_SOURCE_ENABLED_TLS' || $sField=='AUTH_ANONYMOUS'))? ($sValue=='yes')?1:0 :$sValue;
|
||||||
function testingOption($params){
|
}
|
||||||
/*global $RBAC;
|
else {
|
||||||
|
$aData[$sField] = $sValue;
|
||||||
$fields = array('AUTH_SOURCE_PROVIDER' => $params->optionAuthS);
|
}
|
||||||
|
}
|
||||||
$G_PUBLISH = new Publisher();
|
$aFields['AUTH_SOURCE_DATA'] = $aData;
|
||||||
$data=array();
|
if (isset($aFields['AUTH_SOURCE_UID']) && $aFields['AUTH_SOURCE_UID'] != '') {
|
||||||
|
$RBAC->updateAuthSource($aFields);
|
||||||
$aCommonFields = array('AUTH_SOURCE_UID',
|
}
|
||||||
'AUTH_SOURCE_NAME',
|
else {
|
||||||
'AUTH_SOURCE_PROVIDER',
|
$aAuth = $RBAC->createAuthSource($aFields);
|
||||||
'AUTH_SOURCE_SERVER_NAME',
|
}*/
|
||||||
'AUTH_SOURCE_PORT',
|
//G::pr($aAuth);die;
|
||||||
'AUTH_SOURCE_ENABLED_TLS',
|
$data['success'] = true;
|
||||||
'AUTH_ANONYMOUS',
|
$data['optionAuthS'] = $params->optionAuthS;
|
||||||
'AUTH_SOURCE_SEARCH_USER',
|
//$data['sUID'] = $aAuth;
|
||||||
'AUTH_SOURCE_PASSWORD',
|
return $data;
|
||||||
'AUTH_SOURCE_VERSION',
|
|
||||||
'AUTH_SOURCE_BASE_DN',
|
|
||||||
'AUTH_SOURCE_OBJECT_CLASSES',
|
|
||||||
'AUTH_SOURCE_ATTRIBUTES');
|
|
||||||
|
|
||||||
$aFields = $aData = array();
|
|
||||||
|
|
||||||
unset($params->PHPSESSID);
|
|
||||||
foreach ($params as $sField => $sValue) {
|
|
||||||
if (in_array($sField, $aCommonFields)) {
|
|
||||||
$aFields[$sField] = (($sField=='AUTH_SOURCE_ENABLED_TLS' || $sField=='AUTH_ANONYMOUS'))? ($sValue=='yes')?1:0 :$sValue;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$aData[$sField] = $sValue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$aFields['AUTH_SOURCE_DATA'] = $aData;
|
|
||||||
if (isset($aFields['AUTH_SOURCE_UID']) && $aFields['AUTH_SOURCE_UID'] != '') {
|
|
||||||
$RBAC->updateAuthSource($aFields);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$aAuth = $RBAC->createAuthSource($aFields);
|
|
||||||
}*/
|
|
||||||
//G::pr($aAuth);die;
|
|
||||||
$data['success'] = true;
|
|
||||||
$data['optionAuthS'] = $params->optionAuthS;
|
|
||||||
//$data['sUID'] = $aAuth;
|
|
||||||
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();
|
|
||||||
|
|
||||||
unset($params->PHPSESSID);
|
|
||||||
foreach ($params as $sField => $sValue) {
|
|
||||||
if (in_array($sField, $aCommonFields)) {
|
|
||||||
$aFields[$sField] = (($sField=='AUTH_SOURCE_ENABLED_TLS' || $sField=='AUTH_ANONYMOUS'))? ($sValue=='yes')?1:0 :$sValue;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$aData[$sField] = $sValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$aFields['AUTH_SOURCE_DATA'] = $aData;
|
|
||||||
if ($aFields['AUTH_SOURCE_UID'] == '') {
|
|
||||||
$RBAC->createAuthSource($aFields);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$RBAC->updateAuthSource($aFields);
|
|
||||||
}
|
|
||||||
$data=array();
|
|
||||||
$data['success'] = true;
|
|
||||||
return $data;
|
|
||||||
}//end saveAuthSoruces function
|
|
||||||
|
|
||||||
|
$aFields = $aData = array ();
|
||||||
|
|
||||||
|
unset( $params->PHPSESSID );
|
||||||
|
foreach ($params as $sField => $sValue) {
|
||||||
|
if (in_array( $sField, $aCommonFields )) {
|
||||||
|
$aFields[$sField] = (($sField == 'AUTH_SOURCE_ENABLED_TLS' || $sField == 'AUTH_ANONYMOUS')) ? ($sValue == 'yes') ? 1 : 0 : $sValue;
|
||||||
|
} else {
|
||||||
|
$aData[$sField] = $sValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$aFields['AUTH_SOURCE_DATA'] = $aData;
|
||||||
|
if ($aFields['AUTH_SOURCE_UID'] == '') {
|
||||||
|
$RBAC->createAuthSource( $aFields );
|
||||||
|
} else {
|
||||||
|
$RBAC->updateAuthSource( $aFields );
|
||||||
|
}
|
||||||
|
$data = array ();
|
||||||
|
$data['success'] = true;
|
||||||
|
return $data;
|
||||||
|
} //end saveAuthSoruces function
|
||||||
} //end authSourceProxy class
|
} //end authSourceProxy class
|
||||||
|
|
||||||
|
|||||||
@@ -24,16 +24,13 @@ 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'] = ' ';
|
||||||
|
|
||||||
$empty = array ();
|
$empty = array ();
|
||||||
@@ -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 {
|
||||||
|
|||||||
@@ -12,38 +12,40 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
$frm = $HTTP_GET_VARS;
|
$frm = $HTTP_GET_VARS;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<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>
|
||||||
<option value="curso1">Curso 1</option>
|
<td><select name=curso>
|
||||||
<option value="curso2">Curso 2</option>
|
<option value="curso1">Curso 1</option>
|
||||||
<option value="curso3">Curso 3</option>
|
<option value="curso2">Curso 2</option>
|
||||||
<option value="curso4">Curso 4</4option>
|
<option value="curso3">Curso 3</option>
|
||||||
<option value="curso5">Curso 5</option>
|
<option value="curso4">Curso 4</4option>
|
||||||
</td></tr>
|
|
||||||
<tr><td colspan=2>
|
<option value="curso5">Curso 5</option></td>
|
||||||
<input type=submit ></td></tr>
|
</tr>
|
||||||
</table>
|
<tr>
|
||||||
|
<td colspan=2><input type=submit></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,38 +1,32 @@
|
|||||||
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.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
<?php
|
<?php
|
||||||
$frm = $HTTP_POST_VARS;
|
$frm = $HTTP_POST_VARS;
|
||||||
|
|
||||||
$dbc = new dbconnection();
|
$dbc = new dbconnection();
|
||||||
$ses = new DBSession($dbc);
|
$ses = new DBSession( $dbc );
|
||||||
$sql = "update tickets set tipo = ' " . $frm['tipo'] ."', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] ."' ";
|
$sql = "update tickets set tipo = ' " . $frm['tipo'] . "', resultado = ' " . $frm['curso'] . "' where ticket = '" . $frm['ticket'] . "' ";
|
||||||
$ses->Execute ( $sql );
|
$ses->Execute( $sql );
|
||||||
?>
|
?>
|
||||||
<script language = "JavaScript">
|
<script language="JavaScript">
|
||||||
window.close();
|
window.close();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,44 +104,55 @@ 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">
|
<tr>
|
||||||
<table cellspacing="1" cellpadding="3" border="0" width="100%">
|
<td bgcolor="#4682B4">
|
||||||
<tr><td colspan="7"><table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table cellspacing="1" cellpadding="3" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td> +(obj_caller&&obj_caller.year_scroll?'<a href="javascript:set_datetime('+dt_prev_year.valueOf()+')">
|
<td colspan="7"><table cellspacing="0" cellpadding="0" border="0"
|
||||||
<img src="'+STR_ICONPATH+'prev_year.gif" width="16" height="16" border="0" alt="previous year"></a> ':'')+'
|
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>+(obj_caller&&obj_caller.year_scroll?'<a
|
||||||
</td>
|
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> ':'')+' <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 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?'
|
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?' <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>
|
||||||
<script language="JavaScript">
|
<tr>
|
||||||
|
<script language="JavaScript">
|
||||||
<?php
|
<?php
|
||||||
// print weekdays titles
|
// print weekdays titles
|
||||||
for ($n=0; $n<7; $n++)
|
for ($n = 0; $n < 7; $n ++)
|
||||||
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[ (NUM_WEEKSTART+n)%7] . "</font></td>";
|
print "<td bgcolor='#87cefa' align='center'><font color='#ffffff'>" . $ARR_WEEKDAYS[(NUM_WEEKSTART + n) % 7] . "</font></td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
// print calendar table
|
// print calendar table
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -12,69 +12,59 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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 );
|
||||||
|
|
||||||
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count($aFields) . '" style="width:100%;' . (! isset($_POST['sNoShowLeyend']) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
$sHTML = '<select name="_Var_Form_" id="_Var_Form_" size="' . count( $aFields ) . '" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:50%;' : '') . '" ondblclick="insertFormVar(\'' . $_POST['sFieldName'] . '\', this.value);">';
|
||||||
foreach ( $aFields as $aField ) {
|
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']
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$sHTML .= '</select>';
|
$sHTML .= '</select>';
|
||||||
$sHTML = '';
|
$sHTML = '';
|
||||||
|
|
||||||
if (! isset($_POST['sNoShowLeyend'])) {
|
if (! isset( $_POST['sNoShowLeyend'] )) {
|
||||||
$sHTML = '<table width="100%">';
|
$sHTML = '<table width="100%">';
|
||||||
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
|
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"><b>Variables cast prefix</b></td></tr>';
|
||||||
if (isset($_POST['sType'])) {
|
if (isset( $_POST['sType'] )) {
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESC') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_ESC' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_NONEC') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_NONEC' ) . '</td></tr>';
|
||||||
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
|
/*$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EURL') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_EVAL') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCJS') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_ESCSJS') . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
|
$sHTML .= '<tr><td class="module_app_input___gray">' . G::LoadTranslation('ID_FUNCTION') . '</td></tr>';*/
|
||||||
} else {
|
} else {
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_STRING') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@@</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_STRING' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_FLOAT') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@#</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_FLOAT' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_INTEGER') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@%</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_INTEGER' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_TO_URL') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@?</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_TO_URL' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_SQL_ESCAPE') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@$</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_SQL_ESCAPE' ) . '</td></tr>';
|
||||||
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation('ID_REPLACE_WITHOUT_CHANGES') . '</td></tr>';
|
$sHTML .= '<tr><td class="module_app_input___gray" width="5%">@=</td><td class="module_app_input___gray">' . G::LoadTranslation( 'ID_REPLACE_WITHOUT_CHANGES' ) . '</td></tr>';
|
||||||
}
|
}
|
||||||
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"> </td></tr>';
|
$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2"> </td></tr>';
|
||||||
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
|
//$sHTML .= '<tr><td align="center" class="module_app_input___gray" colspan="2">' . G::LoadTranslation('ID_DOCLICK') . '</td></tr>';
|
||||||
$sHTML .= '</table>';
|
$sHTML .= '</table>';
|
||||||
} else {
|
} else {
|
||||||
// please don't remove this definition if there isn't some sort of html tags before the css styles aren't loaded in IE
|
// please don't remove this definition if there isn't some sort of html tags before the css styles aren't loaded in IE
|
||||||
$sHTML = '<table width="100%">';
|
$sHTML = '<table width="100%">';
|
||||||
$sHTML .= '</table>';
|
$sHTML .= '</table>';
|
||||||
}
|
}
|
||||||
$sStyle = " <style type=\"text/css\">
|
$sStyle = " <style type=\"text/css\">
|
||||||
|
|
||||||
@@ -126,37 +116,37 @@ background: #fff; /* set desired hover color */
|
|||||||
</style>";
|
</style>";
|
||||||
$cssTabs = "<div id=\"all\">
|
$cssTabs = "<div id=\"all\">
|
||||||
<ul id=\"tabnav\">
|
<ul id=\"tabnav\">
|
||||||
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','".$_POST['sProcess']."','".$_POST['sFieldName']."','".$_POST['sSymbol']."','processVariablesContent');\">All variables</a></li>
|
<li class=\"all\"><a href=\"#\" onclick=\"changeVariables('all','" . $_POST['sProcess'] . "','" . $_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'] . "','" . $_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>
|
<li class=\"process\"><a href=\"#\" onclick=\"changeVariables('process','" . $_POST['sProcess'] . "','" . $_POST['sFieldName'] . "','" . $_POST['sSymbol'] . "','processVariablesContent');\">Process</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
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' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['dynavars'] = $aRows;
|
$_DBArray['dynavars'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$oCriteria = new Criteria('dbarray');
|
$oCriteria = new Criteria( 'dbarray' );
|
||||||
$oCriteria->setDBArrayTable('dynavars');
|
$oCriteria->setDBArrayTable( 'dynavars' );
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
|
$oHeadPublisher->addScriptFile( "/jscore/controls/varsAjax.js" );
|
||||||
$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' );
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,104 +12,78 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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(\''.
|
break;
|
||||||
$_POST['sFieldName'].'\',\''.$_POST['sSymbol'] . $aField['sName'].'\');">'.$_POST['sSymbol'] . $aField['sName'].'</a></div>',
|
case "process":
|
||||||
'type' => $aField['sType'],
|
if ($aField['sType'] != "system") {
|
||||||
'label' => $aField['sLabel']
|
$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']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$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']
|
||||||
);
|
);
|
||||||
}
|
break;
|
||||||
break;
|
}
|
||||||
case "process":
|
|
||||||
if($aField['sType']!="system"){
|
|
||||||
$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']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$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']
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// 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>
|
||||||
";
|
";
|
||||||
|
|
||||||
echo $cssTabs;
|
echo $cssTabs;
|
||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass( 'ArrayPeer' );
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
$_DBArray['dynavars'] = $aRows;
|
$_DBArray['dynavars'] = $aRows;
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
G::LoadClass('ArrayPeer');
|
G::LoadClass( 'ArrayPeer' );
|
||||||
$oCriteria = new Criteria('dbarray');
|
$oCriteria = new Criteria( 'dbarray' );
|
||||||
$oCriteria->setDBArrayTable('dynavars');
|
$oCriteria->setDBArrayTable( 'dynavars' );
|
||||||
|
|
||||||
$aFields = array ();
|
$aFields = array ();
|
||||||
$G_PUBLISH = new Publisher();
|
$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' );
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,84 +12,85 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
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' );
|
||||||
$c = new Configurations();
|
$c = new Configurations();
|
||||||
$configPage = $c->getConfiguration('eventList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
$configPage = $c->getConfiguration( 'eventList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
$G_MAIN_MENU = 'processmaker';
|
$G_MAIN_MENU = 'processmaker';
|
||||||
$G_SUB_MENU = 'logs';
|
$G_SUB_MENU = 'logs';
|
||||||
$G_ID_MENU_SELECTED = 'logs';
|
$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
|
||||||
$oHeadPublisher->addContent('events/eventList'); //adding a html file .html.
|
$oHeadPublisher->addContent( 'events/eventList' ); //adding a html file .html.
|
||||||
//sending the columns to display in grid
|
//sending the columns to display in grid
|
||||||
$oHeadPublisher->assign( 'typeValues', $type );
|
$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");
|
||||||
|
|
||||||
$processes = Array();
|
$processes = Array ();
|
||||||
$processes[] = array ( '', G::LoadTranslation('ID_ALL_PROCESS') );
|
$processes[] = array ('',G::LoadTranslation( 'ID_ALL_PROCESS' ));
|
||||||
|
|
||||||
$cProcess = new Criteria('workflow');
|
$cProcess = new Criteria( 'workflow' );
|
||||||
$cProcess->clearSelectColumns();
|
$cProcess->clearSelectColumns();
|
||||||
$cProcess->addSelectColumn(AppCacheViewPeer::PRO_UID);
|
$cProcess->addSelectColumn( AppCacheViewPeer::PRO_UID );
|
||||||
$cProcess->addSelectColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
$cProcess->addSelectColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||||
$cProcess->setDistinct(AppCacheViewPeer::PRO_UID);
|
$cProcess->setDistinct( AppCacheViewPeer::PRO_UID );
|
||||||
|
|
||||||
$cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
|
$cProcess->addAscendingOrderByColumn( AppCacheViewPeer::APP_PRO_TITLE );
|
||||||
|
|
||||||
$oDataset = AppCacheViewPeer::doSelectRS($cProcess);
|
$oDataset = AppCacheViewPeer::doSelectRS( $cProcess );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
|
|
||||||
while($aRow = $oDataset->getRow()){
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$processes[] = array ( $aRow['PRO_UID'], $aRow['APP_PRO_TITLE'] );
|
$processes[] = array ($aRow['PRO_UID'],$aRow['APP_PRO_TITLE']);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $processes;
|
return $processes;
|
||||||
}
|
}
|
||||||
|
|
||||||
G::RenderPage('publish', 'extJs');
|
G::RenderPage( 'publish', 'extJs' );
|
||||||
|
|
||||||
|
|||||||
@@ -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 <> ''";
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +28,7 @@ switch($req){
|
|||||||
$rs = $stmt->executeQuery();
|
$rs = $stmt->executeQuery();
|
||||||
|
|
||||||
$aRows[] = array('USR_UID'=>'char', 'USR_EMAIL'=>'char', 'USR_FULLNAME'=>'char');
|
$aRows[] = array('USR_UID'=>'char', 'USR_EMAIL'=>'char', 'USR_FULLNAME'=>'char');
|
||||||
while($rs->next()){
|
while ($rs->next()) {
|
||||||
$aRows[] = array('USR_UID'=>$rs->getString('USR_UID'), 'USR_EMAIL'=>$rs->getString('USR_EMAIL'), 'USR_FULLNAME'=>$rs->getString('USR_FULLNAME'));
|
$aRows[] = array('USR_UID'=>$rs->getString('USR_UID'), 'USR_EMAIL'=>$rs->getString('USR_EMAIL'), 'USR_FULLNAME'=>$rs->getString('USR_FULLNAME'));
|
||||||
}
|
}
|
||||||
//echo '<pre>'; print_r($aRows);
|
//echo '<pre>'; print_r($aRows);
|
||||||
@@ -40,11 +39,10 @@ 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');
|
||||||
break;
|
break;
|
||||||
case 'showGroups':
|
case 'showGroups':
|
||||||
G::LoadClass('groups');
|
G::LoadClass('groups');
|
||||||
$groups = new Groups();
|
$groups = new Groups();
|
||||||
@@ -56,41 +54,35 @@ 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');
|
||||||
break;
|
break;
|
||||||
case 'showDynavars':
|
case 'showDynavars':
|
||||||
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'] : '';
|
||||||
@@ -110,7 +102,7 @@ switch($req){
|
|||||||
$result = AppEventPeer::doSelectRS($criteria);
|
$result = AppEventPeer::doSelectRS($criteria);
|
||||||
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$result->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$data = Array();
|
$data = Array();
|
||||||
while( $result->next() ) {
|
while ( $result->next() ) {
|
||||||
$data[] = $result->getRow();
|
$data[] = $result->getRow();
|
||||||
}
|
}
|
||||||
$totalCount = count($data);
|
$totalCount = count($data);
|
||||||
@@ -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 {
|
||||||
@@ -136,12 +127,13 @@ switch($req){
|
|||||||
$data = Array();
|
$data = Array();
|
||||||
$dataPro = array();
|
$dataPro = array();
|
||||||
$index = 0;
|
$index = 0;
|
||||||
while( $result->next() ) {
|
while ( $result->next() ) {
|
||||||
$data[] = $result->getRow();
|
$data[] = $result->getRow();
|
||||||
}
|
}
|
||||||
$response = array();
|
$response = array();
|
||||||
$response['totalCount'] = $totalCount;
|
$response['totalCount'] = $totalCount;
|
||||||
$response['data'] = $data;
|
$response['data'] = $data;
|
||||||
die(G::json_encode($response));
|
die(G::json_encode($response));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,27 +12,27 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,24 +12,24 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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 );
|
||||||
|
|
||||||
|
|||||||
@@ -12,74 +12,68 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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' );
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
|
|
||||||
if (isset($_GET['EVN_UID'])) {
|
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'];
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$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() );
|
||||||
|
$aTriggersList = $oProcessMap->getTriggers( $_SESSION['PROCESS'] );
|
||||||
|
$aTriggersFileds = Array ('TRI_UID' => 'char','TRI_TITLE' => 'char');
|
||||||
|
|
||||||
$oProcessMap = new processMap(new DBConnection);
|
foreach ($aTriggersList as $i => $v) {
|
||||||
$aTriggersList = $oProcessMap->getTriggers($_SESSION['PROCESS']);
|
unset( $aTriggersList[$i]['PRO_UID'] );
|
||||||
$aTriggersFileds = Array('TRI_UID'=>'char', 'TRI_TITLE'=>'char');
|
unset( $aTriggersList[$i]['TRI_DESCRIPTION'] );
|
||||||
|
$aTriggersList[$i]['TRI_TITLE'] = (strlen( $aTriggersList[$i]['TRI_TITLE'] ) > 32) ? substr( $aTriggersList[$i]['TRI_TITLE'], 0, 32 ) . '...' : $aTriggersList[$i]['TRI_TITLE'];
|
||||||
foreach($aTriggersList as $i=>$v){
|
|
||||||
unset($aTriggersList[$i]['PRO_UID']);
|
|
||||||
unset($aTriggersList[$i]['TRI_DESCRIPTION']);
|
|
||||||
$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' );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,238 +12,224 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
global $_DBArray;
|
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 {
|
||||||
|
$evnUid = $_GET['EVN_UID'];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
$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';
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
$oTrigger = new Triggers();
|
$oTrigger = new Triggers();
|
||||||
$aFields = $oEvent->load( $evnUid );
|
$aFields = $oEvent->load( $evnUid );
|
||||||
$parameters = unserialize ( $oEvent->getEvnActionParameters() );
|
$parameters = unserialize( $oEvent->getEvnActionParameters() );
|
||||||
//g::pr($parameters); die;
|
//g::pr($parameters); die;
|
||||||
$aTrigger = $oTrigger->load($aFields['TRI_UID']);
|
$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) {
|
||||||
// if has changed edit manually
|
// if has changed edit manually
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$aFields['EVN_MESSAGE_SUBJECT'] = (isset($parameters->SUBJECT) ? $parameters->SUBJECT : '');
|
$aFields['EVN_MESSAGE_SUBJECT'] = (isset( $parameters->SUBJECT ) ? $parameters->SUBJECT : '');
|
||||||
|
|
||||||
if(isset($parameters->TO)){
|
if (isset( $parameters->TO )) {
|
||||||
$paramTO[] = Array('id'=>'char', 'name'=>'char');
|
$paramTO[] = Array ('id' => 'char','name' => 'char' );
|
||||||
|
|
||||||
//echo '<pre>';print_r($parameters->TO);
|
//echo '<pre>';print_r($parameters->TO);
|
||||||
foreach($parameters->TO as $item){
|
foreach ($parameters->TO as $item) {
|
||||||
$row = explode('|', $item);
|
$row = explode( '|', $item );
|
||||||
switch($row[0]){
|
switch ($row[0]) {
|
||||||
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 {
|
$rec = $user->load( $row[1] );
|
||||||
$rec = $user->load($row[1]);
|
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
|
||||||
$value = $rec['USR_FIRSTNAME'].' '.$rec['USR_LASTNAME'];
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case 'grp':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
case 'grp':
|
$group = new Groups();
|
||||||
G::LoadClass('groups');
|
$rec = $group->load( $row[1] );
|
||||||
$group = new Groups();
|
$value = strip_tags( $rec->getGrpTitle() );
|
||||||
$rec = $group->load($row[1]);
|
break;
|
||||||
|
case 'ext':
|
||||||
$value = strip_tags($rec->getGrpTitle());
|
$value = htmlentities( $row[1] );
|
||||||
break;
|
break;
|
||||||
|
case 'dyn':
|
||||||
case 'ext':
|
$value = htmlentities( '@#' . $row[1] );
|
||||||
$value = htmlentities($row[1]);
|
break;
|
||||||
break;
|
default:
|
||||||
|
echo '->' . $row[0];
|
||||||
case 'dyn':
|
}
|
||||||
$value = htmlentities('@#'.$row[1]);
|
$paramTO[] = Array ('id' => replaceQuotes( $item ),'name' => $value
|
||||||
break;
|
);
|
||||||
|
}
|
||||||
default:
|
|
||||||
echo '->'.$row[0];
|
|
||||||
}
|
|
||||||
$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;
|
||||||
|
|
||||||
if(isset($parameters->CC)){
|
if (isset( $parameters->CC )) {
|
||||||
$paramCC[] = Array('id'=>'char', 'name'=>'char');
|
$paramCC[] = Array ('id' => 'char','name' => 'char' );
|
||||||
foreach($parameters->CC as $item){
|
foreach ($parameters->CC as $item) {
|
||||||
$row = explode('|', $item);
|
$row = explode( '|', $item );
|
||||||
switch($row[0]){
|
switch ($row[0]) {
|
||||||
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 {
|
||||||
$rec = $user->load($row[1]);
|
$rec = $user->load( $row[1] );
|
||||||
$value = $rec['USR_FIRSTNAME'].' '.$rec['USR_LASTNAME'];
|
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'grp':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$group = new Groups();
|
||||||
|
$rec = $group->load( $row[1] );
|
||||||
|
$value = strip_tags( $rec->getGrpTitle() );
|
||||||
|
break;
|
||||||
|
case 'ext':
|
||||||
|
$value = htmlentities( $row[1] );
|
||||||
|
break;
|
||||||
|
case 'dyn':
|
||||||
|
$value = htmlentities( '@#' . $row[1] );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$paramCC[] = Array ('id' => replaceQuotes( $item ),'name' => $value
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
case 'grp':
|
$_DBArray['eventomsgcc'] = $paramCC;
|
||||||
G::LoadClass('groups');
|
|
||||||
$group = new Groups();
|
|
||||||
$rec = $group->load($row[1]);
|
|
||||||
|
|
||||||
$value = strip_tags($rec->getGrpTitle());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'ext':
|
|
||||||
$value = htmlentities($row[1]);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'dyn':
|
|
||||||
$value = htmlentities('@#'.$row[1]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$paramCC[] = Array('id'=>replaceQuotes($item), 'name'=>$value);
|
|
||||||
}
|
|
||||||
|
|
||||||
$_DBArray['eventomsgcc'] = $paramCC;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$_DBArray['eventomsgcc'] = Array();
|
$_DBArray['eventomsgcc'] = Array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($parameters->BCC)){
|
if (isset( $parameters->BCC )) {
|
||||||
$paramBCC[] = Array('id'=>'char', 'name'=>'char');
|
$paramBCC[] = Array ('id' => 'char','name' => 'char' );
|
||||||
foreach($parameters->BCC as $item){
|
foreach ($parameters->BCC as $item) {
|
||||||
$row = explode('|', $item);
|
$row = explode( '|', $item );
|
||||||
switch($row[0]){
|
switch ($row[0]) {
|
||||||
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 {
|
||||||
$rec = $user->load($row[1]);
|
$rec = $user->load( $row[1] );
|
||||||
$value = $rec['USR_FIRSTNAME'].' '.$rec['USR_LASTNAME'];
|
$value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'grp':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$group = new Groups();
|
||||||
|
$rec = $group->load( $row[1] );
|
||||||
|
$value = strip_tags( $rec->getGrpTitle() );
|
||||||
|
break;
|
||||||
|
case 'ext':
|
||||||
|
$value = htmlentities( $row[1] );
|
||||||
|
break;
|
||||||
|
case 'dyn':
|
||||||
|
$value = htmlentities( '@#' . $row[1] );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$paramBCC[] = Array ('id' => replaceQuotes( $item ),'name' => $value);
|
||||||
|
}
|
||||||
|
|
||||||
case 'grp':
|
$_DBArray['eventomsgbcc'] = $paramBCC;
|
||||||
G::LoadClass('groups');
|
|
||||||
$group = new Groups();
|
|
||||||
$rec = $group->load($row[1]);
|
|
||||||
|
|
||||||
$value = strip_tags($rec->getGrpTitle());
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'ext':
|
|
||||||
$value = htmlentities($row[1]);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'dyn':
|
|
||||||
$value = htmlentities('@#'.$row[1]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$paramBCC[] = Array('id'=>replaceQuotes($item), 'name'=>$value);
|
|
||||||
}
|
|
||||||
|
|
||||||
$_DBArray['eventomsgbcc'] = $paramBCC;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$_DBArray['eventomsgbcc'] = Array();
|
$_DBArray['eventomsgbcc'] = Array ();
|
||||||
}
|
}
|
||||||
$aFields['EVN_MESSAGE_TO_TO'] = $paramTO;
|
$aFields['EVN_MESSAGE_TO_TO'] = $paramTO;
|
||||||
$aFields['EVN_MESSAGE_TO_CC'] = (isset($parameters->CC) ? $paramCC : '');
|
$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','TEMPLATE2' => 'char');
|
||||||
$aTemplates[] = array('TEMPLATE1' => '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' )) {
|
||||||
@copy(PATH_TPL . 'mails' . PATH_SEP . 'alert_message.html', $sDirectory . 'alert_message.html');
|
@copy( PATH_TPL . 'mails' . PATH_SEP . 'alert_message.html', $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;
|
||||||
|
|
||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsEditAction', '', $aFields, '../events/eventsSave' );
|
||||||
//$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('"', '"e;', $aData);
|
{
|
||||||
|
return str_replace( '"', '"e;', $aData );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,50 +12,49 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
G::LoadClass('tasks');
|
G::LoadClass( 'tasks' );
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
|
|
||||||
$oTasks = new Tasks();
|
$oTasks = new Tasks();
|
||||||
$aAux1 = $oTasks->getAllTasks($_GET['PRO_UID']);
|
$aAux1 = $oTasks->getAllTasks( $_GET['PRO_UID'] );
|
||||||
$aTasks = array();
|
$aTasks = array ();
|
||||||
$aTasks[] = array('TAS_UID' => 'char', 'TAS_TITLE' => 'char');
|
$aTasks[] = array ('TAS_UID' => 'char','TAS_TITLE' => 'char');
|
||||||
|
|
||||||
//g::pr($aAux1);die;
|
//g::pr($aAux1);die;
|
||||||
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');
|
||||||
|
|
||||||
foreach($aTriggersList as $i=>$v){
|
foreach ($aTriggersList as $i => $v) {
|
||||||
unset($aTriggersList[$i]['PRO_UID']);
|
unset( $aTriggersList[$i]['PRO_UID'] );
|
||||||
unset($aTriggersList[$i]['TRI_DESCRIPTION']);
|
unset( $aTriggersList[$i]['TRI_DESCRIPTION'] );
|
||||||
$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;
|
||||||
@@ -63,6 +62,6 @@ $_DBArray['TMP_TRIGGERS'] = $aTriggersList;
|
|||||||
$_SESSION['_DBArray'] = $_DBArray;
|
$_SESSION['_DBArray'] = $_DBArray;
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'events/eventsNew', '', array('PRO_UID' => $_GET['PRO_UID'], 'EVN_ACTION' => $_GET['EVN_TYPE']), '');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'events/eventsNew', '', array ('PRO_UID' => $_GET['PRO_UID'],'EVN_ACTION' => $_GET['EVN_TYPE']), '' );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,21 +12,20 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
@@ -35,11 +34,11 @@ global $_DBArray;
|
|||||||
require_once 'classes/model/Event.php';
|
require_once 'classes/model/Event.php';
|
||||||
|
|
||||||
$oEvent = new Event();
|
$oEvent = new Event();
|
||||||
$envUId = $oEvent->create($_POST);
|
$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');
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -12,27 +12,27 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,66 +12,59 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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'] );
|
||||||
unset($_POST['form']['EVN_MESSAGE_TO_CC']);
|
unset( $_POST['form']['EVN_MESSAGE_TO_CC'] );
|
||||||
unset($_POST['form']['EVN_MESSAGE_TO_BCC']);
|
unset( $_POST['form']['EVN_MESSAGE_TO_BCC'] );
|
||||||
unset($_POST['form']['EVN_MESSAGE_TEMPLATE']);
|
unset( $_POST['form']['EVN_MESSAGE_TEMPLATE'] );
|
||||||
}
|
}
|
||||||
unset($_POST['form']['SAVE']);
|
unset( $_POST['form']['SAVE'] );
|
||||||
|
|
||||||
require_once 'classes/model/Event.php';
|
require_once 'classes/model/Event.php';
|
||||||
$oEvent = new Event();
|
$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());
|
||||||
prit_r($oEvnActionParameters);
|
prit_r($oEvnActionParameters);
|
||||||
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++){
|
{
|
||||||
$aData[$i] = str_replace(""e;", '"', $aData[$i]);
|
for ($i = 0; $i < sizeof( $aData ); $i ++) {
|
||||||
}
|
$aData[$i] = str_replace( ""e;", '"', $aData[$i] );
|
||||||
return $aData;
|
}
|
||||||
|
return $aData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,55 +1,62 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$w = 350;
|
$w = 350;
|
||||||
$h = 90;
|
$h = 90;
|
||||||
|
|
||||||
//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';
|
||||||
$timeunit = ucfirst(strtolower($timeunit));
|
$timeunit = ucfirst( strtolower( $timeunit ) );
|
||||||
|
|
||||||
//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 = isset( $_GET['w'] ) ? $_GET['w'] : '0';
|
||||||
|
|
||||||
//when
|
$im = imagecreate( $w, $h );
|
||||||
$when = isset( $_GET['w'] ) ? $_GET['w'] : '0';
|
$bg = imagecolorallocate( $im, 0xFF, 0xFF, 0xFF );
|
||||||
|
$fg = imagecolorallocate( $im, 0x00, 200, 0x00 );
|
||||||
|
$sc = imagecolorallocate( $im, 200, 0, 0 );
|
||||||
|
$gray = imagecolorallocate( $im, 180, 180, 180 );
|
||||||
|
$red = imagecolorallocate( $im, 200, 0, 0 );
|
||||||
|
$green = imagecolorallocate( $im, 0, 200, 0 );
|
||||||
|
$blue = imagecolorallocate( $im, 0, 0, 200 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
|
imagerectangle( $im, 0, 0, $w - 1, $h - 1, $gray );
|
||||||
$im = imagecreate($w,$h);
|
|
||||||
$bg = imagecolorallocate ($im, 0xFF, 0xFF, 0xFF);
|
|
||||||
$fg = imagecolorallocate ($im, 0x00, 200, 0x00);
|
|
||||||
$sc = imagecolorallocate ($im, 200, 0, 0);
|
|
||||||
$gray = imagecolorallocate ($im, 180,180,180);
|
|
||||||
$red = imagecolorallocate ($im, 200, 0, 0);
|
|
||||||
$green = imagecolorallocate ($im, 0, 200, 0);
|
|
||||||
$blue = imagecolorallocate ($im, 0, 0, 200);
|
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
|
||||||
|
|
||||||
imagerectangle($im, 0, 0, $w-1, $h-1, $gray);
|
|
||||||
|
|
||||||
// $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,155 +70,170 @@
|
|||||||
// 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 ) {
|
|
||||||
global $w;
|
|
||||||
$blue = imagecolorallocate ($im, 160, 160, 180);
|
|
||||||
$gray = imagecolorallocate ($im, 100, 100, 100);
|
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
|
||||||
|
|
||||||
for ( $i = $y; $i < $h ; $i+= 2 ) {
|
function drawTask ($im, $x1, $x2, $y, $h)
|
||||||
imageline($im, $x1, $i, $x1 , $i, $gray);
|
{
|
||||||
imageline($im, $x2, $i, $x2 , $i, $gray);
|
global $w;
|
||||||
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
|
$gray = imagecolorallocate( $im, 100, 100, 100 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
|
for ($i = $y; $i < $h; $i += 2) {
|
||||||
|
imageline( $im, $x1, $i, $x1, $i, $gray );
|
||||||
|
imageline( $im, $x2, $i, $x2, $i, $gray );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( $i = $x1; $i < $x2; $i+= 2 ) {
|
for ($i = $x1; $i < $x2; $i += 2) {
|
||||||
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);
|
{
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
for ( $i = $x1; $i < $x2; $i+= 2 ) {
|
for ($i = $x1; $i < $x2; $i += 2) {
|
||||||
imageline($im, $i, $y-8 , $i, $y, $blue);
|
imageline( $im, $i, $y - 8, $i, $y, $blue );
|
||||||
}
|
}
|
||||||
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;
|
{
|
||||||
$terca = ($x2 - $x1 ) / 3;
|
global $w;
|
||||||
$blue = imagecolorallocate ($im, 160, 160, 180);
|
$terca = ($x2 - $x1) / 3;
|
||||||
$gray = imagecolorallocate ($im, 100, 100, 100);
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
$gray = imagecolorallocate( $im, 100, 100, 100 );
|
||||||
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
|
||||||
for ( $i = $y; $i < $h ; $i+= 2 ) {
|
for ($i = $y; $i < $h; $i += 2) {
|
||||||
imageline($im, $x2, $i, $x2 , $i, $gray);
|
imageline( $im, $x2, $i, $x2, $i, $gray );
|
||||||
}
|
}
|
||||||
for ( $i = $y-10; $i < $h ; $i+= 2 ) {
|
for ($i = $y - 10; $i < $h; $i += 2) {
|
||||||
imageline($im, $x1, $i, $x1 , $i, $gray);
|
imageline( $im, $x1, $i, $x1, $i, $gray );
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
{
|
||||||
$red = imagecolorallocate ($im, 200, 100, 0);
|
$blue = imagecolorallocate( $im, 160, 160, 180 );
|
||||||
$gray = imagecolorallocate ($im, 100, 100, 100);
|
$red = imagecolorallocate( $im, 200, 100, 0 );
|
||||||
$black = imagecolorallocate ($im, 0, 0, 0);
|
$gray = imagecolorallocate( $im, 100, 100, 100 );
|
||||||
$yellow = imagecolorallocate ($im, 240, 240, 220);
|
$black = imagecolorallocate( $im, 0, 0, 0 );
|
||||||
|
$yellow = imagecolorallocate( $im, 240, 240, 220 );
|
||||||
|
|
||||||
for ( $i = $y1 + 15; $i < $h ; $i+= 2 ) {
|
for ($i = $y1 + 15; $i < $h; $i += 2) {
|
||||||
imageline($im, $x1, $i, $x1 , $i, $gray);
|
imageline( $im, $x1, $i, $x1, $i, $gray );
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageEllipse($im, $x1, $y1, 26, 26, $black);
|
ImageEllipse( $im, $x1, $y1, 26, 26, $black );
|
||||||
ImageEllipse($im, $x1, $y1, 22, 22, $black);
|
ImageEllipse( $im, $x1, $y1, 22, 22, $black );
|
||||||
ImageFilledEllipse($im, $x1, $y1, 16, 16, $yellow );
|
ImageFilledEllipse( $im, $x1, $y1, 16, 16, $yellow );
|
||||||
ImageEllipse($im, $x1, $y1, 16, 16, $red);
|
ImageEllipse( $im, $x1, $y1, 16, 16, $red );
|
||||||
imageline($im, $x1 , $y1-8 , $x1, $y1+8, $red);
|
imageline( $im, $x1, $y1 - 8, $x1, $y1 + 8, $red );
|
||||||
//imageline($im, $x1 , $y1+8 , $x1, $y1+6, $red);
|
//imageline($im, $x1 , $y1+8 , $x1, $y1+6, $red);
|
||||||
imageline($im, $x1-8 , $y1 , $x1+8 , $y1, $red);
|
imageline( $im, $x1 - 8, $y1, $x1 + 8, $y1, $red );
|
||||||
imageline($im, $x1-7 , $y1-4 , $x1+7 , $y1+4, $red);
|
imageline( $im, $x1 - 7, $y1 - 4, $x1 + 7, $y1 + 4, $red );
|
||||||
imageline($im, $x1-4 , $y1-7 , $x1+4 , $y1+7, $red);
|
imageline( $im, $x1 - 4, $y1 - 7, $x1 + 4, $y1 + 7, $red );
|
||||||
imageline($im, $x1+7 , $y1-4 , $x1-7 , $y1+4, $red);
|
imageline( $im, $x1 + 7, $y1 - 4, $x1 - 7, $y1 + 4, $red );
|
||||||
imageline($im, $x1+4 , $y1-7 , $x1-4 , $y1+7, $red);
|
imageline( $im, $x1 + 4, $y1 - 7, $x1 - 4, $y1 + 7, $red );
|
||||||
ImageFilledEllipse($im, $x1, $y1, 10, 10, $yellow );
|
ImageFilledEllipse( $im, $x1, $y1, 10, 10, $yellow );
|
||||||
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, $w - 23, $h - 23, $w - 15, $h - 19, $red );
|
||||||
|
imageline( $im, $w - 23, $h - 15, $w - 15, $h - 19, $red );
|
||||||
|
imagestring( $im, 2, $w - 30, $h - 37, 'Days', $red );
|
||||||
|
|
||||||
imageline($im, 15, $h-19 , $w -15, $h-19, $red);
|
if ($estimated == 0) {
|
||||||
imageline($im, $w - 23, $h-23 , $w -15, $h-19, $red);
|
$s = 'i';
|
||||||
imageline($im, $w - 23, $h-15 , $w -15, $h-19, $red);
|
header( "Content-Type: image/png" );
|
||||||
imagestring ($im, 2, $w -30 , $h -37, 'Days', $red);
|
imagepng( $im );
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
if ( $estimated == 0 ) {
|
if ($t == 's') {
|
||||||
$s = 'i';
|
drawTask( $im, 80, 220, $h - 30, $h - 15 );
|
||||||
header("Content-Type: image/png");
|
} else {
|
||||||
imagepng($im);
|
drawMultipleTask( $im, 80, 220, $h - 30, $h - 15 );
|
||||||
die;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( $t == 's' )
|
|
||||||
drawTask ( $im, 80, 220, $h - 30 , $h -15);
|
|
||||||
else
|
|
||||||
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;
|
||||||
imagestring ($im, 2, $xTimer -8 , $h -16, $when, $black);
|
imagestring( $im, 2, $xTimer - 8, $h - 16, $when, $black );
|
||||||
$s = 'i';
|
$s = 'i';
|
||||||
}
|
}
|
||||||
|
|
||||||
//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 )) {
|
||||||
$xTimer = 30;
|
//this event is before the start of the task, so will never occurs
|
||||||
$sWhen = abs($when) - abs($estimated);
|
$xTimer = 30;
|
||||||
imagestring ($im, 2, $xTimer -8 , $h -16, $sWhen, $black);
|
$sWhen = abs( $when ) - abs( $estimated );
|
||||||
$s = 'i';
|
imagestring( $im, 2, $xTimer - 8, $h - 16, $sWhen, $black );
|
||||||
|
$s = 'i';
|
||||||
}
|
}
|
||||||
if ( abs($when) < abs($estimated) ) { //this event is after the start of the task, drawing
|
if (abs( $when ) < abs( $estimated )) {
|
||||||
$xTimer = 170;
|
//this event is after the start of the task, drawing
|
||||||
$sWhen = $estimated + $when;
|
$xTimer = 170;
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $sWhen, $black);
|
$sWhen = $estimated + $when;
|
||||||
|
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 )) {
|
||||||
$xTimer = 80;
|
//this event is exactly at starting
|
||||||
$sWhen = $estimated + $when;
|
$xTimer = 80;
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $sWhen, $black);
|
$sWhen = $estimated + $when;
|
||||||
|
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//when is positive and the event occurs after, then this event will occurs
|
//when is positive and the event occurs after, then this event will occurs
|
||||||
if ( $when > 0 && $o == 'a' ) {
|
if ($when > 0 && $o == 'a') {
|
||||||
$xTimer = 270;
|
$xTimer = 270;
|
||||||
$sWhen = $estimated + $when;
|
$sWhen = $estimated + $when;
|
||||||
imagestring ($im, 2, $xTimer -4 , $h -16, $sWhen, $black);
|
imagestring( $im, 2, $xTimer - 4, $h - 16, $sWhen, $black );
|
||||||
}
|
}
|
||||||
|
|
||||||
//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);
|
if ($when == 0) {
|
||||||
}
|
$xTimer = ($o == 's') ? 80 : 220;
|
||||||
|
}
|
||||||
|
|
||||||
if ( $when == 0 ) {
|
if ($s == 'a') {
|
||||||
$xTimer = ( $o == 's' ) ? 80: 220 ;
|
drawTimerEvent( $im, $xTimer, $h - 70, $h - 15 );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $s == 'a' ) {
|
header( "Content-Type: image/png" );
|
||||||
drawTimerEvent ( $im, $xTimer, $h -70 , $h -15);
|
imagepng( $im );
|
||||||
}
|
die();
|
||||||
|
|
||||||
header("Content-Type: image/png");
|
|
||||||
imagepng($im);
|
|
||||||
die;
|
|
||||||
|
|||||||
@@ -12,29 +12,27 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_FACTORY"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
|
||||||
require_once('classes/model/Triggers.php');
|
return $RBAC_Response;
|
||||||
$oTrigger = new Triggers();
|
|
||||||
if ($_POST['form']['TRI_UID'] != '')
|
|
||||||
{
|
|
||||||
$oTrigger->load($_POST['form']['TRI_UID']);
|
|
||||||
}
|
}
|
||||||
else
|
require_once ('classes/model/Triggers.php');
|
||||||
{
|
$oTrigger = new Triggers();
|
||||||
$oTrigger->create($_POST['form']);
|
if ($_POST['form']['TRI_UID'] != '') {
|
||||||
$_POST['form']['TRI_UID']=$oTrigger->getTriUid();
|
$oTrigger->load( $_POST['form']['TRI_UID'] );
|
||||||
|
} else {
|
||||||
|
$oTrigger->create( $_POST['form'] );
|
||||||
|
$_POST['form']['TRI_UID'] = $oTrigger->getTriUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
$oTrigger->update($_POST['form']);
|
$oTrigger->update( $_POST['form'] );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,59 +12,58 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$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();
|
||||||
$configPage = $c->getConfiguration('groupList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
$configPage = $c->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
$configEnv = $c->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||||
|
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addExtJsScript('groups/groupsList', false); //adding a javascript file .js
|
$oHeadPublisher->addExtJsScript( 'groups/groupsList', false ); //adding a javascript file .js
|
||||||
$oHeadPublisher->addContent('groups/groupsList'); //adding a html file .html.
|
$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');
|
|
||||||
?>
|
|
||||||
@@ -12,65 +12,64 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$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();
|
||||||
|
|
||||||
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
|
|
||||||
|
$oHeadPublisher->addExtJsScript( 'groups/groupsMembers', false ); //adding a javascript file .js
|
||||||
|
$oHeadPublisher->addContent( 'groups/groupsMembers' ); //adding a html file .html.
|
||||||
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$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') );
|
||||||
|
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
G::LoadClass( 'groups' );
|
||||||
|
|
||||||
$oHeadPublisher->addExtJsScript('groups/groupsMembers', false); //adding a javascript file .js
|
|
||||||
$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'));
|
|
||||||
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroup = new Groupwf();
|
$oGroup = new Groupwf();
|
||||||
$oGroup->load($_REQUEST['GRP_UID']);
|
$oGroup->load( $_REQUEST['GRP_UID'] );
|
||||||
|
|
||||||
$groups['GRP_UID'] = $_REQUEST['GRP_UID'];
|
$groups['GRP_UID'] = $_REQUEST['GRP_UID'];
|
||||||
$groups['GRP_TITLE'] = $oGroup->getGrpTitle();
|
$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' );
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,46 +12,47 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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) {
|
||||||
G::LoadClass('groups');
|
return $RBAC_Response;
|
||||||
$oGroups = new Groups();
|
}
|
||||||
$oGroup = new Groupwf();
|
G::LoadClass( 'groups' );
|
||||||
$aFields = $oGroup->load($_GET['UID']);
|
$oGroups = new Groups();
|
||||||
$G_PUBLISH = new Publisher();
|
$oGroup = new Groupwf();
|
||||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
|
$aFields = $oGroup->load( $_GET['UID'] );
|
||||||
$G_PUBLISH->AddContent('propeltable', 'groups/paged-table', 'groups/groups_AvailableUsers', $oGroups->getAvailableUsersCriteria($_GET['UID']));
|
$G_PUBLISH = new Publisher();
|
||||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_SelectUsers','', '','save' );
|
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
|
||||||
G::RenderPage('publish', 'raw');
|
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table', 'groups/groups_AvailableUsers', $oGroups->getAvailableUsersCriteria( $_GET['UID'] ) );
|
||||||
|
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_SelectUsers','', '','save' );
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
|
||||||
|
|||||||
@@ -12,339 +12,320 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||||
G::LoadInclude('ajax');
|
return $RBAC_Response;
|
||||||
$_POST['action'] = get_ajax_value('action');
|
|
||||||
|
|
||||||
switch ($_POST['action'])
|
|
||||||
{
|
|
||||||
case 'showUsers':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroups = new Groups();
|
|
||||||
$oGroup = new Groupwf();
|
|
||||||
$aFields = $oGroup->load($_POST['sGroupUID']);
|
|
||||||
global $G_PUBLISH;
|
|
||||||
$G_PUBLISH = new Publisher();
|
|
||||||
//$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']));
|
|
||||||
|
|
||||||
$oHeadPublisher =& headPublisher::getSingleton();
|
|
||||||
$oHeadPublisher->addScriptCode("groupname=\"{$aFields["GRP_TITLE"]}\";");
|
|
||||||
|
|
||||||
G::RenderPage('publish', 'raw');
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'assignUser':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroup = new Groups();
|
|
||||||
$oGroup->addUserToGroup($_POST['GRP_UID'], $_POST['USR_UID']);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'assignAllUsers':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroup = new Groups();
|
|
||||||
$aUsers=explode(',', $_POST['aUsers']);
|
|
||||||
|
|
||||||
for($i=0; $i<count($aUsers); $i++)
|
|
||||||
{
|
|
||||||
$oGroup->addUserToGroup($_POST['GRP_UID'], $aUsers[$i]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'ofToAssignUser':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroup = new Groups();
|
|
||||||
$oGroup->removeUserOfGroup($_POST['GRP_UID'], $_POST['USR_UID']);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'verifyGroupname':
|
|
||||||
$_POST['sOriginalGroupname'] = get_ajax_value('sOriginalGroupname');
|
|
||||||
$_POST['sGroupname'] = get_ajax_value('sGroupname');
|
|
||||||
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname'])
|
|
||||||
{
|
|
||||||
echo '0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
require_once 'classes/model/Groupwf.php';
|
|
||||||
G::LoadClass('Groupswf');
|
|
||||||
$oGroup = new Groupwf();
|
|
||||||
$oCriteria=$oGroup->loadByGroupname($_POST['sGroupname']);
|
|
||||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$oDataset->next();
|
|
||||||
$aRow = $oDataset->getRow();
|
|
||||||
if (!$aRow)
|
|
||||||
{
|
|
||||||
echo '0';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo '1';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'groupsList':
|
|
||||||
require_once 'classes/model/Groupwf.php';
|
|
||||||
require_once 'classes/model/TaskUser.php';
|
|
||||||
require_once 'classes/model/GroupUser.php';
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
$co = new Configurations();
|
|
||||||
$config = $co->getConfiguration('groupList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
|
||||||
$env = $co->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
|
||||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
|
||||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
|
||||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
|
||||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
|
||||||
|
|
||||||
global $RBAC;
|
|
||||||
if ($limit == $start) $limit = $limit +$limit ;
|
|
||||||
$tasks = new TaskUser();
|
|
||||||
$aTask = $tasks->getCountAllTaksByGroups();
|
|
||||||
|
|
||||||
$members = new GroupUser();
|
|
||||||
$aMembers = $members->getCountAllUsersByGroup();
|
|
||||||
|
|
||||||
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
|
||||||
$uxList = adminProxy::getUxTypesList();
|
|
||||||
|
|
||||||
$groups = new Groupwf();
|
|
||||||
$data = $groups->getAllGroup($start,$limit,$filter);
|
|
||||||
$result = $data['rows'];
|
|
||||||
|
|
||||||
$totalRows = 0;
|
|
||||||
$arrData = array();
|
|
||||||
foreach ($result as $results) {
|
|
||||||
$totalRows ++;
|
|
||||||
$results['CON_VALUE'] = str_replace(array("<", ">"), array("<", ">"), $results['GRP_TITLE']);
|
|
||||||
$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;
|
|
||||||
$arrData[] = $results;
|
|
||||||
}
|
|
||||||
|
|
||||||
$result = new StdClass();
|
|
||||||
$result->success = true;
|
|
||||||
$result->groups = $arrData;
|
|
||||||
$result->total_groups = $data['totalCount'];
|
|
||||||
|
|
||||||
echo G::json_encode($result);
|
|
||||||
break;
|
|
||||||
case 'exitsGroupName':
|
|
||||||
require_once 'classes/model/Groupwf.php';
|
|
||||||
G::LoadClass('Groupswf');
|
|
||||||
$oGroup = new Groupwf();
|
|
||||||
$oCriteria=$oGroup->loadByGroupname($_POST['GRP_NAME']);
|
|
||||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$oDataset->next();
|
|
||||||
$aRow = $oDataset->getRow();
|
|
||||||
$response = ($aRow) ? 'true' : 'false';
|
|
||||||
echo $response;
|
|
||||||
break;
|
|
||||||
case 'saveNewGroup':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$newGroup['GRP_UID'] = '';
|
|
||||||
$newGroup['GRP_STATUS'] = G::toUpper($_POST['status']);
|
|
||||||
$newGroup['GRP_TITLE'] = trim($_POST['name']);
|
|
||||||
unset($newGroup['GRP_UID']);
|
|
||||||
$group = new Groupwf();
|
|
||||||
$group->create($newGroup);
|
|
||||||
echo '{success: true}';
|
|
||||||
break;
|
|
||||||
case 'saveEditGroup':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$editGroup['GRP_UID'] = $_POST['grp_uid'];
|
|
||||||
$editGroup['GRP_STATUS'] = G::toUpper($_POST['status']);
|
|
||||||
$editGroup['GRP_TITLE'] = trim($_POST['name']);
|
|
||||||
$group = new Groupwf();
|
|
||||||
$group->update($editGroup);
|
|
||||||
echo '{success: true}';
|
|
||||||
break;
|
|
||||||
case 'deleteGroup':
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$group = new Groupwf();
|
|
||||||
if (!isset($_POST['GRP_UID'])) return;
|
|
||||||
$group->remove(urldecode($_POST['GRP_UID']));
|
|
||||||
require_once 'classes/model/TaskUser.php';
|
|
||||||
$oProcess = new TaskUser();
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->add(TaskUserPeer::USR_UID, $_POST['GRP_UID']);
|
|
||||||
TaskUserPeer::doDelete($oCriteria);
|
|
||||||
echo '{success: true}';
|
|
||||||
break;
|
|
||||||
case 'assignedMembers':
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
require_once 'classes/model/GroupUser.php';
|
|
||||||
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
$co = new Configurations();
|
|
||||||
$config = $co->getConfiguration('groupList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
|
||||||
$env = $co->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
|
||||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
|
||||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
|
||||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
|
||||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
|
||||||
|
|
||||||
$sGroupUID = $_REQUEST['gUID'];
|
|
||||||
|
|
||||||
$aUsers = Array();
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
|
|
||||||
$oCriteria->addJoin(GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
|
||||||
$oCriteria->add(GroupUserPeer::GRP_UID, $sGroupUID);
|
|
||||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
|
||||||
$filter = (isset($_POST['textFilter']))? $_POST['textFilter'] : '';
|
|
||||||
if ($filter != ''){
|
|
||||||
$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))));
|
|
||||||
}
|
|
||||||
$oDataset = UsersPeer::DoSelectRs ($oCriteria);
|
|
||||||
$oDataset->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$oDataset->next();
|
|
||||||
$row = $oDataset->getRow();
|
|
||||||
$totalRows = $row['CNT'];
|
|
||||||
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->addSelectColumn(GroupUserPeer::GRP_UID);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_STATUS);
|
|
||||||
$oCriteria->addJoin(GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
|
||||||
$oCriteria->add(GroupUserPeer::GRP_UID, $sGroupUID);
|
|
||||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
|
||||||
$filter = (isset($_POST['textFilter']))? $_POST['textFilter'] : '';
|
|
||||||
if ($filter != ''){
|
|
||||||
$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->setOffset($start);
|
|
||||||
$oCriteria->setLimit($limit);
|
|
||||||
|
|
||||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$arrData = Array();
|
|
||||||
while ($oDataset->next()){
|
|
||||||
$arrData[] = $oDataset->getRow();
|
|
||||||
}
|
|
||||||
echo '{success: true, members: '.G::json_encode($arrData).', total_users: '.$totalRows.'}';
|
|
||||||
break;
|
|
||||||
case 'availableMembers':
|
|
||||||
require_once 'classes/model/Users.php';
|
|
||||||
require_once 'classes/model/GroupUser.php';
|
|
||||||
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
$co = new Configurations();
|
|
||||||
$config = $co->getConfiguration('groupList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
|
||||||
$env = $co->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
|
||||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
|
||||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
|
||||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
|
||||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
|
||||||
|
|
||||||
$sGroupUID = $_REQUEST['gUID'];
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->addSelectColumn(GroupUserPeer::GRP_UID);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
|
||||||
$oCriteria->addJoin(GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
|
||||||
$oCriteria->add(GroupUserPeer::GRP_UID, $sGroupUID);
|
|
||||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
|
||||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$oDataset->next();
|
|
||||||
$uUIDs = array();
|
|
||||||
while ($aRow = $oDataset->getRow()) {
|
|
||||||
$uUIDs[] = $aRow['USR_UID'];
|
|
||||||
$oDataset->next();
|
|
||||||
}
|
|
||||||
|
|
||||||
$aUsers = Array();
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->addSelectColumn('COUNT(*) AS CNT');
|
|
||||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
|
||||||
$oCriteria->add(UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN);
|
|
||||||
$filter = (isset($_POST['textFilter']))? $_POST['textFilter'] : '';
|
|
||||||
if ($filter != ''){
|
|
||||||
$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))));
|
|
||||||
}
|
|
||||||
$oDataset = UsersPeer::DoSelectRs ($oCriteria);
|
|
||||||
$oDataset->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$oDataset->next();
|
|
||||||
$row = $oDataset->getRow();
|
|
||||||
$totalRows = $row['CNT'];
|
|
||||||
|
|
||||||
$oCriteria = new Criteria('workflow');
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_EMAIL);
|
|
||||||
$oCriteria->addSelectColumn(UsersPeer::USR_STATUS);
|
|
||||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
|
||||||
$oCriteria->add(UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN);
|
|
||||||
$filter = (isset($_POST['textFilter']))? $_POST['textFilter'] : '';
|
|
||||||
if ($filter != ''){
|
|
||||||
$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->setOffset($start);
|
|
||||||
$oCriteria->setLimit($limit);
|
|
||||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
|
||||||
$arrData = Array();
|
|
||||||
while ($oDataset->next()){
|
|
||||||
$arrData[] = $oDataset->getRow();
|
|
||||||
}
|
|
||||||
echo '{success: true, members: '.G::json_encode($arrData).', total_users: '.$totalRows.'}';
|
|
||||||
break;
|
|
||||||
case 'assignUsersToGroupsMultiple':
|
|
||||||
$GRP_UID = $_POST['GRP_UID'];
|
|
||||||
$uUIDs = explode(',',$_POST['USR_UID']);
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroup = new Groups();
|
|
||||||
foreach ($uUIDs as $USR_UID){
|
|
||||||
$oGroup->addUserToGroup($GRP_UID, $USR_UID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'deleteUsersToGroupsMultiple':
|
|
||||||
$GRP_UID = $_POST['GRP_UID'];
|
|
||||||
$uUIDs = explode(',',$_POST['USR_UID']);
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$oGroup = new Groups();
|
|
||||||
foreach ($uUIDs as $USR_UID){
|
|
||||||
$oGroup->removeUserOfGroup($GRP_UID, $USR_UID);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'updatePageSize':
|
|
||||||
G::LoadClass('configuration');
|
|
||||||
$c = new Configurations();
|
|
||||||
$arr['pageSize'] = $_REQUEST['size'];
|
|
||||||
$arr['dateSave'] = date('Y-m-d H:i:s');
|
|
||||||
$config = Array();
|
|
||||||
$config[] = $arr;
|
|
||||||
$c->aConfig = $config;
|
|
||||||
$c->saveConfig('groupList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
|
||||||
echo '{success: true}';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
G::LoadInclude( 'ajax' );
|
||||||
|
$_POST['action'] = get_ajax_value( 'action' );
|
||||||
|
|
||||||
|
switch ($_POST['action']) {
|
||||||
|
case 'showUsers':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$oGroups = new Groups();
|
||||||
|
$oGroup = new Groupwf();
|
||||||
|
$aFields = $oGroup->load( $_POST['sGroupUID'] );
|
||||||
|
global $G_PUBLISH;
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
//$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']) );
|
||||||
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
|
$oHeadPublisher->addScriptCode( "groupname=\"{$aFields["GRP_TITLE"]}\";" );
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
break;
|
||||||
|
case 'assignUser':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$oGroup = new Groups();
|
||||||
|
$oGroup->addUserToGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
||||||
|
break;
|
||||||
|
case 'assignAllUsers':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$oGroup = new Groups();
|
||||||
|
$aUsers = explode( ',', $_POST['aUsers'] );
|
||||||
|
for ($i = 0; $i < count( $aUsers ); $i ++) {
|
||||||
|
$oGroup->addUserToGroup( $_POST['GRP_UID'], $aUsers[$i] );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'ofToAssignUser':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$oGroup = new Groups();
|
||||||
|
$oGroup->removeUserOfGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
||||||
|
break;
|
||||||
|
case 'verifyGroupname':
|
||||||
|
$_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' );
|
||||||
|
$_POST['sGroupname'] = get_ajax_value( 'sGroupname' );
|
||||||
|
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname']) {
|
||||||
|
echo '0';
|
||||||
|
} else {
|
||||||
|
require_once 'classes/model/Groupwf.php';
|
||||||
|
G::LoadClass( 'Groupswf' );
|
||||||
|
$oGroup = new Groupwf();
|
||||||
|
$oCriteria = $oGroup->loadByGroupname( $_POST['sGroupname'] );
|
||||||
|
$oDataset = GroupwfPeer::doSelectRS( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$oDataset->next();
|
||||||
|
$aRow = $oDataset->getRow();
|
||||||
|
if (! $aRow) {
|
||||||
|
echo '0';
|
||||||
|
} else {
|
||||||
|
echo '1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'groupsList':
|
||||||
|
require_once 'classes/model/Groupwf.php';
|
||||||
|
require_once 'classes/model/TaskUser.php';
|
||||||
|
require_once 'classes/model/GroupUser.php';
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
$co = new Configurations();
|
||||||
|
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
|
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||||
|
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||||
|
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||||
|
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||||
|
|
||||||
|
global $RBAC;
|
||||||
|
if ($limit == $start) {
|
||||||
|
$limit = $limit + $limit;
|
||||||
|
}
|
||||||
|
$tasks = new TaskUser();
|
||||||
|
$aTask = $tasks->getCountAllTaksByGroups();
|
||||||
|
|
||||||
|
$members = new GroupUser();
|
||||||
|
$aMembers = $members->getCountAllUsersByGroup();
|
||||||
|
|
||||||
|
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
||||||
|
$uxList = adminProxy::getUxTypesList();
|
||||||
|
|
||||||
|
$groups = new Groupwf();
|
||||||
|
$data = $groups->getAllGroup( $start, $limit, $filter );
|
||||||
|
$result = $data['rows'];
|
||||||
|
|
||||||
|
$totalRows = 0;
|
||||||
|
$arrData = array ();
|
||||||
|
foreach ($result as $results) {
|
||||||
|
$totalRows ++;
|
||||||
|
$results['CON_VALUE'] = str_replace( array ("<",">"
|
||||||
|
), array ("<",">"
|
||||||
|
), $results['GRP_TITLE'] );
|
||||||
|
$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;
|
||||||
|
$arrData[] = $results;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = new StdClass();
|
||||||
|
$result->success = true;
|
||||||
|
$result->groups = $arrData;
|
||||||
|
$result->total_groups = $data['totalCount'];
|
||||||
|
|
||||||
|
echo G::json_encode( $result );
|
||||||
|
break;
|
||||||
|
case 'exitsGroupName':
|
||||||
|
require_once 'classes/model/Groupwf.php';
|
||||||
|
G::LoadClass( 'Groupswf' );
|
||||||
|
$oGroup = new Groupwf();
|
||||||
|
$oCriteria = $oGroup->loadByGroupname( $_POST['GRP_NAME'] );
|
||||||
|
$oDataset = GroupwfPeer::doSelectRS( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$oDataset->next();
|
||||||
|
$aRow = $oDataset->getRow();
|
||||||
|
$response = ($aRow) ? 'true' : 'false';
|
||||||
|
echo $response;
|
||||||
|
break;
|
||||||
|
case 'saveNewGroup':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$newGroup['GRP_UID'] = '';
|
||||||
|
$newGroup['GRP_STATUS'] = G::toUpper( $_POST['status'] );
|
||||||
|
$newGroup['GRP_TITLE'] = trim( $_POST['name'] );
|
||||||
|
unset( $newGroup['GRP_UID'] );
|
||||||
|
$group = new Groupwf();
|
||||||
|
$group->create( $newGroup );
|
||||||
|
echo '{success: true}';
|
||||||
|
break;
|
||||||
|
case 'saveEditGroup':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$editGroup['GRP_UID'] = $_POST['grp_uid'];
|
||||||
|
$editGroup['GRP_STATUS'] = G::toUpper( $_POST['status'] );
|
||||||
|
$editGroup['GRP_TITLE'] = trim( $_POST['name'] );
|
||||||
|
$group = new Groupwf();
|
||||||
|
$group->update( $editGroup );
|
||||||
|
echo '{success: true}';
|
||||||
|
break;
|
||||||
|
case 'deleteGroup':
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$group = new Groupwf();
|
||||||
|
if (! isset( $_POST['GRP_UID'] )) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$group->remove( urldecode( $_POST['GRP_UID'] ) );
|
||||||
|
require_once 'classes/model/TaskUser.php';
|
||||||
|
$oProcess = new TaskUser();
|
||||||
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] );
|
||||||
|
TaskUserPeer::doDelete( $oCriteria );
|
||||||
|
echo '{success: true}';
|
||||||
|
break;
|
||||||
|
case 'assignedMembers':
|
||||||
|
require_once 'classes/model/Users.php';
|
||||||
|
require_once 'classes/model/GroupUser.php';
|
||||||
|
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
$co = new Configurations();
|
||||||
|
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
|
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||||
|
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||||
|
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||||
|
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||||
|
|
||||||
|
$sGroupUID = $_REQUEST['gUID'];
|
||||||
|
|
||||||
|
$aUsers = Array ();
|
||||||
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
$oCriteria->addSelectColumn( 'COUNT(*) AS CNT' );
|
||||||
|
$oCriteria->addJoin( GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||||
|
$oCriteria->add( GroupUserPeer::GRP_UID, $sGroupUID );
|
||||||
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
|
if ($filter != '') {
|
||||||
|
$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 ) ) ) );
|
||||||
|
}
|
||||||
|
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$oDataset->next();
|
||||||
|
$row = $oDataset->getRow();
|
||||||
|
$totalRows = $row['CNT'];
|
||||||
|
|
||||||
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
$oCriteria->addSelectColumn( GroupUserPeer::GRP_UID );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_EMAIL );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_STATUS );
|
||||||
|
$oCriteria->addJoin( GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||||
|
$oCriteria->add( GroupUserPeer::GRP_UID, $sGroupUID );
|
||||||
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
|
if ($filter != '') {
|
||||||
|
$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->setOffset( $start );
|
||||||
|
$oCriteria->setLimit( $limit );
|
||||||
|
|
||||||
|
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$arrData = Array ();
|
||||||
|
while ($oDataset->next()) {
|
||||||
|
$arrData[] = $oDataset->getRow();
|
||||||
|
}
|
||||||
|
echo '{success: true, members: ' . G::json_encode( $arrData ) . ', total_users: ' . $totalRows . '}';
|
||||||
|
break;
|
||||||
|
case 'availableMembers':
|
||||||
|
require_once 'classes/model/Users.php';
|
||||||
|
require_once 'classes/model/GroupUser.php';
|
||||||
|
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
$co = new Configurations();
|
||||||
|
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||||
|
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||||
|
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||||
|
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||||
|
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||||
|
|
||||||
|
$sGroupUID = $_REQUEST['gUID'];
|
||||||
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
$oCriteria->addSelectColumn( GroupUserPeer::GRP_UID );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||||
|
$oCriteria->addJoin( GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||||
|
$oCriteria->add( GroupUserPeer::GRP_UID, $sGroupUID );
|
||||||
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
|
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$oDataset->next();
|
||||||
|
$uUIDs = array ();
|
||||||
|
while ($aRow = $oDataset->getRow()) {
|
||||||
|
$uUIDs[] = $aRow['USR_UID'];
|
||||||
|
$oDataset->next();
|
||||||
|
}
|
||||||
|
|
||||||
|
$aUsers = Array ();
|
||||||
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
$oCriteria->addSelectColumn( 'COUNT(*) AS CNT' );
|
||||||
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
|
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
|
||||||
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
|
if ($filter != '') {
|
||||||
|
$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 ) ) ) );
|
||||||
|
}
|
||||||
|
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$oDataset->next();
|
||||||
|
$row = $oDataset->getRow();
|
||||||
|
$totalRows = $row['CNT'];
|
||||||
|
|
||||||
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_EMAIL );
|
||||||
|
$oCriteria->addSelectColumn( UsersPeer::USR_STATUS );
|
||||||
|
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||||
|
$oCriteria->add( UsersPeer::USR_UID, $uUIDs, Criteria::NOT_IN );
|
||||||
|
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||||
|
if ($filter != '') {
|
||||||
|
$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->setOffset( $start );
|
||||||
|
$oCriteria->setLimit( $limit );
|
||||||
|
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||||
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$arrData = Array ();
|
||||||
|
while ($oDataset->next()) {
|
||||||
|
$arrData[] = $oDataset->getRow();
|
||||||
|
}
|
||||||
|
echo '{success: true, members: ' . G::json_encode( $arrData ) . ', total_users: ' . $totalRows . '}';
|
||||||
|
break;
|
||||||
|
case 'assignUsersToGroupsMultiple':
|
||||||
|
$GRP_UID = $_POST['GRP_UID'];
|
||||||
|
$uUIDs = explode( ',', $_POST['USR_UID'] );
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$oGroup = new Groups();
|
||||||
|
foreach ($uUIDs as $USR_UID) {
|
||||||
|
$oGroup->addUserToGroup( $GRP_UID, $USR_UID );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'deleteUsersToGroupsMultiple':
|
||||||
|
$GRP_UID = $_POST['GRP_UID'];
|
||||||
|
$uUIDs = explode( ',', $_POST['USR_UID'] );
|
||||||
|
G::LoadClass( 'groups' );
|
||||||
|
$oGroup = new Groups();
|
||||||
|
foreach ($uUIDs as $USR_UID) {
|
||||||
|
$oGroup->removeUserOfGroup( $GRP_UID, $USR_UID );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'updatePageSize':
|
||||||
|
G::LoadClass( 'configuration' );
|
||||||
|
$c = new Configurations();
|
||||||
|
$arr['pageSize'] = $_REQUEST['size'];
|
||||||
|
$arr['dateSave'] = date( 'Y-m-d H:i:s' );
|
||||||
|
$config = Array ();
|
||||||
|
$config[] = $arr;
|
||||||
|
$c->aConfig = $config;
|
||||||
|
$c->saveConfig( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||||
|
echo '{success: true}';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,53 +12,54 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$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'] ) );
|
||||||
|
|
||||||
require_once 'classes/model/TaskUser.php';
|
require_once 'classes/model/TaskUser.php';
|
||||||
$oProcess = new TaskUser();
|
$oProcess = new TaskUser();
|
||||||
|
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add(TaskUserPeer::USR_UID, $_POST['GRP_UID']);
|
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] );
|
||||||
TaskUserPeer::doDelete($oCriteria);
|
TaskUserPeer::doDelete( $oCriteria );
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -12,59 +12,54 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
$access = $RBAC->userCanAccess('PM_USERS');
|
if ($access != 1) {
|
||||||
if( $access != 1 ){
|
switch ($access) {
|
||||||
switch ($access)
|
case - 1:
|
||||||
{
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
case -1:
|
G::header( 'location: ../login/login' );
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
die();
|
||||||
G::header('location: ../login/login');
|
break;
|
||||||
die;
|
case - 2:
|
||||||
break;
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
case -2:
|
G::header( 'location: ../login/login' );
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
die();
|
||||||
G::header('location: ../login/login');
|
break;
|
||||||
die;
|
default:
|
||||||
break;
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
default:
|
G::header( 'location: ../login/login' );
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
die();
|
||||||
G::header('location: ../login/login');
|
break;
|
||||||
die;
|
}
|
||||||
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' );
|
||||||
|
|
||||||
$dbc = new DBConnection();
|
$dbc = new DBConnection();
|
||||||
$ses = new DBSession($dbc);
|
$ses = new DBSession( $dbc );
|
||||||
|
|
||||||
$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 {
|
||||||
}
|
$aFields = array ();
|
||||||
else
|
}
|
||||||
{
|
$G_PUBLISH = new Publisher();
|
||||||
$aFields=array();
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'groups/groups_Edit', '', $aFields, 'groups_Save' );
|
||||||
}
|
|
||||||
$G_PUBLISH = new Publisher();
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_Edit', '', $aFields , 'groups_Save');
|
|
||||||
|
|
||||||
G::RenderPage( "publish" , "raw" );
|
G::RenderPage( "publish", "raw" );
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -12,44 +12,44 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||||
$access = $RBAC->userCanAccess('PM_USERS');
|
if ($access != 1) {
|
||||||
if( $access != 1 ){
|
switch ($access) {
|
||||||
switch ($access)
|
case - 1:
|
||||||
{
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
case -1:
|
G::header( 'location: ../login/login' );
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
die();
|
||||||
G::header('location: ../login/login');
|
break;
|
||||||
die;
|
case - 2:
|
||||||
break;
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
|
||||||
case -2:
|
G::header( 'location: ../login/login' );
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
die();
|
||||||
G::header('location: ../login/login');
|
break;
|
||||||
die;
|
default:
|
||||||
break;
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||||
default:
|
G::header( 'location: ../login/login' );
|
||||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
die();
|
||||||
G::header('location: ../login/login');
|
break;
|
||||||
die;
|
}
|
||||||
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->AddContent( 'view', 'groups/groups_Tree' );
|
||||||
|
G::RenderPage( "publish-raw", "raw" );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
|
||||||
$G_PUBLISH->AddContent( 'view', 'groups/groups_Tree' );
|
|
||||||
G::RenderPage( "publish-raw" , "raw" );
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,58 +12,54 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$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' );
|
||||||
|
|
||||||
$G_MAIN_MENU = 'wf.login';
|
$G_MAIN_MENU = 'wf.login';
|
||||||
$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']);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -12,18 +12,20 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
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' );
|
||||||
|
$groups = new Groups();
|
||||||
|
$groups->addUserToGroup( $_GET['GRP_UID'], $_POST['form']['USR_UID'] );
|
||||||
|
|
||||||
G::LoadClass('groups');
|
|
||||||
$groups = new Groups;
|
|
||||||
$groups->addUserToGroup( $_GET['GRP_UID'], $_POST['form']['USR_UID'] );
|
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -20,7 +21,7 @@ BEGIN
|
|||||||
IF ( @APP_TITLE IS NULL ) THEN
|
IF ( @APP_TITLE IS NULL ) THEN
|
||||||
SET @APP_TITLE = '';
|
SET @APP_TITLE = '';
|
||||||
END IF;
|
END IF;
|
||||||
SELECT CONTENT.CON_VALUE into @APP_PRO_TITLE FROM CONTENT WHERE NEW.PRO_UID=CON_ID AND CON_CATEGORY='PRO_TITLE' and CON_LANG = '{lang}' LIMIT 1;
|
SELECT CONTENT.CON_VALUE into @APP_PRO_TITLE FROM CONTENT WHERE NEW.PRO_UID=CON_ID AND CON_CATEGORY='PRO_TITLE' and CON_LANG = '{lang}' LIMIT 1;
|
||||||
SELECT CONTENT.CON_VALUE into @APP_TAS_TITLE FROM CONTENT WHERE NEW.TAS_UID=CON_ID AND CON_CATEGORY='TAS_TITLE' and CON_LANG = '{lang}' LIMIT 1;
|
SELECT CONTENT.CON_VALUE into @APP_TAS_TITLE FROM CONTENT WHERE NEW.TAS_UID=CON_ID AND CON_CATEGORY='TAS_TITLE' and CON_LANG = '{lang}' LIMIT 1;
|
||||||
SELECT CONCAT(USERS.USR_LASTNAME, ' ', USERS.USR_FIRSTNAME) INTO @APP_CURRENT_USER FROM USERS WHERE USR_UID = NEW.USR_UID LIMIT 1;
|
SELECT CONCAT(USERS.USR_LASTNAME, ' ', USERS.USR_FIRSTNAME) INTO @APP_CURRENT_USER FROM USERS WHERE USR_UID = NEW.USR_UID LIMIT 1;
|
||||||
IF ( @APP_CURRENT_USER IS NULL ) THEN
|
IF ( @APP_CURRENT_USER IS NULL ) THEN
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -12,109 +12,102 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Authentication for Case Tracker
|
* Authentication for Case Tracker
|
||||||
*
|
*
|
||||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
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 {
|
||||||
$frm = $_POST['form'];
|
$frm = $_POST['form'];
|
||||||
$case = '';
|
$case = '';
|
||||||
$pin = '';
|
$pin = '';
|
||||||
|
|
||||||
if (isset($frm['CASE'])) {
|
if (isset( $frm['CASE'] )) {
|
||||||
$case = strtolower(trim($frm['CASE']));
|
$case = strtolower( trim( $frm['CASE'] ) );
|
||||||
$pin = trim($frm['PIN']);
|
$pin = trim( $frm['PIN'] );
|
||||||
}
|
|
||||||
|
|
||||||
G::LoadClass('case');
|
|
||||||
$cases = new Cases();
|
|
||||||
|
|
||||||
$uid = $cases->verifyCaseTracker($case, $pin);
|
|
||||||
switch ($uid) {
|
|
||||||
//The case doesn't exist
|
|
||||||
case -1:
|
|
||||||
G::SendTemporalMessage ('ID_CASE_NOT_EXISTS', "error");
|
|
||||||
break;
|
|
||||||
//The pin is invalid
|
|
||||||
case -2:
|
|
||||||
G::SendTemporalMessage ('ID_PIN_INVALID', "error");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($uid < 0 ) {
|
|
||||||
G::header ("location: login.php");
|
|
||||||
die;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(is_array($uid))
|
|
||||||
{
|
|
||||||
require_once ("classes/model/CaseTracker.php");
|
|
||||||
require_once ("classes/model/CaseTrackerObject.php");
|
|
||||||
$_SESSION['CASE'] = $case;
|
|
||||||
$_SESSION['PIN'] = $pin;
|
|
||||||
$_SESSION['PROCESS'] = $uid['PRO_UID'];
|
|
||||||
$_SESSION['APPLICATION'] = $uid['APP_UID'];
|
|
||||||
$_SESSION['TASK'] = -1;
|
|
||||||
$_SESSION['INDEX'] = -1;
|
|
||||||
|
|
||||||
$criteria = new Criteria();
|
|
||||||
$criteria->add(CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS']);
|
|
||||||
$caseTracker = new CaseTracker();
|
|
||||||
if (CaseTrackerPeer::doCount($criteria) === 0) {
|
|
||||||
$permissionsCaseTracker = array('PRO_UID' => $_SESSION['PROCESS'],
|
|
||||||
'CT_MAP_TYPE' => 'PROCESSMAP',
|
|
||||||
'CT_DERIVATION_HISTORY' => 1,
|
|
||||||
'CT_MESSAGE_HISTORY' => 1);
|
|
||||||
$caseTracker->create($permissionsCaseTracker);
|
|
||||||
}
|
}
|
||||||
$caseTracker = $cases->caseTrackerPermissions( $_SESSION['PROCESS']);
|
|
||||||
|
|
||||||
if ($caseTracker['CT_MAP_TYPE']) {
|
G::LoadClass( 'case' );
|
||||||
G::header ('location: tracker_ViewMap');
|
$cases = new Cases();
|
||||||
|
|
||||||
|
$uid = $cases->verifyCaseTracker( $case, $pin );
|
||||||
|
switch ($uid) {
|
||||||
|
//The case doesn't exist
|
||||||
|
case - 1:
|
||||||
|
G::SendTemporalMessage( 'ID_CASE_NOT_EXISTS', "error" );
|
||||||
|
break;
|
||||||
|
//The pin is invalid
|
||||||
|
case - 2:
|
||||||
|
G::SendTemporalMessage( 'ID_PIN_INVALID', "error" );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if ($caseTracker['DYNADOC']) {
|
if ($uid < 0) {
|
||||||
G::header ("location: tracker_DynaDocs");
|
G::header( "location: login.php" );
|
||||||
}
|
die();
|
||||||
else {
|
}
|
||||||
if ($caseTracker['CT_DERIVATION_HISTORY']) {
|
|
||||||
G::header ("location: tracker_History");
|
if (is_array( $uid )) {
|
||||||
|
require_once ("classes/model/CaseTracker.php");
|
||||||
|
require_once ("classes/model/CaseTrackerObject.php");
|
||||||
|
$_SESSION['CASE'] = $case;
|
||||||
|
$_SESSION['PIN'] = $pin;
|
||||||
|
$_SESSION['PROCESS'] = $uid['PRO_UID'];
|
||||||
|
$_SESSION['APPLICATION'] = $uid['APP_UID'];
|
||||||
|
$_SESSION['TASK'] = - 1;
|
||||||
|
$_SESSION['INDEX'] = - 1;
|
||||||
|
|
||||||
|
$criteria = new Criteria();
|
||||||
|
$criteria->add( CaseTrackerPeer::PRO_UID, $_SESSION['PROCESS'] );
|
||||||
|
$caseTracker = new CaseTracker();
|
||||||
|
if (CaseTrackerPeer::doCount( $criteria ) === 0) {
|
||||||
|
$permissionsCaseTracker = array ('PRO_UID' => $_SESSION['PROCESS'],'CT_MAP_TYPE' => 'PROCESSMAP','CT_DERIVATION_HISTORY' => 1,'CT_MESSAGE_HISTORY' => 1
|
||||||
|
);
|
||||||
|
$caseTracker->create( $permissionsCaseTracker );
|
||||||
}
|
}
|
||||||
else {
|
$caseTracker = $cases->caseTrackerPermissions( $_SESSION['PROCESS'] );
|
||||||
if ($caseTracker['CT_MESSAGE_HISTORY']) {
|
|
||||||
G::header ("location: tracker_No");
|
if ($caseTracker['CT_MAP_TYPE']) {
|
||||||
}
|
G::header( 'location: tracker_ViewMap' );
|
||||||
else {
|
} else {
|
||||||
G::header ("location: login.php");
|
if ($caseTracker['DYNADOC']) {
|
||||||
G::SendTemporalMessage ('ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error");
|
G::header( "location: tracker_DynaDocs" );
|
||||||
}
|
} else {
|
||||||
|
if ($caseTracker['CT_DERIVATION_HISTORY']) {
|
||||||
|
G::header( "location: tracker_History" );
|
||||||
|
} else {
|
||||||
|
if ($caseTracker['CT_MESSAGE_HISTORY']) {
|
||||||
|
G::header( "location: tracker_No" );
|
||||||
|
} else {
|
||||||
|
G::header( "location: login.php" );
|
||||||
|
G::SendTemporalMessage( 'ID_ACCOUNT_DISABLED_CONTACT_ADMIN', "error" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception $e) {
|
||||||
}
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
catch ( Exception $e ) {
|
$G_PUBLISH = new Publisher();
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
$G_PUBLISH = new Publisher;
|
G::RenderPage( 'publish' );
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
die();
|
||||||
G::RenderPage( 'publish' );
|
|
||||||
die;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* login.php
|
* login.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
@@ -12,34 +12,28 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Login for authentication of Case Tracker
|
* Login for authentication of Case Tracker
|
||||||
*
|
*
|
||||||
* @author Everth S. Berrios Morales <everth@colosa.com>
|
* @author Everth S. Berrios Morales <everth@colosa.com>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$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' );
|
||||||
|
|
||||||
G::RenderPage( "publish" );
|
G::RenderPage( "publish" );
|
||||||
session_destroy();
|
session_destroy();
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -12,58 +12,57 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
if (isset($_POST['form']['action'])) {
|
if (isset( $_POST['form']['action'] )) {
|
||||||
$_POST['action'] = $_POST['form']['action'];
|
$_POST['action'] = $_POST['form']['action'];
|
||||||
}
|
}
|
||||||
switch ($_POST['action']) {
|
switch ($_POST['action']) {
|
||||||
case 'availableCaseTrackerObjects':
|
case 'availableCaseTrackerObjects':
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->availableCaseTrackerObjects($_POST['PRO_UID']);
|
$oProcessMap->availableCaseTrackerObjects( $_POST['PRO_UID'] );
|
||||||
break;
|
break;
|
||||||
case 'assignCaseTrackerObject':
|
case 'assignCaseTrackerObject':
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$cto_UID = $oProcessMap->assignCaseTrackerObject($_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID']);
|
$cto_UID = $oProcessMap->assignCaseTrackerObject( $_POST['PRO_UID'], $_POST['OBJECT_TYPE'], $_POST['OBJECT_UID'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
echo $cto_UID;
|
echo $cto_UID;
|
||||||
break;
|
break;
|
||||||
case 'removeCaseTrackerObject':
|
case 'removeCaseTrackerObject':
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->removeCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
|
$oProcessMap->removeCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
break;
|
break;
|
||||||
case 'upCaseTrackerObject':
|
case 'upCaseTrackerObject':
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->upCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
|
$oProcessMap->upCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
break;
|
break;
|
||||||
case 'downCaseTrackerObject':
|
case 'downCaseTrackerObject':
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
$oProcessMap = new ProcessMap();
|
$oProcessMap = new ProcessMap();
|
||||||
$oProcessMap->downCaseTrackerObject($_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION']);
|
$oProcessMap->downCaseTrackerObject( $_POST['CTO_UID'], $_POST['PRO_UID'], $_POST['STEP_POSITION'] );
|
||||||
$oProcessMap->getCaseTrackerObjectsCriteria($_POST['PRO_UID']);
|
$oProcessMap->getCaseTrackerObjectsCriteria( $_POST['PRO_UID'] );
|
||||||
break;
|
break;
|
||||||
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( '
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Sm=new stagesmap();
|
Sm=new stagesmap();
|
||||||
Sm.options = {
|
Sm.options = {
|
||||||
@@ -77,366 +76,361 @@ try {
|
|||||||
rw : true,
|
rw : true,
|
||||||
hideMenu : false
|
hideMenu : false
|
||||||
};
|
};
|
||||||
Sm.make();');
|
Sm.make();' );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'showUploadedDocumentTracker':
|
case 'showUploadedDocumentTracker':
|
||||||
require_once 'classes/model/AppDocument.php';
|
require_once 'classes/model/AppDocument.php';
|
||||||
require_once 'classes/model/AppDelegation.php';
|
require_once 'classes/model/AppDelegation.php';
|
||||||
require_once 'classes/model/InputDocument.php';
|
require_once 'classes/model/InputDocument.php';
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
$oAppDocument->Fields = $oAppDocument->load($_POST['APP_DOC_UID']);
|
$oAppDocument->Fields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||||
|
|
||||||
$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');
|
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX'] );
|
||||||
$oCriteria->add(AppDelegationPeer::DEL_INDEX, $oAppDocument->Fields['DEL_INDEX']);
|
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->next();
|
||||||
$oDataset->next();
|
$aRow = $oDataset->getRow();
|
||||||
$aRow = $oDataset->getRow();
|
$oTask = new Task();
|
||||||
$oTask = new Task();
|
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||||
$aTask = $oTask->load($aRow['TAS_UID']);
|
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||||
$Fields['ORIGIN'] = $aTask['TAS_TITLE'];
|
$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':
|
||||||
{
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
|
||||||
case 'REAL':
|
break;
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument2';
|
case 'VIRTUAL':
|
||||||
break;
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
|
||||||
case 'VIRTUAL':
|
break;
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument1';
|
case 'VREAL':
|
||||||
break;
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
|
||||||
case 'VREAL':
|
break;
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument3';
|
default:
|
||||||
break;
|
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
|
||||||
default:
|
break;
|
||||||
$sXmlForm = 'tracker/tracker_ViewAnyInputDocument';
|
}
|
||||||
break;
|
$oAppDocument->Fields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||||
}
|
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . rand();
|
||||||
$oAppDocument->Fields['VIEW'] = G::LoadTranslation('ID_OPEN');
|
|
||||||
$oAppDocument->Fields['FILE'] = 'tracker_ShowDocument?a=' . $_POST['APP_DOC_UID'] . '&r=' . 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();
|
||||||
$filesPluginArray=$oPluginRegistry->executeTriggers ( PM_CASE_DOCUMENT_LIST_ARR , $_SESSION['APPLICATION'] );
|
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $_SESSION['APPLICATION'] );
|
||||||
//Now search for the file, if exists the change the download URL
|
//Now search for the file, if exists the change the download URL
|
||||||
foreach($filesPluginArray as $file){
|
foreach ($filesPluginArray as $file) {
|
||||||
if($file->filename==$_POST['APP_DOC_UID']){
|
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||||
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
$oAppDocument->Fields['FILE'] = $file->downloadScript;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $sXmlForm, '', G::array_merges( $Fields, $oAppDocument->Fields ), '' );
|
||||||
|
G::RenderPage( 'publish', 'raw' );
|
||||||
|
break;
|
||||||
|
case 'showGeneratedDocumentTracker':
|
||||||
|
require_once 'classes/model/AppDocument.php';
|
||||||
|
require_once 'classes/model/AppDelegation.php';
|
||||||
|
$oAppDocument = new AppDocument();
|
||||||
|
$aFields = $oAppDocument->load( $_POST['APP_DOC_UID'] );
|
||||||
|
require_once 'classes/model/OutputDocument.php';
|
||||||
|
$oOutputDocument = new OutputDocument();
|
||||||
|
$aOD = $oOutputDocument->load( $aFields['DOC_UID'] );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher;
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', G::array_merges($Fields, $oAppDocument->Fields), '');
|
$oCriteria->add( AppDelegationPeer::APP_UID, $aFields['APP_UID'] );
|
||||||
G::RenderPage('publish', 'raw');
|
$oCriteria->add( AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX'] );
|
||||||
break;
|
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
|
||||||
case 'showGeneratedDocumentTracker':
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
require_once 'classes/model/AppDocument.php';
|
$oDataset->next();
|
||||||
require_once 'classes/model/AppDelegation.php';
|
$aRow = $oDataset->getRow();
|
||||||
$oAppDocument = new AppDocument();
|
$oTask = new Task();
|
||||||
$aFields = $oAppDocument->load($_POST['APP_DOC_UID']);
|
$aTask = $oTask->load( $aRow['TAS_UID'] );
|
||||||
require_once 'classes/model/OutputDocument.php';
|
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
|
||||||
$oOutputDocument = new OutputDocument();
|
require_once 'classes/model/Users.php';
|
||||||
$aOD = $oOutputDocument->load($aFields['DOC_UID']);
|
$oUser = new Users();
|
||||||
|
$aUser = $oUser->load( $aFields['USR_UID'] );
|
||||||
|
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||||
|
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||||
|
$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();
|
||||||
|
|
||||||
$oCriteria = new Criteria('workflow');
|
//If plugin and trigger are defined for listing
|
||||||
$oCriteria->add(AppDelegationPeer::APP_UID, $aFields['APP_UID']);
|
if ($oPluginRegistry->existsTrigger( PM_CASE_DOCUMENT_LIST_ARR )) {
|
||||||
$oCriteria->add(AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX']);
|
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||||
$oDataset = AppDelegationPeer::doSelectRS($oCriteria);
|
$filesPluginArray = $oPluginRegistry->executeTriggers( PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID'] );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
//Now search for the file, if exists the change the download URL
|
||||||
$oDataset->next();
|
foreach ($filesPluginArray as $file) {
|
||||||
$aRow = $oDataset->getRow();
|
if ($file->filename == $_POST['APP_DOC_UID']) {
|
||||||
$oTask = new Task();
|
$aFields['FILE2'] = $file->downloadScript; // The PDF is the only one uploaded to KT
|
||||||
$aTask = $oTask->load($aRow['TAS_UID']);
|
}
|
||||||
$aFields['ORIGIN'] = $aTask['TAS_TITLE'];
|
}
|
||||||
require_once 'classes/model/Users.php';
|
}
|
||||||
$oUser = new Users();
|
|
||||||
$aUser = $oUser->load($aFields['USR_UID']);
|
|
||||||
$aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
|
||||||
$aFields['VIEW'] = G::LoadTranslation('ID_OPEN');
|
|
||||||
$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();
|
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
//If plugin and trigger are defined for listing
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges( $aOD, $aFields ), '' );
|
||||||
if ( $oPluginRegistry->existsTrigger ( PM_CASE_DOCUMENT_LIST_ARR ) ) {
|
G::RenderPage( 'publish', 'raw' );
|
||||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
break;
|
||||||
$filesPluginArray=$oPluginRegistry->executeTriggers ( PM_CASE_DOCUMENT_LIST_ARR , $aFields['APP_UID'] );
|
case 'load':
|
||||||
//Now search for the file, if exists the change the download URL
|
$oConnection = Propel::getConnection( 'workflow' );
|
||||||
foreach($filesPluginArray as $file){
|
$oStatement = $oConnection->prepareStatement( "CREATE TABLE IF NOT EXISTS `STAGE` (
|
||||||
if($file->filename==$_POST['APP_DOC_UID']){
|
|
||||||
$aFields['FILE2'] = $file->downloadScript;// The PDF is the only one uploaded to KT
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_ViewAnyOutputDocument', '', G::array_merges($aOD, $aFields), '');
|
|
||||||
G::RenderPage('publish', 'raw');
|
|
||||||
break;
|
|
||||||
case 'load':
|
|
||||||
$oConnection = Propel::getConnection('workflow');
|
|
||||||
$oStatement = $oConnection->prepareStatement("CREATE TABLE IF NOT EXISTS `STAGE` (
|
|
||||||
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
`STG_UID` VARCHAR( 32 ) NOT NULL ,
|
||||||
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
`PRO_UID` VARCHAR( 32 ) NOT NULL ,
|
||||||
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
`STG_POSX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||||
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
`STG_POSY` INT( 11 ) NOT NULL DEFAULT '0',
|
||||||
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
`STG_INDEX` INT( 11 ) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY ( `STG_UID` )
|
PRIMARY KEY ( `STG_UID` )
|
||||||
);");
|
);" );
|
||||||
$oStatement->executeQuery();
|
$oStatement->executeQuery();
|
||||||
/***************************************************************************************************************/
|
/**
|
||||||
require_once 'classes/model/Stage.php';
|
* ************************************************************************************************************
|
||||||
require_once 'classes/model/Process.php';
|
*/
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Stage.php';
|
||||||
require_once 'classes/model/AppDelegation.php';
|
require_once 'classes/model/Process.php';
|
||||||
$oJSON = new Services_JSON();
|
require_once 'classes/model/Task.php';
|
||||||
$oData = $oJSON->decode(stripslashes($_POST['data']));
|
require_once 'classes/model/AppDelegation.php';
|
||||||
$oProcess = new Process();
|
$oJSON = new Services_JSON();
|
||||||
$aRow = $oProcess->load($oData->uid);
|
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
|
||||||
$oSM->title->label = strip_tags($aRow['PRO_TITLE']);
|
$oProcess = new Process();
|
||||||
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
$aRow = $oProcess->load( $oData->uid );
|
||||||
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
$oSM->title->label = strip_tags( $aRow['PRO_TITLE'] );
|
||||||
$oSM->title->position->x = 10;
|
//$oSM->title->position->x = $aRow['PRO_TITLE_X'];
|
||||||
$oSM->title->position->y = 10;
|
//$oSM->title->position->y = $aRow['PRO_TITLE_Y'];
|
||||||
$oSM->stages = array();
|
$oSM->title->position->x = 10;
|
||||||
$oCriteria = new Criteria('workflow');
|
$oSM->title->position->y = 10;
|
||||||
$oCriteria->addSelectColumn(StagePeer::STG_UID);
|
$oSM->stages = array ();
|
||||||
$oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn(StagePeer::STG_POSX);
|
$oCriteria->addSelectColumn( StagePeer::STG_UID );
|
||||||
$oCriteria->addSelectColumn(StagePeer::STG_POSY);
|
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
|
||||||
$aConditions = array();
|
$oCriteria->addSelectColumn( StagePeer::STG_POSX );
|
||||||
$aConditions[] = array(0 => StagePeer::STG_UID, 1 => ContentPeer::CON_ID);
|
$oCriteria->addSelectColumn( StagePeer::STG_POSY );
|
||||||
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
|
$aConditions = array ();
|
||||||
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => StagePeer::STG_UID,1 => ContentPeer::CON_ID);
|
||||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'STG_TITLE' . DBAdapter::getStringDelimiter());
|
||||||
$oCriteria->add(StagePeer::PRO_UID, $oData->uid);
|
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
||||||
$oCriteria->addAscendingOrderByColumn(StagePeer::STG_INDEX);
|
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
||||||
$oDataset = StagePeer::doSelectRS($oCriteria);
|
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oCriteria->addAscendingOrderByColumn( StagePeer::STG_INDEX );
|
||||||
$oDataset->next();
|
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||||
while ($aRow1 = $oDataset->getRow()) {
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$oStage = null;
|
$oDataset->next();
|
||||||
$oStage->uid = $aRow1['STG_UID'];
|
while ($aRow1 = $oDataset->getRow()) {
|
||||||
$oStage->label = strip_tags($aRow1['CON_VALUE']);
|
$oStage = null;
|
||||||
$oStage->position->x = (int)$aRow1['STG_POSX'];
|
$oStage->uid = $aRow1['STG_UID'];
|
||||||
$oStage->position->y = (int)$aRow1['STG_POSY'];
|
$oStage->label = strip_tags( $aRow1['CON_VALUE'] );
|
||||||
$oStage->derivation = null;
|
$oStage->position->x = (int) $aRow1['STG_POSX'];
|
||||||
$oStage->derivation->to = array();
|
$oStage->position->y = (int) $aRow1['STG_POSY'];
|
||||||
if (!$oData->mode) {
|
$oStage->derivation = null;
|
||||||
$oCriteria = new Criteria('workflow');
|
$oStage->derivation->to = array ();
|
||||||
$oCriteria->add(TaskPeer::STG_UID, $aRow1['STG_UID']);
|
if (! $oData->mode) {
|
||||||
$oDataset1 = TaskPeer::doSelectRS($oCriteria);
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oDataset1->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oCriteria->add( TaskPeer::STG_UID, $aRow1['STG_UID'] );
|
||||||
$oDataset1->next();
|
$oDataset1 = TaskPeer::doSelectRS( $oCriteria );
|
||||||
$aTasks = array();
|
$oDataset1->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
while ($aRow2 = $oDataset1->getRow()) {
|
$oDataset1->next();
|
||||||
$aTasks[] = $aRow2['TAS_UID'];
|
$aTasks = array ();
|
||||||
$oDataset1->next();
|
while ($aRow2 = $oDataset1->getRow()) {
|
||||||
}
|
$aTasks[] = $aRow2['TAS_UID'];
|
||||||
$oCriteria = new Criteria('workflow');
|
$oDataset1->next();
|
||||||
$oCriteria->add(AppDelegationPeer::APP_UID, $_SESSION['APPLICATION']);
|
}
|
||||||
$oCriteria->add(AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN);
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL)->addOr($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, '')));
|
$oCriteria->add( AppDelegationPeer::APP_UID, $_SESSION['APPLICATION'] );
|
||||||
if (AppDelegationPeer::doCount($oCriteria) > 0) {
|
$oCriteria->add( AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN );
|
||||||
$oStage->color = '#FF0000';
|
$oCriteria->add( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL )->addOr( $oCriteria->getNewCriterion( AppDelegationPeer::DEL_FINISH_DATE, '' ) ) );
|
||||||
}
|
if (AppDelegationPeer::doCount( $oCriteria ) > 0) {
|
||||||
}
|
$oStage->color = '#FF0000';
|
||||||
$oSM->stages[] = $oStage;
|
}
|
||||||
$oDataset->next();
|
}
|
||||||
}
|
$oSM->stages[] = $oStage;
|
||||||
foreach ($oSM->stages as $iKey => $oStage) {
|
$oDataset->next();
|
||||||
if (isset($oSM->stages[$iKey + 1])) {
|
}
|
||||||
$oDerivation = new StdClass();
|
foreach ($oSM->stages as $iKey => $oStage) {
|
||||||
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
|
if (isset( $oSM->stages[$iKey + 1] )) {
|
||||||
$oSM->stages[$iKey]->derivation->to = array($oDerivation);
|
$oDerivation = new StdClass();
|
||||||
$oSM->stages[$iKey]->derivation->type = 0;
|
$oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
|
||||||
}
|
$oSM->stages[$iKey]->derivation->to = array ($oDerivation);
|
||||||
}
|
$oSM->stages[$iKey]->derivation->type = 0;
|
||||||
$oJSON = new Services_JSON();
|
}
|
||||||
echo $oJSON->encode($oSM);
|
}
|
||||||
break;
|
$oJSON = new Services_JSON();
|
||||||
case 'addStage':
|
echo $oJSON->encode( $oSM );
|
||||||
require_once 'classes/model/Stage.php';
|
break;
|
||||||
$oJSON = new Services_JSON();
|
case 'addStage':
|
||||||
$oData = $oJSON->decode(stripslashes($_POST['data']));
|
require_once 'classes/model/Stage.php';
|
||||||
$oCriteria = new Criteria('workflow');
|
$oJSON = new Services_JSON();
|
||||||
$oCriteria->addSelectColumn('STG_UID');
|
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
|
||||||
$oCriteria->add(StagePeer::PRO_UID, $oData->uid);
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oDataset = StagePeer::doSelectRS($oCriteria);
|
$oCriteria->addSelectColumn( 'STG_UID' );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oCriteria->add( StagePeer::PRO_UID, $oData->uid );
|
||||||
$oDataset->next();
|
$oDataset = StagePeer::doSelectRS( $oCriteria );
|
||||||
$aStages = array();
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
$iStageNumber = 0;
|
$oDataset->next();
|
||||||
while ($aRow = $oDataset->getRow()) {
|
$aStages = array ();
|
||||||
$aStages[] = $aRow['STG_UID'];
|
$iStageNumber = 0;
|
||||||
$iStageNumber++;
|
while ($aRow = $oDataset->getRow()) {
|
||||||
$oDataset->next();
|
$aStages[] = $aRow['STG_UID'];
|
||||||
}
|
$iStageNumber ++;
|
||||||
if ($iStageNumber == 0) {
|
$oDataset->next();
|
||||||
$iStageNumber = 1;
|
}
|
||||||
}
|
if ($iStageNumber == 0) {
|
||||||
$iIndex = $iStageNumber + 1;
|
$iStageNumber = 1;
|
||||||
$bContinue = false;
|
}
|
||||||
while (!$bContinue) {
|
$iIndex = $iStageNumber + 1;
|
||||||
$oCriteria = new Criteria('workflow');
|
$bContinue = false;
|
||||||
$oCriteria->addSelectColumn('COUNT(*) AS TIMES');
|
while (! $bContinue) {
|
||||||
$oCriteria->add(ContentPeer::CON_ID, $aStages, Criteria::IN);
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->add(ContentPeer::CON_CATEGORY, 'STG_TITLE');
|
$oCriteria->addSelectColumn( 'COUNT(*) AS TIMES' );
|
||||||
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
|
$oCriteria->add( ContentPeer::CON_ID, $aStages, Criteria::IN );
|
||||||
$oCriteria->add(ContentPeer::CON_VALUE, G::LoadTranslation('ID_STAGE') . ' ' . $iStageNumber);
|
$oCriteria->add( ContentPeer::CON_CATEGORY, 'STG_TITLE' );
|
||||||
$oDataset = ContentPeer::doSelectRS($oCriteria);
|
$oCriteria->add( ContentPeer::CON_LANG, SYS_LANG );
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oCriteria->add( ContentPeer::CON_VALUE, G::LoadTranslation( 'ID_STAGE' ) . ' ' . $iStageNumber );
|
||||||
$oDataset->next();
|
$oDataset = ContentPeer::doSelectRS( $oCriteria );
|
||||||
$aRow = $oDataset->getRow();
|
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
if ((int)$aRow['TIMES'] > 0) {
|
$oDataset->next();
|
||||||
$iStageNumber += 1;
|
$aRow = $oDataset->getRow();
|
||||||
}
|
if ((int) $aRow['TIMES'] > 0) {
|
||||||
else {
|
$iStageNumber += 1;
|
||||||
$bContinue = true;
|
} else {
|
||||||
}
|
$bContinue = true;
|
||||||
}
|
}
|
||||||
$oStage = new Stage();
|
}
|
||||||
$oNewStage->label = G::LoadTranslation('ID_STAGE') . ' ' . $iStageNumber;
|
$oStage = new Stage();
|
||||||
|
$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();
|
||||||
echo $oJSON->encode($oNewStage);
|
echo $oJSON->encode( $oNewStage );
|
||||||
break;
|
break;
|
||||||
case 'saveStagePosition':
|
case 'saveStagePosition':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
$oJSON = new Services_JSON();
|
$oJSON = new Services_JSON();
|
||||||
$oData = $oJSON->decode(stripslashes($_POST['data']));
|
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load($oData->uid);
|
$aFields = $oStage->load( $oData->uid );
|
||||||
$aFields['STG_UID'] = $oData->uid;
|
$aFields['STG_UID'] = $oData->uid;
|
||||||
$aFields['STG_POSX'] = $oData->position->x;
|
$aFields['STG_POSX'] = $oData->position->x;
|
||||||
$aFields['STG_POSY'] = $oData->position->y;
|
$aFields['STG_POSY'] = $oData->position->y;
|
||||||
$oStage->update($aFields);
|
$oStage->update( $aFields );
|
||||||
break;
|
break;
|
||||||
case 'deleteStage':
|
case 'deleteStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
$oJSON = new Services_JSON();
|
$oJSON = new Services_JSON();
|
||||||
$oData = $oJSON->decode(stripslashes($_POST['data']));
|
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load($oData->stg_uid);
|
$aFields = $oStage->load( $oData->stg_uid );
|
||||||
$oStage->remove($oData->stg_uid);
|
$oStage->remove( $oData->stg_uid );
|
||||||
$oStage->reorderPositions($aFields['PRO_UID'], $aFields['STG_INDEX']);
|
$oStage->reorderPositions( $aFields['PRO_UID'], $aFields['STG_INDEX'] );
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria1 = new Criteria('workflow');
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add(TaskPeer::STG_UID, $oData->stg_uid);
|
$oCriteria1->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||||
$oCriteria2 = new Criteria('workflow');
|
$oCriteria2 = new Criteria( 'workflow' );
|
||||||
$oCriteria2->add(TaskPeer::STG_UID, '');
|
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||||
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
|
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||||
break;
|
break;
|
||||||
case 'editStage':
|
case 'editStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
$oJSON = new Services_JSON();
|
$oJSON = new Services_JSON();
|
||||||
$oData = $oJSON->decode(stripslashes($_POST['data']));
|
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load($oData->stg_uid);
|
$aFields = $oStage->load( $oData->stg_uid );
|
||||||
$aFields['THEINDEX'] = $oData->theindex;
|
$aFields['THEINDEX'] = $oData->theindex;
|
||||||
$aFields['action'] = 'updateStage';
|
$aFields['action'] = 'updateStage';
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax');
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_StageEdit', '', $aFields, '../tracker/tracker_Ajax' );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'updateStage':
|
case 'updateStage':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
$oStage = new Stage();
|
$oStage = new Stage();
|
||||||
$aFields = $oStage->load($_POST['form']['STG_UID']);
|
$aFields = $oStage->load( $_POST['form']['STG_UID'] );
|
||||||
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
|
$aFields['STG_TITLE'] = $_POST['form']['STG_TITLE'];
|
||||||
$oStage->update($aFields);
|
$oStage->update( $aFields );
|
||||||
break;
|
break;
|
||||||
case 'tasksAssigned':
|
case 'tasksAssigned':
|
||||||
require_once 'classes/model/Stage.php';
|
require_once 'classes/model/Stage.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oJSON = new Services_JSON();
|
$oJSON = new Services_JSON();
|
||||||
$oData = $oJSON->decode(stripslashes($_POST['data']));
|
$oData = $oJSON->decode( stripslashes( $_POST['data'] ) );
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn(TaskPeer::TAS_UID);
|
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||||
$oCriteria->addAsColumn('TAS_TITLE', ContentPeer::CON_VALUE);
|
$oCriteria->addAsColumn( 'TAS_TITLE', ContentPeer::CON_VALUE );
|
||||||
$aConditions = array();
|
$aConditions = array ();
|
||||||
$aConditions[] = array(0 => TaskPeer::TAS_UID, 1 => ContentPeer::CON_ID);
|
$aConditions[] = array (0 => TaskPeer::TAS_UID,1 => ContentPeer::CON_ID);
|
||||||
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
|
||||||
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
||||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
||||||
$oCriteria->add(TaskPeer::STG_UID, $oData->stg_uid);
|
$oCriteria->add( TaskPeer::STG_UID, $oData->stg_uid );
|
||||||
$oCriteria->addAscendingOrderByColumn('TAS_TITLE');
|
$oCriteria->addAscendingOrderByColumn( 'TAS_TITLE' );
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array('PRO_UID' => $oData->pro_uid, 'STG_UID' => $oData->stg_uid));
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_StageTasks', $oCriteria, array ('PRO_UID' => $oData->pro_uid,'STG_UID' => $oData->stg_uid) );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'availableTasksForTheStage':
|
case 'availableTasksForTheStage':
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria( 'workflow' );
|
||||||
$oCriteria->addSelectColumn(TaskPeer::TAS_UID);
|
$oCriteria->addSelectColumn( TaskPeer::TAS_UID );
|
||||||
$oCriteria->addAsColumn('TAS_TITLE', ContentPeer::CON_VALUE);
|
$oCriteria->addAsColumn( 'TAS_TITLE', ContentPeer::CON_VALUE );
|
||||||
$aConditions = array();
|
$aConditions = array ();
|
||||||
$aConditions[] = array(0 => TaskPeer::TAS_UID, 1 => ContentPeer::CON_ID);
|
$aConditions[] = array (0 => TaskPeer::TAS_UID,1 => ContentPeer::CON_ID );
|
||||||
$aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => ContentPeer::CON_CATEGORY,1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
|
||||||
$aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
$aConditions[] = array (0 => ContentPeer::CON_LANG,1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
|
||||||
$oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
|
$oCriteria->addJoinMC( $aConditions, Criteria::LEFT_JOIN );
|
||||||
$oCriteria->add(TaskPeer::PRO_UID, $_POST['PRO_UID']);
|
$oCriteria->add( TaskPeer::PRO_UID, $_POST['PRO_UID'] );
|
||||||
$oCriteria->add(TaskPeer::STG_UID, '');
|
$oCriteria->add( TaskPeer::STG_UID, '' );
|
||||||
$oCriteria->addAscendingOrderByColumn('TAS_TITLE');
|
$oCriteria->addAscendingOrderByColumn( 'TAS_TITLE' );
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array('STG_UID' => $_POST['STG_UID']));
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_AvailableStageTasks', $oCriteria, array ('STG_UID' => $_POST['STG_UID']) );
|
||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage( 'publish', 'raw' );
|
||||||
break;
|
break;
|
||||||
case 'assignTaskToStage':
|
case 'assignTaskToStage':
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria1 = new Criteria('workflow');
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add(TaskPeer::TAS_UID, $_POST['TAS_UID']);
|
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||||
$oCriteria2 = new Criteria('workflow');
|
$oCriteria2 = new Criteria( 'workflow' );
|
||||||
$oCriteria2->add(TaskPeer::STG_UID, $_POST['STG_UID']);
|
$oCriteria2->add( TaskPeer::STG_UID, $_POST['STG_UID'] );
|
||||||
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
|
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||||
break;
|
break;
|
||||||
case 'removeTaskFromTheStage':
|
case 'removeTaskFromTheStage':
|
||||||
require_once 'classes/model/Task.php';
|
require_once 'classes/model/Task.php';
|
||||||
$oCriteria1 = new Criteria('workflow');
|
$oCriteria1 = new Criteria( 'workflow' );
|
||||||
$oCriteria1->add(TaskPeer::TAS_UID, $_POST['TAS_UID']);
|
$oCriteria1->add( TaskPeer::TAS_UID, $_POST['TAS_UID'] );
|
||||||
$oCriteria2 = new Criteria('workflow');
|
$oCriteria2 = new Criteria( 'workflow' );
|
||||||
$oCriteria2->add(TaskPeer::STG_UID, '');
|
$oCriteria2->add( TaskPeer::STG_UID, '' );
|
||||||
BasePeer::doUpdate($oCriteria1, $oCriteria2, Propel::getConnection('workflow'));
|
BasePeer::doUpdate( $oCriteria1, $oCriteria2, Propel::getConnection( 'workflow' ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "processMapLegend":
|
case "processMapLegend":
|
||||||
$arrayField = array();
|
$arrayField = array ();
|
||||||
$arrayField["sLabel1"] = G::LoadTranslation("ID_TASK_IN_PROGRESS");
|
$arrayField["sLabel1"] = G::LoadTranslation( "ID_TASK_IN_PROGRESS" );
|
||||||
$arrayField["sLabel2"] = G::LoadTranslation("ID_COMPLETED_TASK");
|
$arrayField["sLabel2"] = G::LoadTranslation( "ID_COMPLETED_TASK" );
|
||||||
$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) {
|
||||||
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
catch (Exception $oException) {
|
|
||||||
die($oException->getMessage());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,43 +12,40 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (!isset($_SESSION['PROCESS']))
|
if (! isset( $_SESSION['PROCESS'] )) {
|
||||||
{
|
G::header( 'location: login' );
|
||||||
G::header('location: login');
|
}
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
switch ($RBAC->userCanAccess('PM_FACTORY')) {
|
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
||||||
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';
|
||||||
$oCaseTrackerObject = new CaseTrackerObject();
|
$oCaseTrackerObject = new CaseTrackerObject();
|
||||||
$aFields = $oCaseTrackerObject->load($_GET['CTO_UID']);
|
$aFields = $oCaseTrackerObject->load( $_GET['CTO_UID'] );
|
||||||
G::LoadClass('xmlfield_InputPM');
|
G::LoadClass( 'xmlfield_InputPM' );
|
||||||
$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) {
|
||||||
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
catch (Exception $oException) {
|
|
||||||
die($oException->getMessage());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -12,46 +12,43 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
if (!isset($_SESSION['PROCESS']))
|
if (! isset( $_SESSION['PROCESS'] )) {
|
||||||
{
|
G::header( 'location: login' );
|
||||||
G::header('location: login');
|
}
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
switch ($RBAC->userCanAccess('PM_FACTORY')) {
|
switch ($RBAC->userCanAccess( 'PM_FACTORY' )) {
|
||||||
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';
|
||||||
$oCaseTrackerObject = new CaseTrackerObject();
|
$oCaseTrackerObject = new CaseTrackerObject();
|
||||||
if(isset ($_POST['form']))
|
if (isset( $_POST['form'] ))
|
||||||
$value=$_POST['form'];
|
$value = $_POST['form'];
|
||||||
else
|
else
|
||||||
$value=$_POST;
|
$value = $_POST;
|
||||||
|
|
||||||
$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) {
|
||||||
|
die( $oException->getMessage() );
|
||||||
}
|
}
|
||||||
catch (Exception $oException) {
|
|
||||||
die($oException->getMessage());
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* dynaforms & documents for Case Tracker
|
* dynaforms & documents for Case Tracker
|
||||||
@@ -29,45 +28,42 @@
|
|||||||
* @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' );
|
||||||
$oProcessMap = new processMap();
|
$oProcessMap = new processMap();
|
||||||
|
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
|
|
||||||
$idProcess = $_SESSION['PROCESS'];
|
$idProcess = $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aProcessFieds = $oProcess->load($idProcess);
|
$aProcessFieds = $oProcess->load( $idProcess );
|
||||||
$noShowTitle = 0;
|
$noShowTitle = 0;
|
||||||
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
|
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||||
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
if (isset($aFields['TITLE'])) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
|
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
|
|
||||||
$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 );
|
||||||
}
|
}
|
||||||
$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' );
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Hystory case for Case Tracker
|
* Hystory case for Case Tracker
|
||||||
@@ -29,42 +28,38 @@
|
|||||||
* @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 = 'HISTORY';
|
$G_ID_MENU_SELECTED = 'HISTORY';
|
||||||
|
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
|
|
||||||
$idProcess = $_SESSION['PROCESS'];
|
$idProcess = $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aProcessFieds = $oProcess->load($idProcess);
|
$aProcessFieds = $oProcess->load( $idProcess );
|
||||||
$noShowTitle = 0;
|
$noShowTitle = 0;
|
||||||
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
|
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||||
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($aFields['TITLE'])) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
|
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
|
|
||||||
$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 );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent( 'propeltable',
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_TransferHistory', Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] ), array () );
|
||||||
'paged-table',
|
G::RenderPage( 'publish' );
|
||||||
'tracker/tracker_TransferHistory',
|
|
||||||
Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']),
|
|
||||||
array());
|
|
||||||
G::RenderPage('publish');
|
|
||||||
|
|
||||||
@@ -13,15 +13,14 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* History messages for Case Tracker
|
* History messages for Case Tracker
|
||||||
@@ -29,42 +28,40 @@
|
|||||||
* @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 = 'MESSAGES';
|
$G_ID_MENU_SELECTED = 'MESSAGES';
|
||||||
|
|
||||||
$oHeadPublisher->addScriptFile('/jscore/tracker/tracker.js');
|
$oHeadPublisher->addScriptFile( '/jscore/tracker/tracker.js' );
|
||||||
|
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
|
|
||||||
$idProcess = $_SESSION['PROCESS'];
|
$idProcess = $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aProcessFieds = $oProcess->load($idProcess);
|
$aProcessFieds = $oProcess->load( $idProcess );
|
||||||
$noShowTitle = 0;
|
$noShowTitle = 0;
|
||||||
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
|
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||||
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($aFields['TITLE'])) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$aFields['TITLE'] = G::LoadTranslation('ID_TITLE');
|
$aFields['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
|
|
||||||
$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 );
|
||||||
}
|
}
|
||||||
$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',
|
G::RenderPage( 'publish' );
|
||||||
Cases::getHistoryMessagesTracker($_SESSION['APPLICATION']),
|
|
||||||
array('VIEW' => G::LoadTranslation('ID_VIEW')));
|
|
||||||
G::RenderPage('publish');
|
|
||||||
|
|||||||
@@ -12,34 +12,33 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Messages for Case Tracker
|
* Messages for Case Tracker
|
||||||
*
|
*
|
||||||
* @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 = 'MESSAGES';
|
||||||
$G_ID_MENU_SELECTED = 'MESSAGES';
|
|
||||||
|
|
||||||
G::LoadClass("case");
|
G::LoadClass( "case" );
|
||||||
$Fields = Cases::getHistoryMessagesTrackerView($_GET['APP_UID'], $_GET['APP_MSG_UID']);
|
$Fields = Cases::getHistoryMessagesTrackerView( $_GET['APP_UID'], $_GET['APP_MSG_UID'] );
|
||||||
|
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
|
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_MessagesView', '', $Fields );
|
||||||
|
G::RenderPage( 'publish' );
|
||||||
|
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_MessagesView', '',$Fields);
|
|
||||||
G::RenderPage('publish');
|
|
||||||
@@ -12,34 +12,33 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* message for Case Tracker
|
* message for Case Tracker
|
||||||
*
|
*
|
||||||
* @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_PUBLISH = new Publisher();
|
G::LoadClass( 'processMap' );
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'tracker/tracker_No', '', '');
|
|
||||||
|
|
||||||
G::RenderPage('publish');
|
$G_PUBLISH = new Publisher();
|
||||||
|
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_No', '', '' );
|
||||||
|
|
||||||
|
G::RenderPage( 'publish' );
|
||||||
|
|
||||||
@@ -12,64 +12,60 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (!isset($_SESSION['PROCESS']))
|
if (! isset( $_SESSION['PROCESS'] )) {
|
||||||
{
|
G::header( 'location: login' );
|
||||||
G::header('location: login');
|
}
|
||||||
}
|
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
if (!isset($_DBArray)) {
|
if (! isset( $_DBArray )) {
|
||||||
$_DBArray = array();
|
$_DBArray = array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_MAIN_MENU = 'caseTracker';
|
$G_MAIN_MENU = 'caseTracker';
|
||||||
$G_ID_MENU_SELECTED = 'DYNADOC';
|
$G_ID_MENU_SELECTED = 'DYNADOC';
|
||||||
global $G_PUBLISH;
|
global $G_PUBLISH;
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
|
|
||||||
if(isset($_SESSION['APPLICATION'])){
|
if (isset( $_SESSION['APPLICATION'] )) {
|
||||||
$array['CASE'] = G::LoadTranslation('ID_CASE');
|
$array['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$array['USER'] = G::LoadTranslation('ID_USER');
|
$array['USER'] = G::LoadTranslation( 'ID_USER' );
|
||||||
$array['WORKSPACE'] = G::LoadTranslation('ID_WORKSPACE');
|
$array['WORKSPACE'] = G::LoadTranslation( 'ID_WORKSPACE' );
|
||||||
$array['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
$array['APP_NUMBER'] = $Fields['APP_NUMBER'];
|
||||||
$array['APP_TITLE'] = $Fields['TITLE'];
|
$array['APP_TITLE'] = $Fields['TITLE'];
|
||||||
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
|
$array['USR_USERNAME'] = $Fields['APP_DATA']['USR_USERNAME'];
|
||||||
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
|
$array['USER_ENV'] = $Fields['APP_DATA']['SYS_SYS'];
|
||||||
$array['DATEPRINT'] = date('Y-m-d H:m:s');
|
$array['DATEPRINT'] = date( 'Y-m-d H:m:s' );
|
||||||
}
|
}
|
||||||
$array['APP_PROCESS'] = $sProcess;
|
$array['APP_PROCESS'] = $sProcess;
|
||||||
|
|
||||||
if(isset($Fields['TITLE']) && strlen($Fields['TITLE'])>0)
|
if (isset( $Fields['TITLE'] ) && strlen( $Fields['TITLE'] ) > 0)
|
||||||
$array['TITLE'] = G::LoadTranslation('ID_TITLE');
|
$array['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
|
||||||
else
|
else
|
||||||
$array['TITLE'] = '';
|
$array['TITLE'] = '';
|
||||||
// $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->AddContent('smarty', 'cases/cases_PrintViewTitle', '', '', $array);
|
|
||||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS']. '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view');
|
|
||||||
G::RenderPage('publish', 'blank');
|
|
||||||
|
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_PrintViewTitle', '', '', $array );
|
||||||
|
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['CTO_UID_OBJ'], '', $Fields['APP_DATA'], '', '', 'view' );
|
||||||
|
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>
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
if(isset($_POST['form']))
|
if (isset( $_POST['form'] ))
|
||||||
$sValue = $_POST['form']; //For old processmap
|
$sValue = $_POST['form']; //For old processmap
|
||||||
else
|
else
|
||||||
$sValue = $_POST;
|
$sValue = $_POST;
|
||||||
|
|
||||||
unset($sValue['SAVE']);
|
unset( $sValue['SAVE'] );
|
||||||
if (!isset($sValue['CT_DERIVATION_HISTORY'])) {
|
if (! isset( $sValue['CT_DERIVATION_HISTORY'] )) {
|
||||||
$sValue['CT_DERIVATION_HISTORY'] = 0;
|
$sValue['CT_DERIVATION_HISTORY'] = 0;
|
||||||
}
|
}
|
||||||
if (!isset($sValue['CT_MESSAGE_HISTORY'])) {
|
if (! isset( $sValue['CT_MESSAGE_HISTORY'] )) {
|
||||||
$sValue['CT_MESSAGE_HISTORY'] = 0;
|
$sValue['CT_MESSAGE_HISTORY'] = 0;
|
||||||
}
|
}
|
||||||
require_once 'classes/model/CaseTracker.php';
|
require_once 'classes/model/CaseTracker.php';
|
||||||
$oCaseTracker = new CaseTracker();
|
$oCaseTracker = new CaseTracker();
|
||||||
$oCaseTracker->update($sValue);
|
$oCaseTracker->update( $sValue );
|
||||||
|
|
||||||
|
|||||||
@@ -12,81 +12,77 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dynaforms & documents for Case Tracker
|
* dynaforms & documents for Case Tracker
|
||||||
*
|
*
|
||||||
* @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');
|
}
|
||||||
}
|
|
||||||
|
|
||||||
global $_DBArray;
|
global $_DBArray;
|
||||||
if (!isset($_DBArray)) {
|
if (! isset( $_DBArray )) {
|
||||||
$_DBArray = array();
|
$_DBArray = array ();
|
||||||
}
|
}
|
||||||
|
|
||||||
$G_MAIN_MENU = 'caseTracker';
|
$G_MAIN_MENU = 'caseTracker';
|
||||||
$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();
|
||||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
|
||||||
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'alert("Sample"); return false;';
|
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'alert("Sample"); return false;';
|
||||||
$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;
|
||||||
|
|
||||||
case 'INPUT_DOCUMENT':
|
case 'INPUT_DOCUMENT':
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$c = $oCase->getAllUploadedDocumentsCriteriaTracker($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ']);
|
$c = $oCase->getAllUploadedDocumentsCriteriaTracker( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ'] );
|
||||||
|
|
||||||
$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;
|
||||||
|
|
||||||
case 'OUTPUT_DOCUMENT':
|
case 'OUTPUT_DOCUMENT':
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$c = $oCase->getAllGeneratedDocumentsCriteriaTracker($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ']);
|
$c = $oCase->getAllGeneratedDocumentsCriteriaTracker( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ'] );
|
||||||
|
|
||||||
$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_Outputdocs', $c);
|
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Outputdocs', $c );
|
||||||
G::RenderPage('publish');
|
G::RenderPage( 'publish' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@@ -12,74 +12,71 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once ( "classes/model/AppDocumentPeer.php" );
|
require_once ("classes/model/AppDocumentPeer.php");
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
if(!isset($_GET['v'])){//Load last version of the document
|
if (! isset( $_GET['v'] )) { //Load last version of the document
|
||||||
$docVersion=$oAppDocument->getLastAppDocVersion($_GET['a']);
|
$docVersion = $oAppDocument->getLastAppDocVersion( $_GET['a'] );
|
||||||
}else{
|
} else {
|
||||||
$docVersion=$_GET['v'];
|
$docVersion = $_GET['v'];
|
||||||
}
|
}
|
||||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a'],$docVersion);
|
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||||
$iDocVersion = $oAppDocument->getDocVersion();
|
$iDocVersion = $oAppDocument->getDocVersion();
|
||||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||||
$ext = $info['extension'];
|
$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;
|
if (file_exists( $realPath )) {
|
||||||
if(file_exists($realPath)){
|
$sw_file_exists = true;
|
||||||
$sw_file_exists=true;
|
} elseif (file_exists( $realPath1 )) {
|
||||||
}elseif(file_exists($realPath1)){
|
$sw_file_exists = true;
|
||||||
$sw_file_exists=true;
|
$realPath = $realPath1;
|
||||||
$realPath=$realPath1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$sw_file_exists){
|
if (! $sw_file_exists) {
|
||||||
$error_message="'".$oAppDocument->Fields['APP_DOC_FILENAME']. "' ".G::LoadTranslation('ID_ERROR_STREAMING_FILE');
|
$error_message = "'" . $oAppDocument->Fields['APP_DOC_FILENAME'] . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
|
||||||
if((isset($_POST['request']))&&($_POST['request']==true)){
|
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||||
$res ['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res ['message'] = $error_message;
|
$res['message'] = $error_message;
|
||||||
print G::json_encode ( $res );
|
print G::json_encode( $res );
|
||||||
}else{
|
} else {
|
||||||
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 {
|
||||||
if((isset($_POST['request']))&&($_POST['request']==true)){
|
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||||
$res ['success'] = 'success';
|
$res['success'] = 'success';
|
||||||
$res ['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
|
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
|
||||||
print G::json_encode ( $res );
|
print G::json_encode( $res );
|
||||||
}else{
|
} else {
|
||||||
G::streamFile ( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
|
G::streamFile( $realPath, $bDownload, $oAppDocument->Fields['APP_DOC_FILENAME'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,78 +12,75 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Created on 13-02-2008
|
* Created on 13-02-2008
|
||||||
*
|
*
|
||||||
* @author David Callizaya <davidsantos@colosa.com>
|
* @author David Callizaya <davidsantos@colosa.com>
|
||||||
*/
|
*/
|
||||||
require_once ( "classes/model/AppDocumentPeer.php" );
|
require_once ("classes/model/AppDocumentPeer.php");
|
||||||
|
|
||||||
$oAppDocument = new AppDocument();
|
$oAppDocument = new AppDocument();
|
||||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a'],(isset($_GET['v']) )? $_GET['v'] : NULL );
|
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : NULL );
|
||||||
|
|
||||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
$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'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ver= (isset($_GET['v']) && $_GET['v']!='') ? '_'.$_GET['v'] : '';
|
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
|
||||||
|
|
||||||
if(!$ver) //This code is in the case the outputdocument won't be versioned
|
if (! $ver) //This code is in the case the outputdocument won't be versioned
|
||||||
$ver='_1';
|
$ver = '_1';
|
||||||
|
|
||||||
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $sAppDocUid .$ver. '.' . $ext ;
|
$realPath = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
|
||||||
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] .$ver. '.' . $ext ;
|
$realPath1 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
|
||||||
$realPath2 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename']. '.' . $ext ;
|
$realPath2 = PATH_DOCUMENT . $oAppDocument->Fields['APP_UID'] . '/outdocs/' . $info['basename'] . '.' . $ext;
|
||||||
$sw_file_exists=false;
|
$sw_file_exists = false;
|
||||||
if(file_exists($realPath)){
|
if (file_exists( $realPath )) {
|
||||||
$sw_file_exists=true;
|
$sw_file_exists = true;
|
||||||
}elseif(file_exists($realPath1)){
|
} elseif (file_exists( $realPath1 )) {
|
||||||
$sw_file_exists=true;
|
$sw_file_exists = true;
|
||||||
$realPath=$realPath1;
|
$realPath = $realPath1;
|
||||||
}elseif(file_exists($realPath2)){
|
} elseif (file_exists( $realPath2 )) {
|
||||||
$sw_file_exists=true;
|
$sw_file_exists = true;
|
||||||
$realPath=$realPath2;
|
$realPath = $realPath2;
|
||||||
}
|
}
|
||||||
if(!$sw_file_exists){
|
if (! $sw_file_exists) {
|
||||||
$error_message="'".$info['basename'] .$ver. '.' . $ext."' ".G::LoadTranslation('ID_ERROR_STREAMING_FILE');
|
$error_message = "'" . $info['basename'] . $ver . '.' . $ext . "' " . G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
|
||||||
if((isset($_POST['request']))&&($_POST['request']==true)){
|
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||||
$res ['success'] = 'failure';
|
$res['success'] = 'failure';
|
||||||
$res ['message'] = $error_message;
|
$res['message'] = $error_message;
|
||||||
print G::json_encode ( $res );
|
print G::json_encode( $res );
|
||||||
}else{
|
} else {
|
||||||
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 {
|
||||||
if((isset($_POST['request']))&&($_POST['request']==true)){
|
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||||
$res ['success'] = 'success';
|
$res['success'] = 'success';
|
||||||
$res ['message'] = $info['basename'] .$ver. '.' . $ext;
|
$res['message'] = $info['basename'] . $ver . '.' . $ext;
|
||||||
print G::json_encode ( $res );
|
print G::json_encode( $res );
|
||||||
}else{
|
} else {
|
||||||
G::streamFile ( $realPath, true ,$info['basename'] .$ver. '.' . $ext );
|
G::streamFile( $realPath, true, $info['basename'] . $ver . '.' . $ext );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//G::streamFile ( $realPath, true);
|
//G::streamFile ( $realPath, true);
|
||||||
?>
|
|
||||||
|
|||||||
@@ -13,15 +13,14 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* 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/>.
|
* 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.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Map for Case Tracker
|
* Map for Case Tracker
|
||||||
@@ -30,21 +29,21 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require_once 'classes/model/Process.php';
|
require_once 'classes/model/Process.php';
|
||||||
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 = 'MAP';
|
$G_ID_MENU_SELECTED = 'MAP';
|
||||||
|
|
||||||
require_once 'classes/model/CaseTracker.php';
|
require_once 'classes/model/CaseTracker.php';
|
||||||
$oCaseTracker = new CaseTracker();
|
$oCaseTracker = new CaseTracker();
|
||||||
$aCaseTracker = $oCaseTracker->load($_SESSION['PROCESS']);
|
$aCaseTracker = $oCaseTracker->load( $_SESSION['PROCESS'] );
|
||||||
|
|
||||||
$idProcess = $_SESSION['PROCESS'];
|
$idProcess = $_SESSION['PROCESS'];
|
||||||
$oProcess = new Process();
|
$oProcess = new Process();
|
||||||
$aProcessFieds = $oProcess->load($idProcess);
|
$aProcessFieds = $oProcess->load( $idProcess );
|
||||||
$noShowTitle = 0;
|
$noShowTitle = 0;
|
||||||
if (isset($aProcessFieds['PRO_SHOW_MESSAGE'])) {
|
if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
|
||||||
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
$noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
|
||||||
}
|
}
|
||||||
switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
||||||
@@ -52,28 +51,28 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
|||||||
//Nothing
|
//Nothing
|
||||||
break;
|
break;
|
||||||
case 'PROCESSMAP':
|
case 'PROCESSMAP':
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
G::LoadClass('processMap');
|
G::LoadClass( 'processMap' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
if (isset($aFields['TITLE'])) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$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 );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode('
|
$oHeadPublisher->addScriptCode( '
|
||||||
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
var maximunX = ' . processMap::getMaximunTaskX( $_SESSION['PROCESS'] ) . ';
|
||||||
leimnud.event.add(window,"load",function(){
|
leimnud.event.add(window,"load",function(){
|
||||||
var pb = leimnud.dom.capture("tag.body 0");
|
var pb = leimnud.dom.capture("tag.body 0");
|
||||||
pm = new processmap();
|
pm = new processmap();
|
||||||
@@ -133,30 +132,30 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
|||||||
}.extend(this);
|
}.extend(this);
|
||||||
|
|
||||||
rpcRequest.make();
|
rpcRequest.make();
|
||||||
});');
|
});' );
|
||||||
G::RenderPage('publish');
|
G::RenderPage( 'publish' );
|
||||||
break;
|
break;
|
||||||
case 'STAGES':
|
case 'STAGES':
|
||||||
G::LoadClass('case');
|
G::LoadClass( 'case' );
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||||
if (isset($aFields['TITLE'])) {
|
if (isset( $aFields['TITLE'] )) {
|
||||||
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
$aFields['APP_TITLE'] = $aFields['TITLE'];
|
||||||
}
|
}
|
||||||
if ($aFields['APP_PROC_CODE'] != '') {
|
if ($aFields['APP_PROC_CODE'] != '') {
|
||||||
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
$aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
|
||||||
}
|
}
|
||||||
$aFields['CASE'] = G::LoadTranslation('ID_CASE');
|
$aFields['CASE'] = G::LoadTranslation( 'ID_CASE' );
|
||||||
$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 );
|
||||||
}
|
}
|
||||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode('
|
$oHeadPublisher->addScriptCode( '
|
||||||
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
|
leimnud.Package.Load("stagesmap",{Type:"file",Absolute:true,Path:"/jscore/stagesmap/core/stagesmap.js"});
|
||||||
leimnud.event.add(window,"load",function(){
|
leimnud.event.add(window,"load",function(){
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
@@ -174,7 +173,8 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
|||||||
hideMenu : false
|
hideMenu : false
|
||||||
};
|
};
|
||||||
Sm.make();
|
Sm.make();
|
||||||
});');
|
});' );
|
||||||
G::RenderPage('publish');
|
G::RenderPage( 'publish' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user