HOR-4676
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\BusinessModel\Cases as BmCases;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
@@ -7,7 +8,7 @@ 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();
|
||||
}
|
||||
|
||||
@@ -15,38 +16,54 @@ $filter = new InputFilter();
|
||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
|
||||
if(isset($_REQUEST['action']) && $_REQUEST['action'] == "verifySession" ) {
|
||||
if (isset($_REQUEST['action']) && $_REQUEST['action'] == "verifySession") {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$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 {
|
||||
$response = new stdclass();
|
||||
//When the user has session we will to validate the permissions over other actions
|
||||
/** Action: Reassign from openCase */
|
||||
global $RBAC;
|
||||
$proUid = isset($_SESSION['PROCESS']) ? $_SESSION['PROCESS'] : '';
|
||||
$appUid = isset($_SESSION['APPLICATION']) ? $_SESSION['APPLICATION'] : '';
|
||||
$tasUid = isset($_SESSION['TASK']) ? $_SESSION['TASK'] : '';
|
||||
|
||||
//Check if the user is a supervisor to this Process
|
||||
GLOBAL $RBAC;
|
||||
if($RBAC->userCanAccess('PM_REASSIGNCASE') == 1){
|
||||
$response->reassigncase = true;
|
||||
$response->message = '';
|
||||
} elseif ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
$response->reassigncase = false;
|
||||
$response->message = G::LoadTranslation('ID_NOT_ABLE_REASSIGN');
|
||||
$processUser = new ProcessUser();
|
||||
$listProcess = $processUser->getProUidSupervisor($_SESSION['USER_LOGGED']);
|
||||
if (in_array($_SESSION['PROCESS'], $listProcess)) {
|
||||
$response = new stdclass();
|
||||
$userAuthorization = [];
|
||||
if (!empty($proUid) && !empty($appUid)) {
|
||||
$cases = new BmCases();
|
||||
$userAuthorization = $cases->userAuthorization(
|
||||
$RBAC->aUserInfo['USER_INFO']['USR_UID'],
|
||||
$proUid,
|
||||
$appUid,
|
||||
['PM_REASSIGNCASE', 'PM_REASSIGNCASE_SUPERVISOR'],
|
||||
['REASSIGN_MY_CASES' => ''],
|
||||
true,
|
||||
$tasUid
|
||||
);
|
||||
|
||||
if (
|
||||
$userAuthorization['rolesPermissions']['PM_REASSIGNCASE'] ||
|
||||
($userAuthorization['rolesPermissions']['PM_REASSIGNCASE_SUPERVISOR'] && $userAuthorization['supervisor']) ||
|
||||
in_array($appUid, $userAuthorization['objectPermissions']['REASSIGN_MY_CASES'])
|
||||
) {
|
||||
$response->reassigncase = true;
|
||||
$response->message = '';
|
||||
}
|
||||
}
|
||||
$response->reassigncase = false;
|
||||
$response->message = G::LoadTranslation('ID_NOT_ABLE_REASSIGN');
|
||||
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
class Ajax
|
||||
{
|
||||
|
||||
public function getCaseMenu($params)
|
||||
{
|
||||
global $G_TMP_MENU;
|
||||
@@ -57,13 +74,13 @@ class Ajax
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load('caseOptions');
|
||||
|
||||
$menuOptions = Array();
|
||||
$menuOptions = array();
|
||||
foreach ($oMenu->Options as $i => $action) {
|
||||
$option = Array('id' => $oMenu->Id[$i], 'label' => $oMenu->Labels[$i], 'action' => $action);
|
||||
$option = array('id' => $oMenu->Id[$i], 'label' => $oMenu->Labels[$i], 'action' => $action);
|
||||
|
||||
switch ($option['id']) {
|
||||
case 'STEPS':
|
||||
$option['options'] = Array();
|
||||
$option['options'] = array();
|
||||
break;
|
||||
case 'ACTIONS':
|
||||
$option['options'] = $this->getActionOptions();
|
||||
@@ -84,7 +101,7 @@ class Ajax
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -131,82 +148,104 @@ class Ajax
|
||||
|
||||
public function getInformationOptions()
|
||||
{
|
||||
$options = Array();
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_PROCESS_MAP'), 'fn' => 'processMap');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_PROCESS_INFORMATION'), 'fn' => 'processInformation');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_TASK_INFORMATION'), 'fn' => 'taskInformation');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_CASE_HISTORY'), 'fn' => 'caseHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_HISTORY_MESSAGE_CASE'), 'fn' => 'messageHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_DYNAFORMS'), 'fn' => 'dynaformHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_DYNAFORM_HISTORY'), 'fn' => 'changeLogHistory');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_UPLOADED_DOCUMENTS'), 'fn' => 'uploadedDocuments');
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_GENERATED_DOCUMENTS'), 'fn' => 'generatedDocuments');
|
||||
$options = array();
|
||||
$options[] = array('text' => G::LoadTranslation('ID_PROCESS_MAP'), 'fn' => 'processMap');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_PROCESS_INFORMATION'), 'fn' => 'processInformation');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_TASK_INFORMATION'), 'fn' => 'taskInformation');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_CASE_HISTORY'), 'fn' => 'caseHistory');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_HISTORY_MESSAGE_CASE'), 'fn' => 'messageHistory');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_DYNAFORMS'), 'fn' => 'dynaformHistory');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_DYNAFORM_HISTORY'), 'fn' => 'changeLogHistory');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_UPLOADED_DOCUMENTS'), 'fn' => 'uploadedDocuments');
|
||||
$options[] = array('text' => G::LoadTranslation('ID_GENERATED_DOCUMENTS'), 'fn' => 'generatedDocuments');
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the options menu from action
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getActionOptions()
|
||||
{
|
||||
$APP_UID = $_SESSION['APPLICATION'];
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
$index = $_SESSION['INDEX'];
|
||||
$proUid = $_SESSION['PROCESS'];
|
||||
$tasUid = $_SESSION['TASK'];
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(AppThreadPeer::APP_THREAD_PARENT);
|
||||
$c->add(AppThreadPeer::APP_UID, $APP_UID);
|
||||
$c->add(AppThreadPeer::APP_UID, $appUid);
|
||||
$c->add(AppThreadPeer::APP_THREAD_STATUS, 'OPEN');
|
||||
$cant = AppThreadPeer::doCount($c);
|
||||
|
||||
$oCase = new Cases();
|
||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION'], $_SESSION['INDEX']);
|
||||
$aFields = $oCase->loadCase($appUid, $index);
|
||||
|
||||
GLOBAL $RBAC;
|
||||
global $RBAC;
|
||||
|
||||
$options = Array();
|
||||
$options = [];
|
||||
|
||||
switch ($aFields['APP_STATUS']) {
|
||||
case 'DRAFT':
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate');
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate'];
|
||||
} else {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase'];
|
||||
}
|
||||
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_DELETE'), 'fn' => 'deleteCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_DELETE'), 'fn' => 'deleteCase'];
|
||||
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign');
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'TO_DO':
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate');
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_PAUSED_CASE'), 'fn' => 'setUnpauseCaseDate'];
|
||||
if ($cant == 1) {
|
||||
if ($RBAC->userCanAccess('PM_CANCELCASE') == 1) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase'];
|
||||
} else {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase', 'hide' => 'hiden');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_CANCEL'), 'fn' => 'cancelCase', 'hide' => 'hiden'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_UNPAUSE'), 'fn' => 'unpauseCase'];
|
||||
}
|
||||
if ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1 || $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) {
|
||||
if (!AppDelay::isPaused($_SESSION['APPLICATION'], $_SESSION['INDEX'])) {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign');
|
||||
$cases = new BmCases();
|
||||
$userAuthorization = $cases->userAuthorization(
|
||||
$RBAC->aUserInfo['USER_INFO']['USR_UID'],
|
||||
$proUid,
|
||||
$appUid,
|
||||
[],
|
||||
['REASSIGN_MY_CASES' => ''],
|
||||
false,
|
||||
$tasUid
|
||||
);
|
||||
if (
|
||||
$RBAC->userCanAccess('PM_REASSIGNCASE') == 1
|
||||
|| $RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1
|
||||
|| in_array($appUid, $userAuthorization['objectPermissions']['REASSIGN_MY_CASES'])
|
||||
) {
|
||||
if (!AppDelay::isPaused($appUid, $index)) {
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REASSIGN'), 'fn' => 'getUsersToReassign'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'CANCELLED':
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_REACTIVATE'), 'fn' => 'reactivateCase');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_REACTIVATE'), 'fn' => 'reactivateCase'];
|
||||
break;
|
||||
}
|
||||
|
||||
if ($_SESSION["TASK"] != "" && $_SESSION["TASK"] != "-1") {
|
||||
$oTask = new Task();
|
||||
$tasksInParallel = explode('|', $_SESSION['TASK']);
|
||||
$tasksInParallel = array_filter($tasksInParallel, function($value) {
|
||||
$tasksInParallel = array_filter($tasksInParallel, function ($value) {
|
||||
return !empty($value);
|
||||
});
|
||||
$nTasksInParallel = count($tasksInParallel);
|
||||
@@ -218,9 +257,10 @@ class Ajax
|
||||
}
|
||||
|
||||
if ($aTask['TAS_TYPE'] == 'ADHOC') {
|
||||
$options[] = Array('text' => G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn' => 'adhocAssignmentUsers');
|
||||
$options[] = ['text' => G::LoadTranslation('ID_ADHOC_ASSIGNMENT'), 'fn' => 'adhocAssignmentUsers'];
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
@@ -236,7 +276,7 @@ class Ajax
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
//$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
|
||||
$oHeadPublisher->addScriptCode('
|
||||
@@ -329,7 +369,7 @@ class Ajax
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
$process = new Process();
|
||||
@@ -346,7 +386,7 @@ class Ajax
|
||||
$conf = new Configurations();
|
||||
$conf->getFormats();
|
||||
$processData['PRO_CREATE_DATE'] = $conf->getSystemDate($processData['PRO_CREATE_DATE']);
|
||||
print (G::json_encode($processData));
|
||||
print(G::json_encode($processData));
|
||||
}
|
||||
|
||||
public function getTaskInformation()
|
||||
@@ -355,7 +395,7 @@ class Ajax
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -367,14 +407,14 @@ class Ajax
|
||||
|
||||
$taskData = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($taskData);
|
||||
|
||||
print (G::json_encode($taskData));
|
||||
print(G::json_encode($taskData));
|
||||
}
|
||||
|
||||
public function caseHistory()
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript('cases/caseHistory', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/caseHistory'); //adding a html file .html.
|
||||
@@ -386,7 +426,7 @@ class Ajax
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript('cases/caseMessageHistory', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/caseMessageHistory'); //adding a html file .html.
|
||||
@@ -398,7 +438,7 @@ class Ajax
|
||||
{
|
||||
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.
|
||||
@@ -417,7 +457,7 @@ class Ajax
|
||||
$_SESSION['TASK']
|
||||
);
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript('cases/caseChangeLog', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/caseChangeLog'); //adding a html file .html.
|
||||
@@ -431,12 +471,12 @@ class Ajax
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
@@ -449,7 +489,7 @@ class Ajax
|
||||
{
|
||||
global $G_PUBLISH;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$conf = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/casesUploadedDocumentsPage'); //adding a html file .html.
|
||||
@@ -462,7 +502,7 @@ class Ajax
|
||||
{
|
||||
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.
|
||||
@@ -475,7 +515,7 @@ class Ajax
|
||||
{
|
||||
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.
|
||||
@@ -508,7 +548,7 @@ class Ajax
|
||||
|
||||
// Save the note pause reason
|
||||
if ($_POST['NOTE_REASON'] != '') {
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
require_once("classes/model/AppNotes.php");
|
||||
$appNotes = new AppNotes();
|
||||
$noteContent = addslashes($_POST['NOTE_REASON']);
|
||||
$appNotes->postNewNote($APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_POST['NOTIFY_PAUSE']);
|
||||
@@ -531,11 +571,11 @@ class Ajax
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
|
||||
if(isset($_SESSION['TASK']) && $_SESSION['TASK'] != '-1'){
|
||||
if (isset($_SESSION['TASK']) && $_SESSION['TASK'] != '-1') {
|
||||
$taskUid = $_SESSION['TASK'];
|
||||
} else {
|
||||
$taskUid = $_SESSION['CURRENT_TASK'];
|
||||
@@ -551,7 +591,7 @@ class Ajax
|
||||
$response = [];
|
||||
|
||||
try {
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
$case = new BmCases();
|
||||
|
||||
$result = $case->getUsersToReassign($_SESSION['USER_LOGGED'], $taskUid, ['filter' => $search], $sortField, $sortDir, $start, $limit);
|
||||
|
||||
@@ -578,13 +618,13 @@ class Ajax
|
||||
$TO_USR_UID = $_POST['USR_UID'];
|
||||
try {
|
||||
//Current users of OPEN DEL_INDEX thread
|
||||
if(isset($_SESSION['APPLICATION']) && isset($_SESSION['INDEX'])){
|
||||
if (isset($_SESSION['APPLICATION']) && isset($_SESSION['INDEX'])) {
|
||||
$aCurUser = $oAppDel->getCurrentUsers($_SESSION['APPLICATION'], $_SESSION['INDEX']);
|
||||
}
|
||||
$flagReassign = true;
|
||||
if(!empty($aCurUser)){
|
||||
if (!empty($aCurUser)) {
|
||||
foreach ($aCurUser as $key => $value) {
|
||||
if($value === $TO_USR_UID){
|
||||
if ($value === $TO_USR_UID) {
|
||||
$flagReassign = false;
|
||||
}
|
||||
}
|
||||
@@ -594,7 +634,7 @@ class Ajax
|
||||
}
|
||||
|
||||
//If the currentUser is diferent to nextUser, create the thread
|
||||
if($flagReassign){
|
||||
if ($flagReassign) {
|
||||
$cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
|
||||
}
|
||||
|
||||
@@ -608,7 +648,7 @@ class Ajax
|
||||
|
||||
// Save the note reassign reason
|
||||
if (isset($_POST['NOTE_REASON']) && $_POST['NOTE_REASON'] !== '') {
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
require_once("classes/model/AppNotes.php");
|
||||
$appNotes = new AppNotes();
|
||||
$noteContent = addslashes($_POST['NOTE_REASON']);
|
||||
$notifyReassign = $_POST['NOTIFY_REASSIGN'] === 'true' ? true: false;
|
||||
@@ -641,7 +681,7 @@ class Ajax
|
||||
|
||||
// Save the note pause reason
|
||||
if ($_REQUEST['NOTE_REASON'] != '') {
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
require_once("classes/model/AppNotes.php");
|
||||
$appNotes = new AppNotes();
|
||||
$noteContent = addslashes($_REQUEST['NOTE_REASON']);
|
||||
$appNotes->postNewNote($APP_UID, $_SESSION['USER_LOGGED'], $noteContent, $_REQUEST['NOTIFY_PAUSE']);
|
||||
@@ -750,7 +790,7 @@ class Ajax
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
try {
|
||||
@@ -770,8 +810,7 @@ class Ajax
|
||||
$result = new stdclass();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory');
|
||||
?>
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_DynaformHistory'); ?>
|
||||
<link rel="stylesheet" type="text/css" href="/css/classic.css" />
|
||||
<style type="text/css">
|
||||
html {
|
||||
@@ -948,22 +987,19 @@ class Ajax
|
||||
$a->printView();
|
||||
} else {
|
||||
$G_PUBLISH->AddContent("dynaform", "xmlform", $_SESSION["PROCESS"] . "/" . $_POST["DYN_UID"], "", $Fields["APP_DATA"], "", "", "view");
|
||||
}
|
||||
?>
|
||||
} ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
global $G_FORM; ?>
|
||||
|
||||
function loadForm_<?php echo $G_FORM->id; ?>(parametro1) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
G::RenderPage("publish", "raw");
|
||||
?>
|
||||
G::RenderPage("publish", "raw"); ?>
|
||||
|
||||
<style type="text/css">
|
||||
html {
|
||||
@@ -978,8 +1014,7 @@ class Ajax
|
||||
<script type="text/javascript">
|
||||
|
||||
<?php
|
||||
global $G_FORM;
|
||||
?>
|
||||
global $G_FORM; ?>
|
||||
|
||||
function loadForm_<?php echo $G_FORM->id; ?>(parametro1) {
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Cases as ClassesCases;
|
||||
use ProcessMaker\Util\DateTime;
|
||||
|
||||
$actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
|
||||
@@ -7,7 +8,10 @@ $actionAjax = isset($_REQUEST['actionAjax']) ? $_REQUEST['actionAjax'] : null;
|
||||
switch ($actionAjax) {
|
||||
case 'historyGridList_JXP':
|
||||
global $G_PUBLISH;
|
||||
$criteria = Cases::getTransferHistoryCriteria($_SESSION['APPLICATION']);
|
||||
$appUid = $_SESSION['APPLICATION'];
|
||||
$case = new ClassesCases();
|
||||
$fields = $case->loadCase($appUid);
|
||||
$criteria = Cases::getTransferHistoryCriteria($fields['APP_NUMBER']);
|
||||
|
||||
$dataSet = GulliverBasePeer::doSelectRs($criteria);
|
||||
$totalCount = $dataSet->getRecordCount();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
unset($_SESSION['APPLICATION']);
|
||||
|
||||
//get the action from GET or POST, default is todo
|
||||
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : (isset($_POST['action']) ? $_POST['action'] : 'todo');
|
||||
$openApplicationUid = (isset($_GET['openApplicationUid']))? $_GET['openApplicationUid'] : null;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$filterAction = isset( $_GET['filterAction'] ) ? $_GET['filterAction'] : (isset( $_POST['filterAction'] ) ? $_POST['filterAction'] : '');
|
||||
$filterAction = isset($_GET['filterAction']) ? $_GET['filterAction'] : (isset($_POST['filterAction']) ? $_POST['filterAction'] : '');
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//fix a previous inconsistency
|
||||
@@ -59,32 +59,32 @@ switch ($action) {
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
// oHeadPublisher->setExtSkin( 'xtheme-blue');
|
||||
//get the configuration for this action
|
||||
$conf = new Configurations();
|
||||
try {
|
||||
// the setup for search is the same as the Sent (participated)
|
||||
$confCasesList = $conf->getConfiguration( 'casesList', ($action == 'search' || $action == 'simple_search') ? 'search' : $action );
|
||||
$confCasesList = $conf->getConfiguration('casesList', ($action == 'search' || $action == 'simple_search') ? 'search' : $action);
|
||||
|
||||
$table = null;
|
||||
if (isset($confCasesList['PMTable'])) {
|
||||
$aditionalTable = new AdditionalTables();
|
||||
$table = $aditionalTable->load($confCasesList['PMTable']);
|
||||
}
|
||||
$confCasesList = ($table != null) ? $confCasesList : array ();
|
||||
$confCasesList = ($table != null) ? $confCasesList : array();
|
||||
|
||||
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
} catch (Exception $e) {
|
||||
$confCasesList = array ();
|
||||
$generalConfCasesList = array ();
|
||||
$confCasesList = array();
|
||||
$generalConfCasesList = array();
|
||||
}
|
||||
|
||||
// reassign header configuration
|
||||
$confReassignList = getReassignList();
|
||||
|
||||
// evaluates an action and the configuration for the list that will be rendered
|
||||
$config = getAdditionalFields( $action, $confCasesList );
|
||||
$config = getAdditionalFields($action, $confCasesList);
|
||||
|
||||
$columns = $config['caseColumns'];
|
||||
$readerFields = $config['caseReaderFields'];
|
||||
@@ -92,14 +92,14 @@ $reassignColumns = $confReassignList['caseColumns'];
|
||||
$reassignReaderFields = $confReassignList['caseReaderFields'];
|
||||
|
||||
// if the general settings has been set the pagesize values are extracted from that record
|
||||
if (isset( $generalConfCasesList['casesListRowNumber'] ) && ! empty( $generalConfCasesList['casesListRowNumber'] )) {
|
||||
$pageSize = intval( $generalConfCasesList['casesListRowNumber'] );
|
||||
if (isset($generalConfCasesList['casesListRowNumber']) && ! empty($generalConfCasesList['casesListRowNumber'])) {
|
||||
$pageSize = intval($generalConfCasesList['casesListRowNumber']);
|
||||
} else {
|
||||
$pageSize = intval( $config['rowsperpage'] );
|
||||
$pageSize = intval($config['rowsperpage']);
|
||||
}
|
||||
|
||||
// if the general settings has been set the dateFormat values are extracted from that record
|
||||
if (isset( $generalConfCasesList['casesListDateFormat'] ) && ! empty( $generalConfCasesList['casesListDateFormat'] )) {
|
||||
if (isset($generalConfCasesList['casesListDateFormat']) && ! empty($generalConfCasesList['casesListDateFormat'])) {
|
||||
$dateFormat = $generalConfCasesList['casesListDateFormat'];
|
||||
} else {
|
||||
$dateFormat = $config['dateformat'];
|
||||
@@ -109,14 +109,14 @@ if ($action == 'draft') {
|
||||
//array_unshift ( $columns, array( 'header'=> '', 'width'=> 50, 'sortable'=> false, 'id'=> 'deleteLink' ) );
|
||||
}
|
||||
if ($action == 'selfservice') {
|
||||
array_unshift( $columns, array ('header' => '','width' => 50,'sortable' => false,'id' => 'viewLink') );
|
||||
array_unshift($columns, array('header' => '','width' => 50,'sortable' => false,'id' => 'viewLink'));
|
||||
}
|
||||
|
||||
if ($action == 'paused') {
|
||||
//array_unshift ( $columns, array( 'header'=> '', 'width'=> 50, 'sortable'=> false, 'id'=> 'unpauseLink' ) );
|
||||
}
|
||||
|
||||
$userUid = (isset( $_SESSION['USER_LOGGED'] ) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$userUid = (isset($_SESSION['USER_LOGGED']) && $_SESSION['USER_LOGGED'] != '') ? $_SESSION['USER_LOGGED'] : null;
|
||||
$oAppCache = new AppCacheView();
|
||||
$oAppCache->confCasesList = $confCasesList;
|
||||
$solrEnabled = 0;
|
||||
@@ -164,8 +164,8 @@ $oHeadPublisher->assign('columnSearchValues', $columnToSearch); //Sending the li
|
||||
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=') ) {
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=')) {
|
||||
$filterStatus[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
||||
$filterStatus[] = array('ON_TIME', G::LoadTranslation('ID_ON_TIME'));
|
||||
$filterStatus[] = array('AT_RISK', G::LoadTranslation('ID_AT_RISK'));
|
||||
@@ -184,17 +184,18 @@ if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjB
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
//menu permissions
|
||||
/** Define actions menu in the cases list */
|
||||
$cnt = '';
|
||||
$reassignCase = ($RBAC->userCanAccess( 'PM_REASSIGNCASE' ) == 1) ? 'true' : 'false';
|
||||
$reassignCaseSup = ($RBAC->userCanAccess( 'PM_REASSIGNCASE_SUPERVISOR' ) == 1) ? 'true':'false';
|
||||
$oHeadPublisher->assign( 'varReassignCase', $reassignCase );
|
||||
$oHeadPublisher->assign( 'varReassignCaseSupervisor', $reassignCaseSup );
|
||||
$reassignCase = ($RBAC->userCanAccess('PM_REASSIGNCASE') == 1) ? 'true' : 'false';
|
||||
$reassignCaseSup = ($RBAC->userCanAccess('PM_REASSIGNCASE_SUPERVISOR') == 1) ? 'true' : 'false';
|
||||
$oHeadPublisher->assign('varReassignCase', $reassignCase);
|
||||
$oHeadPublisher->assign('varReassignCaseSupervisor', $reassignCaseSup);
|
||||
|
||||
$c = new Configurations();
|
||||
$oHeadPublisher->addExtJsScript( 'app/main', true );
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesListExtJs' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$oHeadPublisher->addExtJsScript('app/main', true);
|
||||
$oHeadPublisher->addExtJsScript('cases/casesList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('cases/casesListExtJs'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('extJsViewState', $oHeadPublisher->getExtJsViewState());
|
||||
$oHeadPublisher->assign('isIE', Bootstrap::isIE());
|
||||
$oHeadPublisher->assign('__OPEN_APPLICATION_UID__', $openApplicationUid);
|
||||
@@ -202,39 +203,39 @@ $oHeadPublisher->assign('__OPEN_APPLICATION_UID__', $openApplicationUid);
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$fromPlugin = $oPluginRegistry->getOpenReassignCallback();
|
||||
$jsFunction = false;
|
||||
if(sizeof($fromPlugin)) {
|
||||
if (sizeof($fromPlugin)) {
|
||||
/** @var \ProcessMaker\Plugins\Interfaces\OpenReassignCallback $jsFile */
|
||||
foreach($fromPlugin as $jsFile) {
|
||||
foreach ($fromPlugin as $jsFile) {
|
||||
$jsFile = $jsFile->getCallBackFile();
|
||||
if(is_file($jsFile)) {
|
||||
if (is_file($jsFile)) {
|
||||
$jsFile = file_get_contents($jsFile);
|
||||
if(!empty($jsFile)) {
|
||||
if (!empty($jsFile)) {
|
||||
$jsFunction[] = $jsFile;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$oHeadPublisher->assign( 'openReassignCallback', $jsFunction );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->assign('openReassignCallback', $jsFunction);
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
function getCategoryArray ()
|
||||
function getCategoryArray()
|
||||
{
|
||||
global $oAppCache;
|
||||
require_once 'classes/model/ProcessCategory.php';
|
||||
$category[] = array ("",G::LoadTranslation( "ID_ALL_CATEGORIES" )
|
||||
$category[] = array("",G::LoadTranslation("ID_ALL_CATEGORIES")
|
||||
);
|
||||
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
|
||||
$criteria->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME );
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
||||
$criteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
|
||||
$criteria->addAscendingOrderByColumn(ProcessCategoryPeer::CATEGORY_NAME);
|
||||
|
||||
$dataset = ProcessCategoryPeer::doSelectRS( $criteria );
|
||||
$dataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$dataset = ProcessCategoryPeer::doSelectRS($criteria);
|
||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$dataset->next();
|
||||
|
||||
while ($row = $dataset->getRow()) {
|
||||
$category[] = array ($row['CATEGORY_UID'],$row['CATEGORY_NAME']);
|
||||
$category[] = array($row['CATEGORY_UID'],$row['CATEGORY_NAME']);
|
||||
$dataset->next();
|
||||
}
|
||||
return $category;
|
||||
@@ -247,9 +248,9 @@ function getStatusArray($action, $userUid)
|
||||
$status[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
||||
foreach ($aStatus as $key => $value) {
|
||||
if ($action == 'search') {
|
||||
$status[] = array ($value, G::LoadTranslation( 'ID_CASES_STATUS_' . $key ));
|
||||
$status[] = array($value, G::LoadTranslation('ID_CASES_STATUS_' . $key));
|
||||
} else {
|
||||
$status[] = array ($key, G::LoadTranslation( 'ID_CASES_STATUS_' . $key ));
|
||||
$status[] = array($key, G::LoadTranslation('ID_CASES_STATUS_' . $key));
|
||||
}
|
||||
}
|
||||
return $status;
|
||||
@@ -259,66 +260,66 @@ function getStatusArray($action, $userUid)
|
||||
* get the list configuration headers of the cases checked for reassign, for the
|
||||
* reassign cases list.
|
||||
*/
|
||||
function getReassignList ()
|
||||
function getReassignList()
|
||||
{
|
||||
$caseColumns = array ();
|
||||
$caseColumns[] = array ('header' => '#','dataIndex' => 'APP_NUMBER','width' => 40);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_SUMMARY' ),'dataIndex' => 'CASE_SUMMARY','width' => 45,'hidden' => true
|
||||
$caseColumns = array();
|
||||
$caseColumns[] = array('header' => '#','dataIndex' => 'APP_NUMBER','width' => 40);
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_SUMMARY'),'dataIndex' => 'CASE_SUMMARY','width' => 45,'hidden' => true
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_CASES_NOTES' ),'dataIndex' => 'CASE_NOTES_COUNT','width' => 45,'hidden' => true
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_CASES_NOTES'),'dataIndex' => 'CASE_NOTES_COUNT','width' => 45,'hidden' => true
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_CASE' ),'dataIndex' => 'APP_TITLE','width' => 100,'hidden' => true
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_CASE'),'dataIndex' => 'APP_TITLE','width' => 100,'hidden' => true
|
||||
);
|
||||
$caseColumns[] = array ('header' => 'CaseId','dataIndex' => 'APP_UID','width' => 200,'hidden' => true,'hideable' => false
|
||||
$caseColumns[] = array('header' => 'CaseId','dataIndex' => 'APP_UID','width' => 200,'hidden' => true,'hideable' => false
|
||||
);
|
||||
$caseColumns[] = array ('header' => 'User','dataIndex' => 'USR_UID','width' => 200,'hidden' => true,'hideable' => false
|
||||
$caseColumns[] = array('header' => 'User','dataIndex' => 'USR_UID','width' => 200,'hidden' => true,'hideable' => false
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_TASK' ),'dataIndex' => 'APP_TAS_TITLE','width' => 120
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_TASK'),'dataIndex' => 'APP_TAS_TITLE','width' => 120
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_PROCESS' ),'dataIndex' => 'APP_PRO_TITLE','width' => 120
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_PROCESS'),'dataIndex' => 'APP_PRO_TITLE','width' => 120
|
||||
);
|
||||
$caseColumns[] = array ('header' => 'Reassigned Uid','dataIndex' => 'APP_REASSIGN_USER_UID','width' => 120,'hidden' => true,'hideable' => false
|
||||
$caseColumns[] = array('header' => 'Reassigned Uid','dataIndex' => 'APP_REASSIGN_USER_UID','width' => 120,'hidden' => true,'hideable' => false
|
||||
);
|
||||
$caseColumns[] = array ('header' => 'Reassigned Uid','dataIndex' => 'TAS_UID','width' => 120,'hidden' => true,'hideable' => false
|
||||
$caseColumns[] = array('header' => 'Reassigned Uid','dataIndex' => 'TAS_UID','width' => 120,'hidden' => true,'hideable' => false
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_ASSIGNED_TO' ),'dataIndex' => 'APP_CURRENT_USER','width' => 170
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_ASSIGNED_TO'),'dataIndex' => 'APP_CURRENT_USER','width' => 170
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_REASSIGNED_TO' ),'dataIndex' => 'APP_REASSIGN_USER','width' => 170
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_REASSIGNED_TO'),'dataIndex' => 'APP_REASSIGN_USER','width' => 170
|
||||
);
|
||||
$caseColumns[] = array ('header' => G::LoadTranslation( 'ID_REASON' ),'dataIndex' => 'NOTE_REASON','width' => 170
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_REASON'),'dataIndex' => 'NOTE_REASON','width' => 170
|
||||
);
|
||||
$caseColumns[] = array('header' => G::LoadTranslation('ID_NOTIFY'), 'dataIndex' => 'NOTIFY_REASSIGN', 'width' => 100
|
||||
);
|
||||
|
||||
$caseReaderFields = array ();
|
||||
$caseReaderFields[] = array ('name' => 'APP_NUMBER');
|
||||
$caseReaderFields[] = array ('name' => 'APP_TITLE');
|
||||
$caseReaderFields[] = array ('name' => 'APP_UID');
|
||||
$caseReaderFields[] = array ('name' => 'USR_UID');
|
||||
$caseReaderFields[] = array ('name' => 'APP_TAS_TITLE');
|
||||
$caseReaderFields[] = array ('name' => 'APP_PRO_TITLE');
|
||||
$caseReaderFields[] = array ('name' => 'APP_REASSIGN_USER_UID');
|
||||
$caseReaderFields[] = array ('name' => 'TAS_UID');
|
||||
$caseReaderFields[] = array ('name' => 'APP_REASSIGN_USER');
|
||||
$caseReaderFields[] = array ('name' => 'CASE_SUMMARY');
|
||||
$caseReaderFields[] = array ('name' => 'CASE_NOTES_COUNT');
|
||||
$caseReaderFields[] = array ('name' => 'APP_CURRENT_USER');
|
||||
$caseReaderFields = array();
|
||||
$caseReaderFields[] = array('name' => 'APP_NUMBER');
|
||||
$caseReaderFields[] = array('name' => 'APP_TITLE');
|
||||
$caseReaderFields[] = array('name' => 'APP_UID');
|
||||
$caseReaderFields[] = array('name' => 'USR_UID');
|
||||
$caseReaderFields[] = array('name' => 'APP_TAS_TITLE');
|
||||
$caseReaderFields[] = array('name' => 'APP_PRO_TITLE');
|
||||
$caseReaderFields[] = array('name' => 'APP_REASSIGN_USER_UID');
|
||||
$caseReaderFields[] = array('name' => 'TAS_UID');
|
||||
$caseReaderFields[] = array('name' => 'APP_REASSIGN_USER');
|
||||
$caseReaderFields[] = array('name' => 'CASE_SUMMARY');
|
||||
$caseReaderFields[] = array('name' => 'CASE_NOTES_COUNT');
|
||||
$caseReaderFields[] = array('name' => 'APP_CURRENT_USER');
|
||||
|
||||
return array ('caseColumns' => $caseColumns,'caseReaderFields' => $caseReaderFields,'rowsperpage' => 20,'dateformat' => 'M d, Y'
|
||||
return array('caseColumns' => $caseColumns,'caseReaderFields' => $caseReaderFields,'rowsperpage' => 20,'dateformat' => 'M d, Y'
|
||||
);
|
||||
}
|
||||
|
||||
function getReassignUsersList ()
|
||||
function getReassignUsersList()
|
||||
{
|
||||
$caseColumns = array ();
|
||||
$caseColumns = array();
|
||||
|
||||
$caseReaderFields = array ();
|
||||
$caseReaderFields[] = array ('name' => 'userUid'
|
||||
$caseReaderFields = array();
|
||||
$caseReaderFields[] = array('name' => 'userUid'
|
||||
);
|
||||
$caseReaderFields[] = array ('name' => 'userFullname'
|
||||
$caseReaderFields[] = array('name' => 'userFullname'
|
||||
);
|
||||
|
||||
return array ('caseColumns' => $caseColumns,'caseReaderFields' => $caseReaderFields,'rowsperpage' => 20,'dateformat' => 'M d, Y'
|
||||
return array('caseColumns' => $caseColumns,'caseReaderFields' => $caseReaderFields,'rowsperpage' => 20,'dateformat' => 'M d, Y'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -390,7 +391,7 @@ function getAdditionalFields($action, $confCasesList = array())
|
||||
* This function define the possibles columns for apply the specific search
|
||||
* @return array $filters values of the dropdown
|
||||
*/
|
||||
function getColumnsSearchArray ()
|
||||
function getColumnsSearchArray()
|
||||
{
|
||||
$filters = [];
|
||||
$filters[] = ['APP_TITLE', G::LoadTranslation('ID_CASE_TITLE')];
|
||||
@@ -435,4 +436,4 @@ function getAuthorizationCode($client)
|
||||
|
||||
return $code;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
@@ -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\'; }';
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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
@@ -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>');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* cases_Derivate.php
|
||||
*
|
||||
*/
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
G::SendTemporalMessage('ID_LOGIN_AGAIN', 'warning', 'labels');
|
||||
die('<script type="text/javascript">
|
||||
@@ -62,6 +63,27 @@ try {
|
||||
$processUid = isset($_SESSION['PROCESS']) ? $_SESSION['PROCESS'] : '';
|
||||
//load data
|
||||
$oCase = new Cases();
|
||||
// check if a task was already derivated
|
||||
if (isset($_SESSION["APPLICATION"])
|
||||
&& isset($_SESSION["INDEX"])) {
|
||||
$_SESSION['LAST_DERIVATED_APPLICATION'] = isset($_SESSION['LAST_DERIVATED_APPLICATION'])?$_SESSION['LAST_DERIVATED_APPLICATION']:'';
|
||||
$_SESSION['LAST_DERIVATED_INDEX'] = isset($_SESSION['LAST_DERIVATED_INDEX'])?$_SESSION['LAST_DERIVATED_INDEX']:'';
|
||||
if ($_SESSION["APPLICATION"] === $_SESSION['LAST_DERIVATED_APPLICATION']
|
||||
&& $_SESSION["INDEX"] === $_SESSION['LAST_DERIVATED_INDEX']) {
|
||||
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', [G::LoadTranslation('ID_REOPEN')]));
|
||||
} else {
|
||||
$appDel = new AppDelegation();
|
||||
if ($appDel->alreadyRouted($_SESSION["APPLICATION"], $_SESSION['INDEX'])) {
|
||||
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', [G::LoadTranslation('ID_REOPEN')]));
|
||||
} else {
|
||||
$_SESSION['LAST_DERIVATED_APPLICATION'] = $_SESSION["APPLICATION"];
|
||||
$_SESSION['LAST_DERIVATED_INDEX'] = $_SESSION["INDEX"];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Exception(G::LoadTranslation('ID_INVALID_APPLICATION_ID_MSG', [G::LoadTranslation('ID_REOPEN')]));
|
||||
}
|
||||
|
||||
//warning: we are not using the result value of function thisIsTheCurrentUser, so I'm commenting to optimize speed.
|
||||
//$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs');
|
||||
$appFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
@@ -174,21 +196,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 +260,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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
use ProcessMaker\BusinessModel\Task as BusinessModelTask;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
@@ -38,7 +38,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'] != '' &&
|
||||
@@ -51,23 +51,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;
|
||||
}
|
||||
}
|
||||
@@ -78,16 +78,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();
|
||||
@@ -97,21 +97,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);
|
||||
@@ -125,12 +125,12 @@ 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;
|
||||
@@ -154,7 +154,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,166 +1,164 @@
|
||||
<?php
|
||||
/**
|
||||
* cases_ShowOutputDocument.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.
|
||||
*
|
||||
* Created on 13-02-2008
|
||||
*
|
||||
*
|
||||
* @author David Callizaya <davidsantos@colosa.com>
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession" ) {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
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 );
|
||||
die();
|
||||
} else {
|
||||
G::SendMessageText( G::LoadTranslation('ID_LOGIN_TO_SEE_OUTPUTDOCS'), "WARNING" );
|
||||
G::header("location: " . "/");
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
require_once ("classes/model/AppDocumentPeer.php");
|
||||
require_once ("classes/model/OutputDocumentPeer.php");
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : null );
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$sDocUid = $oAppDocument->Fields['DOC_UID'];
|
||||
|
||||
$oOutputDocument = new OutputDocument();
|
||||
$oOutputDocument->Fields = $oOutputDocument->getByUid($sDocUid);
|
||||
$download = $oOutputDocument->Fields['OUT_DOC_OPEN_TYPE'];
|
||||
|
||||
//Check if the user can be download the Output Document
|
||||
if (defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0) {
|
||||
if (!$oAppDocument->canDownloadOutput(
|
||||
$oAppDocument->Fields['USR_UID'],
|
||||
$_SESSION['USER_LOGGED'],
|
||||
$oOutputDocument->Fields['PRO_UID'],
|
||||
$oAppDocument->Fields['APP_UID'],
|
||||
$sAppDocUid)
|
||||
) {
|
||||
G::header('Location: /errors/error403.php');
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||
if (! isset( $_GET['ext'] )) {
|
||||
$ext = $info['extension'];
|
||||
} else {
|
||||
if ($_GET['ext'] != '') {
|
||||
$ext = $_GET['ext'];
|
||||
} else {
|
||||
$ext = $info['extension'];
|
||||
}
|
||||
}
|
||||
$ver = (isset( $_GET['v'] ) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
|
||||
|
||||
if (! $ver) //This code is in the case the outputdocument won't be versioned
|
||||
$ver = '_1';
|
||||
|
||||
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
|
||||
$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 )) {
|
||||
$sw_file_exists = true;
|
||||
} elseif (file_exists( $realPath1 )) {
|
||||
$sw_file_exists = true;
|
||||
$realPath = $realPath1;
|
||||
} elseif (file_exists( $realPath2 )) {
|
||||
$sw_file_exists = true;
|
||||
$realPath = $realPath2;
|
||||
}
|
||||
|
||||
if (!$sw_file_exists) {
|
||||
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger( PM_UPLOAD_DOCUMENT )) {
|
||||
$error_message = G::LoadTranslation( 'ID_ERROR_FILE_NOT_EXIST', SYS_LANG, array('filename' => $info['basename'] . $ver . '.' . $ext) ) . ' ' . G::LoadTranslation('ID_CONTACT_ADMIN');
|
||||
} else {
|
||||
$error_message = "'" . $info['basename'] . $ver . '.' . $ext . "' " . 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 );
|
||||
} else {
|
||||
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)) {
|
||||
$res['success'] = 'success';
|
||||
$res['message'] = $info['basename'] . $ver . '.' . $ext;
|
||||
print G::json_encode( $res );
|
||||
} else {
|
||||
$nameFile = G::inflect($info['basename'] . $ver) . '.' . $ext;
|
||||
$licensedFeatures = &PMLicensedFeatures::getSingleton();
|
||||
$downloadStatus = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
$fieldDrive = $oAppDocument->getAppDocDriveDownload();
|
||||
$drive->loadUser($_SESSION['USER_LOGGED']);
|
||||
$type = $ext == 'doc' ? 'OUTPUT_DOC' : 'OUTPUT_PDF';
|
||||
$uidDrive = $drive->changeUrlDrive($oAppDocument->Fields, $type);
|
||||
$fileContent = $drive->download($uidDrive);
|
||||
if ($fileContent !== null) {
|
||||
$downloadStatus = true;
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Disposition: attachment; filename='.$nameFile);
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Set-Cookie: fileLoading=true');
|
||||
echo $fileContent;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!$downloadStatus) {
|
||||
G::streamFile( $realPath, $download, $nameFile); //download
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* cases_ShowOutputDocument.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.
|
||||
*
|
||||
* Created on 13-02-2008
|
||||
*
|
||||
*
|
||||
* @author David Callizaya <davidsantos@colosa.com>
|
||||
*/
|
||||
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession") {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
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);
|
||||
die();
|
||||
} else {
|
||||
G::SendMessageText(G::LoadTranslation('ID_LOGIN_TO_SEE_OUTPUTDOCS'), "WARNING");
|
||||
G::header("location: " . "/");
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
print G::json_encode($response);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
require_once("classes/model/AppDocumentPeer.php");
|
||||
require_once("classes/model/OutputDocumentPeer.php");
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load($_GET['a'], (isset($_GET['v'])) ? $_GET['v'] : null);
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$sDocUid = $oAppDocument->Fields['DOC_UID'];
|
||||
|
||||
$oOutputDocument = new OutputDocument();
|
||||
$oOutputDocument->Fields = $oOutputDocument->getByUid($sDocUid);
|
||||
$download = $oOutputDocument->Fields['OUT_DOC_OPEN_TYPE'];
|
||||
|
||||
//Check if the user can be download the Output Document
|
||||
if (defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0) {
|
||||
if (!$oAppDocument->canDownloadOutput(
|
||||
$oAppDocument->Fields['USR_UID'],
|
||||
$_SESSION['USER_LOGGED'],
|
||||
$oOutputDocument->Fields['PRO_UID'],
|
||||
$oAppDocument->Fields['APP_UID'],
|
||||
$sAppDocUid
|
||||
)
|
||||
) {
|
||||
G::header('Location: /errors/error403.php');
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$info = pathinfo($oAppDocument->getAppDocFilename());
|
||||
if (!isset($_GET['ext'])) {
|
||||
$ext = $info['extension'];
|
||||
} else {
|
||||
if ($_GET['ext'] != '') {
|
||||
$ext = $_GET['ext'];
|
||||
} else {
|
||||
$ext = $info['extension'];
|
||||
}
|
||||
}
|
||||
$ver = (isset($_GET['v']) && $_GET['v'] != '') ? '_' . $_GET['v'] : '';
|
||||
|
||||
if (!$ver) { //This code is in the case the outputdocument won't be versioned
|
||||
$ver = '_1';
|
||||
}
|
||||
|
||||
$realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
|
||||
$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)) {
|
||||
$sw_file_exists = true;
|
||||
} elseif (file_exists($realPath1)) {
|
||||
$sw_file_exists = true;
|
||||
$realPath = $realPath1;
|
||||
} elseif (file_exists($realPath2)) {
|
||||
$sw_file_exists = true;
|
||||
$realPath = $realPath2;
|
||||
}
|
||||
|
||||
if (!$sw_file_exists) {
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT)) {
|
||||
$error_message = G::LoadTranslation('ID_ERROR_FILE_NOT_EXIST', SYS_LANG, array('filename' => $info['basename'] . $ver . '.' . $ext)) . ' ' . G::LoadTranslation('ID_CONTACT_ADMIN');
|
||||
} else {
|
||||
$error_message = "'" . $info['basename'] . $ver . '.' . $ext . "' " . 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);
|
||||
} else {
|
||||
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)) {
|
||||
$res['success'] = 'success';
|
||||
$res['message'] = $info['basename'] . $ver . '.' . $ext;
|
||||
print G::json_encode($res);
|
||||
} else {
|
||||
$nameFile = G::inflect($info['basename'] . $ver) . '.' . $ext;
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
$downloadStatus = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if ($licensedFeatures->verifyfeature('AhKNjBEVXZlWUFpWE8wVTREQ0FObmo0aTdhVzhvalFic1M=')) {
|
||||
$drive = new AppDocumentDrive();
|
||||
if ($drive->getStatusDrive()) {
|
||||
$fieldDrive = $oAppDocument->getAppDocDriveDownload();
|
||||
$drive->loadUser($_SESSION['USER_LOGGED']);
|
||||
$type = $ext == 'doc' ? 'OUTPUT_DOC' : 'OUTPUT_PDF';
|
||||
$uidDrive = $drive->changeUrlDrive($oAppDocument->Fields, $type);
|
||||
$fileContent = $drive->download($uidDrive);
|
||||
if ($fileContent !== null) {
|
||||
$downloadStatus = true;
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Disposition: attachment; filename=' . $nameFile);
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Set-Cookie: fileLoading=true');
|
||||
echo $fileContent;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!$downloadStatus) {
|
||||
G::streamFile($realPath, $download, $nameFile); //download
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,16 +25,16 @@
|
||||
/* Permissions */
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET,"url");
|
||||
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
||||
$_GET = $filter->xssFilterHard($_GET, "url");
|
||||
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
|
||||
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;
|
||||
}
|
||||
@@ -42,17 +42,17 @@ switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
||||
//If the user does not have the permission and the user can be access from url
|
||||
$processUser = new ProcessUser();
|
||||
$userAccess = $processUser->validateUserAccess($_GET['PRO_UID'], $_SESSION['USER_LOGGED']);
|
||||
if(!$userAccess) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ../login/login' );
|
||||
if (!$userAccess) {
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
die();
|
||||
}
|
||||
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION,"url");
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION, "url");
|
||||
if ((int) $_SESSION['INDEX'] < 1) {
|
||||
$_SERVER['HTTP_REFERER'] = $filter->xssFilterHard($_SERVER['HTTP_REFERER']);
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ' . $_SERVER['HTTP_REFERER']);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -63,21 +63,21 @@ $G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
|
||||
|
||||
/* Prepare page before to show */
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( "
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("
|
||||
if (typeof parent != 'undefined') {
|
||||
if (parent.showCaseNavigatorPanel) {
|
||||
parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
|
||||
}
|
||||
}" );
|
||||
}");
|
||||
// DEPRECATED this script call is marked for removal since almost all the interface is extJS based
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
var leimnud = new maborak();
|
||||
@@ -88,19 +88,19 @@ $oHeadPublisher->addScriptCode( '
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
leimnud.event.add(window,"load",function(){
|
||||
' . (isset( $_SESSION['showCasesWindow'] ) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
|
||||
' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
|
||||
});
|
||||
' );
|
||||
');
|
||||
// DEPRECATED this script call is marked for removal
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
|
||||
if (! isset( $_GET['type'] )) {
|
||||
if (! isset($_GET['type'])) {
|
||||
$_GET['type'] = 'DYNAFORM';
|
||||
}
|
||||
if (! isset( $_GET['position'] )) {
|
||||
if (! isset($_GET['position'])) {
|
||||
$_GET['position'] = $_SESSION['STEP_POSITION'];
|
||||
}else{
|
||||
if($_GET['type'] == 'DYNAFORM'){
|
||||
} else {
|
||||
if ($_GET['type'] == 'DYNAFORM') {
|
||||
$criteria = new Criteria();
|
||||
|
||||
$criteria->addSelectColumn(StepSupervisorPeer::STEP_POSITION);
|
||||
@@ -113,7 +113,7 @@ if (! isset( $_GET['position'] )) {
|
||||
$aRow = $rsCriteria->getRow();
|
||||
|
||||
$_GET['position'] = $aRow['STEP_POSITION'];
|
||||
}else{
|
||||
} else {
|
||||
$_GET['position'] = 1;
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ if (! isset( $_GET['position'] )) {
|
||||
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
|
||||
|
||||
//Obtain previous and next step - Start
|
||||
if (isset( $_GET['type'] )) {
|
||||
if (isset($_GET['type'])) {
|
||||
$sType = $_GET['type'];
|
||||
} else {
|
||||
$sType = '';
|
||||
@@ -135,11 +135,11 @@ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
|
||||
* date: 16-05-08
|
||||
* Description: this was added for the additional database connections
|
||||
*/
|
||||
if (! isset( $_GET['ex'] )) {
|
||||
if (! isset($_GET['ex'])) {
|
||||
$_GET['ex'] = $_GET['position'];
|
||||
}
|
||||
|
||||
$oDbConnections = new DbConnections( $_SESSION['PROCESS'] );
|
||||
$oDbConnections = new DbConnections($_SESSION['PROCESS']);
|
||||
$oDbConnections->loadAdditionalConnections();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
@@ -152,12 +152,12 @@ if ($_GET['DYN_UID'] != '') {
|
||||
$a = new PmDynaform($FieldsPmDynaform);
|
||||
if ($a->isResponsive()) {
|
||||
$a->printEditSupervisor();
|
||||
}else{
|
||||
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] . '&ex=' . $_GET['ex']);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['DYN_UID'], '', $Fields['APP_DATA'], 'cases_SaveDataSupervisor?UID=' . $_GET['DYN_UID'] . '&ex=' . $_GET['ex']);
|
||||
}
|
||||
}
|
||||
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
G::RenderPage('publish', 'blank');
|
||||
?>
|
||||
|
||||
<script>
|
||||
@@ -181,4 +181,3 @@ function setSelect()
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
@@ -25,24 +25,24 @@
|
||||
/* Permissions */
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET,"url");
|
||||
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
||||
$_GET = $filter->xssFilterHard($_GET, "url");
|
||||
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
|
||||
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;
|
||||
}
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION,"url");
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION, "url");
|
||||
if ((int) $_SESSION['INDEX'] < 1) {
|
||||
$_SERVER['HTTP_REFERER'] = $filter->xssFilterHard($_SERVER['HTTP_REFERER']);
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
G::header( 'location: ' . $_SERVER['HTTP_REFERER'] );
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ' . $_SERVER['HTTP_REFERER']);
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -57,12 +57,12 @@ $G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
|
||||
|
||||
/* Prepare page before to show */
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
// Check if these code needs to be removed since the interface ar now moving to ExtJS
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
var leimnud = new maborak();
|
||||
@@ -73,62 +73,62 @@ $oHeadPublisher->addScriptCode( '
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
leimnud.event.add(window,"load",function(){
|
||||
' . (isset( $_SESSION['showCasesWindow'] ) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
|
||||
' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
|
||||
});
|
||||
' );
|
||||
');
|
||||
// Check if these code needs to be removed since the interface ar now moving to ExtJS
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
|
||||
if (! isset( $_GET['position'] )) {
|
||||
if (! isset($_GET['position'])) {
|
||||
$_GET['position'] = 1;
|
||||
}
|
||||
|
||||
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
|
||||
$oCase = new Cases();
|
||||
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
|
||||
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$ex = 0;
|
||||
if (! isset( $_GET['ex'] ) || empty($_GET['ex'])) {
|
||||
if (! isset($_GET['ex']) || empty($_GET['ex'])) {
|
||||
$_GET['ex'] = 0;
|
||||
} else {
|
||||
$ex = $filter->xssFilterHard($_GET['ex']);
|
||||
}
|
||||
|
||||
if (! isset( $_GET['INP_DOC_UID'] )) {
|
||||
if (! isset($_GET['INP_DOC_UID'])) {
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_InputdocsListToRevise', $oCase->getInputDocumentsCriteriaToRevise( $_SESSION['APPLICATION'] ), '' );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_InputdocsListToRevise', $oCase->getInputDocumentsCriteriaToRevise($_SESSION['APPLICATION']), '');
|
||||
} else {
|
||||
$oInputDocument = new InputDocument();
|
||||
$Fields = $oInputDocument->load( $_GET['INP_DOC_UID'] );
|
||||
$Fields = $oInputDocument->load($_GET['INP_DOC_UID']);
|
||||
switch ($Fields['INP_DOC_FORM_NEEDED']) {
|
||||
case 'REAL':
|
||||
$Fields['TYPE_LABEL'] = G::LoadTranslation( 'ID_NEW' );
|
||||
$Fields['TYPE_LABEL'] = G::LoadTranslation('ID_NEW');
|
||||
$sXmlForm = 'cases/cases_AttachInputDocument2';
|
||||
break;
|
||||
case 'VIRTUAL':
|
||||
$Fields['TYPE_LABEL'] = G::LoadTranslation( 'ID_ATTACH' );
|
||||
$Fields['TYPE_LABEL'] = G::LoadTranslation('ID_ATTACH');
|
||||
$sXmlForm = 'cases/cases_AttachInputDocument1';
|
||||
break;
|
||||
case 'VREAL':
|
||||
$Fields['TYPE_LABEL'] = G::LoadTranslation( 'ID_ATTACH' );
|
||||
$Fields['TYPE_LABEL'] = G::LoadTranslation('ID_ATTACH');
|
||||
$sXmlForm = 'cases/cases_AttachInputDocument3';
|
||||
break;
|
||||
}
|
||||
$Fields['MESSAGE1'] = G::LoadTranslation( 'ID_PLEASE_ENTER_COMMENTS' );
|
||||
$Fields['MESSAGE2'] = G::LoadTranslation( 'ID_PLEASE_SELECT_FILE' );
|
||||
$Fields['MESSAGE1'] = G::LoadTranslation('ID_PLEASE_ENTER_COMMENTS');
|
||||
$Fields['MESSAGE2'] = G::LoadTranslation('ID_PLEASE_SELECT_FILE');
|
||||
$docName = $Fields['INP_DOC_TITLE'];
|
||||
$oHeadPublisher->addScriptCode( 'var documentName=\'Reviewing Input Document<br>' . $docName . '\';' );
|
||||
$oHeadPublisher->addScriptCode('var documentName=\'Reviewing Input Document<br>' . $docName . '\';');
|
||||
// $G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', $Fields, 'cases_SupervisorSaveDocument?UID=' .
|
||||
//$_GET['INP_DOC_UID'] . '&APP_UID=' . $_GET['APP_UID'] . '&position=' . $_GET['position']);
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'cases/paged-table-inputDocumentsToRevise', 'cases/cases_ToReviseInputdocsList', $oCase->getInputDocumentsCriteria( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['INP_DOC_UID'] ), array_merge( array ('DOC_UID' => $_GET['INP_DOC_UID']
|
||||
), $Fields ) );
|
||||
$G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocumentsToRevise', 'cases/cases_ToReviseInputdocsList', $oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_GET['INP_DOC_UID']), array_merge(array('DOC_UID' => $_GET['INP_DOC_UID']
|
||||
), $Fields));
|
||||
//$aFields
|
||||
// $G_PUBLISH->AddContent('propeltable', 'cases/paged-table-inputDocuments', 'cases/cases_InputdocsList',
|
||||
//$oCase->getInputDocumentsCriteria($_SESSION['APPLICATION']));//$aFields
|
||||
}
|
||||
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
G::RenderPage('publish', 'blank');
|
||||
|
||||
?>
|
||||
|
||||
@@ -153,4 +153,3 @@ function setSelect()
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
@@ -25,20 +25,20 @@
|
||||
/* Permissions */
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET,"url");
|
||||
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
||||
$_GET = $filter->xssFilterHard($_GET, "url");
|
||||
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
|
||||
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;
|
||||
}
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION,"url");
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION, "url");
|
||||
|
||||
/* Menues */
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
@@ -47,12 +47,12 @@ $G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
|
||||
|
||||
/* Prepare page before to show */
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
// check if the code for the addScriptCode is necessary since the interface is now based in ExtJs
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
var leimnud = new maborak();
|
||||
@@ -63,14 +63,14 @@ leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
leimnud.event.add(window,"load",function(){
|
||||
' . (isset( $_SESSION['showCasesWindow'] ) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '});
|
||||
' );
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '});
|
||||
');
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
$oCase = new Cases();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'cases/cases_OutputdocsListToRevise', $oCase->getOutputDocumentsCriteriaToRevise( $_SESSION['APPLICATION'] ), '' );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_OutputdocsListToRevise', $oCase->getOutputDocumentsCriteriaToRevise($_SESSION['APPLICATION']), '');
|
||||
G::RenderPage('publish', 'blank');
|
||||
|
||||
if (! isset( $_GET['ex'] )) {
|
||||
if (! isset($_GET['ex'])) {
|
||||
$_GET['ex'] = 0;
|
||||
}
|
||||
?>
|
||||
@@ -97,4 +97,3 @@ function setSelect()
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
@@ -25,20 +25,20 @@
|
||||
/* Permissions */
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET,"url");
|
||||
switch ($RBAC->userCanAccess( 'PM_SUPERVISOR' )) {
|
||||
$_GET = $filter->xssFilterHard($_GET, "url");
|
||||
switch ($RBAC->userCanAccess('PM_SUPERVISOR')) {
|
||||
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;
|
||||
}
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION,"url");
|
||||
$_SESSION = $filter->xssFilterHard($_SESSION, "url");
|
||||
|
||||
/* Menues */
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
@@ -47,12 +47,12 @@ $G_ID_MENU_SELECTED = 'CASES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';
|
||||
|
||||
/* Prepare page before to show */
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||
$oTemplatePower->prepare();
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var Cse = {};
|
||||
Cse.panels = {};
|
||||
var leimnud = new maborak();
|
||||
@@ -63,17 +63,17 @@ leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
leimnud.event.add(window,"load",function(){
|
||||
' . (isset( $_SESSION['showCasesWindow'] ) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '});
|
||||
' );
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '});
|
||||
');
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
//
|
||||
require_once 'classes/model/OutputDocument.php';
|
||||
$oOutputDocument = new OutputDocument();
|
||||
$aOD = $oOutputDocument->load( $_GET['UID'] );
|
||||
$aOD = $oOutputDocument->load($_GET['UID']);
|
||||
require_once 'classes/model/AppDocument.php';
|
||||
$oAppDocument = new AppDocument();
|
||||
$aFields = $oAppDocument->load( $_GET['DOC'] );
|
||||
$aFields['VIEW'] = G::LoadTranslation( 'ID_OPEN' );
|
||||
$aFields = $oAppDocument->load($_GET['DOC']);
|
||||
$aFields['VIEW'] = G::LoadTranslation('ID_OPEN');
|
||||
switch ($aOD['OUT_DOC_GENERATE']) {
|
||||
case 'DOC':
|
||||
$aFields['FILE1'] = 'cases_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
|
||||
@@ -88,11 +88,11 @@ switch ($aOD['OUT_DOC_GENERATE']) {
|
||||
}
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ViewOutputDocumentToRevise', '', G::array_merges( $aOD, $aFields ), '' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ViewOutputDocumentToRevise', '', G::array_merges($aOD, $aFields), '');
|
||||
//
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
G::RenderPage('publish', 'blank');
|
||||
|
||||
if (! isset( $_GET['ex'] )) {
|
||||
if (! isset($_GET['ex'])) {
|
||||
$_GET['ex'] = 0;
|
||||
}
|
||||
|
||||
@@ -118,4 +118,3 @@ function setSelect()
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
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;
|
||||
}
|
||||
$caseId = $_SESSION['APPLICATION'];
|
||||
@@ -12,6 +12,7 @@ $actualIndex = $_SESSION['INDEX'];
|
||||
$cont = 0;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
|
||||
$appDel = new AppDelegation();
|
||||
|
||||
$actualThread = $appDel->Load($caseId, $actualIndex);
|
||||
@@ -21,16 +22,15 @@ $oLabels = new labelsGmail();
|
||||
$oLabels->addRelabelingToQueue($caseId, $actualIndex, $actualLastIndex, false);
|
||||
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if(array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus() ){
|
||||
$_SESSION['gmail'] = 0;
|
||||
unset($_SESSION['gmail']); //cleaning session
|
||||
$mUrl = '/sys'. $_SESSION['WORKSPACE'] .'/en/'.$_SESSION['currentSkin'].'/cases/cases_Open?APP_UID='.$caseId.'&DEL_INDEX='.$actualIndex.'&action=sent';
|
||||
} else{
|
||||
$mUrl = 'casesListExtJs';
|
||||
if (isset($_SESSION["currentSkin"]) && $_SESSION["currentSkin"] === 'uxs') {
|
||||
$mUrl = '../home';
|
||||
}
|
||||
if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus()) {
|
||||
$_SESSION['gmail'] = 0;
|
||||
unset($_SESSION['gmail']); //cleaning session
|
||||
$mUrl = '/sys'. $_SESSION['WORKSPACE'] .'/en/'.$_SESSION['currentSkin'].'/cases/cases_Open?APP_UID='.$caseId.'&DEL_INDEX='.$actualIndex.'&action=sent';
|
||||
} else {
|
||||
$mUrl = 'casesListExtJs';
|
||||
if (isset($_SESSION["currentSkin"]) && $_SESSION["currentSkin"] === 'uxs') {
|
||||
$mUrl = '../home';
|
||||
}
|
||||
}
|
||||
|
||||
header( 'location:' . $mUrl );
|
||||
|
||||
header('location:' . $mUrl);
|
||||
|
||||
@@ -4,13 +4,11 @@ $RBAC->requirePermissions('PM_CASES/strict');
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'CASES';
|
||||
|
||||
$_POST['qs'] = isset($_SERVER['QUERY_STRING'])
|
||||
&& $_SERVER['QUERY_STRING'] != '' ? '?' . $_SERVER['QUERY_STRING'] : '';
|
||||
$_POST['qs'] = isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] !== '' ? '?' . $_SERVER['QUERY_STRING'] : '';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_Load');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
G::RenderPage('publish');
|
||||
|
||||
|
||||
@@ -24,29 +24,29 @@
|
||||
|
||||
$conf = new Configurations();
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( "cases/main", false ); //Adding a javascript file .js
|
||||
$oHeadPublisher->addContent( "cases/main" ); //Adding a html file .html.
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript("cases/main", false); //Adding a javascript file .js
|
||||
$oHeadPublisher->addContent("cases/main"); //Adding a html file .html.
|
||||
|
||||
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
|
||||
$memcache = &PMmemcached::getSingleton( config("system.workspace") );
|
||||
$memcache = PMmemcached::getSingleton(config("system.workspace"));
|
||||
|
||||
if (($arrayConfig = $memcache->get( $keyMem )) === false) {
|
||||
$conf->loadConfig( $x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "" );
|
||||
if (($arrayConfig = $memcache->get($keyMem)) === false) {
|
||||
$conf->loadConfig($x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "");
|
||||
$arrayConfig = $conf->aConfig;
|
||||
$memcache->set( $keyMem, $arrayConfig, PMmemcached::ONE_HOUR );
|
||||
$memcache->set($keyMem, $arrayConfig, PMmemcached::ONE_HOUR);
|
||||
}
|
||||
|
||||
$confDefaultOption = "";
|
||||
|
||||
if (isset( $arrayConfig["DEFAULT_CASES_MENU"] )) {
|
||||
if (isset($arrayConfig["DEFAULT_CASES_MENU"])) {
|
||||
//this user has a configuration record
|
||||
$confDefaultOption = $arrayConfig["DEFAULT_CASES_MENU"];
|
||||
|
||||
global $G_TMP_MENU;
|
||||
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load( "cases" );
|
||||
$oMenu->load("cases");
|
||||
$defaultOption = "";
|
||||
|
||||
foreach ($oMenu->Id as $i => $id) {
|
||||
@@ -74,13 +74,13 @@ if (isset($_SESSION['__OPEN_APPLICATION_UID__'])) {
|
||||
|
||||
if (!empty($arrayResult)) {
|
||||
$arrayDefaultOption = [
|
||||
'TO_DO' => ['CASES_INBOX', 'todo'],
|
||||
'DRAFT' => ['CASES_DRAFT', 'draft'],
|
||||
'CANCELLED' => ['CASES_SENT', 'sent'],
|
||||
'COMPLETED' => ['CASES_SENT', 'sent'],
|
||||
'PARTICIPATED' => ['CASES_SENT', 'sent'],
|
||||
'UNASSIGNED' => ['CASES_SELFSERVICE', 'unassigned'],
|
||||
'PAUSED' => ['CASES_PAUSED', 'paused']
|
||||
'TO_DO' => ['CASES_INBOX', 'todo'],
|
||||
'DRAFT' => ['CASES_DRAFT', 'draft'],
|
||||
'CANCELLED' => ['CASES_SENT', 'sent'],
|
||||
'COMPLETED' => ['CASES_SENT', 'sent'],
|
||||
'PARTICIPATED' => ['CASES_SENT', 'sent'],
|
||||
'UNASSIGNED' => ['CASES_SELFSERVICE', 'unassigned'],
|
||||
'PAUSED' => ['CASES_PAUSED', 'paused']
|
||||
];
|
||||
|
||||
$confDefaultOption = $arrayDefaultOption[$arrayResult['APP_STATUS']][0];
|
||||
@@ -122,8 +122,8 @@ if (isset($_SESSION['__OPEN_APPLICATION_UID__'])) {
|
||||
}
|
||||
}
|
||||
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
if ($oServerConf->isRtl( SYS_LANG )) {
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
if ($oServerConf->isRtl(SYS_LANG)) {
|
||||
$regionTreePanel = 'east';
|
||||
$regionDebug = 'west';
|
||||
} else {
|
||||
@@ -158,7 +158,7 @@ function getDsn()
|
||||
{
|
||||
list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, '');
|
||||
$port = empty($port) ? '' : ";port=$port";
|
||||
$dsn = DB_ADAPTER.':host='.$host.';dbname='.DB_NAME.$port;
|
||||
$dsn = DB_ADAPTER . ':host=' . $host . ';dbname=' . DB_NAME . $port;
|
||||
|
||||
return array('dsn' => $dsn, 'username' => DB_USER, 'password' => DB_PASS);
|
||||
}
|
||||
@@ -179,7 +179,7 @@ function getAuthorizationCode($client)
|
||||
));
|
||||
|
||||
$response = $oauthServer->postAuthorize($authorize, $userId, true);
|
||||
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=')+5, 40);
|
||||
$code = substr($response->getHttpHeader('Location'), strpos($response->getHttpHeader('Location'), 'code=') + 5, 40);
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
@@ -65,12 +65,12 @@ $tasUid = (isset($_GET['TAS_UID'])) ? $tasUid = htmlspecialchars($_GET['TAS_UID'
|
||||
$oCase = new Cases();
|
||||
$conf = new Configurations();
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
$urlToRedirectAfterPause = 'casesListExtJs';
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = &PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
||||
$pmGoogle = new PmGoogleApi();
|
||||
if (array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus()) {
|
||||
@@ -153,4 +153,3 @@ if (!isset($_SESSION['APPLICATION']) || !isset($_SESSION['TASK']) || !isset($_SE
|
||||
}
|
||||
$_SESSION['actionCaseOptions'] = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ if ($isBrowserMobile) {
|
||||
$_SESSION['__CD__'] = '../';
|
||||
$_SESSION['__OPEN_APPLICATION_UID__'] = $applicationUid;
|
||||
$G_PUBLISH->AddContent('view', 'cases/cases_Load');
|
||||
$headPublisher = &headPublisher::getSingleton();
|
||||
$headPublisher = headPublisher::getSingleton();
|
||||
$headPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$headPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
} else {
|
||||
|
||||
@@ -48,7 +48,7 @@ if ($sort == 'APP_STATUS_LABEL') {
|
||||
|
||||
try {
|
||||
$userUid = (isset($_SESSION["USER_LOGGED"]) && $_SESSION["USER_LOGGED"] != "") ? $_SESSION["USER_LOGGED"] : null;
|
||||
$result = "";
|
||||
$result = [];
|
||||
|
||||
switch ($action) {
|
||||
case "search":
|
||||
@@ -111,4 +111,3 @@ try {
|
||||
$msg = array("error" => $e->getMessage());
|
||||
echo G::json_encode($msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,16 +57,16 @@ $html .= '<label for="prefix_label">'.$filter->xssFilterHard(G::LoadTranslation(
|
||||
$html .= '</td>';
|
||||
|
||||
$html .= '<td width="25%">';
|
||||
$html .= '<label for="variables_label">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_SEARCH')).'</label>';
|
||||
$html .= '<label for="variables_label">'.$filter->xssFilterHard(G::LoadTranslation('ID_SEARCH')).'</label>';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
|
||||
$html .= '<tr>';
|
||||
$html .= '<td width="25%">';
|
||||
$html .= '<select name="type_variables" id="type_variables">';
|
||||
$html .= '<option value="all">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_ALL_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="system">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_SYSTEM_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="process">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_PROCESS_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="all">'.$filter->xssFilterHard(G::LoadTranslation('ID_TINY_ALL_VARIABLES')).'</option>';
|
||||
$html .= '<option value="system">'.$filter->xssFilterHard(G::LoadTranslation('ID_TINY_SYSTEM_VARIABLES')).'</option>';
|
||||
$html .= '<option value="process">'.$filter->xssFilterHard(G::LoadTranslation('ID_TINY_PROCESS_VARIABLES')).'</option>';
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(BpmnProjectPeer::PRJ_UID);
|
||||
@@ -78,7 +78,7 @@ $row = $oDataset->getRow();
|
||||
$isBpmn = false;
|
||||
if (isset($row["PRJ_UID"])) {
|
||||
$isBpmn = true;
|
||||
$html .= '<option value="grid">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TINY_GRID_VARIABLES' )).'</option>';
|
||||
$html .= '<option value="grid">'.$filter->xssFilterHard(G::LoadTranslation('ID_TINY_GRID_VARIABLES')).'</option>';
|
||||
}
|
||||
|
||||
$html .= '</select> ';
|
||||
@@ -103,35 +103,35 @@ $html .= '<input type="text" id="search" size="15">';
|
||||
$html .= '</td>';
|
||||
$html .= '</tr>';
|
||||
$html .= '<tr>';
|
||||
$html .= '<tr><td><label for="prefix_label">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_VARIABLES' )).'</label></td></tr>';
|
||||
$html .= '<tr><td><label for="prefix_label">'.$filter->xssFilterHard(G::LoadTranslation('ID_VARIABLES')).'</label></td></tr>';
|
||||
$html .= '<tr>';
|
||||
|
||||
$html .= '<td colspan="3">';
|
||||
|
||||
$aFields = getDynaformsVars( $_REQUEST['sProcess'], true, isset( $_POST['bIncMulSelFields'] ) ? $_POST['bIncMulSelFields'] : 0 );
|
||||
$aFields = getDynaformsVars($_REQUEST['sProcess'], true, isset($_POST['bIncMulSelFields']) ? $_POST['bIncMulSelFields'] : 0);
|
||||
|
||||
$displayOption = '';
|
||||
if (isset($_REQUEST['displayOption'])){
|
||||
if (isset($_REQUEST['displayOption'])) {
|
||||
$displayOption = 'displayOption="'.$_REQUEST['displayOption'].'"';
|
||||
} else {
|
||||
$displayOption = 'displayOption="normal"' ;
|
||||
}
|
||||
$html .= '<select name="_Var_Form_" id="_Var_Form_" size="8" style="width:100%;' . (! isset( $_POST['sNoShowLeyend'] ) ? 'height:170;' : '') . '" '.$displayOption.'>';
|
||||
$html .= '<select name="_Var_Form_" id="_Var_Form_" size="8" style="width:100%;' . (! isset($_POST['sNoShowLeyend']) ? 'height:170;' : '') . '" '.$displayOption.'>';
|
||||
|
||||
foreach ($aFields as $aField) {
|
||||
$value = $_REQUEST['sSymbol'] . $aField['sName'];
|
||||
if ($isBpmn) {
|
||||
if(strtolower($aField['sType']) == 'grid') {
|
||||
if (strtolower($aField['sType']) == 'grid') {
|
||||
$gridValue = 'gridt<table border=1 cellspacing=0> <tr> <th>Header_1</th> </tr> <!--@>'.$aField['sName'].'--> <tr> <td>column_name1</td> </tr><!--@<'.$aField['sName'].'--> </table>';
|
||||
$value = htmlentities($gridValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
$html .= '<option value="' . $value . '">' . $_REQUEST['sSymbol'] . $aField['sName'] . ' (' . $aField['sType'] . ')</option>';
|
||||
}
|
||||
|
||||
$aRows[0] = Array ('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char');
|
||||
$aRows[0] = array('fieldname' => 'char','variable' => 'char','type' => 'type','label' => 'char');
|
||||
foreach ($aFields as $aField) {
|
||||
$aRows[] = Array ('fieldname' => $_REQUEST['sFieldName'], 'variable' => $_REQUEST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_REQUEST['sFieldName'] . '\',\'' . $_REQUEST['sSymbol'] . $aField['sName'] . '\');">' . $_REQUEST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||
$aRows[] = array('fieldname' => $_REQUEST['sFieldName'], 'variable' => $_REQUEST['sSymbol'] . $aField['sName'],'variable_label' => '<div class="pm__dynavars"> <a id="dynalink" href=# onclick="insertFormVar(\'' . $_REQUEST['sFieldName'] . '\',\'' . $_REQUEST['sSymbol'] . $aField['sName'] . '\');">' . $_REQUEST['sSymbol'] . $aField['sName'] . '</a></div>','type' => $aField['sType'],'label' => $aField['sLabel']
|
||||
);
|
||||
}
|
||||
$html .= '</select>';
|
||||
@@ -163,7 +163,7 @@ $html .= '</div>';
|
||||
$html .= '<br>';
|
||||
$html .= '<table width="90%" align="center">';
|
||||
$html .= '<tr><td>';
|
||||
$html .= '<label for="desc_prefix">*<span id="desc_prefix">'.$filter->xssFilterHard(G::LoadTranslation( 'ID_TO_STRING' )).'</span></label>';
|
||||
$html .= '<label for="desc_prefix">*<span id="desc_prefix">'.$filter->xssFilterHard(G::LoadTranslation('ID_TO_STRING')).'</span></label>';
|
||||
$html .= '</td></tr>';
|
||||
$html .= '</div>';
|
||||
|
||||
@@ -172,10 +172,10 @@ $html .= '</form>';
|
||||
$display = 'raw';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/controls/variablePicker.js');
|
||||
if (isset($_REQUEST['displayOption'])) {
|
||||
if($_REQUEST['displayOption']=='tinyMCE'){
|
||||
if ($_REQUEST['displayOption']=='tinyMCE') {
|
||||
$display = 'blank';
|
||||
$oHeadPublisher->addScriptFile('/js/tinymce/jscripts/tiny_mce/tiny_mce_popup.js');
|
||||
$oHeadPublisher->addScriptFile('/js/tinymce/jscripts/tiny_mce/plugins/pmVariablePicker/editor_plugin_src.js');
|
||||
@@ -184,4 +184,4 @@ if (isset($_REQUEST['displayOption'])) {
|
||||
|
||||
echo $html;
|
||||
|
||||
G::RenderPage( 'publish', $display );
|
||||
G::RenderPage('publish', $display);
|
||||
|
||||
@@ -22,15 +22,14 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
$RBAC->requirePermissions( 'PM_DASHBOARD' );
|
||||
$RBAC->requirePermissions('PM_DASHBOARD');
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'DASHBOARD';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'dashboard/load' );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent('view', 'dashboard/load');
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
G::RenderPage('publish');
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Description: This is a additional configuration for load all connections; if exist in a particular proccess
|
||||
* @Date: 15-05-2008
|
||||
*
|
||||
* @author : Erik Amaru Ortiz <erik@colosa.com>
|
||||
*/
|
||||
if (isset( $_SESSION['PROCESS'] )) {
|
||||
$pro = include (PATH_CORE . "config/databases.php");
|
||||
|
||||
$oDbConnections = new DbConnections( $_SESSION['PROCESS'] );
|
||||
foreach ($oDbConnections->connections as $db) {
|
||||
$db['DBS_PASSWORD'] = $oDbConnections->getPassWithoutEncrypt( $db );
|
||||
|
||||
$flagTns = ($db["DBS_TYPE"] == "oracle" && $db["DBS_CONNECTION_TYPE"] == "TNS")? 1 : 0;
|
||||
|
||||
if ($flagTns == 0) {
|
||||
$dbsPort = ($db['DBS_PORT'] == '') ? ('') : (':' . $db['DBS_PORT']);
|
||||
$ENCODE = (trim( $db['DBS_ENCODE'] ) == '') ? '' : '?encoding=' . $db['DBS_ENCODE'];
|
||||
if (strpos( $db['DBS_SERVER'], "\\" ) && $db['DBS_TYPE'] == 'mssql') {
|
||||
$pro['datasources'][$db['DBS_UID']]['connection'] = $db['DBS_TYPE'] . '://' . $db['DBS_USERNAME'] . ':' . $db['DBS_PASSWORD'] . '@' . $db['DBS_SERVER'] . '/' . $db['DBS_DATABASE_NAME'] . $ENCODE;
|
||||
} else {
|
||||
$pro['datasources'][$db['DBS_UID']]['connection'] = $db['DBS_TYPE'] . '://' . $db['DBS_USERNAME'] . ':' . $db['DBS_PASSWORD'] . '@' . $db['DBS_SERVER'] . $dbsPort . '/' . $db['DBS_DATABASE_NAME'] . $ENCODE;
|
||||
}
|
||||
} else {
|
||||
$pro["datasources"][$db["DBS_UID"]]["connection"] = $db["DBS_TYPE"] . "://" . $db["DBS_USERNAME"] . ":" . $db["DBS_PASSWORD"] . "@" . $db["DBS_TNS"];
|
||||
}
|
||||
|
||||
$pro['datasources'][$db['DBS_UID']]['adapter'] = $db['DBS_TYPE'];
|
||||
}
|
||||
return $pro;
|
||||
}
|
||||
|
||||
@@ -24,27 +24,27 @@
|
||||
|
||||
require_once 'classes/model/Department.php';
|
||||
|
||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||
$access = $RBAC->userCanAccess('PM_USERS');
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
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 (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ $G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'departments/departmentUsers', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'departments/departmentUsers' ); //adding a html file .html.
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('departments/departmentUsers', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('departments/departmentUsers'); //adding a html file .html.
|
||||
|
||||
$c = new Configurations();
|
||||
|
||||
@@ -67,16 +67,15 @@ $arrayConfig = [];
|
||||
$arrayConfig['pageSize'] = (isset($arrayConfigPage['pageSize']))? $arrayConfigPage['pageSize'] : 20;
|
||||
|
||||
$dep = new Department();
|
||||
$dep->Load( $_GET['dUID'] );
|
||||
$dep->Load($_GET['dUID']);
|
||||
|
||||
$depart = Array ();
|
||||
$depart = array();
|
||||
$depart['DEP_UID'] = $dep->getDepUid();
|
||||
$depart['DEP_TITLE'] = $dep->getDepTitle();
|
||||
$depart['DEP_MANAGER'] = $dep->getDepManager();
|
||||
|
||||
$oHeadPublisher->assign( 'DEPARTMENT', $depart );
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$oHeadPublisher->assign('DEPARTMENT', $depart);
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('CONFIG', $arrayConfig);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -24,27 +24,27 @@
|
||||
*/
|
||||
$c = new Configurations();
|
||||
|
||||
$access = $RBAC->requirePermissions( 'PM_USERS' );
|
||||
$access = $RBAC->requirePermissions('PM_USERS');
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
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 (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
@@ -55,16 +55,15 @@ $G_ID_SUB_MENU_SELECTED = 'DEPARTMENTS';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'departments/departmentList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'departments/departmentList' ); //adding a html file .html.
|
||||
$oHeadPublisher->addExtJsScript('departments/departmentList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('departments/departmentList'); //adding a html file .html.
|
||||
|
||||
|
||||
//$labels = G::getTranslations(Array('ID_DEPARTMENTS','ID_DELETE','ID_EDIT','ID_USERS','ID_ACTIVE','ID_INACTIVE','ID_SELECT_STATUS',
|
||||
// 'ID_CLOSE','ID_SAVE','ID_DEPARTMENT_NAME','ID_STATUS'));
|
||||
//
|
||||
//$oHeadPublisher->assign('TRANSLATIONS', $labels);
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -22,28 +22,28 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
function LookForChildren ($parent, $level, $aDepUsers)
|
||||
function LookForChildren($parent, $level, $aDepUsers)
|
||||
{
|
||||
$conf = new Configurations();
|
||||
$oDept = new Department();
|
||||
$allDepartments = $oDept->getDepartments( $parent );
|
||||
$allDepartments = $oDept->getDepartments($parent);
|
||||
$level ++;
|
||||
$rows = Array ();
|
||||
$rows = array();
|
||||
foreach ($allDepartments as $department) {
|
||||
unset( $depto );
|
||||
$depto['DEP_TITLE'] = str_replace( array ("<",">" ), array ("<",">" ), $department['DEP_TITLE'] );
|
||||
unset($depto);
|
||||
$depto['DEP_TITLE'] = str_replace(array("<",">" ), array("<",">" ), $department['DEP_TITLE']);
|
||||
$depto['DEP_STATUS'] = $department['DEP_STATUS'];
|
||||
if ($department['DEP_MANAGER_USERNAME'] != '') {
|
||||
$depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat( $department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME'] );
|
||||
$depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat($department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME']);
|
||||
} else {
|
||||
$depto['DEP_MANAGER_NAME'] = '';
|
||||
}
|
||||
$depto['DEP_TOTAL_USERS'] = isset( $aDepUsers[$department['DEP_UID']] ) ? $aDepUsers[$department['DEP_UID']] : 0;
|
||||
$depto['DEP_TOTAL_USERS'] = isset($aDepUsers[$department['DEP_UID']]) ? $aDepUsers[$department['DEP_UID']] : 0;
|
||||
$depto['DEP_UID'] = $department['DEP_UID'];
|
||||
$depto['DEP_MANAGER'] = $department['DEP_MANAGER'];
|
||||
$depto['DEP_PARENT'] = $department['DEP_PARENT'];
|
||||
if ($department['HAS_CHILDREN'] > 0) {
|
||||
$depto['children'] = LookForChildren( $department['DEP_UID'], $level, $aDepUsers );
|
||||
$depto['children'] = LookForChildren($department['DEP_UID'], $level, $aDepUsers);
|
||||
$depto['iconCls'] = 'ss_sprite ss_chart_organisation';
|
||||
$depto['expanded'] = true;
|
||||
} else {
|
||||
@@ -59,10 +59,10 @@ function LookForChildren ($parent, $level, $aDepUsers)
|
||||
return $rows;
|
||||
}
|
||||
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
$_POST['action'] = get_ajax_value( 'action' );
|
||||
$_POST['action'] = get_ajax_value('action');
|
||||
|
||||
require_once 'classes/model/Department.php';
|
||||
|
||||
@@ -70,51 +70,51 @@ switch ($_POST['action']) {
|
||||
case 'showUsers':
|
||||
global $G_PUBLISH;
|
||||
$oDept = new Department();
|
||||
$aFields = $oDept->Load( $_POST['sDptoUID'] );
|
||||
$aFields = $oDept->Load($_POST['sDptoUID']);
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields, '' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields, '');
|
||||
|
||||
$criteria = $oDept->getUsersFromDepartment( $_POST['sDptoUID'], $aFields['DEP_MANAGER'] );
|
||||
$criteria = $oDept->getUsersFromDepartment($_POST['sDptoUID'], $aFields['DEP_MANAGER']);
|
||||
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'departments/paged-table2', 'departments/departments_UsersList', $criteria, $aFields );
|
||||
$G_PUBLISH->AddContent('propeltable', 'departments/paged-table2', 'departments/departments_UsersList', $criteria, $aFields);
|
||||
//$G_PUBLISH->AddContent('propeltable', 'paged-table', 'departments/departments_UsersList', $criteria, $aFields);
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( "groupname='{$aFields["DEP_TITLE"]}';" );
|
||||
$oHeadPublisher->addScriptCode( "depUid='{$aFields["DEP_UID"]}';" );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("groupname='{$aFields["DEP_TITLE"]}';");
|
||||
$oHeadPublisher->addScriptCode("depUid='{$aFields["DEP_UID"]}';");
|
||||
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'assignAllUsers':
|
||||
$aUsers = explode( ',', $_POST['aUsers'] );
|
||||
$aUsers = explode(',', $_POST['aUsers']);
|
||||
$oDept = new Department();
|
||||
$depUid = $_POST['DEP_UID'];
|
||||
$cant = $oDept->cantUsersInDepartment( $depUid );
|
||||
$cant = $oDept->cantUsersInDepartment($depUid);
|
||||
|
||||
if ($cant == 0) {
|
||||
$manager = true;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < count( $aUsers ); $i ++) {
|
||||
$oDept->addUserToDepartment( $depUid, $aUsers[$i], $manager, false );
|
||||
for ($i = 0; $i < count($aUsers); $i ++) {
|
||||
$oDept->addUserToDepartment($depUid, $aUsers[$i], $manager, false);
|
||||
$manager = false;
|
||||
}
|
||||
$oDept->updateDepartmentManager( $depUid );
|
||||
$oDept->updateDepartmentManager($depUid);
|
||||
break;
|
||||
case 'removeUserFromDepartment':
|
||||
$oDept = new Department();
|
||||
$oDept->removeUserFromDepartment( $_POST['DEP_UID'], $_POST['USR_UID'] );
|
||||
$oDept->removeUserFromDepartment($_POST['DEP_UID'], $_POST['USR_UID']);
|
||||
break;
|
||||
case 'verifyDptoname':
|
||||
$_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' );
|
||||
$_POST['sGroupname'] = get_ajax_value( 'sGroupname' );
|
||||
$_POST['sOriginalGroupname'] = get_ajax_value('sOriginalGroupname');
|
||||
$_POST['sGroupname'] = get_ajax_value('sGroupname');
|
||||
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname']) {
|
||||
echo '0';
|
||||
} else {
|
||||
$oDpto = new Department();
|
||||
$oCriteria = $oDpto->loadByGroupname( $_POST['sGroupname'] );
|
||||
$oDataset = DepartmentPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oCriteria = $oDpto->loadByGroupname($_POST['sGroupname']);
|
||||
$oDataset = DepartmentPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
if (! $aRow) {
|
||||
@@ -125,39 +125,39 @@ switch ($_POST['action']) {
|
||||
}
|
||||
break;
|
||||
case 'showUnAssignedUsers':
|
||||
$_POST['UID'] = get_ajax_value( 'UID' );
|
||||
require_once ('classes/class.xmlfield_InputPM.php');
|
||||
$_POST['UID'] = get_ajax_value('UID');
|
||||
require_once('classes/class.xmlfield_InputPM.php');
|
||||
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
$oDept = new Department();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'departments/paged-table3', 'departments/departments_AddUnAssignedUsers', $oDept->getAvailableUsersCriteria( '' ) );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
$G_PUBLISH->AddContent('propeltable', 'departments/paged-table3', 'departments/departments_AddUnAssignedUsers', $oDept->getAvailableUsersCriteria(''));
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'departmentList':
|
||||
global $RBAC;
|
||||
$aDEPTS = $RBAC->getAllUsersByDepartment();
|
||||
$tree_depart = LookForChildren( '', 0, $aDEPTS );
|
||||
echo G::json_encode( $tree_depart );
|
||||
$tree_depart = LookForChildren('', 0, $aDEPTS);
|
||||
echo G::json_encode($tree_depart);
|
||||
break;
|
||||
case 'checkDepartmentName':
|
||||
$parent = $_REQUEST['parent'];
|
||||
$dep_name = $_REQUEST['name'];
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria = new Criteria('workflow');
|
||||
|
||||
$oCriteria->clearSelectColumns();
|
||||
$oCriteria->addSelectColumn( DepartmentPeer::DEP_PARENT );
|
||||
$oCriteria->addSelectColumn( DepartmentPeer::DEP_TITLE );
|
||||
$oCriteria->add( DepartmentPeer::DEP_TITLE, $dep_name );
|
||||
$oCriteria->add( DepartmentPeer::DEP_PARENT, $parent );
|
||||
$oCriteria->addSelectColumn(DepartmentPeer::DEP_PARENT);
|
||||
$oCriteria->addSelectColumn(DepartmentPeer::DEP_TITLE);
|
||||
$oCriteria->add(DepartmentPeer::DEP_TITLE, $dep_name);
|
||||
$oCriteria->add(DepartmentPeer::DEP_PARENT, $parent);
|
||||
|
||||
$oDataset = DepartmentPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset = DepartmentPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
echo (! $aRow) ? 'true' : 'false';
|
||||
@@ -167,7 +167,7 @@ switch ($_POST['action']) {
|
||||
$dep_name = $_REQUEST['name'];
|
||||
$dep_uid = $_REQUEST['uid'];
|
||||
$oDepartment = new Department();
|
||||
$checkVal = $oDepartment->checkDepartmentName( $dep_name, $parent, $dep_uid );
|
||||
$checkVal = $oDepartment->checkDepartmentName($dep_name, $parent, $dep_uid);
|
||||
echo (! $checkVal) ? 'true' : 'false';
|
||||
break;
|
||||
case 'saveDepartment':
|
||||
@@ -176,28 +176,28 @@ switch ($_POST['action']) {
|
||||
$newDepartment['DEP_PARENT'] = $parent;
|
||||
$newDepartment['DEP_TITLE'] = $dep_name;
|
||||
$oDept = new Department();
|
||||
$oDept->create( $newDepartment );
|
||||
$oDept->create($newDepartment);
|
||||
echo '{success: true}';
|
||||
break;
|
||||
case 'usersByDepartment':
|
||||
|
||||
$sDepUid = $_REQUEST['DEP_UID'];
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_REPORTS_TO );
|
||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
$oCriteria->add( UsersPeer::DEP_UID, $sDepUid );
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_UID);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_REPORTS_TO);
|
||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
||||
$oCriteria->add(UsersPeer::DEP_UID, $sDepUid);
|
||||
|
||||
$oDataset = DepartmentPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset = DepartmentPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rows = Array ();
|
||||
unset( $first );
|
||||
$rows = array();
|
||||
unset($first);
|
||||
$first['USR_UID'] = '';
|
||||
$first['USR_VALUE'] = G::LoadTranslation( 'ID_NO_MANAGER_SELECTED' );
|
||||
$first['USR_VALUE'] = G::LoadTranslation('ID_NO_MANAGER_SELECTED');
|
||||
$rows[] = $first;
|
||||
|
||||
$conf = new Configurations();
|
||||
@@ -205,11 +205,11 @@ switch ($_POST['action']) {
|
||||
while ($oDataset->next()) {
|
||||
$aRow = $oDataset->getRow();
|
||||
$user['USR_UID'] = $aRow['USR_UID'];
|
||||
$user['USR_VALUE'] = $conf->usersNameFormat( $aRow['USR_USERNAME'], $aRow['USR_FIRSTNAME'], $aRow['USR_LASTNAME'] );
|
||||
$user['USR_VALUE'] = $conf->usersNameFormat($aRow['USR_USERNAME'], $aRow['USR_FIRSTNAME'], $aRow['USR_LASTNAME']);
|
||||
$rows[] = $user;
|
||||
}
|
||||
|
||||
echo '{users: ' . G::json_encode( $rows ) . '}';
|
||||
echo '{users: ' . G::json_encode($rows) . '}';
|
||||
break;
|
||||
case 'updateDepartment':
|
||||
try {
|
||||
@@ -224,18 +224,18 @@ switch ($_POST['action']) {
|
||||
$editDepartment['DEP_STATUS'] = $dep_status;
|
||||
$editDepartment['DEP_MANAGER'] = $dep_manager;
|
||||
$oDept = new Department();
|
||||
$oDept->update( $editDepartment );
|
||||
$oDept->updateDepartmentManager( $dep_uid );
|
||||
$oDept->update($editDepartment);
|
||||
$oDept->updateDepartmentManager($dep_uid);
|
||||
|
||||
$managerName = ' - No Manager Selected';
|
||||
|
||||
if ($_REQUEST['manager'] != '') {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||
$oCriteria->add( UsersPeer::USR_UID, $dep_manager);
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
|
||||
$oCriteria->add(UsersPeer::USR_UID, $dep_manager);
|
||||
|
||||
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset = UsersPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($oDataset->next()) {
|
||||
$aRow = $oDataset->getRow();
|
||||
@@ -257,7 +257,7 @@ switch ($_POST['action']) {
|
||||
case 'canDeleteDepartment':
|
||||
global $RBAC;
|
||||
$aDEPTS = $RBAC->getAllUsersByDepartment();
|
||||
if (isset( $aDEPTS[$_POST['dep_uid']] )) {
|
||||
if (isset($aDEPTS[$_POST['dep_uid']])) {
|
||||
echo '{success: false, users: ' . $aDEPTS[$_POST['dep_uid']] . '}';
|
||||
} else {
|
||||
echo '{success: true}';
|
||||
@@ -266,7 +266,7 @@ switch ($_POST['action']) {
|
||||
case 'deleteDepartment':
|
||||
$DEP_UID = $_POST['DEP_UID'];
|
||||
$oDept = new Department();
|
||||
$oDept->remove( $DEP_UID );
|
||||
$oDept->remove($DEP_UID);
|
||||
echo '{success: true}';
|
||||
break;
|
||||
case 'assignedUsers':
|
||||
@@ -311,31 +311,31 @@ switch ($_POST['action']) {
|
||||
case 'assignDepartmentToUserMultiple':
|
||||
$DEP_UID = $_REQUEST['DEP_UID'];
|
||||
$uSERS = $_REQUEST['USR_UID'];
|
||||
$aUsers = explode( ',', $uSERS );
|
||||
$aUsers = explode(',', $uSERS);
|
||||
$dep = new Department();
|
||||
$dep->Load( $DEP_UID );
|
||||
$dep->Load($DEP_UID);
|
||||
$dep_manager = $dep->getDepManager();
|
||||
$manager = ($dep_manager == '') ? true : false;
|
||||
foreach ($aUsers as $USR_UID) {
|
||||
$dep->addUserToDepartment( $DEP_UID, $USR_UID, $manager, false );
|
||||
$dep->addUserToDepartment($DEP_UID, $USR_UID, $manager, false);
|
||||
$manager = false;
|
||||
}
|
||||
$dep->updateDepartmentManager( $DEP_UID );
|
||||
$dep->updateDepartmentManager($DEP_UID);
|
||||
break;
|
||||
case 'deleteDepartmentToUserMultiple':
|
||||
$DEP_UID = $_REQUEST['DEP_UID'];
|
||||
$uSERS = $_REQUEST['USR_UID'];
|
||||
$aUsers = explode( ',', $uSERS );
|
||||
$aUsers = explode(',', $uSERS);
|
||||
$dep = new Department();
|
||||
$dep->Load( $DEP_UID );
|
||||
$dep->Load($DEP_UID);
|
||||
$manager = $dep->getDepManager();
|
||||
foreach ($aUsers as $USR_UID) {
|
||||
$dep->removeUserFromDepartment( $DEP_UID, $USR_UID );
|
||||
$dep->removeUserFromDepartment($DEP_UID, $USR_UID);
|
||||
if ($USR_UID == $manager) {
|
||||
$editDepto['DEP_UID'] = $DEP_UID;
|
||||
$editDepto['DEP_MANAGER'] = '';
|
||||
$dep->update( $editDepto );
|
||||
$dep->updateDepartmentManager( $DEP_UID );
|
||||
$dep->update($editDepto);
|
||||
$dep->updateDepartmentManager($DEP_UID);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -345,9 +345,8 @@ switch ($_POST['action']) {
|
||||
$editDepartment['DEP_UID'] = $dep_uid;
|
||||
$editDepartment['DEP_MANAGER'] = (!isset($_POST['NO_DEP_MANAGER'])? $dep_manager : '');
|
||||
$oDept = new Department();
|
||||
$oDept->update( $editDepartment );
|
||||
$oDept->updateDepartmentManager( $dep_uid );
|
||||
$oDept->update($editDepartment);
|
||||
$oDept->updateDepartmentManager($dep_uid);
|
||||
echo '{success: true}';
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,49 +26,48 @@
|
||||
*/
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$DISPLAY_MAX_SIZE = 25;
|
||||
global $_DBArray;
|
||||
|
||||
$oFieldCondition = new FieldCondition();
|
||||
if (isset($_SESSION['Current_Dynafom']['Parameters']['DYN_UID'])) {
|
||||
$DYN_UID = $_SESSION['Current_Dynafom']['Parameters']['DYN_UID'];
|
||||
$aRows = $oFieldCondition->getAllByDynUid( $DYN_UID );
|
||||
$aRows = $oFieldCondition->getAllByDynUid($DYN_UID);
|
||||
}
|
||||
|
||||
$aFieldNames = Array ('FCD_NRO','FCD_UID','FCD_FUNCTION','FCD_FIELDS','FCD_CONDITION','FCD_EVENTS','FCD_EVENT_OWNERS','FCD_STATUS','FCD_DYN_UID' );
|
||||
$aFieldNames = array('FCD_NRO','FCD_UID','FCD_FUNCTION','FCD_FIELDS','FCD_CONDITION','FCD_EVENTS','FCD_EVENT_OWNERS','FCD_STATUS','FCD_DYN_UID' );
|
||||
|
||||
//Routines to limit the show in list max size for some fields that can have large size
|
||||
$inndex = 0;
|
||||
$aRowsTmp = Array ();
|
||||
$aRowsTmp = array();
|
||||
foreach ($aRows as $aRow) {
|
||||
$aRow['FCD_NRO'] = ++ $inndex;
|
||||
if (strlen( $aRow['FCD_FIELDS'] ) > $DISPLAY_MAX_SIZE) {
|
||||
$aRow['FCD_FIELDS'] = substr( $aRow['FCD_FIELDS'], 0, $DISPLAY_MAX_SIZE ) . '...';
|
||||
if (strlen($aRow['FCD_FIELDS']) > $DISPLAY_MAX_SIZE) {
|
||||
$aRow['FCD_FIELDS'] = substr($aRow['FCD_FIELDS'], 0, $DISPLAY_MAX_SIZE) . '...';
|
||||
}
|
||||
|
||||
if ($aRow['FCD_FUNCTION'] == 'showAll' || $aRow['FCD_FUNCTION'] == 'hideAll') {
|
||||
$aRow['FCD_FIELDS'] = 'ALL';
|
||||
}
|
||||
|
||||
if (strlen( $aRow['FCD_CONDITION'] ) > $DISPLAY_MAX_SIZE) {
|
||||
$aRow['FCD_CONDITION'] = substr( $aRow['FCD_CONDITION'], 0, $DISPLAY_MAX_SIZE ) . '...';
|
||||
if (strlen($aRow['FCD_CONDITION']) > $DISPLAY_MAX_SIZE) {
|
||||
$aRow['FCD_CONDITION'] = substr($aRow['FCD_CONDITION'], 0, $DISPLAY_MAX_SIZE) . '...';
|
||||
}
|
||||
if (strlen( $aRow['FCD_EVENT_OWNERS'] ) > $DISPLAY_MAX_SIZE) {
|
||||
$aRow['FCD_EVENT_OWNERS'] = substr( $aRow['FCD_EVENT_OWNERS'], 0, $DISPLAY_MAX_SIZE ) . '...';
|
||||
if (strlen($aRow['FCD_EVENT_OWNERS']) > $DISPLAY_MAX_SIZE) {
|
||||
$aRow['FCD_EVENT_OWNERS'] = substr($aRow['FCD_EVENT_OWNERS'], 0, $DISPLAY_MAX_SIZE) . '...';
|
||||
}
|
||||
array_push( $aRowsTmp, $aRow );
|
||||
array_push($aRowsTmp, $aRow);
|
||||
}
|
||||
|
||||
$aRows = array_merge( Array ($aFieldNames), $aRowsTmp );
|
||||
$aRows = array_merge(array($aFieldNames), $aRowsTmp);
|
||||
|
||||
$_DBArray['virtual_pmtable'] = $aRows;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
|
||||
$oCriteria = new Criteria( 'dbarray' );
|
||||
$oCriteria->setDBArrayTable( 'virtual_pmtable' );
|
||||
|
||||
$oHeadPublisher->addScriptFile( '/jscore/dynaforms/dynaforms_conditionalShowHide.js' );
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'dynaforms/dynaforms_ConditionalShowHideList', $oCriteria, Array ('DYN_UID' => $DYN_UID), '' );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
$oCriteria = new Criteria('dbarray');
|
||||
$oCriteria->setDBArrayTable('virtual_pmtable');
|
||||
|
||||
$oHeadPublisher->addScriptFile('/jscore/dynaforms/dynaforms_conditionalShowHide.js');
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'dynaforms/dynaforms_ConditionalShowHideList', $oCriteria, array('DYN_UID' => $DYN_UID), '');
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
@@ -36,19 +36,19 @@ $G_ID_MENU_SELECTED = 'PROCESSES';
|
||||
$G_ID_SUB_MENU_SELECTED = 'FIELDS';
|
||||
|
||||
$dbc = new DBConnection();
|
||||
$ses = new DBSession( $dbc );
|
||||
$ses = new DBSession($dbc);
|
||||
|
||||
//Hardcode: UID of the library by default
|
||||
$PRO_UID = isset( $_POST['PRO_UID'] ) ? $_POST['PRO_UID'] : '746B734DC23311';
|
||||
$PRO_UID = isset($_POST['PRO_UID']) ? $_POST['PRO_UID'] : '746B734DC23311';
|
||||
|
||||
$process = new Process( $dbc );
|
||||
$process->Load( $PRO_UID );
|
||||
$process = new Process($dbc);
|
||||
$process->Load($PRO_UID);
|
||||
|
||||
$dynaform = new Dynaform( $dbc );
|
||||
$dynaform->Fields['DYN_UID'] = (isset( $_POST['DYN_UID'] )) ? urldecode( $_POST['DYN_UID'] ) : '0';
|
||||
$dynaform->Load( $dynaform->Fields['DYN_UID'] );
|
||||
$dynaform = new Dynaform($dbc);
|
||||
$dynaform->Fields['DYN_UID'] = (isset($_POST['DYN_UID'])) ? urldecode($_POST['DYN_UID']) : '0';
|
||||
$dynaform->Load($dynaform->Fields['DYN_UID']);
|
||||
|
||||
if (isset( $_POST['DYN_UID'] ) && ($_POST['DYN_UID'] !== '')) {
|
||||
if (isset($_POST['DYN_UID']) && ($_POST['DYN_UID'] !== '')) {
|
||||
$file = $dynaform->Fields['DYN_FILENAME'];
|
||||
} else {
|
||||
//Hardcode: Sample of xmlform.
|
||||
@@ -56,57 +56,57 @@ if (isset( $_POST['DYN_UID'] ) && ($_POST['DYN_UID'] !== '')) {
|
||||
}
|
||||
|
||||
/* Start Comment: If file doesn't exist, it is created */
|
||||
if (! file_exists( PATH_DYNAFORM . $file . '.xml' )) {
|
||||
if (! file_exists(PATH_DYNAFORM . $file . '.xml')) {
|
||||
$newDoc = new Xml_Document();
|
||||
$newDoc->addChildNode( new Xml_Node( 'dynaForm', 'open', '', array ('type' => 'xmlform','name' => $file
|
||||
) ) );
|
||||
$newDoc->children[0]->addChildNode( new Xml_Node( '', 'cdata', "\n" ) );
|
||||
G::verifyPath( dirname( PATH_DYNAFORM . $file . '.xml' ), true );
|
||||
$newDoc->save( PATH_DYNAFORM . $file . '.xml' );
|
||||
unset( $newDoc );
|
||||
$newDoc->addChildNode(new Xml_Node('dynaForm', 'open', '', array('type' => 'xmlform','name' => $file
|
||||
)));
|
||||
$newDoc->children[0]->addChildNode(new Xml_Node('', 'cdata', "\n"));
|
||||
G::verifyPath(dirname(PATH_DYNAFORM . $file . '.xml'), true);
|
||||
$newDoc->save(PATH_DYNAFORM . $file . '.xml');
|
||||
unset($newDoc);
|
||||
}
|
||||
/* End Comment */
|
||||
|
||||
/* Start Comment: Create and temporal copy. */
|
||||
$pathFile = $filter->xssFilterHard(PATH_DYNAFORM . $file . '.xml', 'path');
|
||||
$copy = implode( '', file( $pathFile ) );
|
||||
$copy = implode('', file($pathFile));
|
||||
$file .= '_tmp0';
|
||||
$fcopy = fopen( $pathFile , "w" );
|
||||
fwrite( $fcopy, $copy );
|
||||
fclose( $fcopy );
|
||||
$fcopy = fopen($pathFile, "w");
|
||||
fwrite($fcopy, $copy);
|
||||
fclose($fcopy);
|
||||
/* End Comment */
|
||||
//Removes any other CURRENT_DYNAFORM that could be pending because of a page refresh or a failure
|
||||
unset( $_SESSION['CURRENT_DYNAFORM'] );
|
||||
unset($_SESSION['CURRENT_DYNAFORM']);
|
||||
|
||||
define( 'DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml' );
|
||||
define( 'DB_XMLDB_USER', '' );
|
||||
define( 'DB_XMLDB_PASS', '' );
|
||||
define( 'DB_XMLDB_NAME', '' );
|
||||
define( 'DB_XMLDB_TYPE', 'myxml' );
|
||||
define('DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml');
|
||||
define('DB_XMLDB_USER', '');
|
||||
define('DB_XMLDB_PASS', '');
|
||||
define('DB_XMLDB_NAME', '');
|
||||
define('DB_XMLDB_TYPE', 'myxml');
|
||||
|
||||
$title = $process->Fields['PRO_TITLE'] . ' : ' . $dynaform->Fields['DYN_TITLE'];
|
||||
|
||||
$Parameters = array ('SYS_LANG' => SYS_LANG,'URL' => G::encrypt( $file, URL_KEY ),'DYN_UID' => $dynaform->Fields['DYN_UID'],'DYNAFORM_NAME' => $title
|
||||
$Parameters = array('SYS_LANG' => SYS_LANG,'URL' => G::encrypt($file, URL_KEY),'DYN_UID' => $dynaform->Fields['DYN_UID'],'DYNAFORM_NAME' => $title
|
||||
);
|
||||
|
||||
$openDoc = new Xml_Document();
|
||||
$openDoc->parseXmlFile( PATH_DYNAFORM . $file . '.xml' );
|
||||
$XmlEditor = array ('URL' => G::encrypt( $file, URL_KEY ),'XML' => $openDoc->getXml()
|
||||
$openDoc->parseXmlFile(PATH_DYNAFORM . $file . '.xml');
|
||||
$XmlEditor = array('URL' => G::encrypt($file, URL_KEY),'XML' => $openDoc->getXml()
|
||||
);
|
||||
|
||||
$form = new Form( $file, PATH_DYNAFORM, SYS_LANG, true );
|
||||
$HtmlEditor = array ('URL' => G::encrypt( $file, URL_KEY ),'HTML' => $form->printTemplate( $form->template, $script )
|
||||
$form = new Form($file, PATH_DYNAFORM, SYS_LANG, true);
|
||||
$HtmlEditor = array('URL' => G::encrypt($file, URL_KEY),'HTML' => $form->printTemplate($form->template, $script)
|
||||
);
|
||||
$JSEditor = array ('URL' => G::encrypt( $file, URL_KEY ),'HTML' => $form->printTemplate( $form->template, $script )
|
||||
$JSEditor = array('URL' => G::encrypt($file, URL_KEY),'HTML' => $form->printTemplate($form->template, $script)
|
||||
);
|
||||
|
||||
/* Block : Loads the Editor configuration */
|
||||
$defaultConfig = array ('Editor' => array ('left' => '0',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
|
||||
$defaultConfig = array('Editor' => array('left' => '0',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
|
||||
'top' => '0',//'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
|
||||
'width' => 'document.body.clientWidth-4','height' => 'document.body.clientHeight-2' //'3/4*(document.body.clientWidth-getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))*2)',
|
||||
),'Toolbar' => array ('left' => 'document.body.clientWidth-2-toolbar.clientWidth-24-3+7',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
|
||||
),'Toolbar' => array('left' => 'document.body.clientWidth-2-toolbar.clientWidth-24-3+7',//'getAbsoluteLeft(document.getElementById("dynaformEditor[0]"))',
|
||||
'top' => '52' //'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))',
|
||||
),'FieldsList' => array ('left' => '4+toolbar.clientWidth+24','top' => 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))','width' => 268 - 24,'height' => 400
|
||||
),'FieldsList' => array('left' => '4+toolbar.clientWidth+24','top' => 'getAbsoluteTop(document.getElementById("dynaformEditor[0]"))','width' => 268 - 24,'height' => 400
|
||||
)
|
||||
);
|
||||
/*$configuration = new Configuration($dbc);
|
||||
@@ -125,39 +125,39 @@ $config = $defaultConfig;
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->publisherId = 'dynaformEditor';
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->setTitle( "Dynaform Editor" );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->setTitle("Dynaform Editor");
|
||||
|
||||
//$G_PUBLISH->AddContent('pagedtable', 'paged-table', 'dynaforms/fields_ShortList', '', $Parameters , '', SYS_URI.'dynaforms/dynaforms_PagedTableAjax');
|
||||
$G_PUBLISH->AddContent( 'blank' );
|
||||
$G_PUBLISH->AddContent('blank');
|
||||
|
||||
$panelConf = array ('title' => G::LoadTranslation( 'ID_DYNAFORM_EDITOR' ) . ' - [' . $title . ']','style' => array ('title' => array ('textAlign' => 'left'
|
||||
$panelConf = array('title' => G::LoadTranslation('ID_DYNAFORM_EDITOR') . ' - [' . $title . ']','style' => array('title' => array('textAlign' => 'left'
|
||||
)
|
||||
),'width' => 700,'height' => 600,'tabWidth' => 120,'modal' => true,'drag' => false,'resize' => false,'blinkToFront' => false
|
||||
);
|
||||
$panelConf = array_merge( $panelConf, $config['Editor'] );
|
||||
$panelConf = array_merge($panelConf, $config['Editor']);
|
||||
|
||||
$G_PUBLISH->AddContent( 'panel-init', 'mainPanel', $panelConf );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'toolbar', 'dynaforms/fields_Toolbar', '', $Parameters, '', '' );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_Editor', '', $Parameters, '', '' );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_XmlEditor', '', $XmlEditor, '', '' );
|
||||
$G_PUBLISH->AddContent('panel-init', 'mainPanel', $panelConf);
|
||||
$G_PUBLISH->AddContent('xmlform', 'toolbar', 'dynaforms/fields_Toolbar', '', $Parameters, '', '');
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Editor', '', $Parameters, '', '');
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_XmlEditor', '', $XmlEditor, '', '');
|
||||
//This space will be loaded dynamically by el js function: "changoToHtmlCode"
|
||||
$G_PUBLISH->AddContent( 'blank' );
|
||||
$G_PUBLISH->AddContent( 'pagedtable', 'paged-table', 'dynaforms/fields_List', '', $Parameters, '', SYS_URI . 'dynaforms/dynaforms_PagedTableAjax' );
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'dynaforms/dynaforms_JSEditor', '', $JSEditor, '', '' );
|
||||
$G_PUBLISH->AddContent( 'blank' );
|
||||
$G_PUBLISH->AddContent('blank');
|
||||
$G_PUBLISH->AddContent('pagedtable', 'paged-table', 'dynaforms/fields_List', '', $Parameters, '', SYS_URI . 'dynaforms/dynaforms_PagedTableAjax');
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_JSEditor', '', $JSEditor, '', '');
|
||||
$G_PUBLISH->AddContent('blank');
|
||||
// $G_PUBLISH->AddContent('xmlform', 'xmlform', 'dynaforms/dynaforms_Properties', '', $JSEditor , '', '');
|
||||
|
||||
|
||||
$G_PUBLISH->AddContent( 'panel-tab', 'Preview', 'dynaformEditor[3]', 'changoToPreview', 'saveCurrentView' );
|
||||
$G_PUBLISH->AddContent( 'panel-tab', 'XML Code', 'dynaformEditor[4]', 'changoToXmlCode', 'saveCurrentView' );
|
||||
$G_PUBLISH->AddContent( 'panel-tab', 'HTML Template', 'dynaformEditor[5]', 'changoToHtmlCode', 'saveCurrentView' );
|
||||
$G_PUBLISH->AddContent( 'panel-tab', 'Fields List', 'dynaformEditor[6]', 'changoToFieldsList', 'saveCurrentView' );
|
||||
$G_PUBLISH->AddContent( 'panel-tab', 'JavaScripts', 'dynaformEditor[7]', 'changoToJavascripts', 'saveCurrentView' );
|
||||
$G_PUBLISH->AddContent( 'panel-tab', 'Properties', 'dynaformEditor[8]', 'changoToProperties', 'saveCurrentView' );
|
||||
$G_PUBLISH->AddContent( 'panel-close' );
|
||||
$G_PUBLISH->AddContent('panel-tab', 'Preview', 'dynaformEditor[3]', 'changoToPreview', 'saveCurrentView');
|
||||
$G_PUBLISH->AddContent('panel-tab', 'XML Code', 'dynaformEditor[4]', 'changoToXmlCode', 'saveCurrentView');
|
||||
$G_PUBLISH->AddContent('panel-tab', 'HTML Template', 'dynaformEditor[5]', 'changoToHtmlCode', 'saveCurrentView');
|
||||
$G_PUBLISH->AddContent('panel-tab', 'Fields List', 'dynaformEditor[6]', 'changoToFieldsList', 'saveCurrentView');
|
||||
$G_PUBLISH->AddContent('panel-tab', 'JavaScripts', 'dynaformEditor[7]', 'changoToJavascripts', 'saveCurrentView');
|
||||
$G_PUBLISH->AddContent('panel-tab', 'Properties', 'dynaformEditor[8]', 'changoToProperties', 'saveCurrentView');
|
||||
$G_PUBLISH->AddContent('panel-close');
|
||||
|
||||
G::RenderPage( "publish", "raw" );
|
||||
G::RenderPage("publish", "raw");
|
||||
|
||||
?>
|
||||
<script>
|
||||
|
||||
@@ -32,80 +32,78 @@
|
||||
$filter = new InputFilter();
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
|
||||
function subDependencies ($k, &$G_FORM, &$aux, $grid = '')
|
||||
function subDependencies($k, &$G_FORM, &$aux, $grid = '')
|
||||
{
|
||||
$myDependentFields = '';
|
||||
if (array_search( $k, $aux ) !== false) {
|
||||
return array ();
|
||||
if (array_search($k, $aux) !== false) {
|
||||
return array();
|
||||
}
|
||||
if ($grid == '') {
|
||||
if (! array_key_exists( $k, $G_FORM->fields )) {
|
||||
return array ();
|
||||
if (!array_key_exists($k, $G_FORM->fields)) {
|
||||
return array();
|
||||
}
|
||||
if (! isset( $G_FORM->fields[$k]->dependentFields )) {
|
||||
return array ();
|
||||
if (!isset($G_FORM->fields[$k]->dependentFields)) {
|
||||
return array();
|
||||
}
|
||||
$aux[] = $k;
|
||||
$mydependentFields = $G_FORM->fields[$k]->dependentFields;
|
||||
|
||||
} else {
|
||||
if (! array_key_exists( $k, $G_FORM->fields[$grid]->fields )) {
|
||||
return array ();
|
||||
if (!array_key_exists($k, $G_FORM->fields[$grid]->fields)) {
|
||||
return array();
|
||||
}
|
||||
if (! isset( $G_FORM->fields[$grid]->fields[$k]->dependentFields )) {
|
||||
return array ();
|
||||
if (!isset($G_FORM->fields[$grid]->fields[$k]->dependentFields)) {
|
||||
return array();
|
||||
}
|
||||
$myDependentFields = $G_FORM->fields[$grid]->fields[$k]->dependentFields;
|
||||
$myDependentFields = explode( ',', $G_FORM->fields[$grid]->fields[$k]->dependentFields );
|
||||
|
||||
$myDependentFields = explode(',', $G_FORM->fields[$grid]->fields[$k]->dependentFields);
|
||||
}
|
||||
return $myDependentFields;
|
||||
}
|
||||
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
// the script responds an ajax request in order to check the dependent fields,
|
||||
// and generate a json output of the values that the dependent field must have.
|
||||
$sDynUid = G::getUIDName( urlDecode( $_POST['DYN_UID'] ) );
|
||||
// the script responds an ajax request in order to check the dependent fields,
|
||||
// and generate a json output of the values that the dependent field must have.
|
||||
$sDynUid = G::getUIDName(urlDecode($_POST['DYN_UID']));
|
||||
//$json = new Services_JSON();
|
||||
$formValues = (Bootstrap::json_decode( $_POST['fields'] ));
|
||||
$formValues = (Bootstrap::json_decode($_POST['fields']));
|
||||
$sFieldName = $_POST['fieldName'];
|
||||
$sMasterField = '';
|
||||
$sPath = PATH_DYNAFORM;
|
||||
$G_FORM = new Form( $sDynUid, $sPath );
|
||||
$aux = array ();
|
||||
$newValues = Bootstrap::json_decode( urlDecode( stripslashes( $_POST['form'] ) ) );
|
||||
$G_FORM = new Form($sDynUid, $sPath);
|
||||
$aux = array();
|
||||
$newValues = Bootstrap::json_decode(urlDecode(stripslashes($_POST['form'])));
|
||||
|
||||
if (isset( $_POST['grid'] )) {
|
||||
$_POST['row'] = (int) $_POST['row'];
|
||||
$aAux = array ();
|
||||
if (isset($_POST['grid'])) {
|
||||
$_POST['row'] = (int)$_POST['row'];
|
||||
$aAux = array();
|
||||
foreach ($newValues as $sKey => $newValue) {
|
||||
$newValue = (array) $newValue;
|
||||
$aKeys = array_keys( $newValue );
|
||||
$aValues = array ();
|
||||
for ($i = 1; $i <= ($_POST['row'] - 1); $i ++) {
|
||||
$aValues[$i] = array ($aKeys[0] => ''
|
||||
$newValue = (array)$newValue;
|
||||
$aKeys = array_keys($newValue);
|
||||
$aValues = array();
|
||||
for ($i = 1; $i <= ($_POST['row'] - 1); $i++) {
|
||||
$aValues[$i] = array($aKeys[0] => ''
|
||||
);
|
||||
}
|
||||
$aValues[$_POST['row']] = array ($aKeys[0] => $newValue[$aKeys[0]] );
|
||||
$newValues[$sKey]->$_POST['grid'] = $aValues;
|
||||
unset( $newValues[$sKey]->$aKeys[0] );
|
||||
$aValues[$_POST['row']] = array($aKeys[0] => $newValue[$aKeys[0]]);
|
||||
$newValues[$sKey]->{$_POST['grid']} = $aValues;
|
||||
unset($newValues[$sKey]->{$aKeys[0]});
|
||||
}
|
||||
}
|
||||
|
||||
$dependentFields = array ();
|
||||
$aux = array ();
|
||||
$dependentFields = array();
|
||||
$aux = array();
|
||||
$found = false;
|
||||
for ($r = 0; $r < sizeof( $newValues ); $r ++) {
|
||||
$newValues[$r] = (array) $newValues[$r];
|
||||
$G_FORM->setValues( $newValues[$r] );
|
||||
for ($r = 0; $r < sizeof($newValues); $r++) {
|
||||
$newValues[$r] = (array)$newValues[$r];
|
||||
$G_FORM->setValues($newValues[$r]);
|
||||
//Search dependent fields
|
||||
foreach ($newValues[$r] as $k => $v) {
|
||||
if (! is_array( $v )) {
|
||||
$myDependentFields = subDependencies( $k, $G_FORM, $aux );
|
||||
if (! $found) {
|
||||
if (in_array( $sFieldName, $myDependentFields )) {
|
||||
if (!is_array($v)) {
|
||||
$myDependentFields = subDependencies($k, $G_FORM, $aux);
|
||||
if (!$found) {
|
||||
if (in_array($sFieldName, $myDependentFields)) {
|
||||
$sMasterField = $k;
|
||||
$found = true;
|
||||
}
|
||||
@@ -113,9 +111,9 @@ for ($r = 0; $r < sizeof( $newValues ); $r ++) {
|
||||
$_SESSION[$G_FORM->id][$k] = $v;
|
||||
} else {
|
||||
foreach ($v[$_POST['row']] as $k1 => $v1) {
|
||||
$myDependentFields = subDependencies( $k1, $G_FORM, $aux, $_POST['grid'] );
|
||||
if (! $found) {
|
||||
if (in_array( $sFieldName, $myDependentFields )) {
|
||||
$myDependentFields = subDependencies($k1, $G_FORM, $aux, $_POST['grid']);
|
||||
if (!$found) {
|
||||
if (in_array($sFieldName, $myDependentFields)) {
|
||||
$sMasterField = $k1;
|
||||
$found = true;
|
||||
}
|
||||
@@ -123,15 +121,14 @@ for ($r = 0; $r < sizeof( $newValues ); $r ++) {
|
||||
$_SESSION[$G_FORM->id][$_POST['grid']][$_POST['row']][$k1] = $v1;
|
||||
}
|
||||
}
|
||||
$dependentFields = array_merge( $dependentFields, $myDependentFields );
|
||||
$dependentFields = array_merge($dependentFields, $myDependentFields);
|
||||
}
|
||||
}
|
||||
switch ($_POST['function']) {
|
||||
case 'showDependentFields':
|
||||
echo $json->encode( array_unique( $dependentFields ) );
|
||||
echo $json->encode(array_unique($dependentFields));
|
||||
break;
|
||||
case 'showDependentOf':
|
||||
echo $sMasterField;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent( 'view', 'dynaforms/fieldsHandlerViewer' );
|
||||
G::RenderPage( "publish", "raw" );
|
||||
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent('view', 'dynaforms/fieldsHandlerViewer');
|
||||
G::RenderPage("publish", "raw");
|
||||
|
||||
@@ -21,37 +21,37 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
|
||||
|
||||
|
||||
if (! (isset( $_POST['A'] ) && $_POST['A'] !== '')) {
|
||||
if (! (isset($_POST['A']) && $_POST['A'] !== '')) {
|
||||
return;
|
||||
}
|
||||
if (! (isset( $_POST['XMLNODE_NAME'] ) && $_POST['XMLNODE_NAME'] !== '')) {
|
||||
if (! (isset($_POST['XMLNODE_NAME']) && $_POST['XMLNODE_NAME'] !== '')) {
|
||||
return;
|
||||
}
|
||||
if (! (isset( $_POST['NEW_POS'] ) && $_POST['NEW_POS'] !== '')) {
|
||||
if (! (isset($_POST['NEW_POS']) && $_POST['NEW_POS'] !== '')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$file = PATH_DYNAFORM . G::decrypt( $_POST['A'], URL_KEY ) . '.xml';
|
||||
$file = PATH_DYNAFORM . G::decrypt($_POST['A'], URL_KEY) . '.xml';
|
||||
$fieldName = $_POST['XMLNODE_NAME'];
|
||||
$newPos = intval( $_POST['NEW_POS'] );
|
||||
$newPos = intval($_POST['NEW_POS']);
|
||||
|
||||
if (! file_exists( $file )) {
|
||||
if (! file_exists($file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$xmldoc = new Xml_Document();
|
||||
$xmldoc->parseXmlFile( $file );
|
||||
$xmldoc->parseXmlFile($file);
|
||||
|
||||
$node = & $xmldoc->findNode( '/dynaForm/' . $fieldName );
|
||||
$node = $xmldoc->findNode('/dynaForm/' . $fieldName);
|
||||
|
||||
if (! isset( $node )) {
|
||||
if (! isset($node)) {
|
||||
return;
|
||||
}
|
||||
$numFields = 0;
|
||||
@@ -63,7 +63,7 @@ $newPos = ($newPos < 1) ? 1 : $newPos;
|
||||
$newPos = ($newPos > $numFields) ? $numFields : $newPos;
|
||||
|
||||
$rowCounter = (int) 0;
|
||||
$newOrder = array ();
|
||||
$newOrder = array();
|
||||
foreach ($xmldoc->children[0]->children as $index => $child) {
|
||||
if ($child->name !== '') {
|
||||
$rowCounter ++;
|
||||
@@ -86,19 +86,18 @@ if ($rowCounter < $newPos) {
|
||||
}
|
||||
$xmldoc->children[0]->children = $newOrder;
|
||||
|
||||
$xmldoc->save( $file );
|
||||
$xmldoc->save($file);
|
||||
|
||||
$i = 0;
|
||||
$aFields = array ();
|
||||
$aFields[] = array ('XMLNODE_NAME' => 'char','TYPE' => 'char','UP' => 'char','DOWN' => 'char','row__' => 'integer');
|
||||
$oSession = new DBSession( new DBConnection( $file, '', '', '', 'myxml' ) );
|
||||
$oDataset = $oSession->Execute( 'SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" )' );
|
||||
$aFields = array();
|
||||
$aFields[] = array('XMLNODE_NAME' => 'char','TYPE' => 'char','UP' => 'char','DOWN' => 'char','row__' => 'integer');
|
||||
$oSession = new DBSession(new DBConnection($file, '', '', '', 'myxml'));
|
||||
$oDataset = $oSession->Execute('SELECT * FROM dynaForm WHERE NOT( XMLNODE_NAME = "" )');
|
||||
$iMaximun = $oDataset->count();
|
||||
while ($aRow = $oDataset->Read()) {
|
||||
$aFields[] = array ('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],'TYPE' => $aRow['TYPE'],'UP' => ($i > 0 ? G::LoadTranslation( 'ID_UP' ) : ''),'DOWN' => ($i < $iMaximun - 1 ? G::LoadTranslation( 'ID_DOWN' ) : ''),'row__' => ($i + 1) );
|
||||
$aFields[] = array('XMLNODE_NAME' => $aRow['XMLNODE_NAME'],'TYPE' => $aRow['TYPE'],'UP' => ($i > 0 ? G::LoadTranslation('ID_UP') : ''),'DOWN' => ($i < $iMaximun - 1 ? G::LoadTranslation('ID_DOWN') : ''),'row__' => ($i + 1) );
|
||||
$i ++;
|
||||
}
|
||||
global $_DBArray;
|
||||
$_DBArray['fields'] = $aFields;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ $arrayConfigPage = $configuration->getConfiguration("emailServerList", "pageSize
|
||||
$arrayConfig = array();
|
||||
$arrayConfig["pageSize"] = (isset($arrayConfigPage["pageSize"]))? $arrayConfigPage["pageSize"] : 20;
|
||||
|
||||
$headPublisher = &headPublisher::getSingleton();
|
||||
$headPublisher = headPublisher::getSingleton();
|
||||
$headPublisher->addContent("emailServer/emailServer"); //Adding a HTML file
|
||||
$headPublisher->addExtJsScript("emailServer/emailServer", false); //Adding a JavaScript file
|
||||
$headPublisher->assign("CONFIG", $arrayConfig);
|
||||
@@ -25,4 +25,3 @@ $headPublisher->assign("EMAILSERVER_LICENSED", (PMLicensedFeatures::getSingleton
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
|
||||
@@ -4,49 +4,53 @@ use ProcessMaker\Core\System;
|
||||
|
||||
AddonsStore::checkLicenseStore();
|
||||
|
||||
$licenseManager = &PmLicenseManager::getSingleton();
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
if (isset($licenseManager->date) && is_array($licenseManager->date)) {
|
||||
$conf = new Configurations();
|
||||
if (!empty(config("system.workspace")) && $conf->exists("ENVIRONMENT_SETTINGS")) {
|
||||
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
|
||||
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
|
||||
$licenseManager->date['START'] = $conf->getSystemDate($licenseManager->date['START']);
|
||||
$licenseManager->date['END'] = $conf->getSystemDate($licenseManager->date['END']);
|
||||
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
|
||||
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
|
||||
$licenseManager->date['START'] = $conf->getSystemDate($licenseManager->date['START']);
|
||||
$licenseManager->date['END'] = $conf->getSystemDate($licenseManager->date['END']);
|
||||
} else {
|
||||
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
|
||||
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
|
||||
$licenseManager->date['START'] = G::getformatedDate($licenseManager->date['START'], 'M d, yyyy', SYS_LANG);
|
||||
$licenseManager->date['END'] = G::getformatedDate($licenseManager->date['END'], 'M d, yyyy', SYS_LANG);
|
||||
$licenseManager->date['START'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['START']));
|
||||
$licenseManager->date['END'] = date("Y-m-d H:i:s", strtotime($licenseManager->date['HUMAN']['END']));
|
||||
$licenseManager->date['START'] = G::getformatedDate($licenseManager->date['START'], 'M d, yyyy', SYS_LANG);
|
||||
$licenseManager->date['END'] = G::getformatedDate($licenseManager->date['END'], 'M d, yyyy', SYS_LANG);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($licenseManager->result) && $licenseManager->result == "OK") {
|
||||
$oHeadPublisher->assign("license_start_date",$licenseManager->date["START"]);
|
||||
$oHeadPublisher->assign("license_end_date", $licenseManager->expireIn!="NEVER" ? $licenseManager->date["END"]:"NA" );
|
||||
$oHeadPublisher->assign("license_user", $licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")");
|
||||
$oHeadPublisher->assign("license_span", $licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"]/60/60/24) : "~");
|
||||
$oHeadPublisher->assign("license_name", $licenseManager->type);
|
||||
$oHeadPublisher->assign("license_server", $licenseManager->server);
|
||||
$oHeadPublisher->assign("license_expires", $licenseManager->expireIn);
|
||||
$oHeadPublisher->assign("license_message", $licenseManager->status["message"]);
|
||||
$oHeadPublisher->assign("license_start_date", $licenseManager->date["START"]);
|
||||
$oHeadPublisher->assign("license_end_date",
|
||||
$licenseManager->expireIn != "NEVER" ? $licenseManager->date["END"] : "NA");
|
||||
$oHeadPublisher->assign("license_user",
|
||||
$licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")");
|
||||
$oHeadPublisher->assign("license_span",
|
||||
$licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"] / 60 / 60 / 24) : "~");
|
||||
$oHeadPublisher->assign("license_name", $licenseManager->type);
|
||||
$oHeadPublisher->assign("license_server", $licenseManager->server);
|
||||
$oHeadPublisher->assign("license_expires", $licenseManager->expireIn);
|
||||
$oHeadPublisher->assign("license_message", $licenseManager->status["message"]);
|
||||
$oHeadPublisher->assign("licensed", true);
|
||||
}
|
||||
elseif (isset($licenseManager->info)) {
|
||||
} elseif (isset($licenseManager->info)) {
|
||||
$oHeadPublisher->assign("license_start_date", $licenseManager->date["START"]);
|
||||
$oHeadPublisher->assign("license_end_date", $licenseManager->date["END"]);
|
||||
$oHeadPublisher->assign("license_span", $licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"]/60/60/24) : "~");
|
||||
$oHeadPublisher->assign("license_user", $licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")");
|
||||
$oHeadPublisher->assign("license_span",
|
||||
$licenseManager->expireIn != "NEVER" ? ceil($licenseManager->date["SPAN"] / 60 / 60 / 24) : "~");
|
||||
$oHeadPublisher->assign("license_user",
|
||||
$licenseManager->info["FIRST_NAME"] . " " . $licenseManager->info["LAST_NAME"] . " (" . $licenseManager->info["DOMAIN_WORKSPACE"] . ")");
|
||||
$oHeadPublisher->assign("license_name", $licenseManager->type);
|
||||
$oHeadPublisher->assign("license_server", $licenseManager->server);
|
||||
$oHeadPublisher->assign("license_server", $licenseManager->server);
|
||||
$oHeadPublisher->assign("license_expires", $licenseManager->expireIn);
|
||||
$oHeadPublisher->assign("license_message", $licenseManager->status["message"]);
|
||||
$oHeadPublisher->assign("licensed", false);
|
||||
} else {
|
||||
$oHeadPublisher->assign("license_user", "");
|
||||
$oHeadPublisher->assign("license_name", "<b>Unlicensed</b>");
|
||||
$oHeadPublisher->assign("license_server", "<b>no server</b>");
|
||||
$oHeadPublisher->assign("license_server", "<b>no server</b>");
|
||||
$oHeadPublisher->assign("license_expires", "");
|
||||
|
||||
$currentLicenseStatus = $licenseManager->getCurrentLicenseStatus();
|
||||
@@ -57,21 +61,25 @@ elseif (isset($licenseManager->info)) {
|
||||
$oHeadPublisher->assign("license_span", "");
|
||||
$oHeadPublisher->assign("licensed", false);
|
||||
}
|
||||
$oHeadPublisher->assign("license_serial", (isset($licenseManager->licenseSerial))? $licenseManager->licenseSerial : '');
|
||||
$oHeadPublisher->assign("SUPPORT_FLAG", ((isset($licenseManager->supportStartDate) && $licenseManager->supportStartDate == '') || !isset($licenseManager->supportStartDate)) ? true : false );
|
||||
$oHeadPublisher->assign("supportStartDate", (isset($licenseManager->supportStartDate))? $licenseManager->supportStartDate : '');
|
||||
$oHeadPublisher->assign("supportEndDate", (isset($licenseManager->supportEndDate))? $licenseManager->supportEndDate : '');
|
||||
$oHeadPublisher->assign("license_serial",
|
||||
(isset($licenseManager->licenseSerial)) ? $licenseManager->licenseSerial : '');
|
||||
$oHeadPublisher->assign("SUPPORT_FLAG",
|
||||
((isset($licenseManager->supportStartDate) && $licenseManager->supportStartDate == '') || !isset($licenseManager->supportStartDate)) ? true : false);
|
||||
$oHeadPublisher->assign("supportStartDate",
|
||||
(isset($licenseManager->supportStartDate)) ? $licenseManager->supportStartDate : '');
|
||||
$oHeadPublisher->assign("supportEndDate",
|
||||
(isset($licenseManager->supportEndDate)) ? $licenseManager->supportEndDate : '');
|
||||
|
||||
$oHeadPublisher->assign("PROCESSMAKER_VERSION", System::getVersion());
|
||||
$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN );
|
||||
$oHeadPublisher->assign("PROCESSMAKER_URL", "/sys" . config("system.workspace") . "/" . SYS_LANG . "/" . SYS_SKIN);
|
||||
$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN);
|
||||
$oHeadPublisher->assign("URL_PART_LOGIN", ((substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs")? "main/login" : "login/login"));
|
||||
$oHeadPublisher->assign("URL_PART_LOGIN",
|
||||
((substr(SYS_SKIN, 0, 2) == "ux" && SYS_SKIN != "uxs") ? "main/login" : "login/login"));
|
||||
$oHeadPublisher->assign("URL_PART_SETUP", EnterpriseUtils::getUrlPartSetup());
|
||||
$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE", ((is_writable(PATH_PLUGINS))? 1 : 0));
|
||||
$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE", ((is_writable(PATH_PLUGINS)) ? 1 : 0));
|
||||
$oHeadPublisher->assign("PATH_PLUGINS_WRITABLE_MESSAGE", "The directory " . PATH_PLUGINS . " have not writable.");
|
||||
$oHeadPublisher->assign("SKIN_IS_UX", EnterpriseUtils::skinIsUx());
|
||||
$oHeadPublisher->assign("INTERNET_CONNECTION", EnterpriseUtils::getInternetConnection());
|
||||
|
||||
$oHeadPublisher->addExtJsScript("enterprise/addonsStore", true);
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
function runBgProcessmaker($task, $log)
|
||||
{
|
||||
require_once (PATH_CORE . "bin/tasks/cliAddons.php");
|
||||
require_once(PATH_CORE . "bin/tasks/cliAddons.php");
|
||||
|
||||
$task = str_replace("\"", null, $task);
|
||||
$data = explode(" ", $task);
|
||||
@@ -23,7 +23,7 @@ try {
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['addon']) && isset($_REQUEST['store'])) {
|
||||
require_once (PATH_CORE . 'classes/model/AddonsManagerPeer.php');
|
||||
require_once(PATH_CORE . 'classes/model/AddonsManagerPeer.php');
|
||||
|
||||
$addon = AddonsManagerPeer::retrieveByPK($_REQUEST['addon'], $_REQUEST['store']);
|
||||
$addonId = $_REQUEST['addon'];
|
||||
@@ -53,12 +53,12 @@ try {
|
||||
$dir = PATH_DATA_SITE;
|
||||
G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]);
|
||||
//reading the file that was uploaded
|
||||
$oPmLicenseManager = &PmLicenseManager::getSingleton();
|
||||
$oPmLicenseManager = PmLicenseManager::getSingleton();
|
||||
$response = $oPmLicenseManager->installLicense($dir . $aInfoLoadFile["name"]);
|
||||
|
||||
///////
|
||||
//This command also find the following file "AddonsStore.php"
|
||||
$licenseManager = &PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
|
||||
preg_match("/^license_(.*).dat$/", $licenseManager->file, $matches);
|
||||
$realId = urlencode($matches[1]);
|
||||
@@ -214,7 +214,7 @@ try {
|
||||
}
|
||||
|
||||
///////
|
||||
$licenseManager = &PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
$server = $licenseManager->server;
|
||||
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
|
||||
$url = "http://$server/sys".$workspace."/en/green/services/rest";
|
||||
@@ -234,7 +234,7 @@ try {
|
||||
$data = $data . "--$boundary\n";
|
||||
|
||||
///////
|
||||
//$licenseManager = &pmLicenseManager::getSingleton();
|
||||
//$licenseManager = PmLicenseManager::getSingleton();
|
||||
$activeLicense = $licenseManager->getActiveLicense();
|
||||
|
||||
$data = $data . "Content-Disposition: form-data; name=\"licenseFile\"; filename=\"" . $licenseManager->file . "\"\n";
|
||||
@@ -311,8 +311,7 @@ try {
|
||||
} else {
|
||||
$result["addons"] = array();
|
||||
}
|
||||
G::outRes( G::json_encode($result) );
|
||||
|
||||
G::outRes(G::json_encode($result));
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
|
||||
@@ -130,9 +130,9 @@ class enterprisePlugin extends PMPlugin
|
||||
{
|
||||
$this->setConfiguration();
|
||||
|
||||
require_once (PATH_CORE . 'classes/model/AddonsStore.php');
|
||||
require_once(PATH_CORE . 'classes/model/AddonsStore.php');
|
||||
AddonsStore::checkLicenseStore();
|
||||
$licenseManager = &PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
AddonsStore::updateAll(false);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ class enterprisePlugin extends PMPlugin
|
||||
//define("PATH_PLUGINS", PATH_CORE . "plugins" . PATH_SEP);
|
||||
|
||||
if (file_exists(PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php")) {
|
||||
require_once (PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php");
|
||||
require_once(PATH_CORE . "plugins" . PATH_SEP . $pluginName . ".php");
|
||||
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
@@ -278,7 +278,7 @@ class enterprisePlugin extends PMPlugin
|
||||
$strTable = str_replace("_", " ", strtolower($table));
|
||||
$strTable = str_replace(" ", null, ucwords($strTable));
|
||||
|
||||
require_once (PATH_PLUGINS . "enterprise" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "$strTable.php");
|
||||
require_once(PATH_PLUGINS . "enterprise" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "$strTable.php");
|
||||
|
||||
while ($rsSelectTablebak->next()) {
|
||||
$row = $rsSelectTablebak->getRow();
|
||||
@@ -336,4 +336,3 @@ $oPluginRegistry->registerPlugin('enterprise', __FILE__); //<- enterprise string
|
||||
// PATH_PM_LICENSE_MANAGER.PATH_SEPARATOR.
|
||||
// get_include_path()
|
||||
//);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ ini_set("max_execution_time", 0);
|
||||
|
||||
if (!defined("PM_VERSION")) {
|
||||
if (file_exists(PATH_METHODS . "login/version-pmos.php")) {
|
||||
include (PATH_METHODS . "login/version-pmos.php");
|
||||
include(PATH_METHODS . "login/version-pmos.php");
|
||||
} else {
|
||||
define("PM_VERSION", "2.0.0");
|
||||
}
|
||||
@@ -19,8 +19,6 @@ if (!defined("BUFSIZE")) {
|
||||
|
||||
function install($file)
|
||||
{
|
||||
|
||||
|
||||
$result = array();
|
||||
$status = 1;
|
||||
|
||||
@@ -119,7 +117,7 @@ switch ($option) {
|
||||
}
|
||||
|
||||
///////
|
||||
$licenseManager = &PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
$server = isset($licenseManager->server) ? $licenseManager->server : '';
|
||||
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
|
||||
|
||||
@@ -295,7 +293,7 @@ switch ($option) {
|
||||
}
|
||||
|
||||
///////
|
||||
$licenseManager = &PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
$server = (isset($licenseManager->server)) ? $licenseManager->server : '';
|
||||
$workspace = (isset($licenseManager->workspace)) ? $licenseManager->workspace : 'pmLicenseSrv';
|
||||
|
||||
@@ -371,4 +369,3 @@ switch ($option) {
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ $processes = getProcessArray($userUid);
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('events/eventList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('events/eventList'); //adding a html file .html.
|
||||
//sending the columns to display in grid
|
||||
@@ -92,5 +92,4 @@ function getProcessArray($userUid)
|
||||
return $processes;
|
||||
}
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -63,10 +63,9 @@ $configPage = $c->getConfiguration('groupList', 'pageSize', '', $_SESSION['USER_
|
||||
$configEnv = $c->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('groups/groupsList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('groups/groupsList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
|
||||
@@ -22,28 +22,28 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
$access = $RBAC->userCanAccess( 'PM_USERS' );
|
||||
$access = $RBAC->userCanAccess('PM_USERS');
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
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 (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
|
||||
@@ -54,21 +54,20 @@ $G_ID_SUB_MENU_SELECTED = 'GROUPS';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'groups/groupsMembers', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'groups/groupsMembers' ); //adding a html file .html.
|
||||
$oHeadPublisher->addExtJsScript('groups/groupsMembers', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('groups/groupsMembers'); //adding a html file .html.
|
||||
|
||||
|
||||
$labels = G::getTranslations( Array ('ID_GROUPS','ID_GROUP_NAME','ID_BACK','ID_ASSIGN_ALL_MEMBERS','ID_REMOVE_ALL_MEMBERS','ID_MSG_AJAX_FAILURE','ID_PROCESSING','ID_ENTER_SEARCH_TERM','ID_FIRST_NAME','ID_LAST_NAME','ID_USER_NAME','ID_AVAILABLE_MEMBERS','ID_ASSIGNED_MEMBERS') );
|
||||
$labels = G::getTranslations(array('ID_GROUPS','ID_GROUP_NAME','ID_BACK','ID_ASSIGN_ALL_MEMBERS','ID_REMOVE_ALL_MEMBERS','ID_MSG_AJAX_FAILURE','ID_PROCESSING','ID_ENTER_SEARCH_TERM','ID_FIRST_NAME','ID_LAST_NAME','ID_USER_NAME','ID_AVAILABLE_MEMBERS','ID_ASSIGNED_MEMBERS'));
|
||||
|
||||
$oGroup = new Groupwf();
|
||||
$oGroup->load( $_REQUEST['GRP_UID'] );
|
||||
$oGroup->load($_REQUEST['GRP_UID']);
|
||||
|
||||
$groups['GRP_UID'] = $_REQUEST['GRP_UID'];
|
||||
$groups['GRP_TITLE'] = $oGroup->getGrpTitle();
|
||||
|
||||
//$oHeadPublisher->assign('TRANSLATIONS', $labels);
|
||||
$oHeadPublisher->assign( 'GROUPS', $groups );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
$oHeadPublisher->assign('GROUPS', $groups);
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -1,73 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* groups_Ajax.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.
|
||||
*/
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_USERS" )) != 1) {
|
||||
|
||||
if (($RBAC_Response = $RBAC->userCanAccess("PM_USERS")) != 1) {
|
||||
return $RBAC_Response;
|
||||
}
|
||||
$_POST['action'] = get_ajax_value( 'action' );
|
||||
$_POST['action'] = get_ajax_value('action');
|
||||
|
||||
$groups = new Groups();
|
||||
$groupWf = new Groupwf();
|
||||
|
||||
switch ($_POST['action']) {
|
||||
case 'showUsers':
|
||||
|
||||
$oGroups = new Groups();
|
||||
$oGroup = new Groupwf();
|
||||
$aFields = $oGroup->load( $_POST['sGroupUID'] );
|
||||
$fields = $groupWf->load($_POST['sGroupUID']);
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $oGroups->getUsersGroupCriteria( $_POST['sGroupUID'] ), array ('GRP_UID' => $_POST['sGroupUID'],'GRP_NAME' => $aFields['GRP_TITLE']) );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode( "groupname=\"{$aFields["GRP_TITLE"]}\";" );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
$G_PUBLISH->AddContent('propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $groups->getUsersGroupCriteria($_POST['sGroupUID']), array('GRP_UID' => $_POST['sGroupUID'], 'GRP_NAME' => $fields['GRP_TITLE']));
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("groupname=\"{$fields["GRP_TITLE"]}\";");
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
case 'assignUser':
|
||||
$oGroup = new Groups();
|
||||
$oGroup->addUserToGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
||||
$groups->addUserToGroup($_POST['GRP_UID'], $_POST['USR_UID']);
|
||||
break;
|
||||
case 'assignAllUsers':
|
||||
$oGroup = new Groups();
|
||||
$aUsers = explode( ',', $_POST['aUsers'] );
|
||||
for ($i = 0; $i < count( $aUsers ); $i ++) {
|
||||
$oGroup->addUserToGroup( $_POST['GRP_UID'], $aUsers[$i] );
|
||||
foreach (explode(',', $_POST['aUsers']) as $user) {
|
||||
$groups->addUserToGroup($_POST['GRP_UID'], $user);
|
||||
}
|
||||
break;
|
||||
case 'ofToAssignUser':
|
||||
$oGroup = new Groups();
|
||||
$oGroup->removeUserOfGroup( $_POST['GRP_UID'], $_POST['USR_UID'] );
|
||||
$groups->removeUserOfGroup($_POST['GRP_UID'], $_POST['USR_UID']);
|
||||
break;
|
||||
case 'verifyGroupname':
|
||||
$_POST['sOriginalGroupname'] = get_ajax_value( 'sOriginalGroupname' );
|
||||
$_POST['sGroupname'] = get_ajax_value( 'sGroupname' );
|
||||
$_POST['sOriginalGroupname'] = get_ajax_value('sOriginalGroupname');
|
||||
$_POST['sGroupname'] = get_ajax_value('sGroupname');
|
||||
if ($_POST['sOriginalGroupname'] == $_POST['sGroupname']) {
|
||||
echo '0';
|
||||
} else {
|
||||
$oGroup = new Groupwf();
|
||||
$oCriteria = $oGroup->loadByGroupname( $_POST['sGroupname'] );
|
||||
$oDataset = GroupwfPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oCriteria = $groupWf->loadByGroupname($_POST['sGroupname']);
|
||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
if (! $aRow) {
|
||||
if (!$aRow) {
|
||||
echo '0';
|
||||
} else {
|
||||
echo '1';
|
||||
@@ -75,16 +48,15 @@ switch ($_POST['action']) {
|
||||
}
|
||||
break;
|
||||
case 'groupsList':
|
||||
$co = new Configurations();
|
||||
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||
$config = new Configurations();
|
||||
$config = $config->getConfiguration('groupList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
||||
|
||||
$sortField = isset($_REQUEST["sort"])? $_REQUEST["sort"] : "";
|
||||
$sortDir = isset($_REQUEST["dir"])? $_REQUEST["dir"] : "";
|
||||
$sortField = isset($_REQUEST["sort"]) ? $_REQUEST["sort"] : "";
|
||||
$sortDir = isset($_REQUEST["dir"]) ? $_REQUEST["dir"] : "";
|
||||
|
||||
global $RBAC;
|
||||
if ($limit == $start) {
|
||||
@@ -96,19 +68,17 @@ switch ($_POST['action']) {
|
||||
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
||||
$uxList = adminProxy::getUxTypesList();
|
||||
|
||||
$groups = new Groupwf();
|
||||
|
||||
$data = $groups->getAllGroup( $start, $limit, $filter, $sortField, $sortDir, true);
|
||||
$data = $groupWf->getAllGroup($start, $limit, $filter, $sortField, $sortDir, true);
|
||||
$result = $data['rows'];
|
||||
|
||||
$totalRows = 0;
|
||||
$arrData = array ();
|
||||
$arrData = array();
|
||||
foreach ($result as $results) {
|
||||
$totalRows ++;
|
||||
$results['CON_VALUE'] = str_replace( array ("<",">"
|
||||
), array ("<",">"
|
||||
), $results['GRP_TITLE'] );
|
||||
$results['GRP_TASKS'] = isset( $aTask[$results['GRP_UID']] ) ? $aTask[$results['GRP_UID']] : 0;
|
||||
$totalRows++;
|
||||
$results['CON_VALUE'] = str_replace(array("<", ">"
|
||||
), array("<", ">"
|
||||
), $results['GRP_TITLE']);
|
||||
$results['GRP_TASKS'] = isset($aTask[$results['GRP_UID']]) ? $aTask[$results['GRP_UID']] : 0;
|
||||
$arrData[] = $results;
|
||||
}
|
||||
|
||||
@@ -117,13 +87,12 @@ switch ($_POST['action']) {
|
||||
$result->groups = $arrData;
|
||||
$result->total_groups = $data['totalCount'];
|
||||
G::header('Content-Type: application/json');
|
||||
echo G::json_encode( $result );
|
||||
echo G::json_encode($result);
|
||||
break;
|
||||
case 'exitsGroupName':
|
||||
$oGroup = new Groupwf();
|
||||
$oCriteria = $oGroup->loadByGroupname( $_POST['GRP_NAME'] );
|
||||
$oDataset = GroupwfPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oCriteria = $groupWf->loadByGroupname($_POST['GRP_NAME']);
|
||||
$oDataset = GroupwfPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
$response = ($aRow) ? 'true' : 'false';
|
||||
@@ -132,11 +101,10 @@ switch ($_POST['action']) {
|
||||
case 'saveNewGroup':
|
||||
$newGroup['GRP_UID'] = '';
|
||||
$newGroup['GRP_STATUS'] = ($_POST['status'] == '1') ? 'ACTIVE' : 'INACTIVE';
|
||||
$newGroup['GRP_TITLE'] = trim( $_POST['name'] );
|
||||
unset( $newGroup['GRP_UID'] );
|
||||
$group = new Groupwf();
|
||||
$group->create( $newGroup );
|
||||
G::auditLog("CreateGroup", "Group Name: ".$newGroup['GRP_TITLE']." - Group Status: ".$newGroup['GRP_STATUS']);
|
||||
$newGroup['GRP_TITLE'] = trim($_POST['name']);
|
||||
unset($newGroup['GRP_UID']);
|
||||
$groupWf->create($newGroup);
|
||||
G::auditLog("CreateGroup", "Group Name: " . $newGroup['GRP_TITLE'] . " - Group Status: " . $newGroup['GRP_STATUS']);
|
||||
|
||||
echo '{success: true}';
|
||||
|
||||
@@ -144,181 +112,86 @@ switch ($_POST['action']) {
|
||||
case 'saveEditGroup':
|
||||
$editGroup['GRP_UID'] = $_POST['grp_uid'];
|
||||
$editGroup['GRP_STATUS'] = ($_POST['status'] == '1') ? 'ACTIVE' : 'INACTIVE';
|
||||
$editGroup['GRP_TITLE'] = trim( $_POST['name'] );
|
||||
$group = new Groupwf();
|
||||
$group->update( $editGroup );
|
||||
G::auditLog("UpdateGroup", "Group Name: ".$editGroup['GRP_TITLE']." - Group ID: (".$_POST['grp_uid'].") - Group Status: ".$editGroup['GRP_STATUS']);
|
||||
$editGroup['GRP_TITLE'] = trim($_POST['name']);
|
||||
$groupWf->update($editGroup);
|
||||
G::auditLog("UpdateGroup", "Group Name: " . $editGroup['GRP_TITLE'] . " - Group ID: (" . $_POST['grp_uid'] . ") - Group Status: " . $editGroup['GRP_STATUS']);
|
||||
echo '{success: true}';
|
||||
break;
|
||||
case 'deleteGroup':
|
||||
$group = new Groupwf();
|
||||
if (! isset( $_POST['GRP_UID'] )) {
|
||||
if (!isset($_POST['GRP_UID'])) {
|
||||
return;
|
||||
}
|
||||
$group->remove( urldecode( $_POST['GRP_UID'] ) );
|
||||
G::auditLog("DeleteGroup", "Group Name: ".$_POST['GRP_NAME']." Group ID: (".$_POST['GRP_UID'].") ");
|
||||
$groupWf->remove(urldecode($_POST['GRP_UID']));
|
||||
G::auditLog("DeleteGroup", "Group Name: " . $_POST['GRP_NAME'] . " Group ID: (" . $_POST['GRP_UID'] . ") ");
|
||||
require_once 'classes/model/TaskUser.php';
|
||||
$oProcess = new TaskUser();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->add( TaskUserPeer::USR_UID, $_POST['GRP_UID'] );
|
||||
TaskUserPeer::doDelete( $oCriteria );
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(TaskUserPeer::USR_UID, $_POST['GRP_UID']);
|
||||
TaskUserPeer::doDelete($oCriteria);
|
||||
|
||||
//Delete permissions
|
||||
require_once 'classes/model/ObjectPermission.php';
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(ObjectPermissionPeer::USR_UID, $_POST['GRP_UID']);
|
||||
ObjectPermissionPeer::doDelete( $criteria );
|
||||
ObjectPermissionPeer::doDelete($criteria);
|
||||
|
||||
//Delete supervisors assignments
|
||||
require_once 'classes/model/ProcessUser.php';
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(ProcessUserPeer::USR_UID, $_POST['GRP_UID']);
|
||||
$criteria->add(ProcessUserPeer::PU_TYPE, 'GROUP_SUPERVISOR');
|
||||
ProcessUserPeer::doDelete( $criteria );
|
||||
|
||||
ProcessUserPeer::doDelete($criteria);
|
||||
|
||||
//Delete group users
|
||||
require_once 'classes/model/GroupUser.php';
|
||||
$criteria = new Criteria( 'workflow' );
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(GroupUserPeer::GRP_UID, $_POST['GRP_UID']);
|
||||
GroupUserPeer::doDelete( $criteria );
|
||||
GroupUserPeer::doDelete($criteria);
|
||||
|
||||
echo '{success: true}';
|
||||
break;
|
||||
case 'assignedMembers':
|
||||
|
||||
$co = new Configurations();
|
||||
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||
|
||||
$sGroupUID = $_REQUEST['gUID'];
|
||||
|
||||
$aUsers = Array ();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( 'COUNT(*) AS CNT' );
|
||||
$oCriteria->addJoin( GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||
$oCriteria->add( GroupUserPeer::GRP_UID, $sGroupUID );
|
||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||
if ($filter != '') {
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||
}
|
||||
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
$totalRows = $row['CNT'];
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( GroupUserPeer::GRP_UID );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_EMAIL );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_STATUS );
|
||||
$oCriteria->addJoin( GroupUserPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||
$oCriteria->add( GroupUserPeer::GRP_UID, $sGroupUID );
|
||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||
if ($filter != '') {
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||
}
|
||||
$oCriteria->setOffset( $start );
|
||||
$oCriteria->setLimit( $limit );
|
||||
|
||||
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$arrData = Array ();
|
||||
while ($oDataset->next()) {
|
||||
$arrData[] = $oDataset->getRow();
|
||||
}
|
||||
G::header('Content-Type: application/json');
|
||||
echo '{success: true, members: ' . G::json_encode( $arrData ) . ', total_users: ' . $totalRows . '}';
|
||||
break;
|
||||
case 'availableMembers':
|
||||
$co = new Configurations();
|
||||
$config = $co->getConfiguration( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$env = $co->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
|
||||
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
|
||||
|
||||
$config = new Configurations();
|
||||
$inputFilter = new InputFilter();
|
||||
$subQuery = "SELECT " . GroupUserPeer::USR_UID .
|
||||
" FROM " . GroupUserPeer::TABLE_NAME .
|
||||
" WHERE " . GroupUserPeer::GRP_UID . " = '" .
|
||||
$inputFilter->quoteSmart($_REQUEST['gUID'], Propel::getConnection("workflow")) . "'\n" .
|
||||
"UNION SELECT '" . RBAC::GUEST_USER_UID . "'";
|
||||
|
||||
$aUsers = Array ();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( 'COUNT(*) AS CNT' );
|
||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
$oCriteria->add( UsersPeer::USR_UID, UsersPeer::USR_UID . " NOT IN ($subQuery)", Criteria::CUSTOM );
|
||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||
if ($filter != '') {
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||
}
|
||||
$oDataset = UsersPeer::DoSelectRs( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
$totalRows = $row['CNT'];
|
||||
$config = $config->getConfiguration('groupList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
||||
$connection = Propel::getConnection("workflow")->getResource();
|
||||
$groupUid = $inputFilter->quoteSmart($_REQUEST['gUID'], $connection);
|
||||
|
||||
$groupUsers = new GroupUser();
|
||||
$type = $_POST['action'] === 'assignedMembers' ? 'USERS' : 'AVAILABLE-USERS';
|
||||
$data = $groupUsers->getUsersbyGroup($groupUid, $type, $filter, 'USR_USERNAME', 'ASC', $start, $limit);
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_UID );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_EMAIL );
|
||||
$oCriteria->addSelectColumn( UsersPeer::USR_STATUS );
|
||||
$oCriteria->add( UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL );
|
||||
$oCriteria->add( UsersPeer::USR_UID, UsersPeer::USR_UID . " NOT IN ($subQuery)", Criteria::CUSTOM );
|
||||
$filter = (isset( $_POST['textFilter'] )) ? $_POST['textFilter'] : '';
|
||||
if ($filter != '') {
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( UsersPeer::USR_USERNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_FIRSTNAME, '%' . $filter . '%', Criteria::LIKE )->addOr( $oCriteria->getNewCriterion( UsersPeer::USR_LASTNAME, '%' . $filter . '%', Criteria::LIKE ) ) ) );
|
||||
}
|
||||
$oCriteria->addAscendingOrderByColumn( UsersPeer::USR_USERNAME );
|
||||
$oCriteria->setOffset( $start );
|
||||
$oCriteria->setLimit( $limit );
|
||||
$oDataset = UsersPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$arrData = Array ();
|
||||
while ($oDataset->next()) {
|
||||
$arrData[] = $oDataset->getRow();
|
||||
}
|
||||
G::header('Content-Type: application/json');
|
||||
echo '{success: true, members: ' . G::json_encode( $arrData ) . ', total_users: ' . $totalRows . '}';
|
||||
echo '{success: true, members: ' . G::json_encode($data["data"]) . ', total_users: ' . $data["total"] . '}';
|
||||
break;
|
||||
case 'assignUsersToGroupsMultiple':
|
||||
$GRP_UID = $_POST['GRP_UID'];
|
||||
$uUIDs = explode( ',', $_POST['USR_UID'] );
|
||||
$oGroup = new Groups();
|
||||
$uUIDs = explode(',', $_POST['USR_UID']);
|
||||
foreach ($uUIDs as $USR_UID) {
|
||||
$oGroup->addUserToGroup( $GRP_UID, $USR_UID );
|
||||
$groups->addUserToGroup($GRP_UID, $USR_UID);
|
||||
}
|
||||
break;
|
||||
case 'deleteUsersToGroupsMultiple':
|
||||
$GRP_UID = $_POST['GRP_UID'];
|
||||
$uUIDs = explode( ',', $_POST['USR_UID'] );
|
||||
$oGroup = new Groups();
|
||||
$uUIDs = explode(',', $_POST['USR_UID']);
|
||||
foreach ($uUIDs as $USR_UID) {
|
||||
$oGroup->removeUserOfGroup( $GRP_UID, $USR_UID );
|
||||
$groups->removeUserOfGroup($GRP_UID, $USR_UID);
|
||||
}
|
||||
break;
|
||||
case 'updatePageSize':
|
||||
$c = new Configurations();
|
||||
$arr['pageSize'] = $_REQUEST['size'];
|
||||
$arr['dateSave'] = date( 'Y-m-d H:i:s' );
|
||||
$config = Array ();
|
||||
$arr['dateSave'] = date('Y-m-d H:i:s');
|
||||
$config = array();
|
||||
$config[] = $arr;
|
||||
$c->aConfig = $config;
|
||||
$c->saveConfig( 'groupList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$c->saveConfig('groupList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
echo '{success: true}';
|
||||
break;
|
||||
case "verifyIfAssigned":
|
||||
@@ -341,4 +214,4 @@ switch ($_POST['action']) {
|
||||
$response["result"] = $message;
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?php
|
||||
|
||||
try {
|
||||
if (isset( $_REQUEST['status'] )) {
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
if (isset($_REQUEST['status'])) {
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
/*you can use SYS_TEMP or SYS_SYS ON HEAR_BEAT_CONF to save for each workspace*/
|
||||
if ($_REQUEST['status']) {
|
||||
echo "ACTIVE (Thanks!)";
|
||||
$oServerConf->setHeartbeatProperty( 'HB_OPTION', 1, 'HEART_BEAT_CONF' );
|
||||
$oServerConf->unsetHeartbeatProperty( 'HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF' );
|
||||
$oServerConf->setHeartbeatProperty('HB_OPTION', 1, 'HEART_BEAT_CONF');
|
||||
$oServerConf->unsetHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
||||
} else {
|
||||
echo "INACTIVE";
|
||||
$oServerConf->setHeartbeatProperty( 'HB_OPTION', 0, 'HEART_BEAT_CONF' );
|
||||
$oServerConf->unsetHeartbeatProperty( 'HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF' );
|
||||
$oServerConf->setHeartbeatProperty('HB_OPTION', 0, 'HEART_BEAT_CONF');
|
||||
$oServerConf->unsetHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
|
||||
}
|
||||
} else {
|
||||
echo "Nothing to do";
|
||||
@@ -19,6 +19,5 @@ try {
|
||||
} catch (Exception $e) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
|
||||
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,28 +6,28 @@ global $RBAC;
|
||||
|
||||
$RBAC->allows(basename(__FILE__), basename(__FILE__));
|
||||
|
||||
if (isset( $_POST['form']['NW_TITLE'] )) {
|
||||
$action = (isset( $_POST['form']['ACTION'] )) ? trim( $_POST['form']['ACTION'] ) : 'test';
|
||||
$name = trim( $_POST['form']['NW_TITLE'] );
|
||||
if (isset($_POST['form']['NW_TITLE'])) {
|
||||
$action = (isset($_POST['form']['ACTION'])) ? trim($_POST['form']['ACTION']) : 'test';
|
||||
$name = trim($_POST['form']['NW_TITLE']);
|
||||
$inst = new Installer();
|
||||
|
||||
$isset = $inst->isset_site( $name );
|
||||
$isset = $inst->isset_site($name);
|
||||
|
||||
$new = ((! $isset)) ? true : false;
|
||||
$user = (isset( $_POST['form']['NW_USERNAME'] )) ? trim( $_POST['form']['NW_USERNAME'] ) : 'admin';
|
||||
$pass = (isset( $_POST['form']['NW_PASSWORD'] )) ? $_POST['form']['NW_PASSWORD'] : 'admin';
|
||||
$pass1 = (isset( $_POST['form']['NW_PASSWORD2'] )) ? $_POST['form']['NW_PASSWORD2'] : 'admin';
|
||||
$user = (isset($_POST['form']['NW_USERNAME'])) ? trim($_POST['form']['NW_USERNAME']) : 'admin';
|
||||
$pass = (isset($_POST['form']['NW_PASSWORD'])) ? $_POST['form']['NW_PASSWORD'] : 'admin';
|
||||
$pass1 = (isset($_POST['form']['NW_PASSWORD2'])) ? $_POST['form']['NW_PASSWORD2'] : 'admin';
|
||||
|
||||
$ao_db_drop = (isset( $_POST['form']['AO_DB_DROP'] )) ? true : false;
|
||||
$ao_db_drop = (isset($_POST['form']['AO_DB_DROP'])) ? true : false;
|
||||
|
||||
$ao_db_wf = (isset( $_POST['form']['AO_DB_WF'] )) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rb = (isset( $_POST['form']['AO_DB_WF'] )) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rp = (isset( $_POST['form']['AO_DB_WF'] )) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_wf = (isset($_POST['form']['AO_DB_WF'])) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rb = (isset($_POST['form']['AO_DB_WF'])) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
$ao_db_rp = (isset($_POST['form']['AO_DB_WF'])) ? $_POST['form']['AO_DB_WF'] : false;
|
||||
|
||||
$result = $inst->create_site( Array ('isset' => true,'name' => $name,'admin' => Array ('username' => $user,'password' => $pass
|
||||
),'advanced' => Array ('ao_db_drop' => $ao_db_drop,'ao_db_wf' => $ao_db_wf,'ao_db_rb' => $ao_db_rb,'ao_db_rp' => $ao_db_rp
|
||||
$result = $inst->create_site(array('isset' => true,'name' => $name,'admin' => array('username' => $user,'password' => $pass
|
||||
),'advanced' => array('ao_db_drop' => $ao_db_drop,'ao_db_wf' => $ao_db_wf,'ao_db_rb' => $ao_db_rb,'ao_db_rp' => $ao_db_rp
|
||||
)
|
||||
), ($action === 'create') ? true : false );
|
||||
), ($action === 'create') ? true : false);
|
||||
$result['result']['admin']['password'] = ($pass === $pass1) ? true : false;
|
||||
$result['result']['action'] = $action;
|
||||
//$json = new Services_JSON();
|
||||
@@ -35,37 +35,35 @@ if (isset( $_POST['form']['NW_TITLE'] )) {
|
||||
$ec->created=($new)?true:false;
|
||||
$ec->name=$name;
|
||||
$ec->message=($new)?"Workspace created":"Workspace already exists or Name invalid";*/
|
||||
echo Bootstrap::json_encode( $result );
|
||||
echo Bootstrap::json_encode($result);
|
||||
} else {
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess( 'PM_SETUP_ADVANCE' )) {
|
||||
switch ($RBAC->userCanAccess('PM_SETUP_ADVANCE')) {
|
||||
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 - 3:
|
||||
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;
|
||||
}
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'usersList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('usersList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/newSite', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/newSite' ); //adding a html file .html.
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('setup/newSite', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/newSite'); //adding a html file .html.
|
||||
// $oHeadPublisher->assign('CONFIG', $Config);
|
||||
// $oHeadPublisher->assign('FORMATS',$c->getFormats());
|
||||
$oHeadPublisher->assign( "SYS_LANG", SYS_LANG );
|
||||
$oHeadPublisher->assign( "SYS_SKIN", SYS_SKIN );
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->assign("SYS_LANG", SYS_LANG);
|
||||
$oHeadPublisher->assign("SYS_SKIN", SYS_SKIN);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ if ($aux['extension'] != 'dat') {
|
||||
G::uploadFile($aInfoLoadFile["tmp_name"], $dir, $aInfoLoadFile["name"]);
|
||||
//reading the file that was uploaded
|
||||
|
||||
$licenseManager =& PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
$response = $licenseManager->installLicense($dir . $aInfoLoadFile["name"], false, false);
|
||||
|
||||
if ($response) {
|
||||
@@ -57,4 +57,4 @@ if ($aux['extension'] != 'dat') {
|
||||
}
|
||||
|
||||
G::header('Location: ../login/login');
|
||||
die();
|
||||
die();
|
||||
|
||||
@@ -29,10 +29,10 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Browser Compatibility
|
||||
$browserSupported = G::checkBrowserCompatibility();
|
||||
if ($browserSupported==false){
|
||||
if(!isset($_SESSION['G_MESSAGE']) || $_SESSION['G_MESSAGE'] == ""){
|
||||
G::SendTemporalMessage ('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
||||
}
|
||||
if ($browserSupported==false) {
|
||||
if (!isset($_SESSION['G_MESSAGE']) || $_SESSION['G_MESSAGE'] == "") {
|
||||
G::SendTemporalMessage('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$aFields = array();
|
||||
@@ -83,7 +83,7 @@ $pass1 = (isset($_SESSION['NW_PASSWORD2'])) ? $_SESSION['NW_PASSWORD2'] : '';
|
||||
$aFields['LOGIN_VERIFY_MSG'] = G::loadTranslation('LOGIN_VERIFY_MSG');
|
||||
//$aFields['LOGIN_VERIFY_MSG'] = Bootstrap::loadTranslation('LOGIN_VERIFY_MSG');
|
||||
|
||||
if (isset ($_SESSION['USER_LOGGED'])) {
|
||||
if (isset($_SESSION['USER_LOGGED'])) {
|
||||
require_once 'classes/model/LoginLog.php';
|
||||
//close the session, if the current session_id was used in PM.
|
||||
$oCriteria = new Criteria('workflow');
|
||||
@@ -129,12 +129,12 @@ if (isset ($_SESSION['USER_LOGGED'])) {
|
||||
$pluginRegistry = PluginRegistry::loadSingleton();
|
||||
if (defined('PM_SINGLE_SIGN_ON')) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('x4TTzlISnp2K2tnSTJoMC8rTDRMTjlhMCtZeXV0QnNCLzU=')) {
|
||||
//Check in SSO class
|
||||
$oSso = new PmSsoClass();
|
||||
$res = $oSso->ssocVerifyUser();
|
||||
if($res){
|
||||
if ($res) {
|
||||
// Start new session
|
||||
@session_destroy();
|
||||
session_start();
|
||||
@@ -190,14 +190,14 @@ $_SESSION['NW_PASSWORD2'] = $pass1;
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$licenseManager =& PmLicenseManager::getSingleton();
|
||||
$licenseManager = PmLicenseManager::getSingleton();
|
||||
if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc170d8b09178a3', 'ba2b45bdc11e2a4a6e86aab2ac693cbb'))) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$version = explode('.', trim(file_get_contents(PATH_GULLIVER . 'VERSION')));
|
||||
$version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpiredpm3', '', array(), 'licenseUpdate');
|
||||
}else{
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/licenseExpired', '', array(), 'licenseUpdate');
|
||||
}
|
||||
G::RenderPage('publish');
|
||||
@@ -212,12 +212,12 @@ if (in_array(G::encryptOld($licenseManager->result), array('38afd7ae34bd5e3e6fc1
|
||||
$Translations = new Translation();
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
|
||||
$availableLangArray = array ();
|
||||
$availableLangArray [] = array ('LANG_ID' => 'char', 'LANG_NAME' => 'char' );
|
||||
$availableLangArray = array();
|
||||
$availableLangArray [] = array('LANG_ID' => 'char', 'LANG_NAME' => 'char' );
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$availableLangArray [] = array ('LANG_ID' => 'default', 'LANG_NAME' => G::LoadTranslation("ID_DEFAULT_LANGUAGE") );
|
||||
$availableLangArray [] = array('LANG_ID' => 'default', 'LANG_NAME' => G::LoadTranslation("ID_DEFAULT_LANGUAGE") );
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
foreach ($translationsTable as $locale) {
|
||||
@@ -241,7 +241,7 @@ $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||
if (isset($oConf->aConfig["login_defaultLanguage"]) && $oConf->aConfig["login_defaultLanguage"] != "") {
|
||||
$aFields["USER_LANG"] = $oConf->aConfig["login_defaultLanguage"];
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('w2LL3o4NFNiaDRXcFFCYVpJS3Jsall5dmh0ZWtBTkdKR3ROS0VzWGdoLzNQYz0=')) {
|
||||
$aFields["USER_LANG"] = "default";
|
||||
}
|
||||
@@ -258,12 +258,12 @@ $version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
$aFields["FAILED_LOGINS"] = $sFailedLogins;
|
||||
if ($version >= 3) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/loginpm3', '', $aFields, SYS_URI . 'login/authentication.php');
|
||||
}else{
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php');
|
||||
}
|
||||
|
||||
//get the serverconf singleton, and check if we can send the heartbeat
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
if (!$partnerFlag) {
|
||||
$sflag = $oServerConf->getHeartbeatProperty('HB_OPTION', 'HEART_BEAT_CONF');
|
||||
@@ -274,7 +274,7 @@ if (!$partnerFlag) {
|
||||
|
||||
//if flag to send heartbeat is enabled, and it is time to send heartbeat, sent it using asynchronous beat.
|
||||
if (($sflag == "1") && ((strtotime("now") > $nextBeatDate) || is_null($nextBeatDate))) {
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
//To do: we need to change to ExtJs
|
||||
$oHeadPublisher->addScriptCode('var flagHeartBeat = 1;');
|
||||
} else {
|
||||
@@ -287,8 +287,8 @@ if (!$partnerFlag) {
|
||||
//check if we show the panel with the getting started info
|
||||
|
||||
require_once 'classes/model/Configuration.php';
|
||||
$oConfiguration = new Configuration ( );
|
||||
$oCriteria = new Criteria ( 'workflow' );
|
||||
$oConfiguration = new Configuration();
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->add(ConfigurationPeer::CFG_UID, 'getStarted');
|
||||
$oCriteria->add(ConfigurationPeer::OBJ_UID, '');
|
||||
$oCriteria->add(ConfigurationPeer::CFG_VALUE, '1');
|
||||
@@ -325,4 +325,3 @@ $oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Register.js');
|
||||
|
||||
G::RenderPage('publish');
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
/*----------------------------------********---------------------------------*/
|
||||
//Browser Compatibility
|
||||
$browserSupported = G::checkBrowserCompatibility();
|
||||
if ($browserSupported==false){
|
||||
if(!isset($_SESSION['G_MESSAGE']) || $_SESSION['G_MESSAGE'] == ""){
|
||||
G::SendTemporalMessage ('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
||||
}
|
||||
if ($browserSupported==false) {
|
||||
if (!isset($_SESSION['G_MESSAGE']) || $_SESSION['G_MESSAGE'] == "") {
|
||||
G::SendTemporalMessage('ID_CURRENT_BROWSER_NOT_SUPPORTED', 'warning');
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (isset ($_POST['form']['USER_ENV'])) {
|
||||
@@ -59,23 +59,22 @@ session_regenerate_id();
|
||||
$_SESSION = array_merge($_SESSION, $arraySession);
|
||||
|
||||
//Required classes for dbArray work
|
||||
Propel::init (PATH_CORE . "config/databases.php");
|
||||
Creole::registerDriver ('dbarray', 'creole.contrib.DBArrayConnection');
|
||||
Propel::init(PATH_CORE . "config/databases.php");
|
||||
Creole::registerDriver('dbarray', 'creole.contrib.DBArrayConnection');
|
||||
|
||||
function getLangFiles()
|
||||
{
|
||||
$dir = PATH_LANGUAGECONT;
|
||||
$filesArray = array ();
|
||||
if (file_exists ($dir)) {
|
||||
if ($handle = opendir ($dir)) {
|
||||
while (false !== ($file = readdir ($handle))) {
|
||||
|
||||
$fileParts = explode (".", $file);
|
||||
$filesArray = array();
|
||||
if (file_exists($dir)) {
|
||||
if ($handle = opendir($dir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
$fileParts = explode(".", $file);
|
||||
if ($fileParts [0] == "translation") {
|
||||
$filesArray [$fileParts [1]] = $file;
|
||||
}
|
||||
}
|
||||
closedir ($handle);
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
return $filesArray;
|
||||
@@ -83,28 +82,28 @@ function getLangFiles()
|
||||
|
||||
function getWorkspacesAvailable()
|
||||
{
|
||||
$oServerConf = & ServerConf::getSingleton ();
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
$dir = PATH_DB;
|
||||
$filesArray = array ();
|
||||
if (file_exists ($dir)) {
|
||||
if ($handle = opendir ($dir)) {
|
||||
while (false !== ($file = readdir ($handle))) {
|
||||
$filesArray = array();
|
||||
if (file_exists($dir)) {
|
||||
if ($handle = opendir($dir)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if (($file != ".") && ($file != "..")) {
|
||||
if (file_exists (PATH_DB . $file . '/db.php')) {
|
||||
if (! $oServerConf->isWSDisabled ($file)) {
|
||||
if (file_exists(PATH_DB . $file . '/db.php')) {
|
||||
if (! $oServerConf->isWSDisabled($file)) {
|
||||
$filesArray [] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir ($handle);
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
sort ($filesArray, SORT_STRING);
|
||||
sort($filesArray, SORT_STRING);
|
||||
return $filesArray;
|
||||
}
|
||||
|
||||
$availableWorkspace = getWorkspacesAvailable ();
|
||||
$availableWorkspace = getWorkspacesAvailable();
|
||||
|
||||
//Translations
|
||||
//$Translations = G::getModel("Translation"); <-- ugly way to get a class
|
||||
@@ -112,8 +111,8 @@ require_once "classes/model/Translation.php";
|
||||
$Translations = new Translation();
|
||||
$translationsTable = $Translations->getTranslationEnvironments();
|
||||
|
||||
$availableLangArray = array ();
|
||||
$availableLangArray [] = array ('LANG_ID' => 'char', 'LANG_NAME' => 'char');
|
||||
$availableLangArray = array();
|
||||
$availableLangArray [] = array('LANG_ID' => 'char', 'LANG_NAME' => 'char');
|
||||
|
||||
foreach ($translationsTable as $locale) {
|
||||
$aFields['LANG_ID'] = $locale['LOCALE'];
|
||||
@@ -126,10 +125,10 @@ foreach ($translationsTable as $locale) {
|
||||
$availableLangArray [] = $aFields;
|
||||
}
|
||||
|
||||
$availableWorkspaceArray = array ();
|
||||
$availableWorkspaceArray [] = array ('ENV_ID' => 'char', 'ENV_NAME' => 'char');
|
||||
$availableWorkspaceArray = array();
|
||||
$availableWorkspaceArray [] = array('ENV_ID' => 'char', 'ENV_NAME' => 'char');
|
||||
foreach ($availableWorkspace as $envKey => $envName) {
|
||||
$aFields = array ('ENV_ID' => $envName, 'ENV_NAME' => $envName);
|
||||
$aFields = array('ENV_ID' => $envName, 'ENV_NAME' => $envName);
|
||||
$availableWorkspaceArray [] = $aFields;
|
||||
}
|
||||
|
||||
@@ -140,10 +139,10 @@ $_DBArray ['availableWorkspace'] = $availableWorkspaceArray;
|
||||
|
||||
$_SESSION ['_DBArray'] = $_DBArray;
|
||||
|
||||
$aField ['LOGIN_VERIFY_MSG'] = G::loadTranslation ('LOGIN_VERIFY_MSG');
|
||||
$aField ['LOGIN_VERIFY_MSG'] = G::loadTranslation('LOGIN_VERIFY_MSG');
|
||||
$aField['USER_LANG'] = SYS_LANG;
|
||||
|
||||
$G_PUBLISH = new Publisher ();
|
||||
$G_PUBLISH = new Publisher();
|
||||
if (!defined('WS_IN_LOGIN')) {
|
||||
define('WS_IN_LOGIN', 'serverconf');
|
||||
}
|
||||
@@ -153,8 +152,8 @@ $version = isset($version[0]) ? intval($version[0]) : 0;
|
||||
switch (WS_IN_LOGIN) {
|
||||
case 'serverconf':
|
||||
//Get Server Configuration
|
||||
$oServerConf = & ServerConf::getSingleton ();
|
||||
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
if ($oServerConf->getProperty('LOGIN_NO_WS')) {
|
||||
$fileLogin = $version >= 3 ? 'login/sysLoginNoWSpm3' : 'login/sysLoginNoWS';
|
||||
} else {
|
||||
$fileLogin = 'login/sysLogin';
|
||||
@@ -170,12 +169,12 @@ switch (WS_IN_LOGIN) {
|
||||
$fileLogin = 'login/sysLogin';
|
||||
break;
|
||||
}
|
||||
setcookie("PM-Warning", trim(G::LoadTranslation('ID_BLOCKER_MSG'),'*'), time() + (24 * 60 * 60), SYS_CURRENT_URI);
|
||||
setcookie("PM-Warning", trim(G::LoadTranslation('ID_BLOCKER_MSG'), '*'), time() + (24 * 60 * 60), SYS_CURRENT_URI);
|
||||
setcookie("PM-TabPrimary", uniqid(), time() + (24 * 60 * 60), '/');
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Register.js');
|
||||
|
||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', $fileLogin, '', $aField, 'sysLogin');
|
||||
G::RenderPage ("publish");
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', $fileLogin, '', $aField, 'sysLogin');
|
||||
G::RenderPage("publish");
|
||||
|
||||
@@ -36,7 +36,7 @@ $flagER = $pluginRegistry->isEnable('externalRegistration') ? 1 : 0;
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('mails/emailList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('mails/emailList'); //adding a html file .html.
|
||||
//sending the columns to display in grid
|
||||
@@ -45,4 +45,3 @@ $oHeadPublisher->assign('processValues', $processes);
|
||||
$oHeadPublisher->assign('flagER', $flagER);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@ $arrayScope = array(
|
||||
array("value" => "edit_processes", "label" => "Edit Processes")
|
||||
);
|
||||
|
||||
$headPublisher = &headPublisher::getSingleton();
|
||||
$headPublisher = headPublisher::getSingleton();
|
||||
$headPublisher->addContent("oauth2" . PATH_SEP . "accessTokenSetup"); //Adding a HTML file .html
|
||||
$headPublisher->addExtJsScript("oauth2" . PATH_SEP . "accessTokenSetup", false); //Adding a JavaScript file .js
|
||||
$headPublisher->assign("CONFIG", $config);
|
||||
$headPublisher->assign("SCOPE", $arrayScope);
|
||||
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
$config = array();
|
||||
$config["pageSize"] = 20;
|
||||
|
||||
$headPublisher = &headPublisher::getSingleton();
|
||||
$headPublisher = headPublisher::getSingleton();
|
||||
//$headPublisher->addContent("oauth2" . PATH_SEP . "clientSetup"); //Adding a HTML file .html
|
||||
$headPublisher->addExtJsScript("oauth2" . PATH_SEP . "clientSetup", false); //Adding a JavaScript file .js
|
||||
$headPublisher->assign("CONFIG", $config);
|
||||
$headPublisher->assign("CREATE_CLIENT", (isset($_GET["create_app"]))? 1 : 0);
|
||||
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ $G_ID_SUB_MENU_SELECTED = '';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('processCategory/processCategoryList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('processCategory/processCategoryList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
G::RenderPage('publish', 'extJs');
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
class AdditionalTablesConsolidated extends AdditionalTables
|
||||
{
|
||||
public function createPropelClasses($sTableName, $sClassName, $aFields, $sAddTabUid)
|
||||
public function createPropelClasses($sTableName, $sClassName, $aFields, $sAddTabUid, $connection = 'workflow')
|
||||
{
|
||||
try {
|
||||
$aTypes = array('VARCHAR' => 'string',
|
||||
|
||||
@@ -25,22 +25,22 @@
|
||||
/*$access = $RBAC->userCanAccess('PM_FACTORY');
|
||||
if( $access != 1 ) {
|
||||
switch ($access) {
|
||||
case -2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
break;
|
||||
case -2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
break;
|
||||
case -1:
|
||||
default:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
break;
|
||||
default:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
|
||||
G::header('location: ../login/login');
|
||||
break;
|
||||
}
|
||||
exit();
|
||||
}*/
|
||||
//next two variables store the current process uid and the last processmap used
|
||||
//print_r ($_SESSION['PROCESS'] );
|
||||
//print_r ($_SESSION['PROCESSMAP'] );
|
||||
$RBAC->requirePermissions( 'PM_FACTORY' );
|
||||
$RBAC->requirePermissions('PM_FACTORY');
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_SUB_MENU = 'process';
|
||||
@@ -48,13 +48,13 @@ $G_ID_MENU_SELECTED = 'PROCESSES';
|
||||
$G_ID_SUB_MENU_SELECTED = '-';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
$G_PUBLISH->AddContent( 'view', 'processes/mainLoad' );
|
||||
|
||||
if (isset( $_GET['type'] ))
|
||||
G::RenderPage( "publishBlank", "blank" );
|
||||
else
|
||||
G::RenderPage( "publish" );
|
||||
$G_PUBLISH->AddContent('view', 'processes/mainLoad');
|
||||
|
||||
if (isset($_GET['type'])) {
|
||||
G::RenderPage("publishBlank", "blank");
|
||||
} else {
|
||||
G::RenderPage("publish");
|
||||
}
|
||||
|
||||
@@ -25,34 +25,33 @@
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
//$oHeadPublisher = & headPublisher::getSingleton();
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_FACTORY' );
|
||||
$RBAC->requirePermissions('PM_FACTORY');
|
||||
|
||||
$conf = new Configurations();
|
||||
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch))? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
$pmVersion = (preg_match("/^([\d\.]+).*$/", System::getVersion(), $arrayMatch)) ? $arrayMatch[1] : ""; //Otherwise: Branch master
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (true) {
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "pmx2", "bpmn");
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$arrayFlagImportFileExtension = array("pm", "pmx", "bpmn");
|
||||
/*----------------------------------********---------------------------------*/
|
||||
/*----------------------------------********---------------------------------*/
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$arrayFlagMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||
$arrayFlagMenuNewOption = array("pm" => true, "bpmn" => true);
|
||||
|
||||
if ($pmVersion != "") {
|
||||
$arrayFlagImportFileExtension = (version_compare($pmVersion . "", "3", ">="))? $arrayFlagImportFileExtension : array("pm");
|
||||
$arrayFlagMenuNewOption = (version_compare($pmVersion . "", "3", ">="))? array("bpmn" => true) : array("pm" => true);
|
||||
$arrayFlagImportFileExtension = (version_compare($pmVersion . "", "3", ">=")) ? $arrayFlagImportFileExtension : array("pm");
|
||||
$arrayFlagMenuNewOption = (version_compare($pmVersion . "", "3", ">=")) ? array("bpmn" => true) : array("pm" => true);
|
||||
}
|
||||
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
|
||||
$arrayMenuNewOptionPlugin = array();
|
||||
$arrayMenuNewOptionPlugin = array();
|
||||
$arrayContextMenuOptionPlugin = array();
|
||||
|
||||
foreach ($oPluginRegistry->getDesignerMenu() as $value) {
|
||||
@@ -79,12 +78,12 @@ foreach ($oPluginRegistry->getDesignerMenu() as $value) {
|
||||
}
|
||||
}
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'processes/main', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'processes/main' ); //adding a html file .html.
|
||||
$oHeadPublisher->addExtJsScript('processes/main', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('processes/main'); //adding a html file .html.
|
||||
|
||||
$partnerFlag = (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false;
|
||||
$oHeadPublisher->assign( 'PARTNER_FLAG', $partnerFlag );
|
||||
$oHeadPublisher->assign( 'pageSize', $conf->getEnvSetting( 'casesListRowNumber' ) );
|
||||
$oHeadPublisher->assign('PARTNER_FLAG', $partnerFlag);
|
||||
$oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
|
||||
$oHeadPublisher->assign("arrayFlagImportFileExtension", $arrayFlagImportFileExtension);
|
||||
$oHeadPublisher->assign("arrayFlagMenuNewOption", $arrayFlagMenuNewOption);
|
||||
$oHeadPublisher->assign("arrayMenuNewOptionPlugin", $arrayMenuNewOptionPlugin);
|
||||
@@ -100,27 +99,26 @@ $oHeadPublisher->assign('credentials', base64_encode(G::json_encode($designer->g
|
||||
|
||||
$deleteCasesFlag = false;
|
||||
global $RBAC;
|
||||
if($RBAC->userCanAccess('PM_DELETE_PROCESS_CASES') === 1) {
|
||||
if ($RBAC->userCanAccess('PM_DELETE_PROCESS_CASES') === 1) {
|
||||
$deleteCasesFlag = true;
|
||||
}
|
||||
$oHeadPublisher->assign('deleteCasesFlag', $deleteCasesFlag);
|
||||
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$callBackFile = $oPluginRegistry->getImportProcessCallback();
|
||||
$file = false;
|
||||
if(sizeof($callBackFile)) {
|
||||
$file = false;
|
||||
if (count($callBackFile)) {
|
||||
$file = $callBackFile[0]->getCallBackFile() != "" ? $callBackFile[0]->getCallBackFile() : false;
|
||||
}
|
||||
$oHeadPublisher->assign("importProcessCallbackFile", $file);
|
||||
|
||||
$isGranularFeature = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('jXsSi94bkRUcVZyRStNVExlTXhEclVadGRRcG9xbjNvTWVFQUF3cklKQVBiVT0=')) {
|
||||
$isGranularFeature = true;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$oHeadPublisher->assign("isGranularFeature", $isGranularFeature);
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
|
||||
require_once 'classes/model/Process.php';
|
||||
|
||||
$start = isset( $_POST['start'] ) ? $_POST['start'] : 0;
|
||||
$limit = isset( $_POST['limit'] ) ? $_POST['limit'] : '';
|
||||
$dir = isset( $_POST['dir'] ) ? $_POST['dir'] : 'ASC';
|
||||
$sort = isset( $_POST['sort'] ) ? $_POST['sort'] : '';
|
||||
$start = isset($_POST['start']) ? $_POST['start'] : 0;
|
||||
$limit = isset($_POST['limit']) ? $_POST['limit'] : '';
|
||||
$dir = isset($_POST['dir']) ? $_POST['dir'] : 'ASC';
|
||||
$sort = isset($_POST['sort']) ? $_POST['sort'] : '';
|
||||
|
||||
$oProcess = new Process();
|
||||
$oProcess->dir = $dir;
|
||||
@@ -36,19 +36,20 @@ $oProcess->sort = $sort;
|
||||
$memkey = 'no memcache';
|
||||
$memcacheUsed = 'not used';
|
||||
$totalCount = 0;
|
||||
if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
|
||||
if (isset( $_POST['processName'] ))
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit, $_POST['category'], $_POST['processName'], true, false, $_SESSION["USER_LOGGED"]);
|
||||
else
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit, $_POST['category'], null, true, false, $_SESSION["USER_LOGGED"]);
|
||||
if (isset($_POST['category']) && $_POST['category'] !== '<reset>') {
|
||||
if (isset($_POST['processName'])) {
|
||||
$proData = $oProcess->getAllProcesses($start, $limit, $_POST['category'], $_POST['processName'], true, false, $_SESSION["USER_LOGGED"]);
|
||||
} else {
|
||||
$proData = $oProcess->getAllProcesses($start, $limit, $_POST['category'], null, true, false, $_SESSION["USER_LOGGED"]);
|
||||
}
|
||||
} else {
|
||||
if (isset( $_POST['processName'] )) {
|
||||
if (isset($_POST['processName'])) {
|
||||
$memkey = 'processList-' . $start . '-' . $limit . '-' . $_POST['processName'];
|
||||
$memcacheUsed = 'yes';
|
||||
$proData = $memcache->get( $memkey );
|
||||
$proData = $memcache->get($memkey);
|
||||
if ($proData === false) {
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit, null, $_POST['processName'], true, false, $_SESSION["USER_LOGGED"]);
|
||||
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );
|
||||
$proData = $oProcess->getAllProcesses($start, $limit, null, $_POST['processName'], true, false, $_SESSION["USER_LOGGED"]);
|
||||
$memcache->set($memkey, $proData, PMmemcached::ONE_HOUR);
|
||||
$totalCount = count($proData);
|
||||
$proData = array_splice($proData, $start, $limit);
|
||||
$memcacheUsed = 'no';
|
||||
@@ -61,18 +62,18 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
|
||||
$memkey = 'processList-allProcesses-' . $start . '-' . $limit;
|
||||
$memkeyTotal = $memkey . '-total';
|
||||
$memcacheUsed = 'yes';
|
||||
if (($proData = $memcache->get( $memkey )) === false || ($totalCount = $memcache->get( $memkeyTotal )) === false) {
|
||||
$proData = $oProcess->getAllProcesses( $start, $limit, null, null, true, false, $_SESSION["USER_LOGGED"]);
|
||||
if (($proData = $memcache->get($memkey)) === false || ($totalCount = $memcache->get($memkeyTotal)) === false) {
|
||||
$proData = $oProcess->getAllProcesses($start, $limit, null, null, true, false, $_SESSION["USER_LOGGED"]);
|
||||
$totalCount = count($proData);
|
||||
$proData = array_splice($proData, $start, $limit);
|
||||
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );
|
||||
$memcache->set( $memkeyTotal, $totalCount, PMmemcached::ONE_HOUR );
|
||||
$memcache->set($memkey, $proData, PMmemcached::ONE_HOUR);
|
||||
$memcache->set($memkeyTotal, $totalCount, PMmemcached::ONE_HOUR);
|
||||
$memcacheUsed = 'no';
|
||||
} else {
|
||||
$proData = $oProcess->orderMemcache($proData, $start, $limit);
|
||||
$proData = $oProcess->orderMemcache($proData, $start, $limit);
|
||||
$totalCount = $proData->totalCount;
|
||||
$proData = $proData->dataMemcache;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$r = new stdclass();
|
||||
@@ -81,4 +82,4 @@ $r->memcache = $memcacheUsed;
|
||||
$r->data = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($proData);
|
||||
$r->totalCount = $totalCount;
|
||||
|
||||
echo G::json_encode( $r );
|
||||
echo G::json_encode($r);
|
||||
|
||||
@@ -23,31 +23,13 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
try {
|
||||
/* global $RBAC;
|
||||
switch ($RBAC->userCanAccess('PM_FACTORY'))
|
||||
{
|
||||
case -2:
|
||||
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');
|
||||
die;
|
||||
break;
|
||||
} */
|
||||
//$oJSON = new Services_JSON();
|
||||
|
||||
|
||||
$filter = new InputFilter();
|
||||
$_GET = $filter->xssFilterHard($_GET);
|
||||
$_POST = $filter->xssFilterHard($_POST);
|
||||
$_REQUEST = $filter->xssFilterHard($_REQUEST);
|
||||
//$_SESSION = $filter->xssFilterHard($_SESSION);
|
||||
|
||||
if (isset($_REQUEST['data'])) {
|
||||
if($_REQUEST['action']=="addText"||$_REQUEST['action']=="updateText") {
|
||||
if ($_REQUEST['action'] == "addText" || $_REQUEST['action'] == "updateText") {
|
||||
$oData = Bootstrap::json_decode($_REQUEST['data']);
|
||||
$oDataAux = G::json_decode($_REQUEST['data']);
|
||||
$oDataAux = (array)$oDataAux;
|
||||
@@ -56,13 +38,12 @@ try {
|
||||
$oDataAux = G::json_decode(stripslashes($_REQUEST['data']));
|
||||
$oDataAux = (array)$oDataAux;
|
||||
}
|
||||
//$oData = $oJSON->decode( stripslashes( $_REQUEST['data'] ) );
|
||||
$sOutput = '';
|
||||
$sTask = '';
|
||||
|
||||
if(array_key_exists('pro_uid', $oDataAux) || array_key_exists('uid', $oDataAux) || array_key_exists('PRO_UID', $oDataAux) || array_key_exists('UID', $oDataAux)) {
|
||||
if(array_key_exists('pro_uid', $oDataAux) || array_key_exists('PRO_UID', $oDataAux)) {
|
||||
if(array_key_exists('pro_uid', $oDataAux)) {
|
||||
if (array_key_exists('pro_uid', $oDataAux) || array_key_exists('uid', $oDataAux) || array_key_exists('PRO_UID', $oDataAux) || array_key_exists('UID', $oDataAux)) {
|
||||
if (array_key_exists('pro_uid', $oDataAux) || array_key_exists('PRO_UID', $oDataAux)) {
|
||||
if (array_key_exists('pro_uid', $oDataAux)) {
|
||||
$proUid = $oDataAux['pro_uid'];
|
||||
} else {
|
||||
$proUid = $oDataAux['PRO_UID'];
|
||||
@@ -74,16 +55,16 @@ try {
|
||||
|
||||
$infoProcess = new Processes();
|
||||
|
||||
if(!$infoProcess->processExists($proUid)) {
|
||||
if (!$infoProcess->processExists($proUid)) {
|
||||
$oSL = new SwimlanesElements();
|
||||
if($oSL->swimlanesElementsExists($proUid)) {
|
||||
if ($oSL->swimlanesElementsExists($proUid)) {
|
||||
$aFields = $oSL->load($proUid);
|
||||
$proUid = $aFields['PRO_UID'];
|
||||
} else {
|
||||
$k = new Criteria('workflow');
|
||||
$k->clearSelectColumns();
|
||||
$k->addSelectColumn(TaskPeer::PRO_UID);
|
||||
$k->add(TaskPeer::TAS_UID, $uidAux );
|
||||
$k->add(TaskPeer::TAS_UID, $uidAux);
|
||||
$rs = TaskPeer::doSelectRS($k);
|
||||
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$rs->next();
|
||||
@@ -93,7 +74,7 @@ try {
|
||||
}
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
} else {
|
||||
if(array_key_exists('PU_UID', $oDataAux)) {
|
||||
if (array_key_exists('PU_UID', $oDataAux)) {
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(ProcessUserPeer::PRO_UID);
|
||||
@@ -111,8 +92,8 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['pro_uid']) && !empty($_REQUEST['pro_uid']) || isset($_REQUEST['PRO_UID']) && !empty($_REQUEST['PRO_UID'])) {
|
||||
if(isset($_REQUEST['pro_uid']) && !empty($_REQUEST['pro_uid'])) {
|
||||
if (isset($_REQUEST['pro_uid']) && !empty($_REQUEST['pro_uid']) || isset($_REQUEST['PRO_UID']) && !empty($_REQUEST['PRO_UID'])) {
|
||||
if (isset($_REQUEST['pro_uid']) && !empty($_REQUEST['pro_uid'])) {
|
||||
$proUid = $_REQUEST['pro_uid'];
|
||||
} else {
|
||||
$proUid = $_REQUEST['PRO_UID'];
|
||||
@@ -122,13 +103,12 @@ try {
|
||||
$resultProcess = $infoProcess->getProcessRow($proUid);
|
||||
}
|
||||
|
||||
if(isset($proUid) && $proUid != "") {
|
||||
|
||||
if (isset($proUid) && $proUid != "") {
|
||||
$infoProcess = new Processes();
|
||||
|
||||
if (!in_array($_REQUEST["action"], array("load"))) {
|
||||
$infoProcess->updateProcessRow(array(
|
||||
"PRO_UID" => $proUid,
|
||||
"PRO_UID" => $proUid,
|
||||
"PRO_UPDATE_DATE" => date("Y-m-d H:i:s")
|
||||
));
|
||||
}
|
||||
@@ -142,12 +122,12 @@ try {
|
||||
case 'load':
|
||||
$_SESSION['PROCESS'] = $oData->uid;
|
||||
if ($oData->ct) {
|
||||
$sOutput = $oProcessMap->load($oData->uid, true, $_SESSION['APPLICATION'], - 1, $_SESSION['TASK'], $oData->ct);
|
||||
$sOutput = $oProcessMap->load($oData->uid, true, $_SESSION['APPLICATION'], -1, $_SESSION['TASK'], $oData->ct);
|
||||
} else {
|
||||
if ($oData->mode) {
|
||||
$sOutput = $oProcessMap->load($oData->uid);
|
||||
} else {
|
||||
if ($_SESSION['TASK'] != - 1) {
|
||||
if ($_SESSION['TASK'] != -1) {
|
||||
$taskUid = $_SESSION['TASK'];
|
||||
} else {
|
||||
$c = new Criteria('workflow');
|
||||
@@ -159,7 +139,7 @@ try {
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aData = $oDataset->getRow();
|
||||
$taskUid = isset($aData['TAS_UID']) ? $aData['TAS_UID'] : - 1;
|
||||
$taskUid = isset($aData['TAS_UID']) ? $aData['TAS_UID'] : -1;
|
||||
}
|
||||
$sOutput = $oProcessMap->load($oData->uid, true, $_SESSION['APPLICATION'], $_SESSION['INDEX'], $taskUid);
|
||||
}
|
||||
@@ -169,21 +149,21 @@ try {
|
||||
$oProcessMap->editProcess($oData->pro_uid);
|
||||
break;
|
||||
case 'process_Export':
|
||||
include (PATH_METHODS . 'processes/processes_Export.php');
|
||||
G::auditLog('ExportProcess','Export process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
include(PATH_METHODS . 'processes/processes_Export.php');
|
||||
G::auditLog('ExportProcess', 'Export process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'process_User':
|
||||
include (PATH_METHODS . 'processes/processes_User.php');
|
||||
include(PATH_METHODS . 'processes/processes_User.php');
|
||||
break;
|
||||
case 'availableProcessesUser':
|
||||
include (PATH_METHODS . 'processes/processes_availableProcessesUser.php');
|
||||
include(PATH_METHODS . 'processes/processes_availableProcessesUser.php');
|
||||
break;
|
||||
case 'webEntry_generate':
|
||||
include (PATH_METHODS . 'processes/processes_webEntryGenerate.php');
|
||||
include(PATH_METHODS . 'processes/processes_webEntryGenerate.php');
|
||||
break;
|
||||
// add this event to validate de data to create a Web Entry
|
||||
case 'webEntry_validate':
|
||||
include (PATH_METHODS . 'processes/processes_webEntryValidate.php');
|
||||
include(PATH_METHODS . 'processes/processes_webEntryValidate.php');
|
||||
break;
|
||||
case 'webEntry_delete':
|
||||
|
||||
@@ -210,7 +190,7 @@ try {
|
||||
|
||||
$oProcessMap = new ProcessMap();
|
||||
$oProcessMap->listProcessesUser($oData->PRO_UID);
|
||||
G::auditLog('AssignRole','Assign new supervisor ('.$oData->USR_UID.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('AssignRole', 'Assign new supervisor (' . $oData->USR_UID . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'removeProcessUser':
|
||||
$oProcessMap->removeProcessUser($oData->PU_UID);
|
||||
@@ -220,7 +200,7 @@ try {
|
||||
break;
|
||||
}
|
||||
}
|
||||
G::auditLog('RemoveUser','Remove supervisor ('.$userSupervisor.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('RemoveUser', 'Remove supervisor (' . $userSupervisor . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'supervisorDynaforms':
|
||||
$oProcessMap->supervisorDynaforms($oData->pro_uid);
|
||||
@@ -232,7 +212,7 @@ try {
|
||||
$oProcessMap->webEntry($oData->pro_uid);
|
||||
break;
|
||||
case 'webEntry_Val_Assig':
|
||||
include (PATH_METHODS . 'processes/webEntry_Val_Assig.php');
|
||||
include(PATH_METHODS . 'processes/webEntry_Val_Assig.php');
|
||||
break;
|
||||
case 'saveTitlePosition':
|
||||
$sOutput = $oProcessMap->saveTitlePosition($oData->pro_uid, $oData->position->x, $oData->position->y);
|
||||
@@ -260,13 +240,13 @@ try {
|
||||
$sOutput = $oProcessMap->addTask($oData->uid, $oData->position->x, $oData->position->y);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('AddTask','Add new task ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('AddTask', 'Add new task (' . $sOutputAux['uid'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'addSubProcess':
|
||||
$sOutput = $oProcessMap->addSubProcess($oData->uid, $oData->position->x, $oData->position->y);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('AddSubProcess','Add new sub process ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('AddSubProcess', 'Add new sub process (' . $sOutputAux['uid'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'taskColor':
|
||||
$oTask->taskColor($oData->pro_uid, $oData->tas_uid);
|
||||
@@ -281,50 +261,50 @@ try {
|
||||
$sOutput = $oProcessMap->saveTaskPosition($oData->uid, $oData->position->x, $oData->position->y);
|
||||
$oTask = new Task();
|
||||
$oTask->load($uidAux);
|
||||
G::auditLog('SaveTaskPosition','Change task position ('.$oTask->getTasTitle().') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('SaveTaskPosition', 'Change task position (' . $oTask->getTasTitle() . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'deleteTask':
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
G::auditlog("DeleteTask",'Delete Task -> '.$titleTask.' : '.$oData->tas_uid);
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
G::auditlog("DeleteTask", 'Delete Task -> ' . $titleTask . ' : ' . $oData->tas_uid);
|
||||
$sOutput = $oProcessMap->deleteTask($oData->tas_uid);
|
||||
break;
|
||||
case 'addGuide':
|
||||
$sOutput = $oProcessMap->addGuide($oData->uid, $oData->position, $oData->direction);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('Add'.ucwords($oDataAux['direction']).'Line','Add '.$oDataAux['direction'].' line ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('Add' . ucwords($oDataAux['direction']) . 'Line', 'Add ' . $oDataAux['direction'] . ' line (' . $sOutputAux['uid'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'saveGuidePosition':
|
||||
$sOutput = $oProcessMap->saveGuidePosition($oData->uid, $oData->position, $oData->direction);
|
||||
G::auditLog('SaveGuidePosition','Change '.$oData->direction.' line position ('.$oData->uid.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('SaveGuidePosition', 'Change ' . $oData->direction . ' line position (' . $oData->uid . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'deleteGuide':
|
||||
$sOutput = $oProcessMap->deleteGuide($oData->uid);
|
||||
G::auditLog('DeleteLine','Delete line ('.$oData->uid.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('DeleteLine', 'Delete line (' . $oData->uid . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'deleteGuides':
|
||||
$sOutput = $oProcessMap->deleteGuides($oData->pro_uid);
|
||||
G::auditLog('DeleteLines','Delete all lines in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('DeleteLines', 'Delete all lines in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'addText':
|
||||
$sOutput = $oProcessMap->addText($oData->uid, html_entity_decode(html_entity_decode($oData->label)), $oData->position->x, $oData->position->y);
|
||||
$sOutputAux = G::json_decode($sOutput);
|
||||
$sOutputAux = (array)$sOutputAux;
|
||||
G::auditLog('AddText','Add new text ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('AddText', 'Add new text (' . $sOutputAux['uid'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'updateText':
|
||||
$sOutput = $oProcessMap->updateText($oData->uid, $oData->label);
|
||||
G::auditLog('UpdateText','Edit text ('.$oData->uid.' ) in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('UpdateText', 'Edit text (' . $oData->uid . ' ) in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'saveTextPosition':
|
||||
$sOutput = $oProcessMap->saveTextPosition($oData->uid, $oData->position->x, $oData->position->y);
|
||||
G::auditLog('SaveTextPosition','Change text position ('.$oData->uid.' ) in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('SaveTextPosition', 'Change text position (' . $oData->uid . ' ) in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'deleteText':
|
||||
$sOutput = $oProcessMap->deleteText($oData->uid);
|
||||
G::auditLog('DeleteText','Delete text ('.$oData->uid.' ) in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('DeleteText', 'Delete text (' . $oData->uid . ' ) in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'dynaforms':
|
||||
$oProcessMap->dynaformsList($oData->pro_uid);
|
||||
@@ -389,125 +369,125 @@ try {
|
||||
case 0:
|
||||
$sType = 'SEQUENTIAL';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
if ($titleNextTask=='') {
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : END OF PROCESS Task Name -> '.$titleTask.' : '.$oData->tas_uid);
|
||||
}else{
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
if ($titleNextTask == '') {
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : END OF PROCESS Task Name -> ' . $titleTask . ' : ' . $oData->tas_uid);
|
||||
} else {
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
$sType = 'SELECT';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
break;
|
||||
case 2:
|
||||
$sType = 'EVALUATE';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
break;
|
||||
case 3:
|
||||
$sType = 'PARALLEL';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
break;
|
||||
case 4:
|
||||
$sType = 'PARALLEL-BY-EVALUATION';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
break;
|
||||
case 5:
|
||||
$sType = 'SEC-JOIN';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
break;
|
||||
case 8:
|
||||
$sType = 'DISCRIMINATOR';
|
||||
$oProcessNewPattern = new Process();
|
||||
$taskProcess=$oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess=$taskProcess['PRO_TITLE'];
|
||||
$taskProcess = $oProcessNewPattern->load($oData->pro_uid);
|
||||
$titleProcess = $taskProcess['PRO_TITLE'];
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
if ($oData->next_task != "-1") {
|
||||
$oTaskNextNewPattern = new Task();
|
||||
$taskNextInfo=$oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask=$taskNextInfo['TAS_TITLE'];
|
||||
$taskNextInfo = $oTaskNextNewPattern->load($oData->next_task);
|
||||
$titleNextTask = $taskNextInfo['TAS_TITLE'];
|
||||
} else {
|
||||
$titleNextTask=G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
$titleNextTask = G::LoadTranslation("ID_END_OF_PROCESS");
|
||||
}
|
||||
G::auditLog("DerivationRule",'PROCESS NAME : '.$titleProcess.' : '.$oData->pro_uid.' Routing rule : '.$sType.' from -> '.$titleTask.' : '.$oData->tas_uid.' To -> '.$titleNextTask.' : '.$oData->next_task);
|
||||
G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $oData->pro_uid . ' Routing rule : ' . $sType . ' from -> ' . $titleTask . ' : ' . $oData->tas_uid . ' To -> ' . $titleNextTask . ' : ' . $oData->next_task);
|
||||
break;
|
||||
}
|
||||
if (($oData->type != 0) && ($oData->type != 5) && ($oData->type != 8)) {
|
||||
@@ -517,7 +497,6 @@ try {
|
||||
unset($aRow);
|
||||
}
|
||||
if (($oData->delete) || ($oData->type == 0) || ($oData->type == 5) || ($oData->type == 8)) {
|
||||
|
||||
$oTasks = new Tasks();
|
||||
$oTasks->deleteAllRoutesOfTask($oData->pro_uid, $oData->tas_uid);
|
||||
$oTasks->deleteAllGatewayOfTask($oData->pro_uid, $oData->tas_uid);
|
||||
@@ -527,9 +506,9 @@ try {
|
||||
case 'deleteAllRoutes':
|
||||
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
G::auditlog("DeleteRoutes",'Delete All Routes From Task -> '.$titleTask.' : '.$oData->tas_uid);
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
G::auditlog("DeleteRoutes", 'Delete All Routes From Task -> ' . $titleTask . ' : ' . $oData->tas_uid);
|
||||
$oTasks = new Tasks();
|
||||
$oTasks->deleteAllRoutesOfTask($oData->pro_uid, $oData->tas_uid);
|
||||
break;
|
||||
@@ -556,11 +535,11 @@ try {
|
||||
case 'exploreDirectory':
|
||||
$_SESSION["PFMDirectory"] = $oData->main_directory;
|
||||
$oProcessMap->exploreDirectory($oData->pro_uid, $oData->main_directory, $oData->directory);
|
||||
G::auditLog('ProcessFileManager','Upload template ('.$oData->main_directory.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('ProcessFileManager', 'Upload template (' . $oData->main_directory . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'deleteFile':
|
||||
$oProcessMap->deleteFile($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->file);
|
||||
G::auditLog('ProcessFileManager','Delete template ('.$oData->main_directory.': '.$oData->file.') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('ProcessFileManager', 'Delete template (' . $oData->main_directory . ': ' . $oData->file . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'deleteDirectory':
|
||||
$oProcessMap->deleteDirectory($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->dir_to_delete);
|
||||
@@ -570,9 +549,9 @@ try {
|
||||
break;
|
||||
case 'deleteSubProcess':
|
||||
$oTaskNewPattern = new Task();
|
||||
$taskInfo=$oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask=$taskInfo['TAS_TITLE'];
|
||||
G::auditlog("DeleteSubProcess",'Delete Sub-Process -> '.$titleTask.' : '.$oData->tas_uid);
|
||||
$taskInfo = $oTaskNewPattern->load($oData->tas_uid);
|
||||
$titleTask = $taskInfo['TAS_TITLE'];
|
||||
G::auditlog("DeleteSubProcess", 'Delete Sub-Process -> ' . $titleTask . ' : ' . $oData->tas_uid);
|
||||
$sOutput = $oProcessMap->deleteSubProcess($oData->pro_uid, $oData->tas_uid);
|
||||
break;
|
||||
case 'subProcess_Properties':
|
||||
@@ -655,7 +634,7 @@ try {
|
||||
require_once 'classes/model/Configuration.php';
|
||||
$oConfiguration = new Configuration();
|
||||
$oConfiguration->create(array('CFG_UID' => 'REGISTER_INFORMATION', 'OBJ_UID' => '', 'CFG_VALUE' => serialize(array('u' => $oData->u, 'p' => $oData->p
|
||||
)), 'PRO_UID' => '', 'USR_UID' => $_SESSION['USER_LOGGED'], 'APP_UID' => ''
|
||||
)), 'PRO_UID' => '', 'USR_UID' => $_SESSION['USER_LOGGED'], 'APP_UID' => ''
|
||||
));
|
||||
$oResponse->sLabel = G::LoadTranslation('ID_DOWNLOAD');
|
||||
$oResponse->sLink = '../processes/downloadPML?id=' . $oData->pro_uid . '&s=' . $sessionId;
|
||||
@@ -676,11 +655,11 @@ try {
|
||||
switch ($sDir) {
|
||||
case 'mailTemplates':
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Edit template ('.$_REQUEST['filename'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('ProcessFileManager', 'Edit template (' . $_REQUEST['filename'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'public':
|
||||
$sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Edit public template ('.$_REQUEST['filename'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('ProcessFileManager', 'Edit public template (' . $_REQUEST['filename'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
default:
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
@@ -688,66 +667,26 @@ try {
|
||||
}
|
||||
$fcontent = file_get_contents($sDirectory);
|
||||
$extion = explode(".", $_REQUEST['filename']);
|
||||
// $oHeadPublisher = &headPublisher::getSingleton();
|
||||
// $oHeadPublisher->clearScripts();
|
||||
// $oHeadPublisher->addScriptFile( '/js/tinymce/jscripts/tiny_mce/tiny_mce.js' );
|
||||
// $jscriptCode .= '
|
||||
//
|
||||
//// var tmpArrToStr = Array.prototype.toStr;
|
||||
//// var tmpObjToStr = Object.prototype.toStr;
|
||||
//// var tmpObjConcat = Object.prototype.concat;
|
||||
//// var tmpObjGetByKey = Object.prototype.get_by_key;
|
||||
//// var tmpObjExpand = Object.prototype.expand;
|
||||
//// var tmpObjSetParent = Object.prototype.setParent;
|
||||
//// var tmpObjIsSetKey = Object.prototype.isset_key;
|
||||
////
|
||||
//// delete Array.prototype.toStr;
|
||||
//// delete Object.prototype.toStr;
|
||||
//// delete Object.prototype.concat;
|
||||
//// delete Object.prototype.get_by_key;
|
||||
//// delete Object.prototype.expand;
|
||||
//// delete Object.prototype.setParent;
|
||||
//// delete Object.prototype.isset_key;
|
||||
//// alert ("hi");
|
||||
//// document.body.onload = function(){
|
||||
// alert ("hello");
|
||||
// tinyMCE.baseURL = "/js/tinymce/jscripts/tiny_mce";
|
||||
// tinyMCE.init({
|
||||
// theme : "advanced",
|
||||
// plugins : "fullpage",
|
||||
// mode : "specific_textareas",
|
||||
// editor_selector : "tmceEditor",
|
||||
// width : "640",
|
||||
// height : "300",
|
||||
// theme_advanced_buttons3_add : "fullpage"
|
||||
// });
|
||||
//// alert ("goodbye");
|
||||
//// }
|
||||
// ';
|
||||
// $oHeadPublisher->addScriptCode($jscriptCode);
|
||||
$_REQUEST['fcontent'] = $fcontent;
|
||||
|
||||
preg_match_all('/\@(?:([\>])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/',$fcontent,$matches);
|
||||
preg_match_all('/\@(?:([\>])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/', $fcontent, $matches);
|
||||
foreach ($matches[0] as $key => $value) {
|
||||
preg_match('/(\!--)'.$value.'(-->)/',$fcontent, $match);
|
||||
if (count($match)==0) {
|
||||
$fcontent = preg_replace ('/'.$value.'/i','<!--'.$value.'-->',$fcontent);
|
||||
preg_match('/(\!--)' . $value . '(-->)/', $fcontent, $match);
|
||||
if (count($match) == 0) {
|
||||
$fcontent = preg_replace('/' . $value . '/i', '<!--' . $value . '-->', $fcontent);
|
||||
}
|
||||
}
|
||||
preg_match_all('/\@(?:([\<])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/',$fcontent,$matches);
|
||||
preg_match_all('/\@(?:([\<])([a-zA-Z\_]\w*)|([a-zA-Z\_][\w\-\>\:]*)\(((?:[^\\\\\)]*(?:[\\\\][\w\W])?)*)\))((?:\s*\[[\'"]?\w+[\'"]?\])+)?/', $fcontent, $matches);
|
||||
foreach ($matches[0] as $key => $value) {
|
||||
preg_match('/(\!--)'.$value.'(-->)/',$fcontent, $match);
|
||||
if (count($match)==0) {
|
||||
$fcontent = preg_replace ('/'.$value.'/i','<!--'.$value.'-->',$fcontent);
|
||||
}
|
||||
preg_match('/(\!--)' . $value . '(-->)/', $fcontent, $match);
|
||||
if (count($match) == 0) {
|
||||
$fcontent = preg_replace('/' . $value . '/i', '<!--' . $value . '-->', $fcontent);
|
||||
}
|
||||
}
|
||||
|
||||
//if($extion[count($extion)-1]=='html' || $extion[count($extion)-1]=='txt'){
|
||||
$aData = Array('pro_uid' => $_REQUEST['pro_uid'], 'fcontent' => $fcontent, 'filename' => $_REQUEST['filename']);
|
||||
$aData = array('pro_uid' => $_REQUEST['pro_uid'], 'fcontent' => $fcontent, 'filename' => $_REQUEST['filename']);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'processes/processes_FileEdit', '', $aData);
|
||||
G::RenderPage('publish', 'raw');
|
||||
// $G_PUBLISH->AddContent( 'view', 'processes/processesFileEditEmail' );
|
||||
// G::RenderPage( 'publish', 'blank' );
|
||||
break;
|
||||
case 'saveFile':
|
||||
$_REQUEST['pro_uid'] = $filter->xssFilterHard($_REQUEST['pro_uid']);
|
||||
@@ -755,8 +694,7 @@ try {
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
global $RBAC;
|
||||
if ( $RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
|
||||
if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
|
||||
$app = new Processes();
|
||||
if (!$app->processExists($_REQUEST['pro_uid'])) {
|
||||
echo G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED');
|
||||
@@ -771,11 +709,11 @@ try {
|
||||
switch ($sDir) {
|
||||
case 'mailTemplates':
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Save template ('.$_REQUEST['filename'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('ProcessFileManager', 'Save template (' . $_REQUEST['filename'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
case 'public':
|
||||
$sDirectory = PATH_DATA_PUBLIC . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
G::auditLog('ProcessFileManager','Save public template ('.$_REQUEST['filename'].') in process "'.$resultProcess['PRO_TITLE'].'"');
|
||||
G::auditLog('ProcessFileManager', 'Save public template (' . $_REQUEST['filename'] . ') in process "' . $resultProcess['PRO_TITLE'] . '"');
|
||||
break;
|
||||
default:
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
@@ -792,32 +730,32 @@ try {
|
||||
}
|
||||
break;
|
||||
case 'getSessid':
|
||||
if(isset($_SESSION['USER_LOGGED'])){
|
||||
if (isset($_SESSION['USER_LOGGED'])) {
|
||||
echo Bootstrap::json_encode(1);
|
||||
}else{
|
||||
} else {
|
||||
echo Bootstrap::json_encode(0);
|
||||
}
|
||||
break;
|
||||
case 'events':
|
||||
$oProcessMap->eventsList($oData->pro_uid, $oData->type);
|
||||
break;
|
||||
/**
|
||||
* returns an array with all Dynaforms Fields
|
||||
*/
|
||||
/**
|
||||
* returns an array with all Dynaforms Fields
|
||||
*/
|
||||
case 'getVariableList':
|
||||
|
||||
$proUid = isset($_REQUEST['process']) ? $_REQUEST['process'] : '';
|
||||
$queryText = isset($_REQUEST['queryText']) ? $_REQUEST['queryText'] : '';
|
||||
switch($_REQUEST['type']) {
|
||||
case 'system';
|
||||
switch ($_REQUEST['type']) {
|
||||
case 'system':
|
||||
$typeVars = $_REQUEST['type'];
|
||||
break;
|
||||
case 'process';
|
||||
break;
|
||||
case 'process':
|
||||
$typeVars = $_REQUEST['type'];
|
||||
break;
|
||||
case 'grid';
|
||||
break;
|
||||
case 'grid':
|
||||
$typeVars = $_REQUEST['type'];
|
||||
break;
|
||||
break;
|
||||
}
|
||||
if ($_REQUEST['type'] == 'all') {
|
||||
$aFields = getDynaformsVars($proUid);
|
||||
@@ -834,14 +772,14 @@ try {
|
||||
}
|
||||
} else {
|
||||
switch ($_REQUEST["type"]) {
|
||||
case "system" :
|
||||
case "system":
|
||||
foreach ($aFields as $key => $value) {
|
||||
if ($aFields[$key]["sType"] == "system") {
|
||||
$aVariables[] = $aFields[$key];
|
||||
}
|
||||
}
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
foreach ($aFields as $key => $value) {
|
||||
$aVariables[] = $aFields[$key];
|
||||
}
|
||||
@@ -851,19 +789,19 @@ try {
|
||||
|
||||
echo Bootstrap::json_encode($aVariables);
|
||||
break;
|
||||
/**
|
||||
* returns the prefix mean
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* returns the prefix mean
|
||||
*
|
||||
*/
|
||||
case 'getVariablePrefix':
|
||||
$_REQUEST['prefix'] = $filter->xssFilterHard($_REQUEST['prefix']);
|
||||
$_REQUEST['prefix'] = $_REQUEST['prefix'] != null ? $_REQUEST['prefix'] : 'ID_TO_STRING';
|
||||
$prefix = $filter->xssFilterHard(G::LoadTranslation($_REQUEST['prefix']));
|
||||
echo G::LoadTranslation($prefix);
|
||||
break;
|
||||
/**
|
||||
* return an array with all Variables of Grid type
|
||||
*/
|
||||
/**
|
||||
* return an array with all Variables of Grid type
|
||||
*/
|
||||
case 'getGridList':
|
||||
|
||||
$proUid = isset($_REQUEST['PRO_UID']) ? $_REQUEST['PRO_UID'] : '';
|
||||
@@ -876,9 +814,9 @@ try {
|
||||
}
|
||||
echo Bootstrap::json_encode($aVariables);
|
||||
break;
|
||||
/**
|
||||
* return an array with all Grid Variables according to Grid
|
||||
*/
|
||||
/**
|
||||
* return an array with all Grid Variables according to Grid
|
||||
*/
|
||||
case 'getVariableGrid':
|
||||
|
||||
$proUid = isset($_REQUEST['PRO_UID']) ? $_REQUEST['PRO_UID'] : '';
|
||||
@@ -910,22 +848,7 @@ try {
|
||||
}
|
||||
}
|
||||
echo Bootstrap::json_encode($resultArray);
|
||||
// var_dump($resultArray);
|
||||
break;
|
||||
/*
|
||||
case 'saveFile':
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $_REQUEST['pro_uid'] . PATH_SEP . $_REQUEST['filename'];
|
||||
|
||||
$fp = fopen($sDirectory, 'w');
|
||||
$content = stripslashes($_REQUEST['fcontent']);
|
||||
$content = str_replace("@amp@", "&", $content);
|
||||
fwrite($fp, $content);
|
||||
fclose($fp);
|
||||
echo 'saved: '. $sDirectory;
|
||||
break;
|
||||
*/
|
||||
case 'emptyFileOptions':
|
||||
global $G_PUBLISH;
|
||||
$G_PUBLISH = new Publisher();
|
||||
@@ -966,7 +889,6 @@ try {
|
||||
}
|
||||
$response = new stdclass();
|
||||
$response->casesNumRec = $casesNumRec;
|
||||
//$json = new Services_JSON();
|
||||
$sOutput = Bootstrap::json_encode($response);
|
||||
break;
|
||||
case "verifyNameFile":
|
||||
@@ -991,7 +913,6 @@ try {
|
||||
} 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -388,8 +388,9 @@ if ($action == "uploadFileNewProcess") {
|
||||
$allowedExtensions = array ($processFileType
|
||||
);
|
||||
$allowedExtensions = array ('pm');
|
||||
if (! in_array( end( explode( ".", $_FILES['PROCESS_FILENAME']['name'] ) ), $allowedExtensions )) {
|
||||
throw new Exception( G::LoadTranslation( "ID_FILE_UPLOAD_INCORRECT_EXTENSION" ) );
|
||||
$explode = explode(".", $_FILES['PROCESS_FILENAME']['name']);
|
||||
if (!in_array(end($explode), $allowedExtensions)) {
|
||||
throw new Exception(G::LoadTranslation("ID_FILE_UPLOAD_INCORRECT_EXTENSION"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,22 +22,22 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
global $RBAC;
|
||||
$access = $RBAC->userCanAccess( 'PM_FACTORY' );
|
||||
$access = $RBAC->userCanAccess('PM_FACTORY');
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
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;
|
||||
}
|
||||
@@ -47,14 +47,14 @@ if ($access != 1) {
|
||||
* ***********************
|
||||
*/
|
||||
|
||||
function parseItemArray ($array)
|
||||
function parseItemArray($array)
|
||||
{
|
||||
if (! isset( $array->item ) && ! is_array( $array )) {
|
||||
if (! isset($array->item) && ! is_array($array)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$result = array ();
|
||||
if (isset( $array->item )) {
|
||||
$result = array();
|
||||
if (isset($array->item)) {
|
||||
foreach ($array->item as $key => $value) {
|
||||
$result[$value->key] = $value->value;
|
||||
}
|
||||
@@ -71,29 +71,29 @@ try {
|
||||
$oProcess->ws_open_public();
|
||||
|
||||
$result = $oProcess->ws_ProcessList();
|
||||
$processes[] = array ('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
|
||||
$processes[] = array('uid' => 'char','name' => 'char','age' => 'integer','balance' => 'float'
|
||||
);
|
||||
|
||||
if ($result->status_code == 0 && isset( $result->processes )) {
|
||||
if ($result->status_code == 0 && isset($result->processes)) {
|
||||
foreach ($result->processes as $key => $val) {
|
||||
$process = parseItemArray( $val );
|
||||
$process = parseItemArray($val);
|
||||
$processes[] = $process;
|
||||
}
|
||||
}
|
||||
$_DBArray['processes'] = $processes;
|
||||
$_SESSION['_DBArray'] = $_DBArray;
|
||||
|
||||
$c = new Criteria( 'dbarray' );
|
||||
$c->setDBArrayTable( 'processes' );
|
||||
$c = new Criteria('dbarray');
|
||||
$c->setDBArrayTable('processes');
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'PROCESSES';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'processes/processes_ListPublic', $c );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'processes/processes_ListPublic', $c);
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
//$oHeadPublisher->addScriptCode('leimnud.Package.Load("newAccount",{Type:"file",Absolute:true,Path:"/jscore/newAccount.js"});');
|
||||
$oHeadPublisher->addScriptCode( "
|
||||
$oHeadPublisher->addScriptCode("
|
||||
var oPanel;
|
||||
var oPanel2;
|
||||
var showDetails = function(sUID) {
|
||||
@@ -124,11 +124,11 @@ try {
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
};
|
||||
" );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
");
|
||||
G::RenderPage('publish', 'blank');
|
||||
} catch (Exception $e) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
}
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
|
||||
G::RenderPage('publish', 'blank');
|
||||
}
|
||||
|
||||
@@ -22,22 +22,22 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
global $RBAC;
|
||||
$access = $RBAC->userCanAccess( 'PM_FACTORY' );
|
||||
$access = $RBAC->userCanAccess('PM_FACTORY');
|
||||
if ($access != 1) {
|
||||
switch ($access) {
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
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;
|
||||
}
|
||||
@@ -50,7 +50,8 @@ $criteria->add(ProcessPeer::PRO_UID, $_GET["PRO_UID"], Criteria::EQUAL);
|
||||
|
||||
$criteria->add(
|
||||
$criteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $_SESSION["USER_LOGGED"], Criteria::EQUAL)->addOr(
|
||||
$criteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL))
|
||||
$criteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL)
|
||||
)
|
||||
);
|
||||
|
||||
$rsCriteria = ProcessPeer::doSelectRS($criteria);
|
||||
@@ -66,7 +67,7 @@ $processUID = $_GET['PRO_UID'];
|
||||
$_SESSION['PROCESS'] = $processUID;
|
||||
$_SESSION['PROCESSMAP'] = 'LEIMNUD';
|
||||
|
||||
$oTemplatePower = new TemplatePower( PATH_TPL . 'processes/processes_Map.html' );
|
||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
|
||||
$oTemplatePower->prepare();
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
@@ -75,20 +76,20 @@ $G_SUB_MENU = 'processes';
|
||||
$G_ID_SUB_MENU_SELECTED = '_';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
|
||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||
|
||||
$consolidated = 0;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||
$licensedFeatures = PMLicensedFeatures::getSingleton();
|
||||
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
|
||||
$consolidated = 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/dbConnections/main.js' );
|
||||
$oHeadPublisher->addScriptCode( '
|
||||
var maximunX = ' . ProcessMap::getMaximunTaskX( $processUID ) . ';
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/dbConnections/main.js');
|
||||
$oHeadPublisher->addScriptCode('
|
||||
var maximunX = ' . ProcessMap::getMaximunTaskX($processUID) . ';
|
||||
var leimnud = new maborak();
|
||||
leimnud.make();
|
||||
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
|
||||
@@ -111,9 +112,10 @@ $oHeadPublisher->addScriptCode( '
|
||||
}
|
||||
Pm.make();
|
||||
});
|
||||
var changesSavedLabel = "' . addslashes( G::LoadTranslation( 'ID_SAVED_SUCCESSFULLY' ) ) . '";' );
|
||||
var changesSavedLabel = "' . addslashes(G::LoadTranslation('ID_SAVED_SUCCESSFULLY')) . '";');
|
||||
|
||||
if (! isset( $_GET['raw'] ))
|
||||
G::RenderPage( 'publish', 'green-submenu' );
|
||||
else
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
if (! isset($_GET['raw'])) {
|
||||
G::RenderPage('publish', 'green-submenu');
|
||||
} else {
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
|
||||
@@ -23,28 +23,18 @@
|
||||
*/
|
||||
|
||||
if ($_GET['NAVIGATOR'] == 'ie') {
|
||||
$oForm = new Form( 'processes/processes_UploadFilesForm', '', SYS_LANG );
|
||||
$oForm = new Form('processes/processes_UploadFilesForm', '', SYS_LANG);
|
||||
$oForm->action = 'processes_UploadFiles';
|
||||
$oForm->values = array ('PRO_UID' => $_GET['PRO_UID'],'MAIN_DIRECTORY' => $_GET['MAIN_DIRECTORY'],'CURRENT_DIRECTORY' => $_GET['CURRENT_DIRECTORY']
|
||||
$oForm->values = array('PRO_UID' => $_GET['PRO_UID'],'MAIN_DIRECTORY' => $_GET['MAIN_DIRECTORY'],'CURRENT_DIRECTORY' => $_GET['CURRENT_DIRECTORY']
|
||||
);
|
||||
echo '<link rel="stylesheet" type="text/css" href="/skins/' . SYS_SKIN . '/style.css"/>' . $oForm->render( PATH_CORE . 'templates/xmlform.html', $scriptCode = '' );
|
||||
|
||||
echo '<link rel="stylesheet" type="text/css" href="/skins/' . SYS_SKIN . '/style.css"/>' . $oForm->render(PATH_CORE . 'templates/xmlform.html', $scriptCode = '');
|
||||
} else {
|
||||
$params = Array ('PRO_UID' => $_GET['PRO_UID'],'MAIN_DIRECTORY' => $_GET['MAIN_DIRECTORY'],'CURRENT_DIRECTORY' => $_GET['CURRENT_DIRECTORY']
|
||||
$params = array('PRO_UID' => $_GET['PRO_UID'],'MAIN_DIRECTORY' => $_GET['MAIN_DIRECTORY'],'CURRENT_DIRECTORY' => $_GET['CURRENT_DIRECTORY']
|
||||
);
|
||||
|
||||
$_SESSION['processes_upload'] = $params;
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent( 'view', 'processes/processes_Upload' );
|
||||
G::RenderPage( "publish", "raw" );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent('view', 'processes/processes_Upload');
|
||||
G::RenderPage("publish", "raw");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,27 +32,26 @@
|
||||
|
||||
try {
|
||||
//$oJSON = new Services_JSON();
|
||||
$stdObj = Bootstrap::json_decode( stripslashes( $_POST['data'] ) );
|
||||
if (isset( $stdObj->pro_uid ))
|
||||
$stdObj = Bootstrap::json_decode(stripslashes($_POST['data']));
|
||||
if (isset($stdObj->pro_uid)) {
|
||||
$sProUid = $stdObj->pro_uid;
|
||||
else
|
||||
throw (new Exception( 'the process uid is not defined!.' ));
|
||||
} else {
|
||||
throw (new Exception('the process uid is not defined!.'));
|
||||
}
|
||||
|
||||
$oProcessMap = new ProcessMap();
|
||||
$c = $oProcessMap->listProcessesUser( $sProUid );
|
||||
$c = $oProcessMap->listProcessesUser($sProUid);
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/processmap/core/processUser.js' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/processmap/core/processUser.js');
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'processes/processes_User', $c, array ('PRO_UID' => $sProUid
|
||||
) );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'processes/processes_User', $c, array('PRO_UID' => $sProUid
|
||||
));
|
||||
G::RenderPage('publish', 'raw');
|
||||
} catch (Exception $e) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'raw' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
|
||||
G::RenderPage('publish', 'raw');
|
||||
}
|
||||
?>
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
|
||||
$id = isset( $_GET['id'] ) ? $_GET['id'] : false;
|
||||
$id = isset($_GET['id']) ? $_GET['id'] : false;
|
||||
$table = false;
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'reportTables/edit', true );
|
||||
$oHeadPublisher->assign( 'ADD_TAB_UID', $id );
|
||||
$oHeadPublisher->addExtJsScript('reportTables/edit', true);
|
||||
$oHeadPublisher->assign('ADD_TAB_UID', $id);
|
||||
|
||||
if ($id) {
|
||||
// if is a edit request
|
||||
|
||||
$additionalTables = new AdditionalTables();
|
||||
$table = $additionalTables->load( $id, true );
|
||||
$tableFields = array ();
|
||||
$fieldsList = array ();
|
||||
$table = $additionalTables->load($id, true);
|
||||
$tableFields = array();
|
||||
$fieldsList = array();
|
||||
|
||||
// list the case fields
|
||||
foreach ($table['FIELDS'] as $i => $field) {
|
||||
@@ -21,52 +21,51 @@ if ($id) {
|
||||
unset($table['FIELDS'][$i]);
|
||||
continue;
|
||||
}*/
|
||||
array_push( $tableFields, $field['FLD_DYN_NAME'] );
|
||||
array_push($tableFields, $field['FLD_DYN_NAME']);
|
||||
}
|
||||
|
||||
//list dynaform fields
|
||||
if ($table['ADD_TAB_TYPE'] == 'NORMAL') {
|
||||
$fields = getDynaformsVars( $table['PRO_UID'], false );
|
||||
$fields = getDynaformsVars($table['PRO_UID'], false);
|
||||
foreach ($fields as $field) {
|
||||
//select to not assigned fields for available grid
|
||||
if (! in_array( $field['sName'], $tableFields )) {
|
||||
$fieldsList[] = array ('FIELD_UID' => $field['sName'] . '-' . $field['sType'],'FIELD_NAME' => $field['sName']);
|
||||
if (! in_array($field['sName'], $tableFields)) {
|
||||
$fieldsList[] = array('FIELD_UID' => $field['sName'] . '-' . $field['sType'],'FIELD_NAME' => $field['sName']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
list ($gridName, $gridId) = explode( '-', $table['ADD_TAB_GRID'] );
|
||||
list($gridName, $gridId) = explode('-', $table['ADD_TAB_GRID']);
|
||||
|
||||
$G_FORM = new Form( $table['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false );
|
||||
$gridFields = $G_FORM->getVars( false );
|
||||
$G_FORM = new Form($table['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||
$gridFields = $G_FORM->getVars(false);
|
||||
|
||||
foreach ($gridFields as $gfield) {
|
||||
if (! in_array( $gfield['sName'], $tableFields )) {
|
||||
$fieldsList[] = array ('FIELD_UID' => $gfield['sName'] . '-' . $gfield['sType'],'FIELD_NAME' => $gfield['sName']);
|
||||
if (! in_array($gfield['sName'], $tableFields)) {
|
||||
$fieldsList[] = array('FIELD_UID' => $gfield['sName'] . '-' . $gfield['sType'],'FIELD_NAME' => $gfield['sName']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$oHeadPublisher->assign( 'avFieldsList', $fieldsList );
|
||||
$oHeadPublisher->assign('avFieldsList', $fieldsList);
|
||||
}
|
||||
|
||||
$repTabPluginPermissions = false;
|
||||
global $G_TMP_MENU;
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load( 'setup' );
|
||||
$oMenu->load('setup');
|
||||
|
||||
foreach ($oMenu->Options as $i => $option) {
|
||||
if ($oMenu->Types[$i] == 'private' && $oMenu->Id[$i] == 'PLUGIN_REPTAB_PERMISSIONS') {
|
||||
$repTabPluginPermissions = array ();
|
||||
$repTabPluginPermissions = array();
|
||||
$repTabPluginPermissions['label'] = $oMenu->Labels[$i];
|
||||
$repTabPluginPermissions['fn'] = $oMenu->Options[$i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$oHeadPublisher->assign( '_plugin_permissions', $repTabPluginPermissions );
|
||||
$oHeadPublisher->assign('_plugin_permissions', $repTabPluginPermissions);
|
||||
|
||||
$oHeadPublisher->assign( 'PRO_UID', isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : false );
|
||||
$oHeadPublisher->assign( 'TABLE', $table );
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->assign('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
|
||||
$oHeadPublisher->assign('TABLE', $table);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -23,36 +23,35 @@
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP_ADVANCE' );
|
||||
$RBAC->requirePermissions('PM_SETUP_ADVANCE');
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
$repTabPluginPermissions = false;
|
||||
global $G_TMP_MENU;
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load( 'setup' );
|
||||
$oMenu->load('setup');
|
||||
|
||||
$simpleREportsPlugin = false;
|
||||
foreach ($oMenu->Options as $i => $option) {
|
||||
if ($oMenu->Types[$i] == 'private' && $oMenu->Id[$i] == 'PLUGIN_REPTAB_PERMISSIONS') {
|
||||
$simpleREportsPlugin = array ();
|
||||
$simpleREportsPlugin = array();
|
||||
$simpleREportsPlugin['label'] = $oMenu->Labels[$i];
|
||||
$simpleREportsPlugin['fn'] = $oMenu->Options[$i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$oHeadPublisher->assign( '_PLUGIN_SIMPLEREPORTS', $simpleREportsPlugin );
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'reportTables/main', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'reportTables/main' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||
$oHeadPublisher->assign( 'PRO_UID', isset( $_GET['PRO_UID'] ) ? $_GET['PRO_UID'] : false );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->assign('_PLUGIN_SIMPLEREPORTS', $simpleREportsPlugin);
|
||||
|
||||
$oHeadPublisher->addExtJsScript('reportTables/main', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('reportTables/main'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
$oHeadPublisher->assign('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -189,7 +189,7 @@ switch ($action) {
|
||||
/**
|
||||
* validations *
|
||||
*/
|
||||
if (is_array( $aNameTable )) {
|
||||
if ($aNameTable) {
|
||||
throw new Exception( 'The table "' . $data['REP_TAB_NAME'] . '" already exits.' );
|
||||
}
|
||||
|
||||
|
||||
@@ -33,15 +33,15 @@ use ProcessMaker\Plugins\PluginRegistry;
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess( 'PM_REPORTS' )) {
|
||||
switch ($RBAC->userCanAccess('PM_REPORTS')) {
|
||||
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;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ try {
|
||||
switch ($RPT_UID) {
|
||||
case 1:
|
||||
$sw = 0;
|
||||
if (isset( $_POST['form'] )) {
|
||||
if (isset($_POST['form'])) {
|
||||
if ($_POST['form']['FROM'] != '0000-00-00' || $_POST['form']['TO'] != '0000-00-00') {
|
||||
$sw = 1;
|
||||
}
|
||||
@@ -66,32 +66,32 @@ try {
|
||||
$fields['TO'] = $_POST['form']['TO'];
|
||||
$fields['STARTEDBY'] = $_POST['form']['STARTEDBY'];
|
||||
} else {
|
||||
$fields['FROM'] = date( 'Y-m-d' );
|
||||
$fields['TO'] = date( 'Y-m-d' );
|
||||
$fields['FROM'] = date('Y-m-d');
|
||||
$fields['TO'] = date('Y-m-d');
|
||||
}
|
||||
|
||||
$oReport = new Report();
|
||||
if ($sw == 0) {
|
||||
$c = $oReport->generatedReport1();
|
||||
} else {
|
||||
$c = $oReport->generatedReport1_filter( $_POST['form']['FROM'], $_POST['form']['TO'], $_POST['form']['STARTEDBY'] );
|
||||
$c = $oReport->generatedReport1_filter($_POST['form']['FROM'], $_POST['form']['TO'], $_POST['form']['STARTEDBY']);
|
||||
}
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/reports/reports.js' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/reports/reports.js');
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'reports/report1', $c );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'reports/report1', $c);
|
||||
|
||||
if (isset( $_POST['form'] )) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report1_search', '', $fields );
|
||||
if (isset($_POST['form'])) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report1_search', '', $fields);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report1_search' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report1_search');
|
||||
}
|
||||
G::RenderPage( 'publish' );
|
||||
G::RenderPage('publish');
|
||||
break;
|
||||
case 2:
|
||||
$sw = 0;
|
||||
if (isset( $_POST['form'] )) {
|
||||
if (isset($_POST['form'])) {
|
||||
if ($_POST['form']['FROM'] != '0000-00-00' || $_POST['form']['TO'] != '0000-00-00') {
|
||||
$sw = 1;
|
||||
}
|
||||
@@ -99,8 +99,8 @@ try {
|
||||
$fields['TO'] = $_POST['form']['TO'];
|
||||
$fields['STARTEDBY'] = $_POST['form']['STARTEDBY'];
|
||||
} else {
|
||||
$fields['FROM'] = date( 'Y-m-d' );
|
||||
$fields['TO'] = date( 'Y-m-d' );
|
||||
$fields['FROM'] = date('Y-m-d');
|
||||
$fields['TO'] = date('Y-m-d');
|
||||
}
|
||||
|
||||
$oReport = new Report();
|
||||
@@ -108,30 +108,30 @@ try {
|
||||
if ($sw == 0) {
|
||||
$c = $oReport->generatedReport2();
|
||||
} else {
|
||||
$c = $oReport->generatedReport2_filter( $_POST['form']['FROM'], $_POST['form']['TO'], $_POST['form']['STARTEDBY'] );
|
||||
$c = $oReport->generatedReport2_filter($_POST['form']['FROM'], $_POST['form']['TO'], $_POST['form']['STARTEDBY']);
|
||||
}
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/reports/reports.js' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/reports/reports.js');
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'reports/report2', $c );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'reports/report2', $c);
|
||||
|
||||
if (isset( $_POST['form'] )) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report1_search', '', $fields );
|
||||
if (isset($_POST['form'])) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report1_search', '', $fields);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report1_search' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report1_search');
|
||||
}
|
||||
G::RenderPage( 'publish' );
|
||||
G::RenderPage('publish');
|
||||
break;
|
||||
case 3:
|
||||
$sw = 0;
|
||||
if (isset( $_POST['form'] )) {
|
||||
if (isset($_POST['form'])) {
|
||||
$sw = 1;
|
||||
$fields['PROCESS'] = $_POST['form']['PROCESS'];
|
||||
$fields['TASKS'] = $_POST['form']['TASKS'];
|
||||
} else {
|
||||
$fields['FROM'] = date( 'Y-m-d' );
|
||||
$fields['TO'] = date( 'Y-m-d' );
|
||||
$fields['FROM'] = date('Y-m-d');
|
||||
$fields['TO'] = date('Y-m-d');
|
||||
}
|
||||
|
||||
$oReport = new Report();
|
||||
@@ -139,24 +139,24 @@ try {
|
||||
if ($sw == 0) {
|
||||
$c = $oReport->generatedReport3();
|
||||
} else {
|
||||
$c = $oReport->generatedReport3_filter( $_POST['form']['PROCESS'], $_POST['form']['TASKS'] );
|
||||
$c = $oReport->generatedReport3_filter($_POST['form']['PROCESS'], $_POST['form']['TASKS']);
|
||||
}
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/reports/reports.js' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/reports/reports.js');
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if (isset( $_POST['form'] )) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report_filter', '', $fields );
|
||||
if (isset($_POST['form'])) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report_filter', '', $fields);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report_filter' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report_filter');
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'reports/report3', $c );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'reports/report3', $c);
|
||||
|
||||
G::RenderPage( 'publish' );
|
||||
G::RenderPage('publish');
|
||||
break;
|
||||
case 4:
|
||||
$sw = 0;
|
||||
if (isset( $_POST['form'] )) {
|
||||
if (isset($_POST['form'])) {
|
||||
$sw = 1;
|
||||
$fields['PROCESS'] = $_POST['form']['PROCESS'];
|
||||
$fields['TASKS'] = $_POST['form']['TASKS'];
|
||||
@@ -167,24 +167,24 @@ try {
|
||||
if ($sw == 0) {
|
||||
$c = $oReport->generatedReport4();
|
||||
} else {
|
||||
$c = $oReport->generatedReport4_filter( $_POST['form']['PROCESS'], $_POST['form']['TASKS'] );
|
||||
$c = $oReport->generatedReport4_filter($_POST['form']['PROCESS'], $_POST['form']['TASKS']);
|
||||
}
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/reports/reports.js' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/reports/reports.js');
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if (isset( $_POST['form'] )) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report_filter', '', $fields );
|
||||
if (isset($_POST['form'])) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report_filter', '', $fields);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report_filter' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report_filter');
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'reports/report4', $c );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'reports/report4', $c);
|
||||
|
||||
G::RenderPage( 'publish' );
|
||||
G::RenderPage('publish');
|
||||
break;
|
||||
case 5:
|
||||
$sw = 0;
|
||||
if (isset( $_POST['form'] )) {
|
||||
if (isset($_POST['form'])) {
|
||||
$sw = 1;
|
||||
$fields['PROCESS'] = $_POST['form']['PROCESS'];
|
||||
$fields['TASKS'] = $_POST['form']['TASKS'];
|
||||
@@ -195,52 +195,50 @@ try {
|
||||
if ($sw == 0) {
|
||||
$c = $oReport->generatedReport5();
|
||||
} else {
|
||||
$c = $oReport->generatedReport5_filter( $_POST['form']['PROCESS'], $_POST['form']['TASKS'] );
|
||||
$c = $oReport->generatedReport5_filter($_POST['form']['PROCESS'], $_POST['form']['TASKS']);
|
||||
}
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/reports/reports.js' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/reports/reports.js');
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if (isset( $_POST['form'] )) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report_filter', '', $fields );
|
||||
if (isset($_POST['form'])) {
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report_filter', '', $fields);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'reports/report_filter' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'reports/report_filter');
|
||||
}
|
||||
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'reports/report5', $c );
|
||||
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'reports/report5', $c);
|
||||
|
||||
G::RenderPage( 'publish' );
|
||||
G::RenderPage('publish');
|
||||
break;
|
||||
default:
|
||||
$foundReport = false;
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
$aAvailableReports = $oPluginRegistry->getReports();
|
||||
foreach ($aAvailableReports as $sReportClass) {
|
||||
|
||||
require_once PATH_PLUGINS . $sReportClass . PATH_SEP . 'class.' . $sReportClass . '.php';
|
||||
$sClassName = $sReportClass . 'Class';
|
||||
$oInstance = new $sClassName();
|
||||
$aReports = $oInstance->getAvailableReports();
|
||||
foreach ($aReports as $oReport) {
|
||||
if ($RPT_UID == $oReport['uid'] && method_exists( $oInstance, $RPT_UID )) {
|
||||
if ($RPT_UID == $oReport['uid'] && method_exists($oInstance, $RPT_UID)) {
|
||||
$foundReport = true;
|
||||
$result = $oInstance->{$RPT_UID}();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//now check if there are customized reports inside the processes
|
||||
if (file_exists( PATH_DATA_PUBLIC ) && is_dir( PATH_DATA_PUBLIC )) {
|
||||
if ($handle = opendir( PATH_DATA_PUBLIC )) {
|
||||
while (false !== ($dir = readdir( $handle ))) {
|
||||
if ($dir[0] != '.' && file_exists( PATH_DATA_PUBLIC . $dir . PATH_SEP . 'reports.php' )) {
|
||||
include_once (PATH_DATA_PUBLIC . $dir . PATH_SEP . 'reports.php');
|
||||
if (file_exists(PATH_DATA_PUBLIC) && is_dir(PATH_DATA_PUBLIC)) {
|
||||
if ($handle = opendir(PATH_DATA_PUBLIC)) {
|
||||
while (false !== ($dir = readdir($handle))) {
|
||||
if ($dir[0] != '.' && file_exists(PATH_DATA_PUBLIC . $dir . PATH_SEP . 'reports.php')) {
|
||||
include_once(PATH_DATA_PUBLIC . $dir . PATH_SEP . 'reports.php');
|
||||
$className = 'report' . $dir;
|
||||
if (class_exists( $className )) {
|
||||
if (class_exists($className)) {
|
||||
$oInstance = new $className();
|
||||
$aReports = $oInstance->getAvailableReports();
|
||||
foreach ($aReports as $oReport) {
|
||||
if ($RPT_UID == $oReport['uid'] && method_exists( $oInstance, $RPT_UID )) {
|
||||
if ($RPT_UID == $oReport['uid'] && method_exists($oInstance, $RPT_UID)) {
|
||||
$foundReport = true;
|
||||
$result = $oInstance->{$RPT_UID}();
|
||||
}
|
||||
@@ -249,17 +247,15 @@ try {
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir( $handle );
|
||||
closedir($handle);
|
||||
}
|
||||
if (! $foundReport) {
|
||||
throw (new Exception( "Call to an nonexistent member function " . $RPT_UID . "() " ));
|
||||
throw (new Exception("Call to an nonexistent member function " . $RPT_UID . "() "));
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
|
||||
G::RenderPage('publish', 'blank');
|
||||
}
|
||||
|
||||
|
||||
@@ -23,20 +23,20 @@
|
||||
*/
|
||||
|
||||
global $RBAC;
|
||||
switch ($RBAC->userCanAccess( 'PM_USERS' )) {
|
||||
switch ($RBAC->userCanAccess('PM_USERS')) {
|
||||
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;
|
||||
case - 3:
|
||||
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;
|
||||
}
|
||||
@@ -54,19 +54,18 @@ $arrayConfigPage = $configuration->getConfiguration('roleUsersPermissionsList',
|
||||
$arrayConfig = [];
|
||||
$arrayConfig['pageSize'] = (isset($arrayConfigPage['pageSize']))? $arrayConfigPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->assign("PARTNER_FLAG", (defined('PARTNER_FLAG')) ? PARTNER_FLAG : false);
|
||||
$oHeadPublisher->assign('CONFIG', $arrayConfig);
|
||||
$oHeadPublisher->addExtJsScript( 'roles/rolesUsersPermission', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'roles/rolesUsersPermission' ); //adding a html file .html.
|
||||
$oHeadPublisher->addExtJsScript('roles/rolesUsersPermission', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('roles/rolesUsersPermission'); //adding a html file .html.
|
||||
|
||||
|
||||
$roles = Array ();
|
||||
$roles = array();
|
||||
$roles['ROL_UID'] = $_GET['rUID'];
|
||||
$roles['ROL_CODE'] = $RBAC->getRoleCode( $_GET['rUID'] );
|
||||
$roles['ROL_CODE'] = $RBAC->getRoleCode($_GET['rUID']);
|
||||
$roles['CURRENT_TAB'] = ($_GET['tab'] == 'permissions') ? 1 : 0;
|
||||
|
||||
$oHeadPublisher->assign( 'ROLES', $roles );
|
||||
$oHeadPublisher->assign( 'permissionsAdmin', $RBAC->loadPermissionAdmin() );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
$oHeadPublisher->assign('ROLES', $roles);
|
||||
$oHeadPublisher->assign('permissionsAdmin', $RBAC->loadPermissionAdmin());
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -56,7 +56,7 @@ $c = new Configurations();
|
||||
$configPage = $c->getConfiguration('rolesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript('roles/rolesList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('roles/rolesList'); //adding a html file .html.
|
||||
@@ -64,4 +64,3 @@ $oHeadPublisher->assign('PARTNER_FLAG', (defined('PARTNER_FLAG')) ? PARTNER_FLAG
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class ldapadvancedClassCron
|
||||
*/
|
||||
public function executeCron($debug)
|
||||
{
|
||||
$rbac = &RBAC::getSingleton();
|
||||
$rbac = RBAC::getSingleton();
|
||||
|
||||
if (is_null($rbac->authSourcesObj)) {
|
||||
$rbac->authSourcesObj = new AuthenticationSource();
|
||||
@@ -203,7 +203,7 @@ class ldapadvancedClassCron
|
||||
|
||||
unset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["DEPARTMENTS_TO_UNASSIGN"]);
|
||||
|
||||
$rbac = &RBAC::getSingleton();
|
||||
$rbac = RBAC::getSingleton();
|
||||
$rbac->authSourcesObj->update($arrayAuthenticationSourceData);
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ class ldapadvancedClassCron
|
||||
|
||||
unset($arrayAuthenticationSourceData["AUTH_SOURCE_DATA"]["GROUPS_TO_UNASSIGN"]);
|
||||
|
||||
$rbac = &RBAC::getSingleton();
|
||||
$rbac = RBAC::getSingleton();
|
||||
$rbac->authSourcesObj->update($arrayAuthenticationSourceData);
|
||||
}
|
||||
|
||||
@@ -599,4 +599,3 @@ class ldapadvancedClassCron
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ $request = isset($_POST['request']) ? $_POST['request'] : (isset($_GET['request'
|
||||
|
||||
function testConnection($type, $server, $user, $passwd, $port = 'none', $dbName = "")
|
||||
{
|
||||
|
||||
if (($port == 'none') || ($port == '') || ($port == 0)) {
|
||||
//setting defaults ports
|
||||
switch ($type) {
|
||||
@@ -43,29 +42,29 @@ function testConnection($type, $server, $user, $passwd, $port = 'none', $dbName
|
||||
$server = $filter->validateInput($server);
|
||||
$user = $filter->validateInput($user);
|
||||
$passwd = $filter->validateInput($passwd);
|
||||
$connDatabase = @mysql_connect($server, $user, $passwd);
|
||||
$connDatabase = mysqli_connect($server, $user, $passwd);
|
||||
$dbNameTest = "PROCESSMAKERTESTDC";
|
||||
$dbNameTest = $filter->validateInput($dbNameTest, 'nosql');
|
||||
$query = "CREATE DATABASE %s";
|
||||
$query = $filter->preventSqlInjection($query, array($dbNameTest), $connDatabase);
|
||||
$db = @mysql_query($query, $connDatabase);
|
||||
$db = mysqli_query($connDatabase, $query);
|
||||
$success = false;
|
||||
if (!$db) {
|
||||
$message = mysql_error();;
|
||||
$message = mysqli_error($connDatabase);
|
||||
} else {
|
||||
$usrTest = "wfrbtest";
|
||||
$chkG = "GRANT ALL PRIVILEGES ON `%s`.* TO %s@'%%' IDENTIFIED BY 'sample' WITH GRANT OPTION";
|
||||
$chkG = $filter->preventSqlInjection($chkG, array($dbNameTest, $usrTest), $connDatabase);
|
||||
$ch = @mysql_query($chkG, $connDatabase);
|
||||
$ch = mysqli_query($connDatabase, $chkG);
|
||||
if (!$ch) {
|
||||
$message = mysql_error();
|
||||
$message = mysqli_error($connDatabase);
|
||||
} else {
|
||||
$sqlCreateUser = "CREATE USER '%s'@'%%' IDENTIFIED BY '%s'";
|
||||
$user = $filter->validateInput($user, 'nosql');
|
||||
$sqlCreateUser = $filter->preventSqlInjection($sqlCreateUser, array($user . "_usertest", "sample"), $connDatabase);
|
||||
$result = @mysql_query($sqlCreateUser, $connDatabase);
|
||||
$result = mysqli_query($connDatabase, $sqlCreateUser);
|
||||
if (!$result) {
|
||||
$message = mysql_error();
|
||||
$message = mysqli_error($connDatabase);
|
||||
} else {
|
||||
$success = true;
|
||||
$message = G::LoadTranslation('ID_SUCCESSFUL_CONNECTION');
|
||||
@@ -73,17 +72,17 @@ function testConnection($type, $server, $user, $passwd, $port = 'none', $dbName
|
||||
$sqlDropUser = "DROP USER '%s'@'%%'";
|
||||
$user = $filter->validateInput($user, 'nosql');
|
||||
$sqlDropUser = $filter->preventSqlInjection($sqlDropUser, array($user . "_usertest"), $connDatabase);
|
||||
@mysql_query($sqlDropUser, $connDatabase);
|
||||
mysqli_query($connDatabase, $sqlDropUser);
|
||||
|
||||
$sqlDropUser = "DROP USER %s@'%%'";
|
||||
$usrTest = $filter->validateInput($usrTest, 'nosql');
|
||||
$sqlDropUser = $filter->preventSqlInjection($sqlDropUser, array($usrTest), $connDatabase);
|
||||
@mysql_query($sqlDropUser, $connDatabase);
|
||||
mysqli_query($connDatabase, $sqlDropUser);
|
||||
}
|
||||
$sqlDropDb = "DROP DATABASE %s";
|
||||
$dbNameTest = $filter->validateInput($dbNameTest, 'nosql');
|
||||
$sqlDropDb = $filter->preventSqlInjection($sqlDropDb, array($dbNameTest), $connDatabase);
|
||||
@mysql_query($sqlDropDb, $connDatabase);
|
||||
mysqli_query($connDatabase, $sqlDropDb);
|
||||
}
|
||||
return array($success, ($message != "") ? $message : $Server->error);
|
||||
} else {
|
||||
@@ -107,7 +106,7 @@ switch ($request) {
|
||||
//check if the APP_CACHE VIEW table and their triggers are installed
|
||||
case 'info':
|
||||
$result = new stdClass();
|
||||
$result->info = array();
|
||||
$result->info = [];
|
||||
|
||||
//check the language, if no info in config about language, the default is 'en'
|
||||
$oConf = new Configurations();
|
||||
@@ -126,7 +125,7 @@ switch ($request) {
|
||||
}
|
||||
|
||||
//get user Root from hash
|
||||
$result->info = array();
|
||||
$result->info = [];
|
||||
$result->error = false;
|
||||
|
||||
//setup the appcacheview object, and the path for the sql files
|
||||
@@ -201,17 +200,17 @@ switch ($request) {
|
||||
case 'getLangList':
|
||||
$Translations = G::getModel('Translation');
|
||||
$result = new stdClass();
|
||||
$result->rows = array();
|
||||
$result->rows = [];
|
||||
|
||||
$langs = $Translations->getTranslationEnvironments();
|
||||
foreach ($langs as $lang) {
|
||||
$result->rows[] = array('LAN_ID' => $lang['LOCALE'], 'LAN_NAME' => $lang['LANGUAGE']);
|
||||
}
|
||||
|
||||
print (G::json_encode($result));
|
||||
print(G::json_encode($result));
|
||||
break;
|
||||
case 'build':
|
||||
$sqlToExe = array();
|
||||
$sqlToExe = [];
|
||||
$conf = new Configurations();
|
||||
|
||||
//DEPRECATED $lang = $_POST['lang'];
|
||||
@@ -225,38 +224,30 @@ switch ($request) {
|
||||
|
||||
//Update APP_DELEGATION.DEL_LAST_INDEX data
|
||||
$res = $appCache->updateAppDelegationDelLastIndex($lang, true);
|
||||
//$result->info[] = array("name" => "update APP_DELEGATION.DEL_LAST_INDEX", "value" => $res);
|
||||
|
||||
//APP_DELEGATION INSERT
|
||||
$res = $appCache->triggerAppDelegationInsert($lang, true);
|
||||
//$result->info[] = array ('name' => 'Trigger APP_DELEGATION INSERT', 'value'=> $res);
|
||||
|
||||
|
||||
//APP_DELEGATION Update
|
||||
$res = $appCache->triggerAppDelegationUpdate($lang, true);
|
||||
//$result->info[] = array ('name' => 'Trigger APP_DELEGATION UPDATE', 'value'=> $res);
|
||||
|
||||
|
||||
//APPLICATION UPDATE
|
||||
$res = $appCache->triggerApplicationUpdate($lang, true);
|
||||
//$result->info[] = array ('name' => 'Trigger APPLICATION UPDATE', 'value'=> $res);
|
||||
|
||||
|
||||
//APPLICATION DELETE
|
||||
$res = $appCache->triggerApplicationDelete($lang, true);
|
||||
//$result->info[] = array ('name' => 'Trigger APPLICATION DELETE', 'value'=> $res);
|
||||
|
||||
//SUB_APPLICATION INSERT
|
||||
$res = $appCache->triggerSubApplicationInsert($lang, false);
|
||||
|
||||
//CONTENT UPDATE
|
||||
$res = $appCache->triggerContentUpdate($lang, true);
|
||||
//$result->info[] = array("name" => "Trigger CONTENT UPDATE", "value" => $res);
|
||||
|
||||
//build using the method in AppCacheView Class
|
||||
$res = $appCache->fillAppCacheView($lang);
|
||||
//$result->info[] = array ('name' => 'build APP_CACHE_VIEW', 'value'=> $res);
|
||||
|
||||
|
||||
//set status in config table
|
||||
$confParams = array('LANG' => $lang, 'STATUS' => 'active');
|
||||
@@ -268,7 +259,6 @@ switch ($request) {
|
||||
$result->msg = G::LoadTranslation('ID_TITLE_COMPLETED');
|
||||
G::auditLog("BuildCache");
|
||||
echo G::json_encode($result);
|
||||
|
||||
} catch (Exception $e) {
|
||||
$confParams = array('lang' => $lang, 'status' => 'failed');
|
||||
$appCacheViewEngine = $oServerConf->setProperty('APP_CACHE_VIEW_ENGINE', $confParams);
|
||||
@@ -276,7 +266,7 @@ switch ($request) {
|
||||
$token = strtotime("now");
|
||||
PMException::registerErrorLog($e, $token);
|
||||
$varRes = '{success: false, msg:"' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '"}';
|
||||
G::outRes( $varRes );
|
||||
G::outRes($varRes);
|
||||
}
|
||||
break;
|
||||
case 'recreate-root':
|
||||
@@ -299,7 +289,7 @@ switch ($request) {
|
||||
$sh = G::encryptOld(filemtime(PATH_GULLIVER . "/class.g.php"));
|
||||
$h = G::encrypt($_POST['host'] . $sh . $_POST['user'] . $sh . $_POST['password'] . $sh . (1), $sh);
|
||||
$insertStatements = "define ( 'HASH_INSTALLATION','{$h}' ); \ndefine ( 'SYSTEM_HASH', '{$sh}' ); \n";
|
||||
$lines = array();
|
||||
$lines = [];
|
||||
$content = '';
|
||||
$filename = PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths_installed.php';
|
||||
$lines = file($filename);
|
||||
|
||||
@@ -1,38 +1,37 @@
|
||||
<?php
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP' );
|
||||
$RBAC->requirePermissions('PM_SETUP');
|
||||
// header('Pragma: no-cache');
|
||||
// header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
//$oHeadPublisher->setExtSkin( 'xtheme-blue');
|
||||
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'setup/appCacheViewConf', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/appCacheViewConf' ); //adding a html file .html.
|
||||
$oHeadPublisher->addExtJsScript('setup/appCacheViewConf', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/appCacheViewConf'); //adding a html file .html.
|
||||
|
||||
$oConf = new Configurations();
|
||||
$oConf->loadConfig( $x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '' );
|
||||
$oConf->loadConfig($x, 'APP_CACHE_VIEW_ENGINE', '', '', '', '');
|
||||
|
||||
//first check about APP_CACHE_VIEW is enabled or not,
|
||||
if (isset( $oConf->aConfig['LANG'] ) && isset( $oConf->aConfig['STATUS'] ) && $oConf->aConfig['STATUS'] == 'active') {
|
||||
if (isset($oConf->aConfig['LANG']) && isset($oConf->aConfig['STATUS']) && $oConf->aConfig['STATUS'] == 'active') {
|
||||
$appCacheViewEnabled = true;
|
||||
} else {
|
||||
$appCacheViewEnabled = false;
|
||||
}
|
||||
$lang = isset( $oConf->aConfig['LANG'] ) ? $oConf->aConfig['LANG'] : 'en';
|
||||
$lang = isset($oConf->aConfig['LANG']) ? $oConf->aConfig['LANG'] : 'en';
|
||||
|
||||
//$oHeadPublisher->assign('appCacheViewEnabled', $appCacheViewEnabled);
|
||||
|
||||
|
||||
$labels = G::getTranslations( Array ('ID_PROCESSING','ID_CACHE_LANGUAGE','ID_CACHE_HOST','ID_CACHE_USER','ID_CACHE_PASSWORD','ID_CACHE_TITLE_INFO','ID_CACHE_SUBTITLE_REBUILD','ID_CACHE_BTN_BUILD','ID_CACHE_BUILDING','ID_CACHE_SUBTITLE_SETUP_DB','ID_CACHE_BTN_SETUP_PASSWRD','ID_CACHE_SUBTITLE_SETUP_SESSION','ID_CACHE_BTN_SETUP_SESSION'
|
||||
) );
|
||||
$labels = G::getTranslations(array('ID_PROCESSING','ID_CACHE_LANGUAGE','ID_CACHE_HOST','ID_CACHE_USER','ID_CACHE_PASSWORD','ID_CACHE_TITLE_INFO','ID_CACHE_SUBTITLE_REBUILD','ID_CACHE_BTN_BUILD','ID_CACHE_BUILDING','ID_CACHE_SUBTITLE_SETUP_DB','ID_CACHE_BTN_SETUP_PASSWRD','ID_CACHE_SUBTITLE_SETUP_SESSION','ID_CACHE_BTN_SETUP_SESSION'
|
||||
));
|
||||
// $oHeadPublisher->assign('TRANSLATIONS', $labels);
|
||||
// $TRANSLATIONS->ID_PROCESSING = G::LoadTranslation('ID_PROCESSING');
|
||||
// $oHeadPublisher->assign( 'TRANSLATIONS', $TRANSLATIONS); //translations
|
||||
$oHeadPublisher->assign( 'currentLang', $lang ); //current language
|
||||
$oHeadPublisher->assign('currentLang', $lang); //current language
|
||||
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\AuditLog\AuditLog;
|
||||
|
||||
global $RBAC;
|
||||
|
||||
if ($RBAC->userCanAccess("PM_SETUP") != 1) {
|
||||
@@ -6,167 +9,11 @@ if ($RBAC->userCanAccess("PM_SETUP") != 1) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( "auditLogList", "pageSize", null, $_SESSION["USER_LOGGED"] );
|
||||
|
||||
$config = array ();
|
||||
$config["pageSize"] = (isset( $configPage["pageSize"] )) ? $configPage["pageSize"] : 20;
|
||||
|
||||
$arrayAction = array(
|
||||
"CreateUser" => G::LoadTranslation("ID_CREATE_USER"),
|
||||
"UpdateUser" => G::LoadTranslation("ID_UPDATE_USER"),
|
||||
"DeleteUser" => G::LoadTranslation("ID_DELETE_USER"),
|
||||
"EnableUser" => G::LoadTranslation("ID_ENABLE_USER"),
|
||||
"DisableUser" => G::LoadTranslation("ID_DISABLE_USER"),
|
||||
"AssignAuthenticationSource" => G::LoadTranslation("ID_ASSIGN_AUTHENTICATION_SOURCE"),
|
||||
"AssignUserToGroup" => G::LoadTranslation("ID_ASSIGN_USER_TO_GROUP"),
|
||||
"CreateAuthSource" => G::LoadTranslation("ID_CREATE_AUTH_SOURCE"),
|
||||
"UpdateAuthSource" => G::LoadTranslation("ID_UPDATE_AUTH_SOURCE"),
|
||||
"DeleteAuthSource" => G::LoadTranslation("ID_DELETE_AUTH_SOURCE"),
|
||||
"CreateRole" => G::LoadTranslation("ID_CREATE_ROLE"),
|
||||
"UpdateRole" => G::LoadTranslation("ID_UPDATE_ROLE"),
|
||||
"DeleteRole" => G::LoadTranslation("ID_DELETE_ROLE"),
|
||||
"AssignUserToRole" => G::LoadTranslation("ID_ASSIGN_USER_TO_ROLE"),
|
||||
"DeleteUserToRole" => G::LoadTranslation("ID_DELETE_USER_TO_ROLE"),
|
||||
"AddPermissionToRole" => G::LoadTranslation("ID_ADD_PERMISSION_TO_ROLE"),
|
||||
"DeletePermissionToRole" => G::LoadTranslation("ID_DELETE_PERMISSION_TO_ROLE"),
|
||||
"CreateSkin" => G::LoadTranslation("ID_CREATE_SKIN"),
|
||||
"ImportSkin" => G::LoadTranslation("ID_IMPORT_SKIN"),
|
||||
"ExportSkin" => G::LoadTranslation("ID_EXPORT_SKIN"),
|
||||
"DeleteSkin" => G::LoadTranslation("ID_DELETE_SKIN"),
|
||||
"CreateGroup" => G::LoadTranslation("ID_CREATE_GROUP"),
|
||||
"UpdateGroup" => G::LoadTranslation("ID_UPDATE_GROUP"),
|
||||
"DeleteGroup" => G::LoadTranslation("ID_DELETE_GROUP"),
|
||||
"CreateCategory" => G::LoadTranslation("ID_CREATE_CATEGORY"),
|
||||
"UpdateCategory" => G::LoadTranslation("ID_UPDATE_CATEGORY"),
|
||||
"DeleteCategory" => G::LoadTranslation("ID_DELETE_CATEGORY"),
|
||||
"BuildCache" => G::LoadTranslation("ID_BUILD_CACHE"),
|
||||
"ClearCache" => G::LoadTranslation("ID_CLEAR_CACHE"),
|
||||
"ClearCron" => G::LoadTranslation("ID_CLEAR_CRON"),
|
||||
"UpdateEnvironmentSettings" => G::LoadTranslation("ID_UPDATE_ENVIRONMENT_SETTINGS"),
|
||||
"UpdateLoginSettings" => G::LoadTranslation("ID_UPDATE_LOGIN_SETTINGS"),
|
||||
"EnableHeartBeat" => G::LoadTranslation("ID_ENABLE_HEART_BEAT"),
|
||||
"DisableHeartBeat" => G::LoadTranslation("ID_DISABLE_HEART_BEAT"),
|
||||
"CreatePmtable" => G::LoadTranslation("ID_CREATE_PMTABLE"),
|
||||
"UpdatePmtable" => G::LoadTranslation("ID_UPDATE_PMTABLE"),
|
||||
"DeletePmtable" => G::LoadTranslation("ID_DELETE_PMTABLE"),
|
||||
"AddDataPmtable" => G::LoadTranslation("ID_ADD_DATA_PMTABLE"),
|
||||
"UpdateDataPmtable" => G::LoadTranslation("ID_UPDATE_DATA_PMTABLE"),
|
||||
"DeleteDataPmtable" => G::LoadTranslation("ID_DELETE_DATA_PMTABLE"),
|
||||
"ImportTable" => G::LoadTranslation("ID_IMPORT_TABLE"),
|
||||
"ExportTable" => G::LoadTranslation("ID_EXPORT_TABLE"),
|
||||
"CreateCalendar" => G::LoadTranslation("ID_CREATE_CALENDAR"),
|
||||
"UpdateCalendar" => G::LoadTranslation("ID_UPDATE_CALENDAR"),
|
||||
"DeleteCalendar" => G::LoadTranslation("ID_DELETE_CALENDAR"),
|
||||
"CreateDashletInstance" => G::LoadTranslation("ID_CREATE_DASHLET_INSTANCE"),
|
||||
"UpdateDashletInstance" => G::LoadTranslation("ID_UPDATE_DASHLET_INSTANCE"),
|
||||
"DeleteDashletInstance" => G::LoadTranslation("ID_DELETE_DASHLET_INSTANCE"),
|
||||
"CreateDepartament" => G::LoadTranslation("ID_CREATE_DEPARTAMENT"),
|
||||
"CreateSubDepartament" => G::LoadTranslation("ID_CREATE_SUB_DEPARTAMENT"),
|
||||
"UpdateDepartament" => G::LoadTranslation("ID_UPDATE_DEPARTAMENT"),
|
||||
"UpdateSubDepartament" => G::LoadTranslation("ID_UPDATE_SUB_DEPARTAMENT"),
|
||||
"DeleteDepartament" => G::LoadTranslation("ID_DELETE_DEPARTAMENT"),
|
||||
"AssignManagerToDepartament" => G::LoadTranslation("ID_ASSIGN_MANAGER_TO_DEPARTAMENT"),
|
||||
"AssignUserToDepartament" => G::LoadTranslation("ID_ASSIGN_USER_TO_DEPARTAMENT"),
|
||||
"RemoveUsersFromDepartament" => G::LoadTranslation("ID_REMOVE_USERS_FROM_DEPARTAMENT"),
|
||||
"AssignUserToGroup" => G::LoadTranslation("ID_ASSIGN_USER_TO_GROUP"),
|
||||
"UploadLanguage" => G::LoadTranslation("ID_UPLOAD_LANGUAGE"),
|
||||
"ExportLanguage" => G::LoadTranslation("ID_EXPORT_LANGUAGE"),
|
||||
"DeleteLanguage" => G::LoadTranslation("ID_DELETE_LAGUAGE"),
|
||||
"UploadSystemSettings" => G::LoadTranslation("ID_UPLOAD_SYSTEM_SETTINGS"),
|
||||
"UpdateEmailSettings" => G::LoadTranslation("ID_UPDATE_EMAIL_SETTINGS"),
|
||||
"CreateEmailSettings" => G::LoadTranslation("ID_CREATE_EMAIL_SETTINGS"),
|
||||
"UploadLogo" => G::LoadTranslation("ID_UPLOAD_LOGO"),
|
||||
"DeleteLogo" => G::LoadTranslation("ID_DELETE_LOGO"),
|
||||
"RestoreLogo" => G::LoadTranslation("ID_RESTORE_LOGO"),
|
||||
"ReplaceLogo" => G::LoadTranslation("ID_REPLACE_LOGO"),
|
||||
"InstallPlugin" => G::LoadTranslation("ID_INSTALL_PLUGIN"),
|
||||
"EnablePlugin" => G::LoadTranslation("ID_ENABLE_PLUGIN"),
|
||||
"DisablePlugin" => G::LoadTranslation("ID_DISABLE_PLUGIN"),
|
||||
"RemovePlugin" => G::LoadTranslation("ID_REMOVE_PLUGIN"),
|
||||
"SetColumns" => G::LoadTranslation("ID_SET_COLUMNS"),
|
||||
"EnableAuditLog" => G::LoadTranslation("ID_ENABLE_AUDIT_LOG"),
|
||||
"DisableAuditLog" => G::LoadTranslation("ID_DISABLE_AUDIT_LOG"),
|
||||
"EditProcess" => G::LoadTranslation("ID_EDIT_PROCESS"),
|
||||
"ExportProcess" => G::LoadTranslation("ID_EXPORT_PROCESS"),
|
||||
"WebEntry" => G::LoadTranslation("ID_WEB_ENTRY"),
|
||||
"AssignRole" => G::LoadTranslation("ID_ASSIGN_ROLE"),
|
||||
"RemoveUser" => G::LoadTranslation("ID_REMOVE_USER"),
|
||||
"AddTask" => G::LoadTranslation("ID_ADD_TASK"),
|
||||
"AddSubProcess" => G::LoadTranslation("ID_ADD_SUB_PROCESS"),
|
||||
"SaveTaskPosition" => G::LoadTranslation("ID_SAVE_TASK_POSITION"),
|
||||
"AddHorizontalLine" => G::LoadTranslation("ID_ADD_HORIZONTAL_LINE"),
|
||||
"AddVerticalLine" => G::LoadTranslation("ID_ADD_VERTICAL_LINE"),
|
||||
"SaveGuidePosition" => G::LoadTranslation("ID_SAVE_GUIDE_POSITION"),
|
||||
"DeleteLine" => G::LoadTranslation("ID_DELETE_LINE"),
|
||||
"DeleteLines" => G::LoadTranslation("ID_DELETE_LINES"),
|
||||
"AddText" => G::LoadTranslation("ID_ADD_TEXT"),
|
||||
"UpdateText" => G::LoadTranslation("ID_UPDATE_TEXT"),
|
||||
"SaveTextPosition" => G::LoadTranslation("ID_SAVE_TEXT_POSITION"),
|
||||
"DeleteText" => G::LoadTranslation("ID_DELETE_TEXT"),
|
||||
"ProcessFileManager" => G::LoadTranslation("ID_PROCESS_FILE_MANAGER"),
|
||||
"ProcessPermissions" => G::LoadTranslation("ID_PROCESS_PERMISSIONS"),
|
||||
"DeletePermissions" => G::LoadTranslation("ID_DELETE_PERMISSIONS"),
|
||||
"AssignSupervisorDynaform" => G::LoadTranslation("ID_ASSIGN_SUPERVISOR_DYNAFORM"),
|
||||
"RemoveSupervisorDynaform" => G::LoadTranslation("ID_REMOVE_SUPERVISOR_DYNAFORM"),
|
||||
"AssignSupervisorInput" => G::LoadTranslation("ID_ASSIGN_SUPERVISOR_INPUT"),
|
||||
"RemoveSupervisorInput" => G::LoadTranslation("ID_REMOVE_SUPERVISOR_INPUT"),
|
||||
"CaseTrackers" => G::LoadTranslation("ID_CASE_TRACKERS"),
|
||||
"EditEvent" => G::LoadTranslation("ID_EDIT_EVENT"),
|
||||
"DeleteEvent" => G::LoadTranslation("ID_EVENT_DELETED"),
|
||||
"CreateDynaform" => G::LoadTranslation("ID_CREATE_DYNAFORM"),
|
||||
"UpdateDynaform" => G::LoadTranslation("ID_UPDATE_DYNAFORM"),
|
||||
"DeleteDynaform" => G::LoadTranslation("ID_DELETE_DYNAFORM"),
|
||||
"ConditionsEditorDynaform" => G::LoadTranslation("ID_CONDITIONS_EDITOR_DYNAFORM"),
|
||||
"CreateCaseScheduler" => G::LoadTranslation("ID_CREATE_CASE_SCHEDULER"),
|
||||
"UpdateCaseScheduler" => G::LoadTranslation("ID_UPDATE_CASE_SCHEDULER"),
|
||||
"DeleteCaseScheduler" => G::LoadTranslation("ID_DELETE_CASE_SCHEDULER"),
|
||||
"CreateDatabaseConnection" => G::LoadTranslation("ID_CREATE_DATABASE_CONNECTION"),
|
||||
"UpdateDatabaseConnection" => G::LoadTranslation("ID_UPDATE_DATABASE_CONNECTION"),
|
||||
"DeleteDatabaseConnection" => G::LoadTranslation("ID_DELETE_DATABASE_CONNECTION"),
|
||||
"CreateInputDocument" => G::LoadTranslation("ID_CREATE_INPUT_DOCUMENT"),
|
||||
"UpdateInputDocument" => G::LoadTranslation("ID_UPDATE_INPUT_DOCUMENT"),
|
||||
"DeleteInputDocument" => G::LoadTranslation("ID_DELETE_INPUT_DOCUMENT"),
|
||||
"CreateOutputDocument" => G::LoadTranslation("ID_CREATE_OUTPUT_DOCUMENT"),
|
||||
"UpdateOutputDocument" => G::LoadTranslation("ID_UPDATE_OUTPUT_DOCUMENT"),
|
||||
"DeleteOutputDocument" => G::LoadTranslation("ID_DELETE_OUTPUT_DOCUMENT"),
|
||||
"CreateTrigger" => G::LoadTranslation("ID_CREATE_TRIGGER"),
|
||||
"UpdateTrigger" => G::LoadTranslation("ID_UPDATE_TRIGGER"),
|
||||
"DeleteTrigger" => G::LoadTranslation("ID_DELETE_TRIGGER"),
|
||||
"DerivationRule" => G::LoadTranslation("ID_DERIVATION_RULE"),
|
||||
"DeleteTask" => G::LoadTranslation("ID_DELETE_TASK"),
|
||||
"DeleteSubProcess" => G::LoadTranslation("ID_DELETE_SUB_PROCESS"),
|
||||
"OptionsMenuTask" => G::LoadTranslation("ID_OPTIONS_MENU_TASK"),
|
||||
"SaveTaskProperties" => G::LoadTranslation("ID_SAVE_TASK_PROPERTIES"),
|
||||
"DeleteRoutes" => G::LoadTranslation("ID_DELETE_ROUTES"),
|
||||
"NewConditionFromStep" => G::LoadTranslation("ID_NEW_CONDITION_FROM_STEP"),
|
||||
"AssignTrigger" => G::LoadTranslation("ID_ASSIGN_TRIGGER"),
|
||||
"UpTrigger" => G::LoadTranslation("ID_UP_TRIGGER"),
|
||||
"DownTrigger" => G::LoadTranslation("ID_DOWN_TRIGGER"),
|
||||
"StepDelete" => G::LoadTranslation("ID_STEP_DELETE"),
|
||||
"StepUp" => G::LoadTranslation("ID_STEP_UP"),
|
||||
"StepDown" => G::LoadTranslation("ID_STEP_DOWN"),
|
||||
"SaveNewStep" => G::LoadTranslation("ID_SAVE_NEW_STEP"),
|
||||
"AssignUserTask" => G::LoadTranslation("ID_ASSIGN_USER_TASK"),
|
||||
"AssignGroupTask" => G::LoadTranslation("ID_ASSIGN_GROUP_TASK"),
|
||||
"DeleteUserTask" => G::LoadTranslation("ID_DELETE_USER_TASK"),
|
||||
"DeleteGroupTask" => G::LoadTranslation("ID_DELETE_GROUP_TASK"),
|
||||
"ImportProcess" => G::LoadTranslation("ID_IMPORT_PROCESS"),
|
||||
"DeleteProcess" => G::LoadTranslation("ID_DELETE_PROCESS")
|
||||
);
|
||||
|
||||
asort($arrayAction);
|
||||
|
||||
$arrayActionAux = $arrayAction;
|
||||
$arrayAction = array(array("ALL", G::LoadTranslation("ID_ALL")));
|
||||
|
||||
foreach ($arrayActionAux as $key => $value) {
|
||||
$arrayAction[] = array($key, $value);
|
||||
}
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( "setup/auditLog", true );
|
||||
$oHeadPublisher->assign( "CONFIG", $config );
|
||||
$oHeadPublisher->assign( "ACTION", $arrayAction );
|
||||
G::RenderPage( "publish", "extJs" );
|
||||
$auditLog = new AuditLog();
|
||||
$auditLog->setUserLogged($_SESSION["USER_LOGGED"]);
|
||||
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript("setup/auditLog", true);
|
||||
$oHeadPublisher->assign("CONFIG", $auditLog->getConfig());
|
||||
$oHeadPublisher->assign("ACTION", $auditLog->getActions());
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
@@ -1,111 +1,13 @@
|
||||
<?php
|
||||
|
||||
function mktimeDate ($date)
|
||||
{
|
||||
$arrayAux = getdate( strtotime( $date ) );
|
||||
$mktDate = mktime( $arrayAux["hours"], $arrayAux["minutes"], $arrayAux["seconds"], $arrayAux["mon"], $arrayAux["mday"], $arrayAux["year"] );
|
||||
return $mktDate;
|
||||
}
|
||||
use ProcessMaker\AuditLog\AuditLog;
|
||||
|
||||
function auditLogArraySet ($str, $filter)
|
||||
{
|
||||
$arrayAux = explode( "|", $str );
|
||||
$date = "";
|
||||
$workspace = "";
|
||||
$action = "";
|
||||
$ip = "";
|
||||
$user = "";
|
||||
$description = "";
|
||||
|
||||
if (count( $arrayAux ) > 1) {
|
||||
$date = (isset( $arrayAux[0] )) ? trim( $arrayAux[0] ) : "";
|
||||
$workspace = (isset( $arrayAux[1] )) ? trim( $arrayAux[1] ) : "";
|
||||
$ip = (isset( $arrayAux[2] )) ? trim( $arrayAux[2] ) : "";
|
||||
$user = (isset( $arrayAux[4] )) ? trim( $arrayAux[4] ) : "";
|
||||
$action = (isset( $arrayAux[5] )) ? trim( $arrayAux[5] ) : "";
|
||||
$description = (isset( $arrayAux[6] )) ? trim( $arrayAux[6] ) : "";
|
||||
}
|
||||
$auditLog = new AuditLog();
|
||||
$auditLog->setUserLogged($_SESSION["USER_LOGGED"]);
|
||||
|
||||
$mktDate = (! empty( $date )) ? mktimeDate( $date ) : 0;
|
||||
|
||||
//Filter
|
||||
$sw = 1;
|
||||
if ($workspace != $filter["workspace"]) {
|
||||
$sw = 0;
|
||||
}
|
||||
$response = [];
|
||||
|
||||
if ($filter["action"] != "ALL") {
|
||||
if ($action != $filter["action"]) {
|
||||
$sw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["dateFrom"] && $mktDate > 0) {
|
||||
if (! (mktimeDate( $filter["dateFrom"] ) <= $mktDate)) {
|
||||
$sw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["dateTo"] && $mktDate > 0) {
|
||||
if (! ($mktDate <= mktimeDate( $filter["dateTo"] . " 23:59:59" ))) {
|
||||
$sw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filter["description"]) {
|
||||
$sw = 0;
|
||||
$string = $filter["description"];
|
||||
|
||||
if ( (stristr($date, $string) !== false) || (stristr($ip, $string) !== false) || (stristr($user, $string) !== false) || (stristr($action, $string) !== false) || (stristr($description, $string) !== false) ) {
|
||||
$sw = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$arrayData = array ();
|
||||
$newAction = preg_replace('/([A-Z])/', '_$1', $action);
|
||||
$newAction = "ID".strtoupper($newAction);
|
||||
|
||||
if ($sw == 1) {
|
||||
$arrayData = array ("DATE" => $date, "USER" => $user, "IP" =>$ip, "ACTION" => G::LoadTranslation($newAction), "DESCRIPTION" => $description);
|
||||
}
|
||||
|
||||
return $arrayData;
|
||||
}
|
||||
|
||||
function getAuditLogData ($filter, $r, $i)
|
||||
{
|
||||
$arrayData = array ();
|
||||
$strAux = null;
|
||||
$count = 0;
|
||||
|
||||
$file = PATH_DATA . "log" . PATH_SEP . "audit.log";
|
||||
|
||||
if (file_exists($file)) {
|
||||
$arrayFileData = file($file);
|
||||
|
||||
for ($k = 0; $k < count($arrayFileData); $k++) {
|
||||
|
||||
$strAux = $arrayFileData[$k];
|
||||
|
||||
if ($strAux) {
|
||||
$arrayAux = auditLogArraySet($strAux, $filter);
|
||||
if (count($arrayAux) > 0) {
|
||||
$count = $count + 1;
|
||||
|
||||
if ($count > $i && count($arrayData) < $r) {
|
||||
$arrayData[] = $arrayAux;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array($count, $arrayData);
|
||||
}
|
||||
|
||||
$option = (isset( $_REQUEST["option"] )) ? $_REQUEST["option"] : null;
|
||||
|
||||
$response = array ();
|
||||
$option = (isset($_REQUEST["option"])) ? $_REQUEST["option"] : null;
|
||||
|
||||
switch ($option) {
|
||||
case "LST":
|
||||
@@ -116,15 +18,23 @@ switch ($option) {
|
||||
$dateFrom = $_REQUEST["dateFrom"];
|
||||
$dateTo = $_REQUEST["dateTo"];
|
||||
|
||||
$arrayFilter = array ("workspace" => $workspace, "action" => $action, "description" => $description,"dateFrom" => str_replace( "T00:00:00", null, $dateFrom ),"dateTo" => str_replace( "T00:00:00", null, $dateTo )
|
||||
);
|
||||
$arrayFilter = [
|
||||
"workspace" => $workspace,
|
||||
"action" => $action,
|
||||
"description" => $description,
|
||||
"dateFrom" => str_replace("T00:00:00", null, $dateFrom),
|
||||
"dateTo" => str_replace("T00:00:00", null, $dateTo)
|
||||
];
|
||||
|
||||
$limit = isset( $_REQUEST["limit"] ) ? $_REQUEST["limit"] : $pageSize;
|
||||
$start = isset( $_REQUEST["start"] ) ? $_REQUEST["start"] : 0;
|
||||
$limit = isset($_REQUEST["limit"]) ? $_REQUEST["limit"] : $pageSize;
|
||||
$start = isset($_REQUEST["start"]) ? $_REQUEST["start"] : 0;
|
||||
|
||||
list ($count, $data) = getAuditLogData( $arrayFilter, $limit, $start );
|
||||
$response = array ("success" => true,"resultTotal" => $count,"resultRoot" => $data
|
||||
);
|
||||
list ($count, $data) = $auditLog->getAuditLogData($arrayFilter, $limit, $start);
|
||||
$response = [
|
||||
"success" => true,
|
||||
"resultTotal" => $count,
|
||||
"resultRoot" => $data
|
||||
];
|
||||
break;
|
||||
case "EMPTY":
|
||||
$status = 1;
|
||||
@@ -132,8 +42,8 @@ switch ($option) {
|
||||
try {
|
||||
$file = PATH_DATA . "log" . PATH_SEP . "cron.log";
|
||||
|
||||
if (file_exists( $file )) {
|
||||
unlink( $file );
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
|
||||
$response["status"] = "OK";
|
||||
@@ -148,4 +58,4 @@ switch ($option) {
|
||||
break;
|
||||
}
|
||||
|
||||
echo G::json_encode( $response );
|
||||
echo G::json_encode($response);
|
||||
|
||||
@@ -4,11 +4,11 @@ global $G_TMP_MENU;
|
||||
switch ($_GET['action']) {
|
||||
case 'saveOption':
|
||||
try {
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
$response = new $oServerConf;
|
||||
$conf = new Configurations();
|
||||
/*you can use SYS_TEMP or SYS_SYS ON AUDIT_LOG_CONF to save for each workspace*/
|
||||
if (isset( $_POST['acceptAL'] )) {
|
||||
if (isset($_POST['acceptAL'])) {
|
||||
$conf->aConfig = 'true';
|
||||
$conf->saveConfig('AUDIT_LOG', 'log');
|
||||
$response->enable = true;
|
||||
@@ -24,7 +24,6 @@ switch ($_GET['action']) {
|
||||
$response->success = false;
|
||||
$response->msg = $e->getMessage();
|
||||
}
|
||||
echo G::json_encode( $response );
|
||||
echo G::json_encode($response);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,13 +37,12 @@ $G_ID_SUB_MENU_SELECTED = 'CALENDAR';
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( 'calendarList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
|
||||
$Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
|
||||
$configPage = $c->getConfiguration('calendarList', 'pageSize', '', $_SESSION['USER_LOGGED']);
|
||||
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/calendarList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/calendarList' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'CONFIG', $Config );
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('setup/calendarList', false); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/calendarList'); //adding a html file .html.
|
||||
$oHeadPublisher->assign('CONFIG', $Config);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -29,9 +29,8 @@ if (!$resultRbac) {
|
||||
die();
|
||||
}
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/clearCompiled', true ); //adding a javascript file .js
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('setup/clearCompiled', true); //adding a javascript file .js
|
||||
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -48,43 +48,43 @@ if ($osIsLinux) {
|
||||
|
||||
//Data
|
||||
$c = new Configurations();
|
||||
$configPage = $c->getConfiguration( "cronList", "pageSize", null, $_SESSION["USER_LOGGED"] );
|
||||
$configPage = $c->getConfiguration("cronList", "pageSize", null, $_SESSION["USER_LOGGED"]);
|
||||
|
||||
$config = array ();
|
||||
$config["pageSize"] = (isset( $configPage["pageSize"] )) ? $configPage["pageSize"] : 20;
|
||||
$config = array();
|
||||
$config["pageSize"] = (isset($configPage["pageSize"])) ? $configPage["pageSize"] : 20;
|
||||
|
||||
$cronInfo = array ();
|
||||
$cronInfo = array();
|
||||
$fileLog = PATH_DATA . "log" . PATH_SEP . "cron.log";
|
||||
$fileLogSize = (file_exists( $fileLog )) ? number_format( filesize( $fileLog ) * (1 / 1024) * (1 / 1024), 4, ".", "" ) : 0;
|
||||
$fileLogSize = (file_exists($fileLog)) ? number_format(filesize($fileLog) * (1 / 1024) * (1 / 1024), 4, ".", "") : 0;
|
||||
|
||||
$cronInfo["status"] = G::LoadTranslation( (($bCronIsRunning) ? "ID_CRON_STATUS_ACTIVE" : "ID_CRON_STATUS_INACTIVE") );
|
||||
$cronInfo["lastExecution"] = (! empty( $sLastExecution )) ? $sLastExecution : "";
|
||||
$cronInfo["status"] = G::LoadTranslation((($bCronIsRunning) ? "ID_CRON_STATUS_ACTIVE" : "ID_CRON_STATUS_INACTIVE"));
|
||||
$cronInfo["lastExecution"] = (! empty($sLastExecution)) ? $sLastExecution : "";
|
||||
$cronInfo["fileLogName"] = "cron.log";
|
||||
$cronInfo["fileLogSize"] = $fileLogSize;
|
||||
$cronInfo["fileLogPath"] = $fileLog;
|
||||
|
||||
//Workspaces
|
||||
$workspaces = System::listWorkspaces();
|
||||
$arrayAux = array ();
|
||||
$arrayAux = array();
|
||||
|
||||
foreach ($workspaces as $index => $workspace) {
|
||||
$arrayAux[] = $workspace->name;
|
||||
}
|
||||
|
||||
sort( $arrayAux );
|
||||
sort($arrayAux);
|
||||
|
||||
//Status
|
||||
$arrayStatus = array (array ("ALL",G::LoadTranslation( "ID_ALL" )
|
||||
),array ("COMPLETED",G::LoadTranslation( "COMPLETED" )
|
||||
),array ("FAILED",G::LoadTranslation( "ID_FAILED" )
|
||||
$arrayStatus = array(array("ALL",G::LoadTranslation("ID_ALL")
|
||||
),array("COMPLETED",G::LoadTranslation("COMPLETED")
|
||||
),array("FAILED",G::LoadTranslation("ID_FAILED")
|
||||
)
|
||||
);
|
||||
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher->addContent( "setup/cron" ); //Adding a html file .html
|
||||
$oHeadPublisher->addExtJsScript( "setup/cron", false ); //Adding a javascript file .js
|
||||
$oHeadPublisher->assign( "CONFIG", $config );
|
||||
$oHeadPublisher->assign( "CRON", $cronInfo );
|
||||
$oHeadPublisher->assign( "STATUS", $arrayStatus );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addContent("setup/cron"); //Adding a html file .html
|
||||
$oHeadPublisher->addExtJsScript("setup/cron", false); //Adding a javascript file .js
|
||||
$oHeadPublisher->assign("CONFIG", $config);
|
||||
$oHeadPublisher->assign("CRON", $cronInfo);
|
||||
$oHeadPublisher->assign("STATUS", $arrayStatus);
|
||||
|
||||
G::RenderPage( "publish", "extJs" );
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
<?php
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP' );
|
||||
$RBAC->requirePermissions('PM_SETUP');
|
||||
|
||||
$c = new Configurations();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript( 'setup/environmentSettings', true );
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addExtJsScript('setup/environmentSettings', true);
|
||||
//$conf->aConfig['startCaseHideProcessInf']
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
$oHeadPublisher->assign('FORMATS', $c->getFormats());
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -22,26 +22,25 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
global $RBAC;
|
||||
$RBAC->requirePermissions( 'PM_SETUP' );
|
||||
$RBAC->requirePermissions('PM_SETUP');
|
||||
|
||||
$oConf = new Configurations();
|
||||
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
|
||||
$oHeadPublisher->addExtJsScript( 'setup/loginSettings', true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'setup/loginSettings' ); //adding a html file .html.
|
||||
$oHeadPublisher->addExtJsScript('setup/loginSettings', true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent('setup/loginSettings'); //adding a html file .html.
|
||||
|
||||
|
||||
$oConf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
|
||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||
|
||||
$forgotPasswd = isset( $oConf->aConfig['login_enableForgotPassword'] ) ? $oConf->aConfig['login_enableForgotPassword'] : false;
|
||||
$virtualKeyboad = isset( $oConf->aConfig['login_enableVirtualKeyboard'] ) ? $oConf->aConfig['login_enableVirtualKeyboard'] : false;
|
||||
$defaultLanguaje = isset( $oConf->aConfig['login_defaultLanguage'] ) ? $oConf->aConfig['login_defaultLanguage'] : 'en';
|
||||
$forgotPasswd = isset($oConf->aConfig['login_enableForgotPassword']) ? $oConf->aConfig['login_enableForgotPassword'] : false;
|
||||
$virtualKeyboad = isset($oConf->aConfig['login_enableVirtualKeyboard']) ? $oConf->aConfig['login_enableVirtualKeyboard'] : false;
|
||||
$defaultLanguaje = isset($oConf->aConfig['login_defaultLanguage']) ? $oConf->aConfig['login_defaultLanguage'] : 'en';
|
||||
|
||||
$oHeadPublisher->assign( 'currentLang', $defaultLanguaje );
|
||||
$oHeadPublisher->assign( 'forgotPasswd', $forgotPasswd );
|
||||
$oHeadPublisher->assign( 'virtualKeyboad', $virtualKeyboad );
|
||||
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
$oHeadPublisher->assign('currentLang', $defaultLanguaje);
|
||||
$oHeadPublisher->assign('forgotPasswd', $forgotPasswd);
|
||||
$oHeadPublisher->assign('virtualKeyboad', $virtualKeyboad);
|
||||
|
||||
G::RenderPage('publish', 'extJs');
|
||||
|
||||
@@ -1,47 +1,49 @@
|
||||
<?php
|
||||
$request = isset( $_REQUEST['request'] ) ? $_REQUEST['request'] : null;
|
||||
$request = isset($_REQUEST['request']) ? $_REQUEST['request'] : null;
|
||||
|
||||
switch ($request) {
|
||||
case 'getLangList':
|
||||
|
||||
$Translations = new Translation();
|
||||
$result = new stdClass();
|
||||
$result->rows = Array ();
|
||||
$result->rows = array();
|
||||
|
||||
$langs = $Translations->getTranslationEnvironments();
|
||||
foreach ($langs as $lang) {
|
||||
$result->rows[] = Array ('LAN_ID' => $lang['LOCALE'],'LAN_NAME' => $lang['LANGUAGE']
|
||||
$result->rows[] = array(
|
||||
'LAN_ID' => $lang['LOCALE'],
|
||||
'LAN_NAME' => $lang['LANGUAGE']
|
||||
);
|
||||
}
|
||||
|
||||
$result->rows[] = array ("LAN_ID" => "", "LAN_NAME" => G::LoadTranslation("ID_USE_LANGUAGE_URL"));
|
||||
$result->rows[] = array("LAN_ID" => "", "LAN_NAME" => G::LoadTranslation("ID_USE_LANGUAGE_URL"));
|
||||
|
||||
print (G::json_encode( $result )) ;
|
||||
print(G::json_encode($result));
|
||||
break;
|
||||
case 'saveSettings':
|
||||
$memcache = & PMmemcached::getSingleton( !empty(config("system.workspace")) ? config("system.workspace") : '' );
|
||||
$memcache = PMmemcached::getSingleton(!empty(config("system.workspace")) ? config("system.workspace") : '');
|
||||
|
||||
$conf = new Configurations();
|
||||
$conf->loadConfig( $obj, 'ENVIRONMENT_SETTINGS', '' );
|
||||
$conf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||
|
||||
$conf->aConfig['login_enableForgotPassword'] = isset( $_REQUEST['forgotPasswd'] );
|
||||
$conf->aConfig['login_enableVirtualKeyboard'] = isset( $_REQUEST['virtualKeyboad'] );
|
||||
$conf->aConfig['login_defaultLanguage'] = isset( $_REQUEST['lang'] ) ? $_REQUEST['lang'] : 'en';
|
||||
$conf->aConfig['login_enableForgotPassword'] = isset($_REQUEST['forgotPasswd']);
|
||||
$conf->aConfig['login_enableVirtualKeyboard'] = isset($_REQUEST['virtualKeyboad']);
|
||||
$conf->aConfig['login_defaultLanguage'] = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : 'en';
|
||||
|
||||
$conf->saveConfig( 'ENVIRONMENT_SETTINGS', '' );
|
||||
$conf->saveConfig('ENVIRONMENT_SETTINGS', '');
|
||||
|
||||
$lang = isset( $_REQUEST['lang'] ) ? $_REQUEST['lang'] : 'en';
|
||||
$lang = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : 'en';
|
||||
//remove from memcache when this value is updated/created
|
||||
$memcache->delete( 'flagForgotPassword' );
|
||||
$memcache->delete('flagForgotPassword');
|
||||
|
||||
$response = new stdclass();
|
||||
$response->success = true;
|
||||
|
||||
$messEnableForgotPassword = (isset($conf->aConfig["login_enableForgotPassword"]) && $conf->aConfig["login_enableForgotPassword"] == "1")? G::LoadTranslation("ID_YES") : G::LoadTranslation("ID_NO");
|
||||
G::auditLog("UpdateLoginSettings", "DefaultLanguage-> " . $lang . " EnableForgotPassword-> " . $messEnableForgotPassword);
|
||||
$messEnableForgotPassword = (isset($conf->aConfig["login_enableForgotPassword"]) && $conf->aConfig["login_enableForgotPassword"] == "1") ? G::LoadTranslation("ID_YES") : G::LoadTranslation("ID_NO");
|
||||
G::auditLog("UpdateLoginSettings",
|
||||
"DefaultLanguage-> " . $lang . " EnableForgotPassword-> " . $messEnableForgotPassword);
|
||||
|
||||
echo G::json_encode( $response );
|
||||
echo G::json_encode($response);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,28 +22,27 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
$RBAC->requirePermissions( 'PM_SETUP', 'PM_USERS' );
|
||||
$RBAC->requirePermissions('PM_SETUP', 'PM_USERS');
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if (isset( $_GET['i18'] ))
|
||||
$_SESSION['DEV_FLAG'] = $_SESSION['TOOLS_VIEWTYPE'] = isset( $_GET['i18'] );
|
||||
else {
|
||||
unset( $_SESSION['DEV_FLAG'] );
|
||||
unset( $_SESSION['TOOLS_VIEWTYPE'] );
|
||||
if (isset($_GET['i18'])) {
|
||||
$_SESSION['DEV_FLAG'] = $_SESSION['TOOLS_VIEWTYPE'] = isset($_GET['i18']);
|
||||
} else {
|
||||
unset($_SESSION['DEV_FLAG']);
|
||||
unset($_SESSION['TOOLS_VIEWTYPE']);
|
||||
}
|
||||
|
||||
if (isset( $_GET['s'] ))
|
||||
if (isset($_GET['s'])) {
|
||||
$_SESSION['ADMIN_SELECTED'] = $_GET['s'];
|
||||
else {
|
||||
unset( $_SESSION['ADMIN_SELECTED'] );
|
||||
} else {
|
||||
unset($_SESSION['ADMIN_SELECTED']);
|
||||
}
|
||||
|
||||
$G_PUBLISH->AddContent( 'view', 'setup/main_Load' );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$G_PUBLISH->AddContent('view', 'setup/main_Load');
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
G::RenderPage('publish');
|
||||
|
||||
@@ -22,32 +22,32 @@
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
|
||||
$RBAC->requirePermissions( "PM_SETUP", "PM_USERS" );
|
||||
$RBAC->requirePermissions("PM_SETUP", "PM_USERS");
|
||||
|
||||
///////
|
||||
$adminSelected = null;
|
||||
|
||||
if (isset( $_REQUEST["s"] )) {
|
||||
if (isset($_REQUEST["s"])) {
|
||||
$adminSelected = $_REQUEST["s"];
|
||||
} else {
|
||||
if (isset( $_SESSION["ADMIN_SELECTED"] )) {
|
||||
if (isset($_SESSION["ADMIN_SELECTED"])) {
|
||||
$adminSelected = $_SESSION["ADMIN_SELECTED"];
|
||||
}
|
||||
}
|
||||
|
||||
///////
|
||||
$oHeadPublisher = &headPublisher::getSingleton();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
|
||||
global $G_TMP_MENU;
|
||||
|
||||
$oMenu = new Menu();
|
||||
$oMenu->load( "setup" );
|
||||
$items = array ();
|
||||
$oMenu->load("setup");
|
||||
$items = array();
|
||||
|
||||
$menuTypes = array_unique( $oMenu->Types );
|
||||
$menuTypes = array_unique($oMenu->Types);
|
||||
foreach ($menuTypes as $i => $v) {
|
||||
if ($v == "admToolsContent") {
|
||||
unset( $menuTypes[$i] );
|
||||
unset($menuTypes[$i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -55,18 +55,18 @@ foreach ($menuTypes as $i => $v) {
|
||||
//sort($menuTypes);
|
||||
|
||||
|
||||
$tabItems = array ();
|
||||
$tabItems = array();
|
||||
$i = 0;
|
||||
|
||||
foreach ($menuTypes as $menuType) {
|
||||
$tabItems[$i] = new stdclass();
|
||||
$tabItems[$i]->id = $menuType;
|
||||
$LABEL_TRANSLATION = G::LoadTranslation( "ID_" . strtoupper( $menuType ) );
|
||||
$LABEL_TRANSLATION = G::LoadTranslation("ID_" . strtoupper($menuType));
|
||||
|
||||
if (substr( $LABEL_TRANSLATION, 0, 2 ) !== "**") {
|
||||
if (substr($LABEL_TRANSLATION, 0, 2) !== "**") {
|
||||
$title = $LABEL_TRANSLATION;
|
||||
} else {
|
||||
$title = str_replace( "_", " ", ucwords( $menuType ) );
|
||||
$title = str_replace("_", " ", ucwords($menuType));
|
||||
}
|
||||
|
||||
$tabItems[$i]->title = $title;
|
||||
@@ -79,38 +79,37 @@ $tabActive = "";
|
||||
if ($adminSelected != null) {
|
||||
foreach ($oMenu->Options as $i => $option) {
|
||||
if ($oMenu->Id[$i] == $adminSelected) {
|
||||
$tabActive = (in_array( $oMenu->Types[$i], array ("","admToolsContent"
|
||||
) )) ? "plugins" : $oMenu->Types[$i];
|
||||
$tabActive = (in_array($oMenu->Types[$i], array("","admToolsContent"
|
||||
))) ? "plugins" : $oMenu->Types[$i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////
|
||||
$oHeadPublisher->addExtJsScript( "setup/main", true ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( "setup/main" ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( "tabActive", $tabActive );
|
||||
$oHeadPublisher->assign( "tabItems", $tabItems );
|
||||
$oHeadPublisher->assign( "_item_selected", (($adminSelected != null) ? $adminSelected : "") );
|
||||
$oHeadPublisher->addExtJsScript("setup/main", true); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent("setup/main"); //adding a html file .html.
|
||||
$oHeadPublisher->assign("tabActive", $tabActive);
|
||||
$oHeadPublisher->assign("tabItems", $tabItems);
|
||||
$oHeadPublisher->assign("_item_selected", (($adminSelected != null) ? $adminSelected : ""));
|
||||
|
||||
$oServerConf = & ServerConf::getSingleton();
|
||||
if ($oServerConf->isRtl( SYS_LANG )) {
|
||||
$oServerConf = ServerConf::getSingleton();
|
||||
if ($oServerConf->isRtl(SYS_LANG)) {
|
||||
$regionTreePanel = 'east';
|
||||
$regionDebug = 'west';
|
||||
} else {
|
||||
$regionTreePanel = 'west';
|
||||
$regionDebug = 'east';
|
||||
}
|
||||
$oHeadPublisher->assign( 'regionTreePanel', $regionTreePanel );
|
||||
$oHeadPublisher->assign('regionTreePanel', $regionTreePanel);
|
||||
|
||||
G::RenderPage( "publish", "extJs" );
|
||||
G::RenderPage("publish", "extJs");
|
||||
|
||||
//this patch enables the load of the plugin list panel inside de main admin panel iframe
|
||||
if (isset( $_GET["action"] ) && $_GET["action"] == "pluginsList") {
|
||||
if (isset($_GET["action"]) && $_GET["action"] == "pluginsList") {
|
||||
echo "
|
||||
<script type=\"text/javascript\">
|
||||
document.getElementById(\"setup-frame\").src = \"pluginsList\";
|
||||
</script>
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user