File manager - Edit - /home/autoph/public_html/tasks/resources/views/tickets/view1.php
Back
<!-- PHP Section Header --> <?php if(isset($_REQUEST['id'])){ $param_id = intval($_REQUEST['id']) ; }else{ echo "Invalid request."; exit; } if(isset($_REQUEST['notification'])){ $notification = "'".$_REQUEST['notification']."'"; }else{ $notification = 0; } ?> <div class="tab-container bg-light"> <div id="ticket_information_view"> <?php include('resources/views/modals/components/ticket_information_modal.php'); ?> </div> <div id="sidebar-remove"></div> </div> <!-- Common scripts --> <!-- dropzonejs --> <script src="plugins/dropzone/min/dropzone.min.js"></script> <!-- Select2 --> <!-- <script src="plugins/select2/js/select2.full.min.js"></script> --> <!-- SweetAlert2 --> <script src="plugins/sweetalert2/sweetalert2.min.js"></script> <!-- Toastr --> <script src="plugins/toastr/toastr.min.js"></script> <!-- AutoCommplete --> <!-- <script src="dist/js/bootstrap-autocomplete/bootstrap-autocomplete.min.js"></script> --> <!-- daterangepicker --> <!-- <script src="plugins/moment/moment.min.js"></script> <script src="plugins/daterangepicker/daterangepicker.js"></script> --> <!-- Ekko Lightbox --> <script src="plugins/ekko-lightbox/ekko-lightbox.min.js"></script> <?php include('resources/views/common/script/function.php'); ?> <!-- custom scripts for this page only --> <script> // GLOBALS var json_notification = <?php echo $notification ?>; </script> <?php include('resources/views/common/script/ticket_list_functions.php'); ?> <script> selected_ticket_data = <?php echo $param_id ?>; // DROPZONE 2 START // Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument try{ var ticketReplyNode = document.querySelector("#ticket_reply_template") ticketReplyNode.id = "" var ticketReplyTemplate = ticketReplyNode.parentNode.innerHTML ticketReplyNode.parentNode.removeChild(ticketReplyNode) var ticketReplyDropzone = new Dropzone("#ticket_information_view", { url: "app/models/file.php", paramName: "file", maxFilesize: 1024, maxFiles: 20, autoProcessQueue: false, acceptedFiles: '.pdf, .doc, .docx, .txt, .html, .htm, .ppt, .pptx, .xls, .csv, .xlsx, .png, .jpeg, .jpg, .mp4, .mkv, .mov, .avi, .wmv', init: function() { this.on('sending', function(file, xhr, formData) { formData.append("model", "create_file"); formData.append("file", "file"); }); }, thumbnailWidth: 50, thumbnailHeight: 50, parallelUploads: 20, previewTemplate: ticketReplyTemplate, autoQueue: false, // Make sure the files aren't queued until manually added previewsContainer: "#ticket_reply_previews", // Define the container to display the previews clickable: ".ticket-reply-button" // Define the element that should be used as click trigger to select files. }); ticketReplyDropzone.on('success', function(file, result) { try { result = JSON.parse(result) if (parseInt(result.status) === 1) { // alert(result.change_name); var uploaded_reply_ticket_attachments_obj = { "change_name": result.change_name, "original_name": result.orig_name } uploaded_reply_ticket_attachments_arr.push(uploaded_reply_ticket_attachments_obj); //console.log(uploaded_reply_ticket_attachments_arr); // uploaded_ticket_attachments = {change_name: result.change_name , original_name: result.orig_name}; } else if (parseInt(result.status) === 0) { //put the first error only if (!uploaded_reply_ticket_attachments_has_error) { uploaded_reply_ticket_attachments_has_error = true; uploaded_ticket_attachments_error_msg = { filename: result.orig_name, message: result.message }; } } if (!result.error) { if (ticketReplyDropzone.getQueuedFiles().length === 0 && ticketReplyDropzone.getUploadingFiles().length === 0) { // console.log(uploaded_reply_ticket_attachments_arr) if (uploaded_reply_ticket_attachments_has_error) { toastr.remove(); toastr.error(uploaded_ticket_attachments_error_msg.filename + ' - ' + uploaded_ticket_attachments_error_msg.message) //remove uploaded files $.ajax({ url: "app/models/file.php", data: { model: 'delete_file', file: '', file_names: JSON.stringify(uploaded_reply_ticket_attachments_arr) }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) {}, error: function() {} }); } else { ticketReplyDropzone.removeAllFiles(true); createReplyTicket(); } uploaded_reply_ticket_attachments_has_error = false; uploaded_reply_ticket_attachments_arr = []; } } //TODO - } catch (e) { //TODO - console.log(e) } }); }catch(e){ // console.log(e); } $(document).ready(function() { // initLightBox(); ticketInformationEvt(); classifiedTicketsEvt(); // $('.am-toggle-left-sidebar').trigger("click"); $('#ticket_info_attachment_container').removeClass('container') $('#ticket-info-modal-tab li a').removeClass('active') $('#ticket-info-modal-tab-content .tab-pane').removeClass('active').removeClass('show') $('#ticket-info-modal-tab-information').addClass('active') $('#ticket-info-modal-tab-information-sec').addClass('active').addClass('show') $("[ticket-info-data]").each(function() { $(this).html("<span class='text-md text-muted font-italic'>Loading...</span>") }); readTicketInformation(); readTicketAttachments(); defaultTicketReplies(); if(json_notification){ // fetch notification information var notification_obj = JSON.parse(json_notification); selected_ticket_data = notification_obj[0]; var to_user_id = notification_obj[1]; $('#ticket_info_modal').modal('show'); // mark notif as read updateNotificationMarkAsRead(selected_ticket_data,to_user_id); } }); </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings