
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
include "../login/landing_api.php";

//is_active_session();

$last_win_date = $_SESSION['last_win_date'];
$cur_date = date('Y-m-d');

//print_r($_POST);

$smobile = "966".substr(convert_ar_num($_POST['mobile']),1);

$digits = 4;
$code =  rand(pow(10, $digits-1), pow(10, $digits)-1);

$message = "رمز التحقق الخاص بك هو:";
$message .= " ".$code;

send_sms($smobile,$message);

if(isset($_POST['mobile'])){}else{

$newURL = 'https://funlandksa.com/luckywheel/login/';

header('Location: '.$newURL);    
    
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Funland | Everyone is winner</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>

<style>
body{
 background-image: url("../login/images/bg.jpg");
 background-color: #cccccc; 
  background-repeat: no-repeat; /* Do not repeat the image */
  background-size: cover; /* Resize the background image to cover the entire container */
}

.input-kd{
    border: 3px solid #fff;
    border-radius: 23px;
    background-image: linear-gradient(to right,#E6E6E6, #fff);
    box-shadow: 0px 0px 4px 4px #2dbdbb;
}
.error{
    border: 3px solid red !important;
   /* background-image: linear-gradient(to right,red, red) !important; */
}
.timer-circle{
     padding-left:10px;
    padding-right:10px;
}
.timer-text{
    text-align: center;
    margin-top: 15px;
    font-size: 19px;
    color: white;
    font-weight: 700;    
}

.label-kd{
color: #fcda00;
}
.fl-right{
    float: right;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {

.win-img{
    height:285px;
}

.gift-box-kd{
    margin-top: -163px;
}

.term1{
height: 29px;float:right;    
}
.term2{
height: 29px;float:left;    
}
    
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {


.win-img{
    height:285px;
}
   
.gift-box-kd{
    margin-top: -163px;
} 

.term1{
height: 29px;float:right;    
}
.term2{
height: 29px;float:left;    
}
    
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {

.win-img{
    height: 430px;
}

.gift-box-kd{
    margin-top: -252px;
}

.term1{
height: 57px;float:right;    
}
.term2{
height: 57px;float:left;    
}
    
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {

.win-img{
    height: 430px;
}

.gift-box-kd{
    margin-top: -252px;
}

.term1{
height: 57px;float:right;    
}
.term2{
height: 57px;float:left;    
}
    
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {

.win-img{
    height: 430px;
}

.gift-box-kd{
    margin-top: -252px;
}

.term1{
height: 57px;float:right;    
}
.term2{
height: 57px;float:left;    
}
    
}




    
</style>  
  
</head>
<body>
<div class="container">

<div style="height:96px;"></div>

<div style="
    top: 15px;
    left: 201px;
    position: absolute;
">
<img src="../login/images/funland-logo.png" style="height: 57px;" >    
</div>

<div style="
    top: 15px;
    right: 201px;
    position: absolute;
">
<img src="../login/images/hashtag.png" style="height: 57px;" >    
</div>

<div style="height:32px;"></div> 

<h3 style="text-align:center;color:white" >رمز التفعيل</h3>

<div style="height:32px;"></div> 


<form action="https://funlandksa.com/luckywheel/login/glogin.php" name="wtl123" onSubmit='javascript:document.charset="UTF-8";return validateForm()' accept-charset='UTF-8'; method="post">
    
<div class="form-group">
    <input type="tel" class="form-control input-kd" name="vcode" id="vcode">
    <div style="text-align:center;"><span id="evcode" style="color:white;"></span></div>
  </div>

<input type="hidden" name="cname" value="<?php echo $_POST['cname']; ?>">
<input type="hidden" name="email" value="<?php echo $_POST['email']; ?>">
<input type="hidden" name="mobile" value="<?php echo convert_ar_num($_POST['mobile']); ?>">
<input type="hidden" name="source" value="<?php echo $_POST['source']; ?>">
<input type="hidden" name="city" value="<?php echo $_POST['city']; ?>">

  

<input type="image" name="submit" value="1" src="../login/images/play-win-min.png" style="height: 96px;" class="mx-auto d-block" />    
    
</div> 

</form>

    
</div>    
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 
<div style="height:64px;"></div> 

<?php 
//$date=date_create($last_win_date);

$date = strtotime("+14 day", strtotime($last_win_date));
$counter_date = date("M d, Y", $date);

//$counter_date = date_format($date,"M d, Y");

?>
    
</body>


</html>
<script>
    function validateForm() {
    
   var e = document.forms["wtl123"]["vcode"].value;
   var ey = document.forms["wtl123"]["vcode"];
    if (e !== "<?php echo $code; ?>") {
        document.getElementById("evcode").innerHTML = "رمز غير صحيح";
        ey.classList.add("error");
        return false;
    }
else if (e !== null || e !== "" || e.trim() !== ""){
document.getElementById("ecity").innerHTML = "";
ey.classList.remove("error");
}


}


</script>
 
