      
<?php
include '../../../config/koneksi.php';
session_start();
?>
<!DOCTYPE html>
<html>
   
   
    <head>
        <script src="ambildata.js"></script>
        <script src="efekscrol.js"></script>
        <title>Halaman OPD</title>

     
    </head>
    <body>
   
    <div class="content-wrapper">
   
            
        <div class ="wrapper">
        <div class="panel-body"  style ="overflow-x :auto ; overflow-y :auto ">
            

<table width="100%"  id="example1s" class="table table-bordered table-striped">
<thead>
       <tr style="text-align:center ; background-color:lightgrey" >
         <th style="text-align:center ;vertical-align: middle;"  >ID</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Sub SKPD</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor</th>
         <th style="text-align:center ;vertical-align: middle;"  >Tanggal SP2D</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor SP2D</th>
         <th style="text-align:center ;vertical-align: middle;"  >Unit SKPD</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nama Penerima</th>
         <th style="text-align:center ;vertical-align: middle;"  >Keterangan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Jenis SP2D</th>
         <th style="text-align:center ;vertical-align: middle;"  >Bruto</th>
         <th style="text-align:center ;vertical-align: middle;"  >Potongan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Neto</th>
         

       </tr>
       <?php
$kode_sub_skpd=$_GET['kode_sub_skpd'];


$sqlsdh  = mysqli_query($koneksi, "SELECT *  From sp2d where  kode_sub_skpd='$kode_sub_skpd'
    ");
foreach ($sqlsdh as $rowsdh) {

    ?>
    <tr>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['id_sp2d'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_sub_skpd'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nomor'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['tanggal_sp2d'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nomor_sp2d'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['unit_skpd'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nama_penerima'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['keterangan'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['jenis_sp2d'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['bruto'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['potongan'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['neto'] ?></td>
    </tr>
    <?php
}
    ?>
      
       </thead>
       <tbody>


<?php

mysqli_close($koneksi);
?> 
  
          <script>
              $(document).ready(function () {
                 $(".selubah").on('click', function () {
                    
                    var currentRow = $(this).closest("tr");
              
                      var col0 = currentRow.find("td:eq(0)").html();
                      var col1 = currentRow.find("td:eq(1)").html();
                      var col2 = currentRow.find("td:eq(2)").html();
                      var col3 = currentRow.find("td:eq(3)").html();
                      
                      col1 = col1.replace(/^\s+|\s+$/g, '');
                      col2 = col2.replace(/^\s+|\s+$/g, '');
                      col3 = col3.replace(/^\s+|\s+$/g, '');
                     
                      
                    
                      $("#id_opdu").val(col1);
                      $("#kode_opdu").val(col2);
                      $("#opdu").val(col3);
                     

                      
                          });
                
                  $(".selhapus").on('click', function () {
                    var currentRow = $(this).closest("tr");
                       var col0 = currentRow.find("td:eq(0)").html();
                      var col1 = currentRow.find("td:eq(1)").html();
                      var col2 = currentRow.find("td:eq(2)").html();
                      var col3 = currentRow.find("td:eq(3)").html();
                      
                      col1 = col1.replace(/^\s+|\s+$/g, '');
                      col2 = col2.replace(/^\s+|\s+$/g, '');
                      col3 = col3.replace(/^\s+|\s+$/g, '');
                     
                      
                    
                      $("#id_opdh").val(col1);
                      $("#kode_opdh").val(col2);
                      $("#opdh").val(col3);
                    
                  });
                  
                                        


                  });

                  





                
           
</script>

<script type="text/javascript">
      function loadul(){
    
        $('#tumbsi').summernote(
        {
            placeholder:'input data anda',
            height:200,
            toolbar: [
['style', []],
['font', []],
['color', []],
['para', []],
['table', []],
['insert', ['picture']],
['view', ['fullscreen']]
]
        });


       
   
 }
</script>
        <script>

  $(function () {
    // Summernote
    $('#summernote1').summernote(
        {
            placeholder:'input data anda',
            height:200,
        });

   
   $('#tumbsi').summernote(
        {
            placeholder:'input data anda',
            height:200,
            toolbar: [
['style', []],
['font', []],
['color', []],
['para', []],
['table', []],
['insert', ['picture']],
['view', ['fullscreen']]
]
        });

   

   
    CodeMirror.fromTextArea(document.getElementById("beritai"), {
      mode: "htmlmixed",
      theme: "monokai"
    });


  })
</script>
          
         <script>
            $(function () {
                $("#example1").DataTable({
                    "responsive": true,
                    "lengthChange": true,
                    "autoWidth": true,
                    "buttons": ["copy", "csv", "excel", "pdf", "print"]
                }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
                $('#example2').DataTable({
                    "paging": true,
                    "lengthChange": false,
                    "searching": false,
                    "ordering": true,
                    "info": true,
                    "autoWidth": false,
                    "responsive": true,
                });
            });
</script>
 
</body>
</html>