RendraTriyanto

lap-transaksi.php

Jun 13th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.75 KB | None | 0 0
  1. <form class="form-inline hidden-print" action="<?=$_SERVER["REQUEST_URI"]?>" method="post">
  2.     <label>Periode</label>
  3.     <input type="text" class="form-control" name="start">
  4.     <label>s/d</label>
  5.     <input type="text" class="form-control" name="stop">
  6.     <button type="submit" class="btn btn-primary btn-sm">Tampilkan</button>
  7.   </form>
  8.   <br>
  9.   <?php if ($_POST): ?>
  10.     <div class="panel panel-info">
  11.         <div class="panel-heading"><h3 class="text-center">LAPORAN KONFIRMASI</h3></div>
  12.         <div class="panel-body">
  13.             <table class="table table-condensed">
  14.                 <thead>
  15.                     <tr>
  16.                         <th>No</th>
  17.                         <th>Nama</th>
  18.                         <th>Tgl Sewa</th>
  19.                         <th>Total Harga</th>
  20.                         <th class="hidden-print"></th>
  21.                     </tr>
  22.                 </thead>
  23.                 <tbody>
  24.                     <?php $no = 1; ?>
  25.                     <?php if ($query = $connection->query("SELECT * FROM transaksi JOIN pelanggan USING(id_pelanggan) JOIN konfirmasi USING(id_transaksi) WHERE tgl_sewa BETWEEN '$_POST[start]' AND '$_POST[stop]'")): ?>
  26.                         <?php while($row = $query->fetch_assoc()): ?>
  27.                         <tr>
  28.                             <td><?=$no++?></td>
  29.                             <td><?=$row['nama']?></td>
  30.                             <td><?=date("d-m-Y H:i:s", strtotime($r['tgl_sewa']))?></td>
  31.                             <td><?=$row['total_harga']?></td>
  32.                             <td class="hidden-print">
  33.                               <a  href="../assets/img/bukti/<?=$row['bukti']?>" class="btn btn-info btn-xs fancybox">Lihat Bukti</a>
  34.                             </td>
  35.                         </tr>
  36.                         <?php endwhile ?>
  37.                     <?php endif ?>
  38.                 </tbody>
  39.             </table>
  40.         </div>
  41.         <div class="panel-footer hidden-print">
  42.             <a onClick="window.print();return false" class="btn btn-primary"><i class="glyphicon glyphicon-print"></i></a>
  43.         </div>
  44.     </div>
  45.   <?php endif; ?>
  46.  
  47. <script type="text/javascript">
  48. $(document).ready(function(){
  49.   $(".fancybox").fancybox({
  50.     openEffect  : 'none',
  51.     closeEffect : 'none',
  52.     iframe : {
  53.       preload: false
  54.     }
  55.   });
  56.   $(".various").fancybox({
  57.     maxWidth    : 800,
  58.     maxHeight    : 600,
  59.     fitToView    : false,
  60.     width        : '70%',
  61.     height        : '70%',
  62.     autoSize    : false,
  63.     closeClick    : false,
  64.     openEffect    : 'none',
  65.     closeEffect    : 'none'
  66.   });
  67.   $('.fancybox-media').fancybox({
  68.     openEffect  : 'none',
  69.     closeEffect : 'none',
  70.     helpers : {
  71.       media : {}
  72.     }
  73.   });
  74. });
  75. </script>
Advertisement
Add Comment
Please, Sign In to add comment