예제 #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
파일: index.php 프로젝트: wborbajr/VolvoApp
// 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;
}