Пример #1
0
function claimCase($params)
{
    $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'));
        return $result;
    }
    G::LoadClass('sessions');
    $oSessions = new Sessions();
    $session = $oSessions->getSessionUser($params->sessionId);
    $ws = new wsBase();
    $res = $ws->claimCase($session['USR_UID'], $params->guid, $params->delIndex);
    return $res;
}
Пример #2
0
// 5 min
session_cache_expire(20);
session_start();
// the requre lines include the lib and api source files
require "lib.php";
require "common.php";
require "apiCOMMON.php";
require "apiCRM.php";
require "apiIORDER.php";
require "apiCEP.php";
require "apiDASHBOARD.php";
require "apiPM.php";
// this instructs the client that the server will output JSON data
// header("Content-Type: application/json; charset=utf-8");
// Verifica se é uma sessao valida.
isValidSession($_POST, $_SERVER);
// the functions you call inside the switch are found in the api.php file
switch ($_POST['action']) {
    // ------
    // ------ COMMON ----------
    // ---------------------
    case "APP_assina":
        APP_assina($_FILES, $_SERVER);
        break;
    case "APP_login":
        APP_login($_POST, $_SERVER);
        break;
    case "APP_logout":
        APP_logout($_POST, $_SERVER);
        break;
    case "APP_cargo":
Пример #3
0
function addCaseNote($params)
{
    $result = isValidSession($params->sessionId);
    if ($result->status_code != 0) {
        return $result;
    }
    if (ifPermission($params->sessionId, "PM_CASES") == 0) {
        $result = new wsResponse(2, "You do not have privileges");
        return $result;
    }
    $ws = new wsBase();
    $result = $ws->addCaseNote($params->caseUid, $params->processUid, $params->taskUid, $params->userUid, $params->note, isset($params->sendMail) ? $params->sendMail : 1);
    return $result;
}
Пример #4
0
function addCaseNote($params)
{
    $result = isValidSession($params->sessionId);
    if ($result->status_code != 0) {
        return $result;
    }
    if (ifPermission($params->sessionId, "PM_CASES") == 0) {
        $result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
        return $result;
    }
    $ws = new wsBase();
    $result = $ws->addCaseNote($params->caseUid, $params->processUid, $params->taskUid, $params->userUid, $params->note, isset($params->sendMail) ? $params->sendMail : 1);
    return $result;
}
Пример #5
0
function removeUserFromGroup($params)
{
    $vsResult = isValidSession($params->sessionId);
    if ($vsResult->status_code !== 0) {
        return $vsResult;
    }
    $ws = new wsBase();
    $res = $ws->removeUserFromGroup($params->userId, $params->groupId);
    return $res;
}