[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
xampp182
/
htdocs
/
simkeu
/
sia
/
[
Home
]
File: export-rekapva.php
<?php require_once("configure_first.php"); if(isset($_POST["tgl1"])) $tgl = $_POST["tgl1"]; if(isset($_GET["tgl1"])) $tgl = $_GET["tgl1"]; if(isset($_POST["tgl2"])) $tgl2 = $_POST["tgl2"]; if(isset($_GET["tgl2"])) $tgl2 = $_GET["tgl2"]; if(isset($_GET["bulan"])) $bulan = $_GET["bulan"]; if($bulan) { $title = "Rekap Pembayaran VA perhari"; }else{ $title = "Rekap Pembayaran VA perbulan"; } ?> <html> <head> <title><?=$title;?></title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.6.5/css/buttons.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"> <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script> </head> <body> <div class="container"> <img src="univbpi.png" width="100%"> <div class="data-tables datatable-dark"> <form action="#" method="POST" enctype="multipart/form-data"> <div class="col-xs-12"> <div class="box-content"> <table id="datanilai" style="width:100%" border="1"> <thead> <tr> <td>No</td> <td><?php if($bulan) echo "Tanggal";else echo "Bulan";?></td> <td>Nominal</td> </tr> </thead> <tbody> <?php if($bulan) { $sql = "SELECT sum(bayar) as total,tgl FROM 0_mandiriva where substr(tgl,1,7) = '".$_GET["tahun"]."-".$bulan."' group by tgl order by tgl asc"; }else{ $sql = "SELECT sum(bayar) as total,substr(tgl,1,7) as bln FROM 0_mandiriva where substr(tgl,1,4) = '".$_GET["tahun"]."' group by substr(tgl,1,7) order by tgl asc"; } // echo $sql; $result = mysqli_query($conn, $sql); $no = 0; $jtotal = 0; if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { $no = ($no+1); $jtotal = ($jtotal+$row['total']); echo "<tr valign=top>"; echo "<td align=center>".$no.". </td>"; if($bulan) { echo "<td align=center>".$row['tgl']."</td>"; echo "<td align=right>Rp. ".format_currency($row["total"])." </td>"; }else{ echo "<td align=center>".$monthName[intval(substr($row['bln'],5,2))]." ".substr($row['bln'],0,4)."</td>"; echo "<td align=right>Rp. ".format_currency($row["total"])." </td>"; } echo "</tr>"; } } ?> </tbody> </table> </div> <!-- /.box-content --> </div> </form> </div> </div> <script> $(document).ready(function() { $('#datanilai').DataTable( { dom: 'Bfrtip', buttons: [ 'copy','csv','excel', 'pdf', 'print' ] } ); } ); </script> <script src="https://code.jquery.com/jquery-3.5.1.js"></script> <script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/dataTables.buttons.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.flash.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.html5.min.js"></script> <script src="https://cdn.datatables.net/buttons/1.6.5/js/buttons.print.min.js"></script> </body> </html>