Merge remote-tracking branch 'origin/feature/HOR-3559' into bugfix/HOR-2933-B
This commit is contained in:
@@ -1,413 +0,0 @@
|
||||
<?php
|
||||
ini_set( "soap.wsdl_cache_enabled", "0" ); // disabling WSDL cache
|
||||
|
||||
|
||||
$wsdl = PATH_METHODS . "services" . PATH_SEP . "pmos.wsdl";
|
||||
|
||||
function login ($params)
|
||||
{
|
||||
$ws = new wsBase();
|
||||
$res = $ws->login( $params->userid, $params->password );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function ProcessList ($params)
|
||||
{
|
||||
$x = ifPermission( $params->sessionId, 'PM_FACTORY' );
|
||||
//if you are not an admin user, then this function will return only
|
||||
//your valid process
|
||||
if ($x == 0) {
|
||||
$oSessions = new Sessions();
|
||||
$session = $oSessions->getSessionUser( $params->sessionId );
|
||||
$userId = $session['USR_UID'];
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->processListVerified( $userId );
|
||||
return $res;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->processList();
|
||||
return array ("processes" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function RoleList ($params)
|
||||
{
|
||||
$x = ifPermission( $params->sessionId, 'PM_USERS' );
|
||||
if ($x == 0) {
|
||||
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->roleList();
|
||||
return array ("roles" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function GroupList ($params)
|
||||
{
|
||||
$x = ifPermission( $params->sessionId, 'PM_USERS' );
|
||||
if ($x == 0) {
|
||||
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->groupList();
|
||||
return array ("groups" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function CaseList ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
return new wsResponse( 9, G::LoadTranslation('ID_SESSION_EXPIRED') );
|
||||
}
|
||||
|
||||
$oSessions = new Sessions();
|
||||
$session = $oSessions->getSessionUser( $params->sessionId );
|
||||
$userId = $session['USR_UID'];
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->caseList( $userId );
|
||||
return array ("cases" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function UserList ($params)
|
||||
{
|
||||
$x = ifPermission( $params->sessionId, 'PM_USERS' );
|
||||
if ($x == 0) {
|
||||
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->userList();
|
||||
return array ("users" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function SendMessage ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
$ws = new wsBase();
|
||||
$res = $ws->sendMessage( $params->caseId, $params->from, $params->to, $params->cc, $params->bcc, $params->subject, $params->template );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function getCaseInfo ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, "You do not have privileges" );
|
||||
return $result;
|
||||
}
|
||||
$ws = new wsBase();
|
||||
$res = $ws->getCaseInfo( $params->caseId, $params->delIndex );
|
||||
return $res;
|
||||
}
|
||||
|
||||
function SendVariables ($params)
|
||||
{
|
||||
|
||||
$filter = new InputFilter();
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
$ws = new wsBase();
|
||||
$variables = $params->variables;
|
||||
if (is_object( $variables )) {
|
||||
$Fields[$variables->name] = $variables->value;
|
||||
}
|
||||
|
||||
if (is_array( $variables )) {
|
||||
foreach ($variables as $key => $val) {
|
||||
$name = $val->name;
|
||||
$value = $val->value;
|
||||
$val->name = $filter->validateInput($val->name);
|
||||
$val->value = $filter->validateInput($val->value);
|
||||
eval( '$Fields[ ' . $val->name . ' ]= $val->value ;' );
|
||||
}
|
||||
}
|
||||
$params->variables = $Fields;
|
||||
$res = $ws->sendVariables( $params->caseId, $params->variables );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function GetVariables ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
|
||||
$res = $ws->getVariables( $params->caseId, $params->variables );
|
||||
return array ("variables" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function DerivateCase ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$oSession = new Sessions();
|
||||
$user = $oSession->getSessionUser( $params->sessionId );
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->derivateCase( $user['USR_UID'], $params->caseId, $params->delIndex );
|
||||
return $res;
|
||||
|
||||
//return $res->getPayloadArray ( );
|
||||
}
|
||||
|
||||
function executeTrigger ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$oSession = new Sessions();
|
||||
$user = $oSession->getSessionUser( $params->sessionId );
|
||||
|
||||
$ws = new wsBase();
|
||||
$delIndex = (isset( $params->delIndex )) ? $params->delIndex : 1;
|
||||
$res = $ws->executeTrigger( $user['USR_UID'], $params->caseId, $params->triggerIndex, $delIndex );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function NewCaseImpersonate ($params)
|
||||
{
|
||||
$filter = new InputFilter();
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
$ws = new wsBase();
|
||||
$variables = $params->variables;
|
||||
foreach ($variables as $key => $val) {
|
||||
$name = $val->name;
|
||||
$value = $val->value;
|
||||
$val->name = $filter->validateInput($val->name);
|
||||
$val->value = $filter->validateInput($val->value);
|
||||
eval( '$Fields[ ' . $val->name . ' ]= $val->value ;' );
|
||||
}
|
||||
$params->variables = $Fields;
|
||||
$res = $ws->newCaseImpersonate( $params->processId, $params->userId, $params->variables );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function NewCase ($params)
|
||||
{
|
||||
$filter = new InputFilter();
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$oSessions = new Sessions();
|
||||
$session = $oSessions->getSessionUser( $params->sessionId );
|
||||
$userId = $session['USR_UID'];
|
||||
$variables = $params->variables;
|
||||
|
||||
if (! isset( $params->variables )) {
|
||||
$variables = array ();
|
||||
$Fields = array ();
|
||||
} else {
|
||||
if (is_object( $variables )) {
|
||||
/*foreach ( $variables as $key=>$val ) {
|
||||
$name = $val->name;
|
||||
$value = $val->value;
|
||||
$Fields[ $val->name ]= $val->value ;
|
||||
}*/
|
||||
$Fields[$variables->name] = $variables->value;
|
||||
}
|
||||
|
||||
if (is_array( $variables )) {
|
||||
foreach ($variables as $key => $val) {
|
||||
$name = $val->name;
|
||||
$value = $val->value;
|
||||
if (! is_object( $val->value )) {
|
||||
$val->name = $filter->validateInput($val->name);
|
||||
$val->value = $filter->validateInput($val->value);
|
||||
eval( '$Fields[ ' . $val->name . ' ]= $val->value ;' );
|
||||
} else {
|
||||
if (is_array( $val->value->item )) {
|
||||
$i = 1;
|
||||
foreach ($val->value->item as $key1 => $val1) {
|
||||
if (isset( $val1->value )) {
|
||||
if (is_array( $val1->value->item )) {
|
||||
foreach ($val1->value->item as $key2 => $val2) {
|
||||
$Fields[$val->name][$i][$val2->key] = $val2->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$i ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$params->variables = $Fields;
|
||||
//$result = new wsResponse (900, print_r($params->variables,1));
|
||||
//return $result;
|
||||
$ws = new wsBase();
|
||||
$res = $ws->newCase( $params->processId, $userId, $params->taskId, $params->variables );
|
||||
return $res;
|
||||
}
|
||||
|
||||
function AssignUserToGroup ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_USERS' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
$sessions = new Sessions();
|
||||
$user = $sessions->getSessionUser( $params->sessionId );
|
||||
if (! is_array( $user )) {
|
||||
return new wsResponse( 3, G::LoadTranslation('ID_USER_NOT_REGISTERED_SYSTEM') );
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->assignUserToGroup( $params->userId, $params->groupId );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function CreateUser ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_USERS' );
|
||||
if ($x == 0) {
|
||||
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
$ws = new wsBase();
|
||||
$res = $ws->createUser( $params->userId, $params->firstname, $params->lastname, $params->email, $params->role, $params->password );
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
function TaskList ($params)
|
||||
{
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$oSessions = new Sessions();
|
||||
$session = $oSessions->getSessionUser( $params->sessionId );
|
||||
$userId = $session['USR_UID'];
|
||||
$res = $ws->taskList( $userId );
|
||||
return array ("tasks" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function TaskCase ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
$x = ifPermission( $params->sessionId, 'PM_CASES' );
|
||||
if ($x == 0) {
|
||||
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
return $result;
|
||||
}
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->taskCase( $params->caseId );
|
||||
return array ("taskCases" => $res
|
||||
);
|
||||
}
|
||||
|
||||
function ReassignCase ($params)
|
||||
{
|
||||
ifSessionExpiredBreakThis( $params->sessionId );
|
||||
|
||||
$ws = new wsBase();
|
||||
$res = $ws->reassignCase( $params->sessionId, $params->caseId, $params->delIndex, $params->userIdSource, $params->userIdTarget );
|
||||
return $res;
|
||||
}
|
||||
|
||||
function ifSessionExpiredBreakThis ($sessionId)
|
||||
{ #added By Erik AO <erik@colosa.com> in datetime 26.06.2008 10:00:00
|
||||
|
||||
$oSessions = new Sessions();
|
||||
$session = $oSessions->verifySession( $sessionId );
|
||||
if ($session == '') {
|
||||
return new wsResponse( 9, G::LoadTranslation('ID_SESSION_EXPIRED') );
|
||||
}
|
||||
}
|
||||
|
||||
function ifPermission ($sessionId, $permission)
|
||||
{
|
||||
global $RBAC;
|
||||
$RBAC->initRBAC();
|
||||
$oSession = new Sessions();
|
||||
$user = $oSession->getSessionUser( $sessionId );
|
||||
|
||||
$oRBAC = RBAC::getSingleton();
|
||||
$oRBAC->loadUserRolePermission( $oRBAC->sSystem, $user['USR_UID'] );
|
||||
$aPermissions = $oRBAC->aUserInfo[$oRBAC->sSystem]['PERMISSIONS'];
|
||||
$sw = 0;
|
||||
foreach ($aPermissions as $aPermission) {
|
||||
if ($aPermission['PER_CODE'] == $permission) {
|
||||
$sw = 1;
|
||||
}
|
||||
}
|
||||
return $sw;
|
||||
}
|
||||
$server = new SoapServer( $wsdl );
|
||||
$server->addFunction( "Login" );
|
||||
$server->addFunction( "ProcessList" );
|
||||
$server->addFunction( "CaseList" );
|
||||
$server->addFunction( "RoleList" );
|
||||
$server->addFunction( "GroupList" );
|
||||
$server->addFunction( "UserList" );
|
||||
$server->addFunction( "SendMessage" );
|
||||
$server->addFunction( "SendVariables" );
|
||||
$server->addFunction( "GetVariables" );
|
||||
$server->addFunction( "DerivateCase" );
|
||||
$server->addFunction( "executeTrigger" );
|
||||
$server->addFunction( "NewCaseImpersonate" );
|
||||
$server->addFunction( "NewCase" );
|
||||
$server->addFunction( "AssignUserToGroup" );
|
||||
$server->addFunction( "CreateUser" );
|
||||
$server->addFunction( "getCaseInfo" );
|
||||
$server->addFunction( "TaskList" );
|
||||
$server->addFunction( "TaskCase" );
|
||||
$server->addFunction( "ReassignCase" );
|
||||
|
||||
$server->handle();
|
||||
|
||||
@@ -654,83 +654,57 @@ function NewCaseImpersonate ($params)
|
||||
return $res;
|
||||
}
|
||||
|
||||
function NewCase ($params)
|
||||
/**
|
||||
* Begins a new case under the name of the logged-in user.
|
||||
* Where the parameter value is:
|
||||
* - string sessionId: The ID of the session, which is obtained during login.
|
||||
* - string processId: The ID of the process where the case should start, which
|
||||
* can be obtained with processList().
|
||||
* - string taskId: The ID of the task where the case should start. This will
|
||||
* generally be the first task in a process, which can be obtained with taskList().
|
||||
* - array variables: An array of variableStruct objects which contain information
|
||||
* to start the case. This array has the following format.
|
||||
*
|
||||
* @param object $params
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
function NewCase($params)
|
||||
{
|
||||
$filter = new InputFilter();
|
||||
$parseSoapVariableVame = new ParseSoapVariableName();
|
||||
|
||||
$vsResult = isValidSession( $params->sessionId );
|
||||
$vsResult = isValidSession($params->sessionId);
|
||||
|
||||
if ($vsResult->status_code !== 0) {
|
||||
return $vsResult;
|
||||
}
|
||||
|
||||
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
|
||||
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
|
||||
if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
|
||||
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$oSession = new Sessions();
|
||||
$session = $oSession->getSessionUser( $params->sessionId );
|
||||
$userId = $session["USR_UID"];
|
||||
$session = $oSession->getSessionUser($params->sessionId);
|
||||
$userId = $session['USR_UID'];
|
||||
$variables = $params->variables;
|
||||
|
||||
/* this code is for previous version of ws, and apparently this will work for grids inside the variables..
|
||||
if (!isset($params->variables) ) {
|
||||
$variables = array();
|
||||
$field = array();
|
||||
}
|
||||
else {
|
||||
if ( is_object ($variables) ) {
|
||||
$field[ $variables->name ]= $variables->value ;
|
||||
}
|
||||
$field = array();
|
||||
|
||||
if ( is_array ( $variables) ) {
|
||||
foreach ( $variables as $key=>$val ) {
|
||||
$name = $val->name;
|
||||
$value = $val->value;
|
||||
if (!is_object($val->value))
|
||||
{
|
||||
eval('$field[ ' . $val->name . ' ]= $val->value ;');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_array($val->value->item)) {
|
||||
$i = 1;
|
||||
foreach ($val->value->item as $key1 => $val1) {
|
||||
if (isset($val1->value)) {
|
||||
if (is_array($val1->value->item)) {
|
||||
foreach ($val1->value->item as $key2 => $val2) {
|
||||
$field[$val->name][$i][$val2->key] = $val2->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$variables = $params->variables;
|
||||
|
||||
$field = array ();
|
||||
|
||||
if ($variables->name === "__POST_VARIABLES__") {
|
||||
if (is_object($variables) && $variables->name === '__POST_VARIABLES__') {
|
||||
$field = G::json_decode($variables->value, true);
|
||||
$variables = null;
|
||||
}
|
||||
|
||||
if (is_object( $variables )) {
|
||||
if (is_object($variables)) {
|
||||
$field[$variables->name] = $variables->value;
|
||||
}
|
||||
|
||||
if (is_array( $variables )) {
|
||||
foreach ($variables as $key => $val) {
|
||||
if (! is_object( $val->value )) {
|
||||
@eval( "\$field[" . $val->name . "]= \$val->value;" );
|
||||
if (is_array($variables)) {
|
||||
foreach ($variables as $val) {
|
||||
if (!is_object($val->value)) {
|
||||
$parseSoapVariableVame->buildVariableName($field, $val->name, $val->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -739,10 +713,10 @@ function NewCase ($params)
|
||||
|
||||
$ws = new wsBase();
|
||||
|
||||
$res = $ws->newCase($params->processId, $userId, $params->taskId, $params->variables, (isset($params->executeTriggers))? (int)($params->executeTriggers) : 0);
|
||||
$res = $ws->newCase($params->processId, $userId, $params->taskId, $params->variables, (isset($params->executeTriggers)) ? (int) ($params->executeTriggers) : 0);
|
||||
|
||||
// we need to register the case id for a stored session variable. like a normal Session.
|
||||
$oSession->registerGlobal( "APPLICATION", $res->caseId );
|
||||
$oSession->registerGlobal('APPLICATION', $res->caseId);
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
$filewsdl = PATH_METHODS . 'services' . PATH_SEP . 'pmos.wsdl';
|
||||
$content = file_get_contents( $filewsdl );
|
||||
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
||||
|
||||
$endpoint = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/sys' . SYS_SYS . '/' . $lang . '/classic/services/soap';
|
||||
//print $endpoint; die;
|
||||
$content = str_replace( "___SOAP_ADDRESS___", $endpoint, $content );
|
||||
|
||||
header( "Content-Type: application/xml;" );
|
||||
|
||||
print $content;
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* control.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->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
//G::header('location: ../login/login');
|
||||
die();
|
||||
}
|
||||
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
//$G_SUB_MENU = 'setup';
|
||||
$G_ID_MENU_SELECTED = 'SETUP';
|
||||
//$G_ID_SUB_MENU_SELECTED = 'WEBSERVICES';
|
||||
|
||||
|
||||
if (! extension_loaded( 'soap' )) {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'setup/wsMessage' );
|
||||
G::RenderPage( "publish" );
|
||||
} else {
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'setup/webServicesTree' );
|
||||
$G_PUBLISH->AddContent( 'smarty', 'groups/groups_usersList', '', '', array () );
|
||||
|
||||
G::RenderPage( "publish-treeview", 'blank' );
|
||||
}
|
||||
|
||||
$link_Edit = G::encryptlink( 'webServicesSetup' );
|
||||
$link_List = G::encryptlink( 'webServicesList' );
|
||||
|
||||
?>
|
||||
<script>
|
||||
document.body.style.backgroundColor="#fff";
|
||||
var oAux = document.getElementById("publisherContent[0]");
|
||||
oAux.id = "publisherContent[666]";
|
||||
var currentGroup=false;
|
||||
|
||||
function webServicesSetup(){
|
||||
popupWindow('' , '<?php echo $link_Edit ?>' , 500 , 225 );
|
||||
}
|
||||
|
||||
function showFormWS( uid, element ){
|
||||
|
||||
currentGroup = uid;
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../setup/webServicesAjax',
|
||||
async : false,
|
||||
method: 'POST',
|
||||
args : 'action=showForm&wsID=' + uid
|
||||
});
|
||||
oRPC.make();
|
||||
document.getElementById('spanUsersList').innerHTML = oRPC.xmlhttp.responseText;
|
||||
if ((uid == 'NewCase') || (uid == 'NewCaseImpersonate')) {
|
||||
var scs=oRPC.xmlhttp.responseText.extractScript();scs.evalScript();
|
||||
}
|
||||
}
|
||||
function execWebService( uid) {
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../setup/webServicesAjax',
|
||||
async : true,
|
||||
method: 'POST',
|
||||
args : 'action=execWebService&wsID=' + uid
|
||||
});
|
||||
|
||||
oRPC.callback = function(rpc) {
|
||||
|
||||
var scs = rpc.xmlhttp.responseText.extractScript();
|
||||
document.getElementById('spanUsersList').innerHTML = rpc.xmlhttp.responseText;
|
||||
scs.evalScript();
|
||||
|
||||
}.extend(this);
|
||||
|
||||
oRPC.make();
|
||||
|
||||
}
|
||||
|
||||
submitThisForm = function(oForm) {
|
||||
var oAux;
|
||||
var bContinue = true;
|
||||
if(bContinue) {
|
||||
result = ajax_post(oForm.action, oForm, 'POST', function(response){
|
||||
var scs = response.extractScript();
|
||||
document.getElementById('spanUsersList').innerHTML = response;
|
||||
scs.evalScript();
|
||||
});
|
||||
refreshTree();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
function callbackWebService( ) {
|
||||
/*
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../setup/webServicesAjax',
|
||||
async : false,
|
||||
method: 'POST',
|
||||
args : 'action=execWebService&wsID=' + uid
|
||||
});
|
||||
oRPC.make();
|
||||
document.getElementById('spanUsersList').innerHTML = oRPC.xmlhttp.responseText;
|
||||
*/
|
||||
document.getElementById('spanUsersList').innerHTML = 'hola';
|
||||
}
|
||||
function saveGroup( form ) {
|
||||
ajax_post( form.action, form, 'POST' );
|
||||
currentPopupWindow.remove();
|
||||
refreshTree();
|
||||
}
|
||||
|
||||
function refreshTree(){
|
||||
tree.refresh( document.getElementById("publisherContent[666]") , '<?php echo $link_List ?>');
|
||||
}
|
||||
|
||||
function showDetails(){
|
||||
var oRPC = new leimnud.module.rpc.xmlhttp({
|
||||
url : '../setup/webServicesAjax',
|
||||
async : false,
|
||||
method: 'POST',
|
||||
args : 'action=showDetails'
|
||||
});
|
||||
oRPC.make();
|
||||
document.getElementById('spanUsersList').innerHTML = oRPC.xmlhttp.responseText;
|
||||
}
|
||||
showDetails();
|
||||
|
||||
function showUploadFilesForm(){
|
||||
oIFrame = window.document.createElement('iframe');
|
||||
oIFrame.style.border = '0';
|
||||
oIFrame.style.width = '700px';
|
||||
oIFrame.style.height = '400px';
|
||||
oIFrame.src = 'webServicesAjax?action=showUploadFilesForm&';
|
||||
document.getElementById('spanUsersList').innerHTML = '';
|
||||
document.getElementById('spanUsersList').appendChild(oIFrame);
|
||||
}
|
||||
</script>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* webServicesList.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->userCanAccess( 'PM_SETUP' ) != 1 && $RBAC->userCanAccess( 'PM_FACTORY' ) != 1) {
|
||||
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
||||
//G::header('location: ../login/login');
|
||||
die();
|
||||
}
|
||||
|
||||
//G::genericForceLogin( 'WF_MYINFO' , 'login/noViewPage', $urlLogin = 'login/login' );
|
||||
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'setup/webServicesTree' );
|
||||
G::RenderPage( "publish-raw", "raw" );
|
||||
|
||||
Reference in New Issue
Block a user