ok
Direktori : /proc/thread-self/root/home2/selectio/www/thedentalpark.com/admin/ |
Current File : //proc/thread-self/root/home2/selectio/www/thedentalpark.com/admin/deleted-file-list.php |
<?php include "header.php";?> <div class="content-wrapper" style="background:white;"> <div class="clearfix"></div> <script type="text/javascript"> $(document).ready(function() { emp_data(); function emp_data(){ var search_table =$('#search_table').val(); var category_id =$('#category_id').val(); var status = $('#statuss').val() var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/deleted-file-details-data-table.php', data:{search:search_table,status:status,category_id:category_id}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true,pageLength: 10, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'colvis', text: 'Columns'}, ] }); } $('#filter_month,#filter_year,#filter_created_by,#filter_updated_by').change(function() { emp_data(); }); $('#search_table').keyup(function() { var status = $('#statuss').val() var search_table =$('#search_table').val(); var category_id =$('#category_id').val(); var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/deleted-file-details-data-table.php', data:{search:search_table,status:status,category_id:category_id}, type: 'POST'}, bDestroy: true,pageLength: 10, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'colvis', text: 'Columns'}, ] }); document.getElementById("search_table").focus(); //table.search(this.value).draw(); }); }); function delete_home_news(id,image){ var result = confirm("Confirm want to hard delete this Home News?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: {type:'hard_delete',delete_id:id,table_name:'home_news',image:image}, success: function(response) { console.log(response); emp_datas(); } }); } } function dynamic_active(id){ var result = confirm("Confirm want to Active this Home News?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: {type:'dynamic_active',delete_id:id,table:'home_news'}, success: function(response) { console.log(response); emp_datas(); } }); } } function emp_datas(){ var search_table =$('#search_table').val(); var file_name =$('#file_name').val(); var status = $('#statuss').val() var table = $('#StData').DataTable({ 'ajax' : { url: 'data-tables/deleted-file-details-data-table.php', data:{search:search_table,status:status,file_name:file_name}, type: 'POST'}, bFilter: true, bDestroy: true, searching: true,pageLength: 10, "buttons": [ { extend: 'copyHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3] } }, { extend: 'excelHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'csvHtml5', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': false, exportOptions: { columns: [ 0, 1, 2, 3 ] } }, { extend: 'colvis', text: 'Columns'}, ] }); } </script> <script> function delete_gallery(id, image) { var result = confirm("Confirm want to hard delete this PDF file?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: { type: 'delete_gallery', image: image, delete_id: id, table_name: 'tbl_pdf' }, success: function(response) { console.log(response); // Assuming emp_datas() is a function that reloads or updates your gallery after deletion emp_datas(); }, error: function(xhr, status, error) { console.error('AJAX Error:', status, error); alert('Failed to delete image. Please try again.'); } }); } } function restore(id) { var result = confirm("Confirm want to Restore this PDF file?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: { type: 'restore', delete_id: id, table_name: 'tbl_pdf' }, success: function(response) { console.log(response); // Assuming emp_datas() is a function that reloads or updates your gallery after deletion emp_datas(); }, error: function(xhr, status, error) { console.error('AJAX Error:', status, error); alert('Failed to delete image. Please try again.'); } }); } } </script> <script> function myText(id) { // Get the text content of the element with the specified ID var copyText = $('#myPath_' + id); // Create a temporary textarea element to hold the text var textarea = document.createElement('textarea'); textarea.value = copyText.text(); // Set the value of the textarea to the text content document.body.appendChild(textarea); // Append the textarea to the document // Select the text in the textarea textarea.select(); textarea.setSelectionRange(0, 99999); // For mobile devices // Copy the selected text inside the textarea to the clipboard document.execCommand('copy'); // Remove the temporary textarea document.body.removeChild(textarea); // Alert the user alert("Link Copied"); } </script> <script> function multiselectDelete() { var checked_values = []; $('input[name="all_delete"]:checked').each(function() { checked_values.push($(this).val()); }); // var joined_values = checked_values.join('\n'); deletetoselected(checked_values); } function deletetoselected(text) { if (text.length > 0) { var result = confirm("Confirm you want to hard delete these PDF files?"); if (result) { $.ajax({ type: 'POST', url: 'api/delete.php', data: { type: 'permanant_delete', delete_id: text, table_name: 'tbl_pdf' }, success: function(response) { emp_datas(); }, error: function(xhr, status, error) { alert('Failed to delete files. Please try again.'); } }); } } else { alert('Please select delete files.'); } } </script> <section class="content"> <div class="row"> <div class="col-md-4"> <div class="form-group"> <label class="required" for="search_table">Filter PDF Name</label> <input name="search_table" id="search_table" class="form-control" onkeyup="emp_datas()"> </div> </div> <div class="col-md-4"> <div class="form-group"> <label class="required" for="status">Status</label> <select name="statuss" onchange="emp_datas()" id="statuss" class="form-control tip select2"> <option value="all">All</option> <option value="1">Active</option> <option value="0">In-Active</option> </select> </div> </div> <div class="col-xs-12"> <div > <div class="box-body"> <div class="clearfix"></div> <div class="table-responsive"> <table id="StData" class="table table-striped table-bordered table-condensed table-hover" style="margin-bottom:5px;font-size: 14px;"> <thead> <tr> <td colspan="7" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table" placeholder="Search Here" style="width:100%;background-color:color: white;"></td> </tr> <tr class="active"> <th style="width:100px;">Actions</th> <th data-sortable="false" id="delete_checkAll" style="text-align: center;"><i class="fa fa-check"></i> <span id="delete_Checkbox_Sections"></span> </th> <th>S.No</th> <th>File Name</th> <th>File Path</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td colspan="6" class="dataTables_empty"><center> Loading Pls Wait Data</center></td> </tr> </tbody> <tfoot> <tr> <th colspan="1"></th> <th><button class="btn btn-danger" id="btn_delete_selected"><i class="fa fa-trash-o"></i>Permanant Delete</button></th> <th colspan="4"></th> </tr> </tfoot> </table> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section> <?php include "footer.php";?> <script> $(document).ready(function() { $('#delete_checkAll').click(function () { var Checkbox_Sections=$('#delete_Checkbox_Sections').text(); if(Checkbox_Sections==''){ $('#delete_Checkbox_Sections').text('Checked'); $('.delete_check_box').prop('checked',true); }else{ $('#delete_Checkbox_Sections').text(''); $('.delete_check_box').prop('checked',false); } }); $('#btn_delete_selected').on('click',function(){ multiselectDelete(); }); }); </script>