Exemplo n.º 1
0
        if (!$this->isMyTicket($ticket)) {
            $this->failJson("Access Denied", "This is not your file!");
        }
        $this->mailCompany($ticket['company_id'], "[#{$ticket['id']}] Attachment Sent: {$file['file_title']}", "Please find the following attachment: {$file['file_title']}", $ticket['queue_id'], $file['file_loc']);
        $json = [];
        $json['gtitle'] = "File E-mailed";
        $json['gbody'] = "File emailed to email address on file.";
        $json['action'] = 'reassignsource';
        $json['elementval'] = "<i class='icon-share'></i>";
        $this->jsone('success', $json);
    }
}
// class
$mod = new ticket();
if (isset($_GET['view'])) {
    $mod->showTicket($_GET);
} else {
    if (isset($_POST['createReply'])) {
        $mod->saveReply($_POST);
    } else {
        if (isset($_POST['createAttachment'])) {
            $mod->saveAttachment($_POST);
        } else {
            if (isset($_GET['close'])) {
                $mod->closeTicket($_GET);
            } else {
                if (isset($_POST['updateStanding'])) {
                    $mod->updateStanding($_POST);
                } else {
                    if (isset($_POST['addTask'])) {
                        $mod->addTask($_POST);