<?php
echo '<h7>-</h7>';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD       XHTML       1.0       Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><img src='https://kapaguswahjono.com/ao_dana/assets/img/ksp-artomorodewedewe.png'></a><div align="center"></div>
<?php
    if( empty( $_SESSION['id_user'] ) ){

    	$_SESSION['err'] = '<strong>ERROR!</strong> Anda harus login terlebih dahulu.';
    	header('Location: ./');
    	die();
    } else {
?>
<html>
<head>
    <link href="css/bootstrap.css" rel="stylesheet"/>
</head>
<body onload="window.print()">
 
<?php
    include "menu.php";
	$kdm  = $_SESSION['kdm'];
	$_SESSION['tgl1'] = date('d-m-Y');
	$tgl1 =  date('d-m-Y');
    $id_user = $_SESSION['id_user'];
    $id_transaksi = $_REQUEST['id_transaksi'];

    $sql = mysqli_query($koneksi, "SELECT no_nota,noang,nama,kdm,kdc,kdj,jenis,tgltrans,jumlahm,jumlahk,id_user FROM transaksi WHERE id_transaksi='$id_transaksi'");

    list($no_nota,$noang,$nama,$kdm,$kdc,$kdj,$jenis,$tgltrans,$jumlahm,$jumlahk,$id_user) = mysqli_fetch_array($sql);

    $sql = mysqli_query($koneksi, "SELECT nama FROM anggotass WHERE noang='$noang'");
    list($nama) = mysqli_fetch_array($sql);
        //echo "<h6><u>$nama</u></h6>";
        
    echo '
        <table class="table table-bordered">
            <h6><b><U>Bukti Transaksi '.$jenis.'</U></b></h6>
            <h6>No. / Tgl.: '.$no_nota.' / '.$tgl1.'</h6>
            <h6>No. Rekg. : <b>'.$kdj.'</b>-<b>'.$noang.'</b></h6>
            <h6>Nama ......: '.$nama.'</h6>
			<h6>Setoran........Rp. '.number_format($jumlahm).'</h6>
			<h6>Penarikan.....Rp. '.number_format($jumlahk).'</h6>
        </table> ';
        $sql = mysqli_query($koneksi, "SELECT nama_user FROM user_market WHERE id_user='$id_user'");
        list($nama_user) = mysqli_fetch_array($sql);
        echo '<h6></h6>';
        echo '<h6></h6>';
        echo "<h6>Terimakasih atas kepercayaan Anda</h6>";
        echo "<h6><i>$nama_user</i></h6>";
        echo '<h6></h6>';
        echo '<h6>-</h6>';
        echo '<h6>---</h6>';
        echo'
</body>
</html>';
}
?>
