<?php
    include '_connect.php';
    // include 'qrcode/qrlib.php';
    $ct_no = $_GET['ct_no'];
    $billerid = $_GET['billerid'];
    $ref1 = $_GET['ref1'];
    $ref2 = $_GET['ref2'];
    $price = $_GET['price'];
    $QRCODE = $billerid." ".$ref1." ".$ref2." ".$price."00";
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
	<head>
		<meta charset="utf-8">
		<title>ชำระด้วย QR CODE</title>
        <?php
            include 'css.php';
        ?>
        <style media="screen">
            body{
                /* font-family:"Angsana New"; */
                font-size:20px;
                background-image: url("img/xBG01.jpg");
                background-repeat: no-repeat;
                background-size: 210%;
            }
        </style>
	</head>
	<body>
		<?php
            $sql = "SELECT ps_name,ct_mobileno,product_name,ct_no FROM EHONGDB.dbo.hps_ctmain
            WHERE ct_no = '$ct_no'";
            $select=$dbh->prepare($sql);
            $select->execute();
            $fetchx=$select->fetch();
            $ps_name = $fetchx['ps_name'];
            $ct_mobileno = $fetchx['ct_mobileno'];
            $product_name = $fetchx['product_name'];
            // echo $sql;
            // echo $QRCODE;
        ?>
        <center>
            <h2>ชำระเงินผ่าน QR CODE</h2>
            <?php
                echo "ชื่อ-นามสกุล : ".$ps_name."<br>";
                echo "สินค้า : ".$product_name."<br>";
                echo "<b><h3><font color='red'>ค่าชำระ : ".number_format($price,2)." บาท </font></h3><b><hr>";
            ?>
            <br>
            <img src='qrcode/qrpng.php?billerid=<?php echo $billerid;?>&ref1=<?php echo $ref1;?>&ref2=<?php echo $ref2;?>&price=<?php echo $price;?>' width="50%">
            <br><br>
            <?php
                echo $QRCODE;
            ?>
        </center>
	</body>
</html>