<?php



ini_set('session.gc_maxlifetime', 30*60);

session_start();

include '../includes/config.php';


$DID = $_GET['DID'];
$user_ID = $_GET['user_ID'];



$Error ='';








$Verification_Code=$_GET['Verification_Code'];
$Phone_Number=$_GET['Phone_Number'];
$U_ID=$_GET['U_ID'];




if(isset($_POST['Submit']))
{
	
	
$U_ID=$_POST['U_ID'];
$Phone_Number=$_POST['Phone_Number'];
$Verification_Code=$_POST['Verification_Code'];







$PN = '962'.substr($Phone_Number, 1);

	$sql1=mysqli_query($dbConn,"update users set Phone_Number='$PN' where ID='$U_ID'");







 //file_get_contents('http://josmsservice.com/sms/api/SendSingleMessage.cfm?numbers='.$PN.',&senderid=FutureDel.&AccName=futureds&AccPass=C@So$L8lu5!7&msg='.$Verification_Code.'&requesttimeout=5000000');



	  
echo '<script language="JavaScript">
            document.location="Users-Sign-Up-3.php?U_ID='.$U_ID.'&Phone_Number='.$Phone_Number.'&Verification_Code='.$Verification_Code.'";
        </script>';


}
?>



<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <!-- FontAwesome -->
    <link rel="stylesheet" href="../css/fontawesome.css">
    <!--International Telephone input JS-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/8.4.6/css/intlTelInput.css">
    <!-- Main Style -->
    <link rel="stylesheet" href="../css/styles.css">
    <title>Sign up</title>
	
	<style>
@font-face {
   font-family: myFirstFont;
   src: url(../fonts/Arial-Rounded-MT-Bold-Regular.ttf);
   font-size:8px;
}



body {
   font-family: myFirstFont !important;
   text-align: right !important;
                overflow: hidden; 

}


</style>


	
	    <link rel="shortcut icon" href="../images/icon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0"/>


</head>
<body>

<!--Loading Container Start-->
<div id="load" class="loading-overlay display-flex flex-column justify-content-center align-items-center">
    <div class="primary-color font-28 fas fa-spinner fa-spin"></div>
</div>
<!--Loading Container End-->

<div class="row h-100">
    <div class="col-xs-12 col-sm-12">


        <!--Page Title & Icons Start-->
        <div class="header-icons-container text-center">
           <!-- <a href="sign-up.html">
                <span class="float-left">
                    <img src="icons/back.svg" alt="Back Icon">
                </span>
            </a>-->
            <span><br>Sign up</span>
        </div>
        <!--Page Title & Icons End-->

        <div class="rest-container">
            <div class="text-center header-icon-logo-margin header-icon-logo-margin-extra">
                <img src="../images/icon.png" width="20%" style="border-radius: 10%;" alt="Main Logo">
            </div>

            <!--Sign Up Container Start-->
            <div class="sign-up-form-container text-center">
                <form class="width-100" method="post" action="Users-Sign-Up-2.php?DID=<?php echo $DID; ?>&user_ID=<?php echo $user_ID; ?>">
				<input type="hidden" name="Phone_Number" value="<?php echo $Phone_Number; ?>"/>
				<input type="hidden" name="U_ID" value="<?php echo $U_ID; ?>"/>
				<input type="hidden" name="Verification_Code" value="<?php echo $Verification_Code; ?>"/>
                   
				   
				   <!--
				   <div class="form-group">
                        <div class="input-group">
                            <input class="form-control h-100" id="phone-input" type="tel" value="<?php echo $Phone_Number; ?>" name="Phone_Number" autocomplete="off"  data-intl-tel-input-id="0" placeholder="+962 7X XXX XXXX" required>
                        </div>
                    </div>
					-->
					
					
					
					 <div class="form-group">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span>
                                    <img src="../icons/phone.svg" alt="Lock Icon">
                                </span>
                            </div>
                            <input class="form-control" type="tel" value="<?php echo $Phone_Number; ?>" readonly  name="Phone_Number" placeholder="Phone number" required> 
                            <div class="input-group-append password-visibility">
                               
                            </div>
                        </div>
                    </div>
					
					
					
					
					
					
					
					
					
					<br><br><br><br><br>
					<br><br><br><br>					
					
                    <div class="form-submit-button small-padding">
					<input type="submit" name="Submit" style="height:50px; font-size: 16px; width:250px !important; border-radius: 12px; color:#fff; border:none; background-image: linear-gradient(to right, #B3E207 0%, #3ADBDB 100%);" class="btn  w-100 mb-3" value="Send code"/>
                    </div>
                </form>

                <!--Rate Text Constainer Start-->
                <div class="text-center sms-rate-text">
                    <span style="color:#011F39">Please check your sms.
We just sent a verification code on your phone messages.</span>
                </div>
                <!--Rate Text Constainer Start-->

            </div>
            <!--Sign Up Container End-->

        </div>
    </div>

   

<div class="footer" style="margin-top:-200px">
</div>

</div>


<style>
  .footer {
    background-image: url('../images/footer.png');
    background-size: cover;
    background-repeat: no-repeat;
    height: 280px; 
    bottom: 0;
    width: 120%;
	
  }
</style>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="../js/jquery-3.4.1.js"></script>
<script src="../js/popper.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!--International Telephone input JS-->
<script src="../js/intlTelInput.min.js"></script>
<script src="../js/main.js"></script>
</body>
</html>