<style type="text/css">
<!--
.style1 {
	color: #FF0000;
	font-weight: bold;
}
-->
</style>
<table width="80%" border="0" align="center" cellpadding="5" cellspacing="0" class="bordertable">
  <tr class="tbl_header">
    <td colspan="2" align="center" style="color:#FF0000">ORDER ANDA SUKSES!<br></td>
  </tr>
  <tr>
    <td width="50%" align="right">Jumlah order : </td>
    <td width="50%"><span class="style1">
    <?= rupiah($jumlah); ?></span></td>
  </tr>
  <tr>
    <td align="right">Keterangan :</td>
    <td><?= $ket; ?></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><strong><br>
      Silahkan melakukan pembayaran ke rekening kami: </strong></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><p>&nbsp;</p>
        <p><strong>
          <?= $db->config("bank");?>
          <br>
        Atau<br>
        <?= $db->config("bank1");?>
        <br>
        Atau<br>
        <?= $db->config("bank2");?>
        <br>
        </strong></p>
        <p><strong>Setelah melakukan pembayaran silahkan konfirmasi via sms ke <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>
          <?= $db->config("hpsms"); ?>
          </strong></font><br>
        Atau konfirmasi via wa, klik tombol whatsapp: <br>
        <a href="https://wa.me/<?= $db->config("ym"); ?>" target="_blank"><img src="Chat-via-whatsapp.png" width="200" height="50" border="0"></a> </strong></p></td>
  </tr>
  <tr>
    <td colspan="2"><?
				srand((double)microtime()*1000000); 
	$seed = rand(80000,99999); 
	srand((double)microtime()*$seed); 
	$yadda = rand (66666,99999); 
	if ($yadda < 10 )
	{
		$acak="00$yadda";
	} else {
		$acak = "0$yadda";
	}
		
			if($referrer == "download") {
				$sql = mysql_query("select id, nama, hit, file, expire, harga, poin, berat from product where id='$pid'");
				$row=mysql_fetch_row($sql);
				$passrdm = makeRandomPassword();
				$beratnya = $row[7];
				$newhit = $row[2] + 1;
				$kode = $acak;
				$tgexp = date("Y-m-d H:i:s",strtotime($clientdate) + (86400 * $row[4]));
				$db->insert("download", "", "'', '$user_session', '$pid', '$row[3]', '$passrdm', '$clientdate', '$row[4]', '$tgexp', '$hit', '$REMOTE_ADDR'");
				//---masukkan ke tbl download---
				//update produk--
				$db->update("product", "hit='$newhit'", "id='$pid'");
				//---masukkan ke table komisi penjualan---
				
				//---komisi admin--
				$komadmin = ($jumlah * 20) / 100;
				$db->insert("transaksi", "", "'', '$kode', '$user_session', '$komadmin', '$clientdate', 'Komisi penjualan buku <b>$row[1]</b> dari $user_session', 1");	
				$db->insert("banner_kiri", "", "'', '$kode', '$user_session', '$jumlah', '$ket', '$tujuan', '$poinn', '$clientdate', 0"); 
				$db->insert("kwitansi", "", "'', '$kode', 'Komisi penjualan buku <b>$row[1]</b> dari $user_session', '$clientdate'");
				$kode1 = kwitansi();
				$db->insert("transaksi", "", "'', '$kode1', '$user_session', '$jumlah', '$clientdate', 'Penjualan buku <b>$row[6]</b> dari $user_session', 0");	
				?>
        <form id="form5" name="form5" method="post" action="?m=download&amp;page=unduh">
          <table width="98%" border="0" align="center" cellpadding="5" cellspacing="0">
            <tr class="tbl_header">
              <td colspan="2" align="center">Pesanan atau order produk anda akan segera kami proses setelah ada konfirmasi pembayaran</td>
            </tr>
            <tr>
              <td colspan="2" align="center"><strong> </strong></td>
            </tr>
            <tr>
              <td colspan="2" align="center"><p>&nbsp; </p>
                  <p>&nbsp; </p></td>
            </tr>
            <tr>
              <td width="50%" align="right">&nbsp;</td>
              <td width="50%">&nbsp;</td>
            </tr>
          </table>
        </form>
        <?
		  } //--end if referrer
		  
		  	$db->insert("kwitansi", "", "'', '$kode1', '$ket', '$clientdate'");
		  ?>
    </td>
  </tr>
</table>
