$filenameparts = explode(".", $filename); $extension = end($filenameparts); $filename = implode(array_slice($filenameparts, 0, 0 - 1)); $filename = preg_replace("/[^a-zA-Z0-9-_ ]/", "", $filename); $filename .= "." . $extension; $validextension = checkTicketAttachmentExtension($filename); if (!$validextension) { $errormessage .= "<li>" . $_LANG['supportticketsfilenotallowed']; continue; } continue; } } } if (!$errormessage) { $attachments = uploadTicketAttachments(); $from = array("name" => $replyname, "email" => $replyemail); AddReply($id, $_SESSION['uid'], $_SESSION['cid'], $replymessage, "", $attachments, $from); redir("tid=" . $tid . "&c=" . $c); } } $id = $data['id']; $userid = $data['userid']; $contactid = $data['contactid']; $deptid = $data['did']; $date = $data['date']; $subject = $data['title']; $message = $data['message']; $status = $data['status']; $attachment = $data['attachment']; $urgency = $data['urgency'];
} if ($access == "deptblocked") { $aInt->gracefulExit($aInt->lang("support", "deptnoaccess")); } if ($access == "flagged") { $aInt->gracefulExit($aInt->lang("support", "flagnoaccess") . ": " . getAdminName($flag)); } if ($access) { exit; } if ($postreply || $postaction) { check_token("WHMCS.admin.default"); if ($postaction == "note") { AddNote($id, $message); } else { $attachments = uploadTicketAttachments(true); if ($postaction == "close") { $newstatus = "Closed"; } else { if (substr($postaction, 0, 9) == "setstatus") { $result = select_query("tblticketstatuses", "title", array("id" => substr($postaction, 9))); $data = mysql_fetch_array($result); $newstatus = $data[0]; } else { if ($postaction == "onhold") { $newstatus = "On Hold"; } else { if ($postaction == "inprogress") { $newstatus = "In Progress"; } else { $newstatus = "Answered";