Exemple #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;
}
Exemple #2
0
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;
    }
    G::LoadClass('wsBase');
    $ws = new wsBase();
    $res = $ws->taskCase($params->caseId);
    return array("taskCases" => $res);
}
Exemple #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, 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;
}
Exemple #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, "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;
}
Exemple #5
0
function TaskCase($params)
{
    ifSessionExpiredBreakThis($params->sessionId);
    $x = ifPermission($params->sessionId, 'PM_CASES');
    if ($x == 0) {
        $result[] = array('guid' => 24, 'name' => 'You do not have privileges');
        return $result;
    }
    G::LoadClass('wsBase');
    $ws = new wsBase();
    $res = $ws->taskCase($params->caseId);
    return array("taskCases" => $res);
}
Exemple #6
0
function TaskCase($params)
{
    $vsResult = isValidSession($params->sessionId);
    if ($vsResult->status_code !== 0) {
        $o->guid = $vsResult->status_code . ' ' . $vsResult->message;
        $o->name = '';
        return array("taskCases" => $o);
    }
    if (ifPermission($params->sessionId, 'PM_CASES') == 0) {
        $o->guid = "2 Insufficient privileges to execute this function";
        $o->name = '';
        return array("taskCases" => $o);
    }
    $ws = new wsBase();
    $res = $ws->taskCase($params->caseId);
    return array("taskCases" => $res);
}