Advertisement
cdsatrian

iseng1

Jun 30th, 2014
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.47 KB | None | 0 0
  1. <?php
  2. include "admin/koneksi.php";
  3. include "admin/fungsi_rupiah.php";
  4. echo"<center>&nbsp; Nama Member : <h2><font color=blue>$_SESSION[nama_member]</font></h2><br/><br/><hr/><hr/><br/><br/></center>";
  5. $trans_cek = mysql_query("SELECT * FROM transaksi,transaksi_detail,produk WHERE kode_member = '$_SESSION[kode_member]' AND status = '' AND transaksi.no_transaksi = transaksi_detail.no_transaksi AND transaksi_detail.id_produk = produk.id_produk") or die (mysql_error());
  6. $i=0;
  7. while($trans = mysql_fetch_array($trans_cek))
  8. {
  9.   $subtotal_a = $trans['harga'] * $trans['jumlah_beli'];
  10.   $subtotal = format_rupiah($subtotal_a);
  11.   $harga = format_rupiah($trans['harga']);
  12. echo (++$i==1?"
  13. <pre>
  14. &nbsp; No Transaksi     : {$trans['no_transaksi']} <br/>
  15. &nbsp; Waktu Belanja    : {$trans['waktu']} <br/>
  16. <center>
  17. <table align=center border=1>
  18. ":"");
  19. echo "
  20.        <tr bgcolor=black>
  21.                <th><font color=white>Nama Produk</font></th>
  22.                <th><font color=white>Harga Satuan</font></th>
  23.                <th><font color=white>Jumlah Beli</font></th>
  24.                <th><font color=white>Subtotal</font></th>
  25.        </tr>
  26.        <tr>
  27.                <td width=200 align=center>$trans[nama_produk]</td>
  28.                <td width=200 align=center>Rp. $harga</td>
  29.                <td width=200 align=center>$trans[jumlah_beli]</td>
  30.                <td width=200 align=center>Rp. $subtotal</td>
  31.        </tr>";
  32. }
  33. echo "</table>
  34. </center>
  35. </pre><hr/><hr/><br/>";
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement