File manager - Edit - /home/autoph/public_html/tasks/resources/views/videos/view1.php
Back
<!-- PHP Section Header --> <?php if(isset($_REQUEST['id'])){ $param_id = intval($_REQUEST['id']) ; }else{ echo "Invalid request."; exit; } ?> <div class="tab-container bg-light"> <div id="ticket_information_view "> <div class="col-sm-8 p-0 m-0"> <div class="embed-responsive embed-responsive-16by9" width="320" height="240"> <video controls id="video_el"> <!-- <source id="video_src" type="video/mp4"> --> </video> </div> </div> <div class="col-12 mt-2"> <span class="font-weight-bold text-lg" id="title"></span> <br> <span class="font-xs text-sm font-italic left-margin-5" id="user"></span> <div id="vehicle_info" > <hr class="mt-2 mb-0"> <span class="font-weight-bold text-md">Vehicle Information:</span> <p class="font-weight-normal text-md m-0" id="vid_brand" >Brand: <span id="brand_area"></span> </p> <p class="font-weight-normal text-md m-0" id="vid_model">Model: <span id="model"></span></p> <p class="font-weight-normal text-md m-0" id="vid_model_variant">Model Variant: <span id="model_variant"></span></p> </div> <!-- <span class="font-weight-bold text-md">Description:</span> --> <hr class="mt-0 mb-2"> <span class="font-weight-bold text-md">Description:</span> <p class="font-weight-normal text-md word-wrap m-0" id="description"> </p> <div id="video_attachment"> <hr class="mt-0 mb-2"> <span class="font-weight-bold text-md">Files:</span> <br> <div id="video_attachment_container"> </div> </div> </div> </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 selected_video_data = <?php echo $param_id; ?>; function initVideoData () { return $.ajax({ url: "app/models/knowledgebase.php", data: { model: 'read_video_data', video_id: selected_video_data }, type: "POST", dataType: 'json', beforeSend: function() {}, success: function(result) { if (isEmpty(result.rows.brand) && isEmpty(result.rows.model) && isEmpty(result.rows.model_variant)) { $('#vehicle_info').hide(); } $.each(result.rows, function(i, n) { if (i == 'brand' && isEmpty(n)) { $("#v_view_brand_p").hide(); } else if (i == 'model' && isEmpty(n)) { $("#v_view_model_p").hide(); } else if (i == 'model_variant' && isEmpty(n)) { $("#v_view_model_variant_p").hide(); } else { // $("#" + i).text(n); // $("#span_video_title" + i).text(n); } }); $("#title").text(result.rows.title); var description = result.rows.description.replaceAll("\n", "<br>") $("#description").html(description); $("#v_view_brand").text(result.rows.brand); $("#v_view_model").text(result.rows.model); $("#v_view_model_variant").text(result.rows.model_variant); if (result.attachments.length > 0) { $('#video_attachment_container').html(''); $.each(result.attachments, function(i, n) { var fileExt = n.change_name.split('.').pop(); var filename = n.change_name.replace(/\.[^/.]+$/, "") switch(fileExt){ case 'png': case 'jpg': case 'jpeg': // $('#video_attachment_container').append(`<a data-toggle="lightbox" href="dist/videos/resources/`+n.change_name+`" > // <u><span>` + n.original_name + `</span></u> // </a><br>`); $('#video_attachment_container').append(`<a data-type="image" data-toggle="lightbox" href="viewer/image.php?token=` + filename + `@4" > <u><span>` + n.original_name + `</span></u> </a><br>`); break; case 'pdf': $('#video_attachment_container').append(`<a target="_blank" href="pdf/pdf.php?token=` + filename + `@4" > <u><span>` + n.original_name + `</span></u> </a><br> `); break; default: $('#video_attachment_container').append(`<a href="javascript:void(0);" onclick="downloadTicketAttachment('` + n.change_name + `','4')"> <u><span>` + n.original_name + `</span></u> </a> <br> `); } }); } else { $('#video_attachment').hide(); } var src_vid = 'dist/videos/' + result.rows.attachment_name; $("#video_el").html('<source src="' + src_vid + '" type="video/mp4"></source>'); }, error: function() {} }); } $(function() { // initLightBox(); initVideoData(); }); </script>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings