<br>
<?php 
    include '../_connect.php';
    $ct_no = $_GET['ct_no'];
    $sql = "SELECT ps_name,ct_mobileno,product_name,due_amnt,ct_no,cnsvbarcode,cnsvrefcode,cnsvrefno FROM EHONGDB.dbo.hps_ctmain
    WHERE ct_no = '$ct_no'";
    // echo $sql;
    $select=$conn->prepare($sql);
    $select->execute();
    $sql_array = array();
    $fetchx=$select->fetch();
    $ct_no = $fetchx['ct_no'];
    $ps_name = $fetchx['ps_name'];
    $ct_mobileno = $fetchx['ct_mobileno'];
    $product_name = $fetchx['product_name'];
    $due_amnt = $fetchx['due_amnt'];
    $cnsvbarcode = $fetchx['cnsvbarcode'];
    $cnsvrefcode = $fetchx['cnsvrefcode'];
    $cnsvrefno = $fetchx['cnsvrefno'];
?>
<div class="box-shadowx" align="left">
    <center>
    <img src="img/logo.png" alt="" style="width:50%;"><br>
    </center>
    <b style="color:brown;">เลขที่สัญญา :</b>  <?php echo $ct_no; ?> <br>
    <b style="color:brown;">ชื่อ-นามสกุล :</b> <?php echo $ps_name; ?> <br>
    <b style="color:brown;">สินค้า :</b> <?php echo $product_name; ?> <br>
    <b style="color:red;">ยอดรวมชำระทั้งหมด : <?php echo number_format($due_amnt,2); ?> </b> <br> <br>
    <center>
    <img src='https://ehongmd.com/genbarcode.php?cnsvref=<?php echo $cnsvrefcode ?>' width='95%'> <br>
    <b style="color:brown; font-size:15px;"> <?php echo $cnsvbarcode; ?> </b>
    </center>
</div>
<br>
<div class="box-shadowx" align="center">
    <b style="color:brown;">ช่องทางการชำระ</b> <br>
    <b style="color:green; font-size:px;">สามารถชำระได้ที่ Counter Service ร้านค้าด้านร่างเท่านั้น</b> <hr>
    <img src="ajax/img/7.png" width="15%" height="auto">&nbsp;
    <img src="ajax/img/cs.png" width="15%" height="auto">&nbsp;
    <img src="ajax/img/bigc.png" width="15%" height="auto">&nbsp;
    <img src="ajax/img/lotus.png" width="15%" height="auto">&nbsp;
    <img src="ajax/img/tp.png" width="15%" height="auto">&nbsp;
</div>