Exemplo n.º 1
0
         if (F1DeskUtils::isAttached($_POST['IDTicket'], $IDAttached)) {
             ErrorHandler::setNotice('ticket', ALREADY_ATTACHED, 'error');
         } else {
             $ObjTicket->attachTicket($_POST['IDTicket'], $IDAttached);
             ErrorHandler::setNotice('ticket', SUCESS_ATTACHING, 'ok');
         }
     }
     break;
 case 'changeDepartment':
     if (!$isSupporter) {
         throw new ErrorHandler(INVALID_OPTION);
     }
     if (!is_numeric($_POST['IDTicket']) || !is_numeric($_POST['IDDepartment'])) {
         ErrorHandler::setNotice('ticket', EXC_GLOBAL_EXPPARAM, 'error');
     } else {
         $BoReturn = $ObjTicket->changeDepartment($_POST['IDTicket'], $_POST['IDDepartment']);
         if (!$BoReturn) {
             ErrorHandler::setNotice('ticket', EXC_ERR_CHANGE, 'error');
         } else {
             ErrorHandler::setNotice('ticket', SUCESS_CHANGEDEPARTMENT, 'ok');
         }
     }
     break;
 case 'setOwner':
     if (!$isSupporter) {
         throw new ErrorHandler(INVALID_OPTION);
     }
     if (!is_numeric($_POST['IDTicket']) || !is_numeric($_POST['IDSupporter'])) {
         ErrorHandler::setNotice('ticket', EXC_GLOBAL_EXPPARAM, 'error');
     } else {
         $Ticket = new TicketHandler();