This commit is contained in:
Paula Quispe
2018-05-29 12:42:49 -04:00
420 changed files with 30154 additions and 48685 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -49,7 +49,7 @@ if (!isset($_REQUEST["tab"])) {
$authenticationSource = array("AUTH_SOURCE_UID" => $_REQUEST["authUid"], "CURRENT_TAB" => ($_REQUEST["tab"] == "synchronizeDepartments" ? 0 : 1));
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript("authSources/authSourcesSynchronize", false);
$oHeadPublisher->addContent("authSources/authSourcesSynchronize");
$oHeadPublisher->assign("AUTHENTICATION_SOURCE", $authenticationSource);
@@ -58,4 +58,3 @@ global $G_PUBLISH;
$G_PUBLISH = new Publisher();
G::RenderPage("publish", "extJs");

View File

@@ -34,7 +34,6 @@ class treeNode extends stdclass
}
try {
$json = new Services_JSON();
header("Content-Type: application/json;");
@@ -46,8 +45,8 @@ try {
global $baseDN;
$ldapAdvanced = getLDAPAdvanceInstance($_REQUEST["authUid"]);
$RBAC =& RBAC::getSingleton();
$authenticationSource = $RBAC->authSourcesObj->load($_REQUEST["authUid"]);
$RBAC = RBAC::getSingleton();
$authenticationSource = $RBAC->authSourcesObj->load($_REQUEST["authUid"]);
$baseDN = $authenticationSource["AUTH_SOURCE_BASE_DN"];
$departments = $ldapAdvanced->searchDepartments();
$terminatedOu = $ldapAdvanced->getTerminatedOu();
@@ -55,11 +54,11 @@ try {
die($json->encode($nodes));
break;
case "saveDepartments":
$depsToCheck = ($_REQUEST['departmentsDN'] != '')? explode('|', $_REQUEST['departmentsDN']) : [];
$depsToCheck = ($_REQUEST['departmentsDN'] != '') ? explode('|', $_REQUEST['departmentsDN']) : [];
$depsToCheck = array_map("urldecode", $depsToCheck);
$depsToUncheck = getDepartmentsToUncheck($depsToCheck);
$RBAC =& RBAC::getSingleton();
$authenticationSource = $RBAC->authSourcesObj->load($_REQUEST["authUid"]);
$RBAC = RBAC::getSingleton();
$authenticationSource = $RBAC->authSourcesObj->load($_REQUEST["authUid"]);
$ldapAdvanced = getLDAPAdvanceInstance($_REQUEST["authUid"]);
foreach ($depsToCheck as $departmentDn) {
@@ -82,9 +81,10 @@ try {
$parentUid == ''
) {
$response = new stdClass();
$response->status = 'ERROR';
$response->status = 'ERROR';
$response->message = G::LoadTranslation(
'ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT', [$parentDn, $departmentTitle]
'ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT',
[$parentDn, $departmentTitle]
);
echo $json->encode($response);
@@ -95,15 +95,15 @@ try {
$department = new Department();
$departmentUid = $department->create([
'DEP_TITLE' => stripslashes($departmentTitle),
'DEP_PARENT' => $parentUid,
'DEP_LDAP_DN' => $departmentDn,
'DEP_TITLE' => stripslashes($departmentTitle),
'DEP_PARENT' => $parentUid,
'DEP_LDAP_DN' => $departmentDn,
'DEP_REF_CODE' => ''
]);
if ($departmentUid === false) {
$response = new stdClass();
$response->status = 'ERROR';
$response->status = 'ERROR';
$response->message = G::LoadTranslation('ID_DEPARTMENT_ERROR_CREATE');
echo $json->encode($response);
@@ -159,8 +159,8 @@ try {
$groupsToCheck = explode("|", $_REQUEST["groupsDN"]);
$groupsToCheck = array_map("urldecode", $groupsToCheck);
$groupsToUncheck = getGroupsToUncheck($groupsToCheck);
$RBAC =& RBAC::getSingleton();
$authenticationSource = $RBAC->authSourcesObj->load($_REQUEST["authUid"]);
$RBAC = RBAC::getSingleton();
$authenticationSource = $RBAC->authSourcesObj->load($_REQUEST["authUid"]);
$ldapAdvanced = getLDAPAdvanceInstance($_REQUEST["authUid"]);
foreach ($groupsToCheck as $groupDN) {
@@ -185,7 +185,7 @@ try {
if ($groupUID == "") {
$group = new Groupwf();
$row["GRP_TITLE"] = stripslashes($groupTitle);
$row["GRP_TITLE"] = stripslashes($groupTitle);
$row["GRP_LDAP_DN"] = $groupDN;
$groupUID = $group->create($row);
@@ -234,7 +234,7 @@ try {
function getLDAPAdvanceInstance($authUid)
{
$RBAC = &RBAC::getSingleton();
$RBAC = RBAC::getSingleton();
$ldapAdvanced = new LdapAdvanced();
$ldapAdvanced->sAuthSource = $authUid;
$ldapAdvanced->sSystem = $RBAC->sSystem;
@@ -300,7 +300,7 @@ function lookForChildrenDeps($parent)
$departmentUid = $ldapAdvanced->getDepUidIfExistsDN($department["DEP_DN"]);
if ($departmentUid != "") {
$departmentObject->text .= " (" . ((isset($arrayDepartmentNumberOfUsersFromDb[$departmentUid]))? $arrayDepartmentNumberOfUsersFromDb[$departmentUid] : 0) . ")";
$departmentObject->text .= " (" . ((isset($arrayDepartmentNumberOfUsersFromDb[$departmentUid])) ? $arrayDepartmentNumberOfUsersFromDb[$departmentUid] : 0) . ")";
$departmentObject->checked = true;
} else {
$departmentObject->checked = false;
@@ -394,7 +394,7 @@ function lookForChildrenGroups()
$groupUid = $ldapAdvanced->getGrpUidIfExistsDN($group["GRP_DN"]);
if ($groupUid != "") {
$groupObject->text .= " (" . ((isset($arrayGroupNumberOfUsersFromDb[$groupUid]))? $arrayGroupNumberOfUsersFromDb[$groupUid] : 0) . ")";
$groupObject->text .= " (" . ((isset($arrayGroupNumberOfUsersFromDb[$groupUid])) ? $arrayGroupNumberOfUsersFromDb[$groupUid] : 0) . ")";
$groupObject->checked = true;
} else {
$groupObject->checked = false;
@@ -450,9 +450,10 @@ function custom_ldap_explode_dn($dn)
unset($result["count"]);
foreach ($result as $key => $value) {
$result[$key] = addcslashes(preg_replace("/\\\([0-9A-Fa-f]{2})/e", "''.chr(hexdec('\\1')).''", $value), '<>,"');
$result[$key] = addcslashes(preg_replace_callback("/\\\([0-9A-Fa-f]{2})/", function ($m) {
return chr(hexdec($m[1]));
}, $value), '<>,"');
}
return($result);
return $result;
}

View File

@@ -1,128 +1,126 @@
<?php
/**
* authSources_Edit.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
if (! isset( $_GET['sUID'] )) {
G::SendTemporalMessage( 'ID_ERROR_OBJECT_NOT_EXISTS', 'error', 'labels' );
G::header( 'location: authSources_List' );
die();
}
if ($_GET['sUID'] == '') {
G::SendTemporalMessage( 'ID_ERROR_OBJECT_NOT_EXISTS', 'error', 'labels' );
G::header( 'location: authSources_List' );
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$fields = $RBAC->getAuthSource( $_GET['sUID'] );
if (is_array( $fields['AUTH_SOURCE_DATA'] )) {
foreach ($fields['AUTH_SOURCE_DATA'] as $field => $value) {
$fields[$field] = $value;
}
}
$fields['AUTH_SOURCE_SHOWGRID_FLAG'] = 0;
if (isset($fields['AUTH_SOURCE_DATA']['AUTH_SOURCE_SHOWGRID']) && $fields['AUTH_SOURCE_DATA']['AUTH_SOURCE_SHOWGRID'] == 'on') {
$fields["AUTH_SOURCE_SHOWGRID_FLAG"] = 1;
}
unset( $fields['AUTH_SOURCE_DATA'] );
$textAttribute = '';
if (isset($fields['AUTH_SOURCE_GRID_ATTRIBUTE']) && count($fields['AUTH_SOURCE_GRID_ATTRIBUTE'])) {
foreach ($fields['AUTH_SOURCE_GRID_ATTRIBUTE'] as $value) {
$textAttribute .= '|' . $value['attributeLdap'] . '/' . $value['attributeUser'];
}
}
$fields['AUTH_SOURCE_GRID_TEXT'] = $textAttribute;
//fixing a problem with dropdown with int values,
//the problem : the value was integer, but the dropdown was expecting a string value, and they returns always the first item of dropdown
if (isset( $fields['AUTH_SOURCE_ENABLED_TLS'] )) {
$fields['AUTH_SOURCE_ENABLED_TLS'] = sprintf( '%d', $fields['AUTH_SOURCE_ENABLED_TLS'] );
}
if (isset( $fields['AUTH_ANONYMOUS'] )) {
$fields['AUTH_ANONYMOUS'] = sprintf( '%d', $fields['AUTH_ANONYMOUS'] );
}
$G_PUBLISH = new Publisher();
if ($fields['AUTH_SOURCE_PROVIDER'] == 'ldap') {
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'authSources/authSourcesEdit', false );
$oHeadPublisher->assign( 'sUID', $_GET['sUID'] );
G::RenderPage( 'publish', 'extJs' );
} else {
if (file_exists( PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
$pluginEnabled = 1;
if ($pluginEnabled == 1) {
$data = executeQuery("DESCRIBE USERS");
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
$attributes = null;
foreach ($data as $value) {
if (!(in_array($value["Field"], $fieldSet))) {
$attributes = $attributes . $value["Field"] . "|";
}
}
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
$oHeadPublisher = & headPublisher::getSingleton ();
$oHeadPublisher->assign("Fields", $fields);
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/library', false, true );
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedForm', false, true );
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedList', false, true );
G::RenderPage ('publish', 'extJs');
die();
}
$G_PUBLISH->AddContent("xmlform", "xmlform", 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save');
} else {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => G::LoadTranslation( 'ID_AUTH_SOURCE_MISSING' )
) );
}
} else {
if (file_exists( PATH_XMLFORM . 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save' );
} else {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => 'File: ' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' . ' not exists.'
) );
}
}
G::RenderPage("publish", "blank");
}
<?php
/**
* authSources_Edit.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
}
if (! isset($_GET['sUID'])) {
G::SendTemporalMessage('ID_ERROR_OBJECT_NOT_EXISTS', 'error', 'labels');
G::header('location: authSources_List');
die();
}
if ($_GET['sUID'] == '') {
G::SendTemporalMessage('ID_ERROR_OBJECT_NOT_EXISTS', 'error', 'labels');
G::header('location: authSources_List');
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$fields = $RBAC->getAuthSource($_GET['sUID']);
if (is_array($fields['AUTH_SOURCE_DATA'])) {
foreach ($fields['AUTH_SOURCE_DATA'] as $field => $value) {
$fields[$field] = $value;
}
}
$fields['AUTH_SOURCE_SHOWGRID_FLAG'] = 0;
if (isset($fields['AUTH_SOURCE_DATA']['AUTH_SOURCE_SHOWGRID']) && $fields['AUTH_SOURCE_DATA']['AUTH_SOURCE_SHOWGRID'] == 'on') {
$fields["AUTH_SOURCE_SHOWGRID_FLAG"] = 1;
}
unset($fields['AUTH_SOURCE_DATA']);
$textAttribute = '';
if (isset($fields['AUTH_SOURCE_GRID_ATTRIBUTE']) && count($fields['AUTH_SOURCE_GRID_ATTRIBUTE'])) {
foreach ($fields['AUTH_SOURCE_GRID_ATTRIBUTE'] as $value) {
$textAttribute .= '|' . $value['attributeLdap'] . '/' . $value['attributeUser'];
}
}
$fields['AUTH_SOURCE_GRID_TEXT'] = $textAttribute;
//fixing a problem with dropdown with int values,
//the problem : the value was integer, but the dropdown was expecting a string value, and they returns always the first item of dropdown
if (isset($fields['AUTH_SOURCE_ENABLED_TLS'])) {
$fields['AUTH_SOURCE_ENABLED_TLS'] = sprintf('%d', $fields['AUTH_SOURCE_ENABLED_TLS']);
}
if (isset($fields['AUTH_ANONYMOUS'])) {
$fields['AUTH_ANONYMOUS'] = sprintf('%d', $fields['AUTH_ANONYMOUS']);
}
$G_PUBLISH = new Publisher();
if ($fields['AUTH_SOURCE_PROVIDER'] == 'ldap') {
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('authSources/authSourcesEdit', false);
$oHeadPublisher->assign('sUID', $_GET['sUID']);
G::RenderPage('publish', 'extJs');
} else {
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$pluginEnabled = 1;
if ($pluginEnabled == 1) {
$data = executeQuery("DESCRIBE USERS");
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
$attributes = null;
foreach ($data as $value) {
if (!(in_array($value["Field"], $fieldSet))) {
$attributes = $attributes . $value["Field"] . "|";
}
}
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->assign("Fields", $fields);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/library', false, true);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/ldapAdvancedForm', false, true);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/ldapAdvancedList', false, true);
G::RenderPage('publish', 'extJs');
die();
}
$G_PUBLISH->AddContent("xmlform", "xmlform", 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save');
} else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => G::LoadTranslation('ID_AUTH_SOURCE_MISSING')
));
}
} else {
if (file_exists(PATH_XMLFORM . 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save');
} else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' . ' not exists.'
));
}
}
G::RenderPage("publish", "blank");
}

View File

@@ -1,54 +1,53 @@
<?php
/**
* authSources_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$c = new Configurations();
$configPage = $c->getConfiguration( 'authSourcesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$G_PUBLISH = new Publisher();
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'authSources/authSourcesList', false ); //adding a javascript file .js
/*----------------------------------********---------------------------------*/
if ($licensedFeatures->verifyfeature('sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=')) {
$oHeadPublisher->addExtJsScript( 'authSources/authSourcesListSyn', false ); //adding a javascript file .js
}
/*----------------------------------********---------------------------------*/
$oHeadPublisher->addContent( 'authSources/authSourcesList' ); //adding a html file .html.
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
$oHeadPublisher->assign( 'CONFIG', $Config );
G::RenderPage( 'publish', 'extJs' );
<?php
/**
* authSources_List.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
}
$c = new Configurations();
$configPage = $c->getConfiguration('authSourcesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$G_PUBLISH = new Publisher();
$licensedFeatures = PMLicensedFeatures::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('authSources/authSourcesList', false); //adding a javascript file .js
/*----------------------------------********---------------------------------*/
if ($licensedFeatures->verifyfeature('sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=')) {
$oHeadPublisher->addExtJsScript('authSources/authSourcesListSyn', false); //adding a javascript file .js
}
/*----------------------------------********---------------------------------*/
$oHeadPublisher->addContent('authSources/authSourcesList'); //adding a html file .html.
$oHeadPublisher->assign('FORMATS', $c->getFormats());
$oHeadPublisher->assign('CONFIG', $Config);
G::RenderPage('publish', 'extJs');

View File

@@ -1,78 +1,77 @@
<?php
/**
* authSources_New.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$fields = array ('AUTH_SOURCE_PROVIDER' => $_REQUEST['AUTH_SOURCE_PROVIDER']);
$G_PUBLISH = new Publisher();
if (file_exists( PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
$pluginEnabled = 1;
if ($pluginEnabled == 1) {
//The attributes the users
$data = executeQuery("DESCRIBE USERS");
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
$attributes = null;
foreach ($data as $value) {
if (!(in_array($value["Field"], $fieldSet))) {
$attributes = $attributes . $value["Field"] . "|";
}
}
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
$oHeadPublisher = & headPublisher::getSingleton ();
$oHeadPublisher->assign("Fields", $fields);
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/library', false, true );
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedForm', false, true );
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedList', false, true );
G::RenderPage ('publish', 'extJs');
die();
}
$G_PUBLISH->AddContent("xmlform", "xmlform", 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save');
} else {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => G::LoadTranslation( 'ID_AUTH_SOURCE_MISSING' )) );
}
} else {
if (file_exists( PATH_XMLFORM . 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save' );
} else {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => 'File: ' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' . ' not exists.') );
}
}
G::RenderPage("publish", "blank");
<?php
/**
* authSources_New.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$fields = array('AUTH_SOURCE_PROVIDER' => $_REQUEST['AUTH_SOURCE_PROVIDER']);
$G_PUBLISH = new Publisher();
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$pluginEnabled = 1;
if ($pluginEnabled == 1) {
//The attributes the users
$data = executeQuery("DESCRIBE USERS");
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
$attributes = null;
foreach ($data as $value) {
if (!(in_array($value["Field"], $fieldSet))) {
$attributes = $attributes . $value["Field"] . "|";
}
}
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->assign("Fields", $fields);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/library', false, true);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/ldapAdvancedForm', false, true);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/ldapAdvancedList', false, true);
G::RenderPage('publish', 'extJs');
die();
}
$G_PUBLISH->AddContent("xmlform", "xmlform", 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save');
} else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => G::LoadTranslation('ID_AUTH_SOURCE_MISSING')));
}
} else {
if (file_exists(PATH_XMLFORM . 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'authSources/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save');
} else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' . ' not exists.'));
}
}
G::RenderPage("publish", "blank");

View File

@@ -1,74 +1,72 @@
<?php
/**
* authSources_SearchUsers.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$G_PUBLISH = new Publisher();
$fields = $RBAC->getAuthSource( $_GET['sUID'] );
if (file_exists( PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
$pluginEnabled = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=')) {
$pluginEnabled = 1;
}
/*----------------------------------********---------------------------------*/
if ($pluginEnabled == 0) {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => G::LoadTranslation( 'ID_AUTH_SOURCE_FEATURE_MISSING' ) ) );
G::RenderPage( 'publish', 'blank' );
} else {
$c = new Configurations();
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize','',$_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher = & headPublisher::getSingleton ();
$oHeadPublisher->assign("FORMATS", $c->getFormats());
$oHeadPublisher->assign("CONFIG", $Config);
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
$oHeadPublisher = & headPublisher::getSingleton ();
$oHeadPublisher->assign("Fields", $fields);
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/library', false, true );
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedSearch', false, true );
G::RenderPage ('publish', 'extJs');
die();
}
}
}
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'authSources/authSources_SearchUsers', '', array ('AUTH_SOURCE_UID' => $_GET['sUID']), '../authSources/authSources_ImportUsers' );
G::RenderPage( 'publish', 'blank' );
<?php
/**
* authSources_SearchUsers.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2008 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$G_PUBLISH = new Publisher();
$fields = $RBAC->getAuthSource($_GET['sUID']);
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$pluginEnabled = 0;
/*----------------------------------********---------------------------------*/
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('sywN09PSzh1MVdOajZBdnhMbFhCSnpNT1lLTEFwVklmOTE=')) {
$pluginEnabled = 1;
}
/*----------------------------------********---------------------------------*/
if ($pluginEnabled == 0) {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => G::LoadTranslation('ID_AUTH_SOURCE_FEATURE_MISSING') ));
G::RenderPage('publish', 'blank');
} else {
$c = new Configurations();
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->assign("FORMATS", $c->getFormats());
$oHeadPublisher->assign("CONFIG", $Config);
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->assign("Fields", $fields);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/library', false, true);
$oHeadPublisher->addExtJsScript(PATH_TPL. 'ldapAdvanced/ldapAdvancedSearch', false, true);
G::RenderPage('publish', 'extJs');
die();
}
}
}
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'authSources/authSources_SearchUsers', '', array('AUTH_SOURCE_UID' => $_GET['sUID']), '../authSources/authSources_ImportUsers');
G::RenderPage('publish', 'blank');

View File

@@ -1,54 +1,53 @@
<?php
/**
* authSources_SelectType.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$aAuthSourceTypes = array (array ('sType' => 'char','sLabel' => 'char'));
$oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP );
while ($sObject = $oDirectory->read()) {
if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) {
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
$sType = trim( str_replace( 'class.', '', str_replace( '.php', '', $sObject ) ) );
$aAuthSourceTypes[] = array ('sType' => $sType,'sLabel' => $sType );
}
}
}
global $_DBArray;
$_DBArray['authSourceTypes'] = $aAuthSourceTypes;
$_SESSION['_DBArray'] = $_DBArray;
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'authSources/authSourcesListNew', true ); //adding a javascript file .js
G::RenderPage( 'publish', 'extJs' );
<?php
/**
* authSources_SelectType.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$aAuthSourceTypes = array(array('sType' => 'char','sLabel' => 'char'));
$oDirectory = dir(PATH_RBAC . 'plugins' . PATH_SEP);
while ($sObject = $oDirectory->read()) {
if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) {
if (is_file(PATH_RBAC . 'plugins' . PATH_SEP . $sObject)) {
$sType = trim(str_replace('class.', '', str_replace('.php', '', $sObject)));
$aAuthSourceTypes[] = array('sType' => $sType,'sLabel' => $sType );
}
}
}
global $_DBArray;
$_DBArray['authSourceTypes'] = $aAuthSourceTypes;
$_SESSION['_DBArray'] = $_DBArray;
$G_PUBLISH = new Publisher();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('authSources/authSourcesListNew', true); //adding a javascript file .js
G::RenderPage('publish', 'extJs');

View File

@@ -1,42 +1,41 @@
<?php
/**
* authSources_SelectType.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' ) != 1) {
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$aAuthSourceTypes = array (array ('sType' => 'char','sLabel' => 'char'));
$oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP );
$G_PUBLISH = new Publisher();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'authSources/authSourceskindof', true ); //adding a javascript file .js
$oHeadPublisher->assign( 'sprovider', $_GET['sprovider'] );
G::RenderPage( 'publish', 'extJs' );
<?php
/**
* authSources_SelectType.php
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.23
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if ($RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'users';
$G_ID_MENU_SELECTED = 'USERS';
$G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
$aAuthSourceTypes = array(array('sType' => 'char','sLabel' => 'char'));
$oDirectory = dir(PATH_RBAC . 'plugins' . PATH_SEP);
$G_PUBLISH = new Publisher();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('authSources/authSourceskindof', true); //adding a javascript file .js
$oHeadPublisher->assign('sprovider', $_GET['sprovider']);
G::RenderPage('publish', 'extJs');

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@ $oCriteria = new Criteria("workflow");
$oCriteria->add(CaseConsolidatedCorePeer::CON_STATUS, 'ACTIVE');
$activeNumRows = CaseConsolidatedCorePeer::doCount($oCriteria);
$headPublisher = &headPublisher::getSingleton();
$headPublisher = headPublisher::getSingleton();
$usrUid = $_SESSION["USER_LOGGED"];
$conf = new Configurations();
@@ -115,7 +115,7 @@ if (count($arrayTabItem) > 0) {
$headPublisher->assign("varSkin", SYS_SKIN); //Sending the current Skin
$headPublisher->assign("FORMATS", $conf->getFormats());
$headPublisher->assign("urlProxy", $urlProxy);
$headPublisher->assign('credentials', $clientToken );
$headPublisher->assign('credentials', $clientToken);
$oHeadPublisher->assign('isIE', Bootstrap::isIE());
@@ -177,7 +177,7 @@ function getProcessArray($action, $userUid)
function getConsolidated()
{
$caseColumns = array ();
$caseColumns = array();
$caseColumns[] = array("header" =>"#", "dataIndex" => "APP_NUMBER", "width" => 45, "align" => "center");
$caseColumns[] = array("header" =>"Case", "dataIndex" => "APP_TITLE", "width" => 150);
$caseColumns[] = array("header" =>"UserUid", "dataIndex" => "USR_UID", "width" => 50, "hidden" => true, "hideable" => false);
@@ -269,4 +269,4 @@ function getAuthorizationCode($client)
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
return $code;
}
}

View File

@@ -21,23 +21,23 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
function casesShowOuputDocumentExist ($url)
function casesShowOuputDocumentExist($url)
{
$urlArray = explode( "?", $url );
$urlArray = explode("?", $url);
$urlParametroString = $urlArray[1];
parse_str( $urlParametroString, $_GET );
parse_str($urlParametroString, $_GET);
require_once ("classes/model/AppDocumentPeer.php");
require_once("classes/model/AppDocumentPeer.php");
$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();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
if (! isset( $_GET['ext'] )) {
$info = pathinfo($oAppDocument->getAppDocFilename());
if (! isset($_GET['ext'])) {
$ext = $info['extension'];
} else {
if ($_GET['ext'] != '') {
@@ -46,7 +46,7 @@ function casesShowOuputDocumentExist ($url)
$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
@@ -57,12 +57,12 @@ function casesShowOuputDocumentExist ($url)
$realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
$realPath2 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
if (file_exists($realPath)) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
} elseif (file_exists($realPath1)) {
$sw_file_exists = true;
$realPath = $realPath1;
} elseif (file_exists( $realPath2 )) {
} elseif (file_exists($realPath2)) {
$sw_file_exists = true;
$realPath = $realPath2;
}
@@ -76,39 +76,38 @@ function casesShowOuputDocumentExist ($url)
if ($actionAjax == 'casesGenerateDocumentPage') {
global $G_PUBLISH;
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$conf = new Configurations();
$oHeadPublisher->addExtJsScript( 'cases/casesGenerateDocumentPage', true ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesGenerateDocumentPage' ); //adding a html file .html.
$oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesGenerateDocumentPage'); //adding a html file .html.
$oHeadPublisher->assign("FORMATS", $conf->getFormats());
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
G::RenderPage( 'publish', 'extJs' );
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
G::RenderPage('publish', 'extJs');
}
if ($actionAjax == 'generateDocumentGrid_Ajax') {
global $G_PUBLISH;
$oCase = new Cases();
$aProcesses = Array ();
$aProcesses = array();
$G_PUBLISH = new Publisher();
$c = $oCase->getAllGeneratedDocumentsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED'] );
$c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
if ($c->getDbName() == 'dbarray') {
$rs = ArrayBasePeer::doSelectRs( $c );
$rs = ArrayBasePeer::doSelectRs($c);
} else {
$rs = GulliverBasePeer::doSelectRs( $c );
$rs = GulliverBasePeer::doSelectRs($c);
}
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs->next();
$totalCount = 0;
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
$result = $rs->getRow();
$result["FILEDOCEXIST"] = casesShowOuputDocumentExist( $result["FILEDOC"] );
$result["FILEPDFEXIST"] = casesShowOuputDocumentExist( $result["FILEPDF"] );
$result["FILEDOCEXIST"] = casesShowOuputDocumentExist($result["FILEDOC"]);
$result["FILEPDFEXIST"] = casesShowOuputDocumentExist($result["FILEPDF"]);
$aProcesses[] = $result;
@@ -120,19 +119,18 @@ if ($actionAjax == 'generateDocumentGrid_Ajax') {
$conf = new Configurations();
try {
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
} catch (Exception $e) {
$generalConfCasesList = array ();
$generalConfCasesList = array();
}
$dateFormat = "";
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
if (isset($generalConfCasesList['casesListDateFormat']) && ! empty($generalConfCasesList['casesListDateFormat'])) {
$dateFormat = $generalConfCasesList['casesListDateFormat'];
}
$newDir = '/tmp/test/directory';
$r = G::verifyPath( $newDir );
$r = G::verifyPath($newDir);
$r->data = $aProcesses;
$r->totalCount = $totalCount;
$r->dataFormat = $dateFormat;
echo G::json_encode( $r );
echo G::json_encode($r);
}

View File

@@ -28,34 +28,38 @@ $_GET = $filter->xssFilterHard($_GET);
$_POST = $filter->xssFilterHard($_POST);
$_REQUEST = $filter->xssFilterHard($_REQUEST);
$actionAjax = isset( $_REQUEST['actionAjax'] ) ? $_REQUEST['actionAjax'] : null;
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
if ($actionAjax == "historyDynaformPage") {
global $G_PUBLISH;
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$conf = new Configurations();
$oHeadPublisher->addExtJsScript( 'cases/caseHistoryDynaformPage', true ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/caseHistoryDynaformPage' ); //adding a html file .html.
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
G::RenderPage( 'publish', 'extJs' );
$oHeadPublisher->addExtJsScript('cases/caseHistoryDynaformPage', true); //adding a javascript file .js
$oHeadPublisher->addContent('cases/caseHistoryDynaformPage'); //adding a html file .html.
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
G::RenderPage('publish', 'extJs');
}
if ($actionAjax == 'historyDynaformGrid_Ajax') {
global $G_PUBLISH;
$oCase = new Cases();
$aProcesses = Array ();
$c = $oCase->getallDynaformsCriteria( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['CURRENT_TASK'],
$_SESSION['USER_LOGGED'] , $_SESSION['INDEX']);
$aProcesses = array();
$c = $oCase->getallDynaformsCriteria(
$_SESSION['PROCESS'],
$_SESSION['APPLICATION'],
$_SESSION['CURRENT_TASK'],
$_SESSION['USER_LOGGED'],
$_SESSION['INDEX']
);
if ($c->getDbName() == 'dbarray') {
$rs = ArrayBasePeer::doSelectRs( $c );
$rs = ArrayBasePeer::doSelectRs($c);
} else {
$rs = GulliverBasePeer::doSelectRs( $c );
$rs = GulliverBasePeer::doSelectRs($c);
}
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs->next();
for ($j = 0; $j < $rs->getRecordCount(); $j ++) {
@@ -66,13 +70,13 @@ if ($actionAjax == 'historyDynaformGrid_Ajax') {
}
$newDir = '/tmp/test/directory';
G::verifyPath( $newDir );
G::verifyPath($newDir);
$r = new stdclass();
$r->data = $aProcesses;
$r->totalCount = 2;
echo G::json_encode( $r );
echo G::json_encode($r);
}
if ($actionAjax == 'showHistoryMessage') {
@@ -110,19 +114,16 @@ if ($actionAjax == 'showHistoryMessage') {
$G_PUBLISH = new Publisher();
$oCase = new Cases();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView( $_POST['APP_UID'], $_POST['APP_MSG_UID'] ) );
?>
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID'])); ?>
<script language="javascript">
<?php
global $G_FORM;
?>
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
global $G_FORM; ?>
function loadForm_<?php echo $G_FORM->id; ?>(parametro1) {
}
</script>
<?php
G::RenderPage( 'publish', 'raw' );
G::RenderPage('publish', 'raw');
}
if ($actionAjax == 'showDynaformListHistory') {
@@ -130,9 +131,7 @@ if ($actionAjax == 'showDynaformListHistory') {
$_POST["APP_UID"] = $_REQUEST["APP_UID"];
$_POST["DYN_UID"] = $_REQUEST["DYN_UID"];
$_POST["PRO_UID"] = $_REQUEST["PRO_UID"];
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"];
?>
$_POST["TAS_UID"] = $_REQUEST["TAS_UID"]; ?>
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
<style type="text/css">
html {
@@ -341,13 +340,12 @@ if ($actionAjax == 'showDynaformListHistory') {
require_once 'classes/model/AppHistory.php';
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'cases/cases_DynaformHistory' );
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
G::RenderPage( 'publish', 'raw' );
G::RenderPage('publish', 'raw');
}
if ($actionAjax == 'dynaformChangeLogViewHistory') {
?>
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
<style type="text/css">
@@ -395,8 +393,7 @@ if ($actionAjax == 'dynaformChangeLogViewHistory') {
$a->printView();
} else {
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
}
?>
} ?>
<script language="javascript">
window.onload = function () {
@@ -412,14 +409,13 @@ if ($actionAjax == 'dynaformChangeLogViewHistory') {
<script language="javascript">
<?php
global $G_FORM;
?>
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
global $G_FORM; ?>
function loadForm_<?php echo $G_FORM->id; ?>(parametro1) {
}
</script>
<?php
G::RenderPage( 'publish', 'raw' );
G::RenderPage('publish', 'raw');
}
if ($actionAjax == 'historyDynaformGridPreview') {
?>
@@ -453,13 +449,12 @@ if ($actionAjax == 'historyDynaformGridPreview') {
$G_PUBLISH = new Publisher();
$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']['NEXT_STEP_LABEL'] = '';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'return false;';
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_POST['DYN_UID'];
?>
$Fields['APP_DATA']['__DYNAFORM_OPTIONS']['DYNUIDPRINT'] = $_POST['DYN_UID']; ?>
<script language="javascript">
window.onload = function () {
@@ -484,21 +479,18 @@ if ($actionAjax == 'historyDynaformGridPreview') {
$a->printView();
} else {
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
}
?>
} ?>
<script language="javascript">
function popUp(URL, width, height, left, top, resizable) {
window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable='+resizable+',width='+width+',height='+height+',left = '+left+',top = '+top+'');
}
<?php
global $G_FORM;
?>
function loadForm_<?php echo $G_FORM->id;?>(parametro1) {
global $G_FORM; ?>
function loadForm_<?php echo $G_FORM->id; ?>(parametro1) {
}
</script>
<?php
G::RenderPage( 'publish', 'blank' );
G::RenderPage('publish', 'blank');
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,14 +4,13 @@ if (typeof window.parent != 'undefined') {
/*----------------------------------********---------------------------------*/
$pathDerivateGmail = 'derivatedGmail';
$statusPMGmail = false;
$licensedFeatures = &PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
$pmGoogle = new PmGoogleApi();
$statusPMGmail = $pmGoogle->getServiceGmailStatus();
}
/*----------------------------------********---------------------------------*/
if (isset( $_GET['ux'] )) {
if (isset($_GET['ux'])) {
switch ($_GET['ux']) {
case 'SIMPLIFIED':
case 'SWITCHABLE':
@@ -21,25 +20,25 @@ if (isset( $_GET['ux'] )) {
default:
$url = 'casesListExtJs';
}
/*----------------------------------********---------------------------------*/
} else if( $statusPMGmail ){
/*----------------------------------********---------------------------------*/
} elseif ($statusPMGmail) {
$url = $pathDerivateGmail;
/*----------------------------------********---------------------------------*/
/*----------------------------------********---------------------------------*/
} else {
$url = 'casesListExtJs';
}
if (isset( $_GET['ux'] )) {
if (isset($_GET['ux'])) {
echo 'if (typeof window.parent.ux_env != \'undefined\') {';
}
echo " window.parent.location.href = '$url';";
if (isset( $_GET['ux'] )) {
if (isset($_GET['ux'])) {
/*----------------------------------********---------------------------------*/
if(PMLicensedFeatures::getSingleton()->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') && $statusPMGmail){
if (PMLicensedFeatures::getSingleton()->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09') && $statusPMGmail) {
echo '} else { window.parent.location.href = \''.$pathDerivateGmail.'\'; }';
} else {
/*----------------------------------********---------------------------------*/
/*----------------------------------********---------------------------------*/
echo '} else { window.parent.location.href = \'casesListExtJs\'; }';
/*----------------------------------********---------------------------------*/
/*----------------------------------********---------------------------------*/
}
/*----------------------------------********---------------------------------*/
}

View File

@@ -8,12 +8,11 @@ if ($RBAC->userCanAccess("PM_SETUP") != 1 || $RBAC->userCanAccess("PM_SETUP_ADVA
$availableFields = array();
$oHeadPublisher = &headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'cases/casesListSetup', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesListSetup' ); //adding a html file .html.
$oHeadPublisher->addExtJsScript('cases/casesListSetup', false); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesListSetup'); //adding a html file .html.
$oHeadPublisher->assignNumber("pageSize", 20); //sending the page size
$oHeadPublisher->assignNumber("availableFields", G::json_encode($availableFields));
G::RenderPage("publish", "extJs");

View File

@@ -1,4 +1,5 @@
<?php
if (!isset($_SESSION['USER_LOGGED'])) {
$response = new stdClass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
@@ -146,8 +147,10 @@ if ($actionAjax == "verifySession") {
print G::json_encode($response);
die();
} else {
$response = new stdclass();
/** Action: Reassign from casesList */
GLOBAL $RBAC;
$response = new stdclass();
//Check if the user is a supervisor to this Process
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) {
$response->reassigncase = true;
@@ -160,7 +163,6 @@ if ($actionAjax == "verifySession") {
$listProcess = $processUser->getProUidSupervisor($_SESSION['USER_LOGGED']);
$response->processeslist = G::json_encode($listProcess);
}
print G::json_encode($response);
die();
}

View File

@@ -1,8 +1,8 @@
<?php
$action = isset( $_GET['action'] ) ? G::sanitizeInput($_GET['action']) : 'default';
$action = isset($_GET['action']) ? G::sanitizeInput($_GET['action']) : 'default';
$userId = isset( $_SESSION['USER_LOGGED'] ) ? $_SESSION['USER_LOGGED'] : '00000000000000000000000000000000';
$userId = isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '00000000000000000000000000000000';
switch ($action) {
case 'getAllCounters':
getAllCounters();
@@ -17,22 +17,22 @@ switch ($action) {
break;
}
function getLoadTreeMenuData ()
function getLoadTreeMenuData()
{
header( "content-type: text/xml" );
header("content-type: text/xml");
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load( 'cases' );
$oMenu->load('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_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');
/*----------------------------------********---------------------------------*/
$licensedFeatures = & PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
$aTypesID['CONSOLIDATED_CASES'] = 'batch_routing';
$aTypes[] = 'batch_routing';
@@ -41,10 +41,10 @@ function getLoadTreeMenuData ()
//'CASES_TO_REVISE'=>'to_revise',
//'CASES_TO_REASSIGN'=>'to_reassign'
$list = array ();
$list = array();
$list['count'] = ' ';
$empty = array ();
$empty = array();
foreach ($aTypes as $key => $val) {
$empty[$val] = $list;
}
@@ -53,7 +53,7 @@ function getLoadTreeMenuData ()
$processNameMaxSize = 20;
//now drawing the treeview using the menu options from menu/cases.php
$menuCases = array ();
$menuCases = array();
for ($i = 0; $i < count($oMenu->Options); $i++) {
if ($oMenu->Types[$i] == 'blockHeader') {
$CurrentBlockID = $oMenu->Id[$i];
@@ -72,7 +72,7 @@ function getLoadTreeMenuData ()
$menuCases[$CurrentBlockID]['blockType'] = $oMenu->Types[$i];
$menuCases[$CurrentBlockID]['link'] = $oMenu->Options[$i];
} elseif ($oMenu->Types[$i] == 'rootNode') {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = array (
$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'
@@ -85,13 +85,13 @@ function getLoadTreeMenuData ()
$i = $index;
} else {
$menuCases[$CurrentBlockID]['blockItems'][$oMenu->Id[$i]] = array (
$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'];
}
}
@@ -114,7 +114,7 @@ function getLoadTreeMenuData ()
}
}
//This function generates an xml, so it prevents the output of a badly formed xml
//This function generates an xml, so it prevents the output of a badly formed xml
//by cleaning any content prior to this function with ob_clean
ob_clean();
echo $xml->asXML();
@@ -135,8 +135,7 @@ function getLoadTreeMenuData ()
}
// adding "menu_block" childs nodes
foreach ($menuBlock['blockItems'] as $id => $menu)
{
foreach ($menuBlock['blockItems'] as $id => $menu) {
if (! empty($menu['childs'])) {
$rootNode = $menuBlockNode->addChild('menu_block');
$rootNode->addAttribute('id', $id);
@@ -178,7 +177,7 @@ function getLoadTreeMenuData ()
}
}
//This function generates an xml, so it prevents the output of a badly formed xml
//This function generates an xml, so it prevents the output of a badly formed xml
//by cleaning any content prior to this function with ob_clean
ob_clean();
echo $xml->asXML();
@@ -199,11 +198,11 @@ function getAllCountersEnterprise()
}
/*----------------------------------********---------------------------------*/
function getAllCounters ()
function getAllCounters()
{
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
$aTypes = Array ();
$aTypes = array();
$aTypes['to_do'] = 'CASES_INBOX';
$aTypes['draft'] = 'CASES_DRAFT';
$aTypes['cancelled'] = 'CASES_CANCELLED';
@@ -217,7 +216,7 @@ function getAllCounters ()
$case = new \ProcessMaker\BusinessModel\Cases();
$aCount = $case->getListCounters($userUid, array_keys($aTypes));
$response = Array ();
$response = array();
$i = 0;
foreach ($aCount as $type => $count) {
$response[$i] = new stdclass();
@@ -225,7 +224,7 @@ function getAllCounters ()
$response[$i]->count = $count;
$i ++;
}
echo G::json_encode( $response );
echo G::json_encode($response);
}
function getChilds($menu, $index)
@@ -234,7 +233,6 @@ function getChilds($menu, $index)
for ($i = $index; $i < count($menu->Options); $i++) {
if ($menu->Types[$i] == 'childNode') {
$childs[$menu->Id[$i]] = array(
'label' => $menu->Labels[$i],
'link' => $menu->Options[$i],
@@ -248,4 +246,3 @@ function getChilds($menu, $index)
return array($childs, --$i);
}

View File

@@ -1,44 +1,43 @@
<?php
unset( $_SESSION['__currentTabDashboard'] );
if (isset( $_GET['action'] )) {
unset($_SESSION['__currentTabDashboard']);
if (isset($_GET['action'])) {
$_SESSION['__currentTabDashboard'] = $_GET['action'];
}
$page = "";
if (isset( $_GET['action'] )) {
if (isset($_GET['action'])) {
$page = $_GET['action'];
}
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
global $RBAC;
switch ($page) {
case "startCase":
$oHeadPublisher->addExtJsScript( 'cases/casesStartCase', true ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesStartCase' ); //adding a html file .html.
$oHeadPublisher->addExtJsScript('cases/casesStartCase', true); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesStartCase'); //adding a html file .html.
$c = new Configurations();
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
$oHeadPublisher->assign('FORMATS', $c->getFormats());
$oHeadPublisher->assign('isIE', Bootstrap::isIE());
break;
case "documents":
$c = new Configurations();
$configPage = $c->getConfiguration( 'documentsModule', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$oHeadPublisher->assign( 'CONFIG', $Config );
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
$configPage = $c->getConfiguration('documentsModule', 'pageSize', '', $_SESSION['USER_LOGGED']);
$configEnv = $c->getConfiguration('ENVIRONMENT_SETTINGS', '');
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('FORMATS', $c->getFormats());
$oHeadPublisher->assign( 'permitodelete', $RBAC->userCanAccess( 'PM_FOLDER_DELETE' ) );
$oHeadPublisher->assign( 'permitoaddfile', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FILE' ) );
$oHeadPublisher->assign( 'permitoaddfolder', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FOLDER' ) );
$oHeadPublisher->assign('permitodelete', $RBAC->userCanAccess('PM_FOLDER_DELETE'));
$oHeadPublisher->assign('permitoaddfile', $RBAC->userCanAccess('PM_FOLDERS_ADD_FILE'));
$oHeadPublisher->assign('permitoaddfolder', $RBAC->userCanAccess('PM_FOLDERS_ADD_FOLDER'));
$oHeadPublisher->addExtJsScript( 'cases/casesDocuments', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesDocuments' ); //adding a html file .html.
$oHeadPublisher->addExtJsScript('cases/casesDocuments', false); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesDocuments'); //adding a html file .html.
break;
default:
$oHeadPublisher->addExtJsScript( 'cases/casesStartPage', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesStartPage' ); //adding a html file .html.
$oHeadPublisher->addExtJsScript('cases/casesStartPage', false); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesStartPage'); //adding a html file .html.
break;
}
G::RenderPage( 'publish', 'extJs' );
G::RenderPage('publish', 'extJs');

View File

@@ -1,15 +1,11 @@
<?php
// $oHeadPublisher =& headPublisher::getSingleton();
// $TRANSLATIONS = array_merge($TRANSLATIONS, $TRANSLATIONS2);
$delIndex = $_GET['DEL_INDEX'];
$appUid = $_GET['APP_UID'];
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations
$casesPanelUrl = 'casesToReviseTreeContent?APP_UID=' . $appUid . '&DEL_INDEX=' . $delIndex;
$oHeadPublisher->assign( 'casesPanelUrl', $casesPanelUrl ); //translations
$oHeadPublisher->assign( 'treeTitle', G::loadtranslation( 'ID_STEP_LIST' ) ); //translations
$oHeadPublisher->addExtJsScript( 'cases/casesToRevisePanel', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesToRevisePanel' ); //adding a html file .html.
G::RenderPage( 'publish', 'extJs' );
$oHeadPublisher->assign('casesPanelUrl', $casesPanelUrl); //translations
$oHeadPublisher->assign('treeTitle', G::loadtranslation('ID_STEP_LIST')); //translations
$oHeadPublisher->addExtJsScript('cases/casesToRevisePanel', false); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesToRevisePanel'); //adding a html file .html.
G::RenderPage('publish', 'extJs');

File diff suppressed because it is too large Load Diff

View File

@@ -26,25 +26,25 @@ if (!isset($_SESSION['USER_LOGGED'])) {
$responseObject->error = G::LoadTranslation('ID_LOGIN_AGAIN');
$responseObject->success = true;
$responseObject->lostSession = true;
print G::json_encode( $responseObject );
print G::json_encode($responseObject);
die();
}
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
switch ($RBAC->userCanAccess('PM_CASES')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
if (isset( $_POST['form']['BTN_CANCEL'] )) {
header( "Location: ../cases/main" );
if (isset($_POST['form']['BTN_CANCEL'])) {
header("Location: ../cases/main");
die();
}
@@ -55,16 +55,16 @@ $sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load( $sAppUid, $iDelIndex );
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
//if there are no user in the delegation row, this case is still in selfservice
if ($aDelegation['USR_UID'] == "") {
$oCase->setCatchUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'] );
$oCase->setCatchUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED']);
/*----------------------------------********---------------------------------*/
$licensedFeatures = &PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
$pmGoogle = new PmGoogleApi();
if($pmGoogle->getServiceGmailStatus()) {
if ($pmGoogle->getServiceGmailStatus()) {
$labGmail = new labelsGmail();
$labGmail->addRelabelingToQueue($sAppUid, $iDelIndex, -1, true);
}
@@ -81,20 +81,20 @@ if ($aDelegation['USR_UID'] == "") {
}
/*----------------------------------********---------------------------------*/
//changing email labels if the claim comes from gmail
if(array_key_exists('gmail',$_SESSION) && $_SESSION['gmail'] == 1){
die( '<script type="text/javascript">
if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1) {
die('<script type="text/javascript">
parent.document.getElementById("iframePM").setAttribute("src", "'.$_SESSION["server"].'cases/cases_Open?APP_UID=' . $_SESSION["APPLICATION"] . '&DEL_INDEX=' . $_SESSION["INDEX"] . '&action=unassigned");
</script>' );
</script>');
}
} else {
G::SendMessageText( G::LoadTranslation( 'ID_CASE_ALREADY_DERIVATED' ), 'error' );
G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error');
}
$validation = (SYS_SKIN != 'uxs') ? 'true' : 'false';
unset($_SESSION['TASK']);
die( '<script type="text/javascript">
die('<script type="text/javascript">
if (' . $validation . ') {
if (window.parent.frames.length != 0) {
parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
@@ -104,5 +104,4 @@ die( '<script type="text/javascript">
} else {
window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
}
</script>' );
</script>');

View File

@@ -22,51 +22,51 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
switch ($RBAC->userCanAccess('PM_CASES')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'] );
$Fields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX']);
/* Render page */
require_once 'classes/model/Process.php';
require_once 'classes/model/Task.php';
$objProc = new Process();
$aProc = $objProc->load( $Fields['PRO_UID'] );
$aProc = $objProc->load($Fields['PRO_UID']);
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
$aTask = $objTask->load( $Fields['TAS_UID'] );
$aTask = $objTask->load($Fields['TAS_UID']);
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$Fields['STATUS'] .= ' ( ' . G::LoadTranslation( 'ID_UNASSIGNED' ) . ' )';
$Fields['STATUS'] .= ' ( ' . G::LoadTranslation('ID_UNASSIGNED') . ' )';
//now getting information about the PREVIOUS task. If is the first task then no preious, use 1
$oAppDel = new AppDelegation();
$oAppDel->Load( $Fields['APP_UID'], ($Fields['DEL_PREVIOUS'] == 0 ? $Fields['DEL_PREVIOUS'] = 1 : $Fields['DEL_PREVIOUS']) );
$oAppDel->Load($Fields['APP_UID'], ($Fields['DEL_PREVIOUS'] == 0 ? $Fields['DEL_PREVIOUS'] = 1 : $Fields['DEL_PREVIOUS']));
$aAppDel = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME );
$aAppDel = $oAppDel->toArray(BasePeer::TYPE_FIELDNAME);
try {
$oCurUser = new Users();
$oCurUser->load( $aAppDel['USR_UID'] );
$oCurUser->load($aAppDel['USR_UID']);
$Fields['PREVIOUS_USER'] = $oCurUser->getUsrFirstname() . ' ' . $oCurUser->getUsrLastname();
} catch (Exception $oError) {
$Fields['PREVIOUS_USER'] = G::LoadTranslation( 'ID_NO_PREVIOUS_USR_UID' );
$Fields['PREVIOUS_USER'] = G::LoadTranslation('ID_NO_PREVIOUS_USR_UID');
}
$objTask = new Task();
$aTask = $objTask->load( $aAppDel['TAS_UID'] );
$aTask = $objTask->load($aAppDel['TAS_UID']);
$Fields['PREVIOUS_TASK'] = $aTask['TAS_TITLE'];
//To enable information (dynaforms, steps) before claim a case
@@ -75,14 +75,14 @@ $G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'caseOptions';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = '_';
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptCode("
if (typeof parent != 'undefined') {
if (parent.showCaseNavigatorPanel) {
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
}
}" );
$oHeadPublisher->addScriptCode( '
}");
$oHeadPublisher->addScriptCode('
var Cse = {};
Cse.panels = {};
var leimnud = new maborak();
@@ -92,13 +92,12 @@ $oHeadPublisher->addScriptCode( '
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
leimnud.exec(leimnud.fix.memoryLeak);
' );
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
');
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/cases/core/cases_Step.js');
$Fields['isIE'] = Bootstrap::isIE();
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute' );
G::RenderPage( 'publish', 'blank' );
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute');
G::RenderPage('publish', 'blank');

View File

@@ -174,21 +174,20 @@ try {
$flagGmail = false;
/*----------------------------------********---------------------------------*/
$licensedFeatures = &PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
$pmGoogle = new PmGoogleApi ();
$pmGoogle = new PmGoogleApi();
if ($pmGoogle->getServiceGmailStatus()) {
$flagGmail = true;
$appDel = new AppDelegation ();
$appDel = new AppDelegation();
$actualThread = $appDel->Load($_SESSION ['APPLICATION'], $_SESSION ['INDEX']);
$appDelPrev = $appDel->LoadParallel($_SESSION ['APPLICATION']);
$Pmgmail = new \ProcessMaker\BusinessModel\Pmgmail ();
$Pmgmail = new \ProcessMaker\BusinessModel\Pmgmail();
foreach ($appDelPrev as $app) {
if (($app ['DEL_INDEX'] != $_SESSION ['INDEX']) && ($app ['DEL_PREVIOUS'] != $actualThread ['DEL_PREVIOUS'])) {
$Pmgmail->gmailsIfSelfServiceValueBased($_SESSION ['APPLICATION'], $app ['DEL_INDEX'],
$_POST ['form'] ['TASKS'], $appFields ['APP_DATA']);
$Pmgmail->gmailsIfSelfServiceValueBased($_SESSION ['APPLICATION'], $app ['DEL_INDEX'], $_POST ['form'] ['TASKS'], $appFields ['APP_DATA']);
}
}
}
@@ -239,9 +238,8 @@ try {
/*----------------------------------********---------------------------------*/
// Set users drive - start
$licensedFeatures = &PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
$drive = new AppDocumentDrive();
if ($drive->getStatusDrive()) {
//add users email next task

View File

@@ -29,20 +29,20 @@
try {
global $RBAC;
switch ($RBAC->userCanAccess( 'PM_REASSIGNCASE' )) {
switch ($RBAC->userCanAccess('PM_REASSIGNCASE')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
if (! isset( $_GET['REASSIGN_USER'] )) {
if (! isset($_GET['REASSIGN_USER'])) {
$_GET['REASSIGN_USER'] = '';
}
$_GET['REASSIGN_BY'] = 2;
@@ -54,27 +54,27 @@ try {
///SELECT USR_UID, CONCAT(USR_FIRSTNAME, ' ', USR_LASTNAME, ' (', USR_USERNAME, ')') AS USER_FULLNAME FROM USERS WHERE USR_STATUS <> 'CLOSED'//////
require_once 'classes/model/Users.php';
$oCriteria = new Criteria();
$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->add( UsersPeer::USR_STATUS, '', Criteria::NOT_EQUAL );
$oDataset = UsersPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$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->add(UsersPeer::USR_STATUS, '', Criteria::NOT_EQUAL);
$oDataset = UsersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
///////////////////////
$oConf = new Configurations();
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
$defaultOption = isset( $oConf->aConfig['format'] ) ? $oConf->aConfig['format'] : '';
$aUserInfo = array ();
$aUserInfo[] = array ('USR_UID' => 'char','USER_FULLNAME' => 'char'
$defaultOption = isset($oConf->aConfig['format']) ? $oConf->aConfig['format'] : '';
$aUserInfo = array();
$aUserInfo[] = array('USR_UID' => 'char','USER_FULLNAME' => 'char'
);
while ($oDataset->next()) {
$aRow1 = $oDataset->getRow();
$infoUser = G::getFormatUserList( $defaultOption, $aRow1 );
$aUserInfo[] = array ('USR_UID' => $aRow1['USR_UID'],'USER_FULLNAME' => $infoUser
$infoUser = G::getFormatUserList($defaultOption, $aRow1);
$aUserInfo[] = array('USR_UID' => $aRow1['USR_UID'],'USER_FULLNAME' => $infoUser
);
}
global $_DBArray;
@@ -82,12 +82,11 @@ try {
$_SESSION['_DBArray'] = $_DBArray;
//////////////////
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignBy', '', $_GET );
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ReassignBy', '', $_GET);
$sUserToReassign = trim( $_GET['REASSIGN_USER'] );
$sUserToReassign = trim($_GET['REASSIGN_USER']);
if ($_GET['REASSIGN_USER'] != '') {
$oTasks = new Tasks();
$oGroups = new Groups();
$oUser = new Users();
@@ -97,57 +96,55 @@ try {
$oCriteriaToDo = $oAppCache->getToDoListCriteria($sUserToReassign);
$oCriteriaDraft = $oAppCache->getDraftListCriteria($sUserToReassign);
$aCasesList = Array ();
$aCasesList = array();
$oDataset = ApplicationPeer::doSelectRS( $oCriteriaToDo );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset = ApplicationPeer::doSelectRS($oCriteriaToDo);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
array_push( $aCasesList, $oDataset->getRow() );
array_push($aCasesList, $oDataset->getRow());
}
$oDataset = ApplicationPeer::doSelectRS( $oCriteriaDraft );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset = ApplicationPeer::doSelectRS($oCriteriaDraft);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($oDataset->next()) {
array_push( $aCasesList, $oDataset->getRow() );
array_push($aCasesList, $oDataset->getRow());
}
$filedNames = Array ("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER"
$filedNames = array("APP_UID","APP_NUMBER","APP_UPDATE_DATE","DEL_PRIORITY","DEL_INDEX","TAS_UID","DEL_INIT_DATE","DEL_FINISH_DATE","USR_UID","APP_STATUS","DEL_TASK_DUE_DATE","APP_CURRENT_USER","APP_TITLE","APP_PRO_TITLE","APP_TAS_TITLE","APP_DEL_PREVIOUS_USER"
);
$aCasesList = array_merge( Array ($filedNames
), $aCasesList );
$aCasesList = array_merge(array($filedNames
), $aCasesList);
// G::pr($aCasesList); die;
require_once ('classes/class.xmlfield_InputPM.php');
require_once('classes/class.xmlfield_InputPM.php');
global $_DBArray;
$_DBArray['reassign_byuser'] = $aCasesList;
$_SESSION['_DBArray'] = $_DBArray;
$oCriteria = new Criteria( 'dbarray' );
$oCriteria->setDBArrayTable( 'reassign_byuser' );
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('reassign_byuser');
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/reassignByUser.js' );
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/cases/reassignByUser.js');
$G_PUBLISH->ROWS_PER_PAGE = 12;
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, Array ('FROM_USR_UID' => $sUserToReassign
) );
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-reassigByUser', 'cases/cases_ToReassignByUserList', $oCriteria, array('FROM_USR_UID' => $sUserToReassign
));
}
G::RenderPage( 'publish', 'blank' );
G::RenderPage('publish', 'blank');
} catch (Exception $oException) {
$token = strtotime("now");
PMException::registerErrorLog($oException, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)));
die;
}
?>
<div id="publisherContent[10]" style="display: none"></div>
<?php

View File

@@ -22,15 +22,15 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
/* Permissions */
switch ($RBAC->userCanAccess( 'PM_CASES' )) {
switch ($RBAC->userCanAccess('PM_CASES')) {
case - 2:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case - 1:
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
G::header( 'location: ../login/login' );
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
@@ -57,7 +57,7 @@ $aUserCanAccess = $objCase->userAuthorization(
);
if (isset($_SESSION['ACTION']) && ($_SESSION['ACTION'] == 'jump')) {
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['ACTION']);
$Fields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['ACTION']);
$process = new Process();
$processData = $process->load($Fields['PRO_UID']);
if (isset($processData['PRO_DYNAFORMS']['PROCESS']) && $processData['PRO_DYNAFORMS']['PROCESS'] != '' &&
@@ -70,23 +70,23 @@ if (isset($_SESSION['ACTION']) && ($_SESSION['ACTION'] == 'jump')) {
exit();
}
} else {
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'], $_SESSION['INDEX']);
$Fields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX']);
}
if (!$aUserCanAccess['participated'] && !$aUserCanAccess['supervisor'] && !$aUserCanAccess['rolesPermissions']['PM_ALLCASES'] && !$aUserCanAccess['objectPermissions']['SUMMARY_FORM']) {
$aMessage['MESSAGE'] = G::LoadTranslation( 'ID_NO_PERMISSION_NO_PARTICIPATED' );
$aMessage['MESSAGE'] = G::LoadTranslation('ID_NO_PERMISSION_NO_PARTICIPATED');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
G::RenderPage( 'publishBlank', 'blank' );
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
G::RenderPage('publishBlank', 'blank');
die();
}
if (isset( $aRow['APP_TYPE'] )) {
if (isset($aRow['APP_TYPE'])) {
switch ($aRow['APP_TYPE']) {
case 'PAUSE':
$Fields['STATUS'] = ucfirst( strtolower( G::LoadTranslation( 'ID_PAUSED' ) ) );
$Fields['STATUS'] = ucfirst(strtolower(G::LoadTranslation('ID_PAUSED')));
break;
case 'CANCEL':
$Fields['STATUS'] = ucfirst( strtolower( G::LoadTranslation( 'ID_CANCELLED' ) ) );
$Fields['STATUS'] = ucfirst(strtolower(G::LoadTranslation('ID_CANCELLED')));
break;
}
}
@@ -97,16 +97,16 @@ if (isset($_GET['action']) && $_GET['action'] == 'paused') {
}
/* Render page */
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "
$oHeadPublisher->addScriptCode("
if (typeof parent != 'undefined') {
if (parent.showCaseNavigatorPanel) {
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
}
}" );
}");
$oHeadPublisher->addScriptCode( '
$oHeadPublisher->addScriptCode('
var Cse = {};
Cse.panels = {};
var leimnud = new maborak();
@@ -116,21 +116,21 @@ $oHeadPublisher->addScriptCode( '
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
leimnud.exec(leimnud.fix.memoryLeak);
' );
');
require_once 'classes/model/Process.php';
$objProc = new Process();
$aProc = $objProc->load( $Fields['PRO_UID'] );
$aProc = $objProc->load($Fields['PRO_UID']);
$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];
$objTask = new Task();
if(!isset($Fields['TAS_UID']) || $Fields['TAS_UID'] == '') {
if (!isset($Fields['TAS_UID']) || $Fields['TAS_UID'] == '') {
$Fields['TAS_UID'] = $Fields['APP_DATA']['TASK'];
}
$tasksInParallel = explode('|', $Fields['TAS_UID']);
$tasksInParallel = array_filter($tasksInParallel, function($value) {
$tasksInParallel = array_filter($tasksInParallel, function ($value) {
return !empty($value);
});
$nTasksInParallel = count($tasksInParallel);
@@ -144,22 +144,22 @@ if ($nTasksInParallel > 1) {
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
$objUser = new Users();
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addScriptFile('/jscore/cases/core/cases_Step.js');
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '' );
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Resume.xml', '', $Fields, '');
if ($Fields['APP_STATUS'] != 'COMPLETED') {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task_Title.xml', '', $Fields, '' );
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Resume_Current_Task_Title.xml', '', $Fields, '');
$objDel = new AppDelegation();
$parallel = $objDel->LoadParallel($Fields['APP_UID']);
$FieldsPar = $Fields;
foreach ($parallel as $row) {
$FieldsPar['TAS_UID'] = $row['TAS_UID'];
$aTask = $objTask->load( $row['TAS_UID'] );
$aTask = $objTask->load($row['TAS_UID']);
$FieldsPar['TAS_TITLE'] = $aTask['TAS_TITLE'];
$FieldsPar['USR_UID'] = $row['USR_UID'];
if (isset($row['USR_UID']) && !empty($row['USR_UID'])) {
$aUser = $objUser->loadDetails ($row['USR_UID']);
$aUser = $objUser->loadDetails($row['USR_UID']);
$FieldsPar['CURRENT_USER'] = $aUser['USR_FULLNAME'];
} else {
$FieldsPar['CURRENT_USER'] = '';
@@ -168,7 +168,7 @@ if ($Fields['APP_STATUS'] != 'COMPLETED') {
$FieldsPar['DEL_INIT_DATE'] = $row['DEL_INIT_DATE'];
$FieldsPar['DEL_TASK_DUE_DATE'] = $row['DEL_TASK_DUE_DATE'];
$FieldsPar['DEL_FINISH_DATE'] = $row['DEL_FINISH_DATE'];
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $FieldsPar);
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $FieldsPar);
}
}

View File

@@ -23,23 +23,22 @@
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/
global $RBAC;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) {
if (($RBAC_Response = $RBAC->userCanAccess("PM_LOGIN")) != 1) {
return $RBAC_Response;
}
$RBAC->requirePermissions( 'PM_SETUP' );
$RBAC->requirePermissions('PM_SETUP');
$G_PUBLISH = new Publisher();
$c = new Configurations();
$configPage = $c->getConfiguration( 'casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
$configPage = $c->getConfiguration('casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher = headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'cases/casesSchedulerLog', false ); //adding a javascript file .js
$oHeadPublisher->addContent( 'cases/casesSchedulerLog' ); //adding a html file .html.
$oHeadPublisher->addExtJsScript('cases/casesSchedulerLog', false); //adding a javascript file .js
$oHeadPublisher->addContent('cases/casesSchedulerLog'); //adding a html file .html.
$oHeadPublisher->assign( 'CONFIG', $Config );
G::RenderPage( 'publish', 'extJs' );
$oHeadPublisher->assign('CONFIG', $Config);
G::RenderPage('publish', 'extJs');

View File

@@ -26,26 +26,26 @@
*
* @author David Callizaya <davidsantos@colosa.com>
*/
if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession" ) {
if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession") {
if (!isset($_SESSION['USER_LOGGED'])) {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
if ((isset($_POST['request'])) && ($_POST['request'] == true)) {
$response = new stdclass();
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
$response->lostSession = true;
print G::json_encode( $response );
print G::json_encode($response);
die();
} else {
G::SendMessageText( G::LoadTranslation('ID_LOGIN_TO_SEE_OUTPUTDOCS'), "WARNING" );
G::SendMessageText(G::LoadTranslation('ID_LOGIN_TO_SEE_OUTPUTDOCS'), "WARNING");
G::header("location: " . "/");
die();
}
} else {
$response = new stdclass();
print G::json_encode( $response );
print G::json_encode($response);
die();
}
}
require_once ("classes/model/AppDocumentPeer.php");
require_once("classes/model/AppDocumentPeer.php");
$oAppDocument = new AppDocument();
if (empty($_GET['a'])) {
@@ -64,21 +64,20 @@ if (empty($_GET['v'])) {
//Send the parameter v = Version
//Send the parameter a = Case UID
if (defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0) {
if (!$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) {
G::header('Location: /errors/error403.php');
die();
}
}
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], $docVersion );
$oAppDocument->Fields = $oAppDocument->load($_GET['a'], $docVersion);
$sAppDocUid = $oAppDocument->getAppDocUid();
$iDocVersion = $oAppDocument->getDocVersion();
$info = pathinfo( $oAppDocument->getAppDocFilename() );
$ext = (isset($info['extension'])?$info['extension']:'');//BUG fix: must handle files without any extension
$info = pathinfo($oAppDocument->getAppDocFilename());
$ext = (isset($info['extension']) ? $info['extension'] : '');//BUG fix: must handle files without any extension
if (isset( $_GET['b'] )) {
if (isset($_GET['b'])) {
if ($_GET['b'] == '0') {
$bDownload = false;
} else {
@@ -91,41 +90,39 @@ if (isset( $_GET['b'] )) {
$app_uid = G::getPathFromUID($oAppDocument->Fields['APP_UID']);
$file = G::getPathFromFileUID($oAppDocument->Fields['APP_UID'], $sAppDocUid);
$realPath = PATH_DOCUMENT . $app_uid . '/' . $file[0] . $file[1] . '_' . $iDocVersion . '.' . $ext;
$realPath = PATH_DOCUMENT . $app_uid . '/' . $file[0] . $file[1] . '_' . $iDocVersion . '.' . $ext;
$realPath1 = PATH_DOCUMENT . $app_uid . '/' . $file[0] . $file[1] . '.' . $ext;
$sw_file_exists = false;
if (file_exists( $realPath )) {
if (file_exists($realPath)) {
$sw_file_exists = true;
} elseif (file_exists( $realPath1 )) {
} elseif (file_exists($realPath1)) {
$sw_file_exists = true;
$realPath = $realPath1;
}
if (! $sw_file_exists) {
$error_message = G::LoadTranslation( 'ID_ERROR_STREAMING_FILE' );
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
if (!$sw_file_exists) {
$error_message = G::LoadTranslation('ID_ERROR_STREAMING_FILE');
if ((isset($_POST['request'])) && ($_POST['request'] == true)) {
$res['success'] = 'failure';
$res['message'] = $error_message;
print G::json_encode( $res );
print G::json_encode($res);
} else {
G::SendMessageText( $error_message, "ERROR" );
$backUrlObj = explode( "sys" . config("system.workspace"), $_SERVER['HTTP_REFERER'] );
G::header( "location: " . "/sys" . config("system.workspace") . $backUrlObj[1] );
G::SendMessageText($error_message, "ERROR");
$backUrlObj = explode("sys" . config("system.workspace"), $_SERVER['HTTP_REFERER']);
G::header("location: " . "/sys" . config("system.workspace") . $backUrlObj[1]);
die();
}
} else {
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
if ((isset($_POST['request'])) && ($_POST['request'] == true)) {
$res['success'] = 'success';
$res['message'] = $oAppDocument->Fields['APP_DOC_FILENAME'];
print G::json_encode( $res );
print G::json_encode($res);
} else {
$nameFile = $oAppDocument->Fields['APP_DOC_FILENAME'];
$licensedFeatures = &PMLicensedFeatures::getSingleton();
$licensedFeatures = PMLicensedFeatures::getSingleton();
$downloadStatus = false;
/*----------------------------------********---------------------------------*/
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
$drive = new AppDocumentDrive();
if ($drive->getStatusDrive()) {
$fieldDrive = $oAppDocument->getAppDocDriveDownload();
@@ -135,7 +132,7 @@ if (! $sw_file_exists) {
if ($fileContent !== null) {
$downloadStatus = true;
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename='.$nameFile);
header('Content-Disposition: attachment; filename=' . $nameFile);
header('Content-Transfer-Encoding: binary');
header('Set-Cookie: fileLoading=true');
echo $fileContent;
@@ -145,11 +142,7 @@ if (! $sw_file_exists) {
}
/*----------------------------------********---------------------------------*/
if (!$downloadStatus) {
G::streamFile( $realPath, $bDownload, $nameFile ); //download
G::streamFile($realPath, $bDownload, $nameFile); //download
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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