예제 #1
0
    case -1:
        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");
    die;
}
/* Includes */
G::LoadClass('case');
$oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation();
$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']);
} else {
    G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error');
}
die('<script type="text/javascript">
      if (window.parent.frames.length != 0) {
        parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
      }
      else {
        window.location = "../cases/cases_Open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
      }
      </script>');
예제 #2
0
    /**

     * ClaimCase

     *

     * @param string $userId

     * @param string $guid

     * @param string $delIndex

     * @return $result will return an object

     */

    public function claimCase($userId, $guid, $delIndex)

    {

        try {

            G::LoadClass('case');

            $oCase = new Cases();

            $oCase->loadCase($guid);

            $oCase->setCatchUser($guid, $delIndex, $userId);



            $result = new wsResponse(0, G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY"));

            return $result;

        } catch (Exception $e) {



            $result = new wsResponse(100, $e->getMessage());

            return $result;

        }

    }