      
<?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;"  >Bulan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode SKPD</th>
         <th style="text-align:center ;vertical-align: middle;"  >SKPD</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Sub SKPD</th>
         <th style="text-align:center ;vertical-align: middle;"  >Sub SKPD</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Fungsi</th>
         <th style="text-align:center ;vertical-align: middle;"  >Fungsi</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Sub Fungsi</th>
         <th style="text-align:center ;vertical-align: middle;"  >Sub Fungsi</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Urusan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Urusan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Bidang</th>
         <th style="text-align:center ;vertical-align: middle;"  >Bidang</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Program</th>
         <th style="text-align:center ;vertical-align: middle;"  >Program</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Kegiatan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kegiatan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Sub Kegiatan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Sub Kegiatan</th>
         <th style="text-align:center ;vertical-align: middle;"  >Kode Rekening</th>
         <th style="text-align:center ;vertical-align: middle;"  >Rekening</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor Dokumen</th>
         <th style="text-align:center ;vertical-align: middle;"  >Jenis Dokumen</th>
         <th style="text-align:center ;vertical-align: middle;"  >Jenis Transaksi</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor DPT</th>
         <th style="text-align:center ;vertical-align: middle;"  >Tanggal Dokumen</th>
         <th style="text-align:center ;vertical-align: middle;"  >Keterangan Dokumen</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor SPP</th>
         <th style="text-align:center ;vertical-align: middle;"  >Tanggal SPP</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor SPM</th>
         <th style="text-align:center ;vertical-align: middle;"  >Tanggal SPM</th>
         <th style="text-align:center ;vertical-align: middle;"  >Tanggal Transfer</th>
         <th style="text-align:center ;vertical-align: middle;"  >Nomor SP2D</th>
         <th style="text-align:center ;vertical-align: middle;"  >Realisasi <br> (Rp)</th>


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

$sqlsdh  = mysqli_query($koneksi, "SELECT Bulan,nomor,kode_skpd,skpd,kode_sub_skpd,sub_skpd,kode_fungsi,fungsi,kode_sub_fungsi,sub_fungsi,kode_urusan,urusan,kode_bidang,bidang,kode_program,program,kode_kegiatan,kegiatan,kode_sub_kegiatan,sub_kegiatan,kode_rekening,rekening,nomor_dokumen,jenis_dokumen, jenis_transaksi,nomor_dpt,tanggal_dokumen,keterangan_dokumen,nomor_spp,tanggal_spp,nomor_spm,tanggal_spm,tanggal_transfer,nomor_sp2d,realisasi From realisasi where bulan='$bulan' and kode_sub_skpd='$kode_sub_skpd'
    ");
foreach ($sqlsdh as $rowsdh) {

    ?>
    <tr>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['Bulan'] ?></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['kode_skpd'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['skpd'] ?></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['sub_skpd'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_fungsi'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['fungsi'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_sub_fungsi'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['sub_fungsi'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_urusan'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['urusan'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_bidang'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['bidang'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_program'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['program'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_kegiatan'] ?>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kegiatan'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_sub_kegiatan'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['sub_kegiatan'] ?></td>    
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['kode_rekening'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['rekening'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nomor_dokumen'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['jenis_dokumen'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['jenis_transaksi'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nomor_dpt'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['tanggal_dokumen'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['keterangan_dokumen'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nomor_spp'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['tanggal_spp'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['nomor_spm'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['tanggal_spm'] ?></td>
    <td style="text-align:center ;vertical-align: middle;"  ><?php echo $rowsdh['tanggal_transfer'] ?></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['realisasi'] ?></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>