<!DOCTYPE html>

<html lang="th">



<head>

  <meta charset="utf-8" />

  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <link rel="apple-touch-icon" sizes="76x76" href="https://www.cdn.niendsitekungz.com/finance/assets/img/apple-icon.png">

  <link rel="icon" type="image/png" href="https://www.cdn.niendsitekungz.com/finance/assets/img/favicon556.png">



  <title>

    คำนวณเงินเรทล่าสุด SPX Express | NiendsiteKunGz

  </title>

  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
  <link href='https://fonts.googleapis.com/css?family=Kanit' rel='stylesheet'>
  <link href="https://www.cdn.niendsitekungz.com/finance/assets/css/nucleo-icons.css" rel="stylesheet" />
  <link href="https://www.cdn.niendsitekungz.com/finance/assets/css/nucleo-svg.css" rel="stylesheet" />
  <link href="https://www.cdn.niendsitekungz.com/finance/assets/css/nucleo-svg.css" rel="stylesheet" />
  <link id="pagestyle" href="https://www.cdn.niendsitekungz.com/finance/assets/css/soft-ui-dashboard.css?v=1.0.6" rel="stylesheet" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">

  <script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
  <script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11">
  <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>



  <style>
    body {
      font-family: 'Kanit';
      font-size: 22px;
    }

    li {
      font-family: 'Kanit';
      font-size: 22px;
    }

    div {
      font-family: 'Kanit';
      font-size: 15px;
    }

    .html {
      font-family: 'Kanit';
      font-size: 20px;
    }

    script {
      font-family: 'Kanit';
      font-size: 17px;
    }

    swal {
      font-family: 'Kanit';
      font-size: 17px;

      if {
        font-family: 'Kanit';
        font-size: 17px;

        /* กำหนดความสูงของ container ให้ Card อยู่กึ่งกลางหน้าจอ */
        .full-height {
          height: 100vh;
        }
  </style>

</head>

<body class="">
  <main class="main-content  mt-0">

    <div class="container position-sticky z-index-sticky top-0">
      <div class="row">
        <div class="col-12">
          <!-- Navbar -->
          <nav class="navbar navbar-expand-lg blur blur-rounded top-0 z-index-3 shadow position-absolute my-3 py-2 start-0 end-0 mx-4">
            <div class="container-fluid pe-0">
              <a class="navbar-brand font-weight-bolder ms-lg-0 ms-3 " href="<?= base_url('') ?>">
                SPX Commission
              </a>
              <button class="navbar-toggler shadow-none ms-2" type="button" data-bs-toggle="collapse" data-bs-target="#navigation" aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon mt-2">
                  <span class="navbar-toggler-bar bar1"></span>
                  <span class="navbar-toggler-bar bar2"></span>
                  <span class="navbar-toggler-bar bar3"></span>
                </span>
              </button>
              <div class="collapse navbar-collapse" id="navigation">
                <ul class="navbar-nav mx-auto ms-xl-auto me-xl-7">
                  <li class="nav-item">
                    <a class="nav-link d-flex align-items-center me-2 active" aria-current="page" href="<?= base_url('') ?>">
                      <i class="fa fa-chart-pie opacity-6 text-dark me-1"></i>
                      หน้าหลัก
                    </a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link me-2" href="https://www.spx.niendsitekungz.com/auth/register">
                      <i class="fa fa-user opacity-6 text-dark me-1"></i>
                      สมัครสมาชิก
                    </a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link me-2" href="https://www.spx.niendsitekungz.com/auth/login">
                      <i class="fas fa-user-circle opacity-6 text-dark me-1"></i>
                      เข้าสู่ระบบ
                    </a>
                  </li>
                </ul>
              </div>
            </div>
          </nav>
          <!-- End Navbar -->
        </div>
      </div>
    </div>

    <section>
      <div class="page-header min-vh-75">
        <div class="container">
          <div class="row">
            <div class="col-xl-4 col-lg-5 col-md-6 d-flex flex-column mx-auto">
              <div class="card card-plain mt-8">
                <div class="card-header pb-0 text-left bg-transparent">
                  <h3 class="font-weight-bolder text-info text-gradient">ยินดีต้อนรับผู้ใช้งานใหม่!</h3>
                  <p class="mb-0">เริ่มต้นใช้งาน แอพพลิเคชั่น <br>คำนวณการจ่ายเงินเรทใหม่ SPX Express ได้เลย!</p>
                </div>
                <div class="card-body">
                  <form id="" class="" action="/order/store" method="post">
                    <div class="mb-3">
                      <input type="number" class="form-control" placeholder="กรอกจำนวนงานที่ต้องการคำนวณ.." name="quantity" id="quantity" required>
                    </div>
                </div>
                <div class="text-center">
                  <button type="submit" class="btn bg-gradient-info w-100 mt-4 mb-0">คำนวณยอดเงินที่ได้รับวันนี้</button>
                </div>

              </div>
            </div>
          </div>

        </div>
      </div>
    </section>

    <footer class="footer pt-3  ">
      <div class="container-fluid">
        <div class="row align-items-center justify-content-lg-between">
          <div class="col-lg-6 mb-lg-0 mb-4">
            <div class="copyright text-center text-sm text-muted text-lg-start">
              © <script>
                document.write(new Date().getFullYear())
              </script>,
              NiendsiteKunGz All rights reserved.
            </div>
          </div>
          <div class="col-lg-6">
            <ul class="nav nav-footer justify-content-center justify-content-lg-end">
              <li class="nav-item">
                <a href="https://www.facebook.com/NiendSiteKunGzProduction?mibextid=ZbWKwL" class="nav-link text-muted" target="_blank">Service</a>
              </li>
              <li class="nav-item">
                <a href="https://www.facebook.com/NiendSiteKunGzProduction?mibextid=ZbWKwL" class="nav-link text-muted" target="_blank">About Us</a>
              </li>
              <li class="nav-item">
                <a href="#" class="nav-link text-muted" target="_blank">Blog</a>
              </li>
              <li class="nav-item">
                <a href="#" class="nav-link pe-0 text-muted" target="_blank">License</a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </footer>
  </main>

  <script>
    document.getElementById('order').addEventListener('submit', function(event) {
      event.preventDefault();

      const quantity = document.getElementById('quantity').value;

      fetch('/order/store', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            quantity
          })
        })
        .then(response => response.json())
        .then(data => {
          Swal.fire({
            title: 'ผลลัพธ์',
            text: `ยอดเงินที่ได้รับ: ${data.total_price} บาท`,
            icon: 'success',
          });
        });
    });
  </script>

  <script src="https://www.cdn.niendsitekungz.com/finance/assets/js/core/popper.min.js"></script>
  <script src="https://www.cdn.niendsitekungz.com/finance/assets/js/core/bootstrap.min.js"></script>
  <script src="https://www.cdn.niendsitekungz.com/finance/assets/js/plugins/perfect-scrollbar.min.js"></script>
  <script src="https://www.cdn.niendsitekungz.com/finance/assets/js/plugins/smooth-scrollbar.min.js"></script>

</body>

</html>