<?php
    session_start();
    include '_connect.php';
    $ct_no = $_REQUEST["ct_no"];
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>เช็คยอด - ตรวจสอบยอดค้างชำระ</title>
    <link rel="icon" type="image/png" href="img/logo_1.png" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <script src="jquery-3.1.1.min.js" type="text/javascript"></script>
    <!-- <script src="script.js" type="text/javascript"></script> -->
    <?php
      include 'css.php';
    ?>
  </head>
  <body>

    <table border="0" id="" class="customers" width="50%">
      <thead>
        <tr>
          <th style="text-align:center; font-size:50px;">ตรวจสอบยอดค้างชำระ</th>
        </tr>
      </thead>
      <tbody></tbody>
    </table>

    <!-- แสดงข้อมูล -->
    <div id="get_checkdata" class="" align="center"></div>

    <input type="text" value="" id="userId" hidden>
    <img src="" id="pictureUrl" alt="" hidden>
    <input type="text" value="" id="displayName" hidden>
    <input type="text" value="" id="statusMessage" hidden>

    <?php 
        // include '_index_linejson_1.php' 
        echo '<script type="text/javascript">';
        echo "var ct_no = '$ct_no';"; // ส่งค่า $data จาก PHP ไปยังตัวแปร data ของ Javascript
        echo '</script>';
    ?>

    <!-- script -->
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
    <script charset="utf-8" src="https://static.line-scdn.net/liff/edge/2/sdk.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="_liffid_c.js"></script>
    <script>
        $.ajax({
            type:"GET",
            url:"ajax/checkdata_ajax.php",
            data: "ct_no=" + ct_no,
            success: function(data) {
                $("#get_checkdata").html(data);
            },
        });
    </script>

  </body>
</html>
