
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php 

if(isset($_POST['login_user_name'])){
    
$url = 'http://136.144.45.200/crm/production/webapi_draw.php?login_user_name='.$_POST['login_user_name'].'&login_user_pass='.$_POST['login_user_pass'];

$curl = curl_init();

curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);

$data = curl_exec($curl);

curl_close($curl);  

$data = json_decode($data,true);

$user_id = $data['user_id'];
//echo $user_id;
if($user_id > 1){

session_start();
$_SESSION["user_id"] = $user_id;

//echo $user_id;

header("Location: https://10yearsanniversary.autozone.sa/redeem/"); 
    
}
 
}   
?>

<!DOCTYPE html>
<html lang="en">
<head>
  <title>10 Years Celebration | Autozone Balubaid</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>

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {

.drw_bg{
background: transparent url(bg-mbl2.jpg) top center no-repeat; 
background-size: cover;
}	

.table-font{
font-size:9px;    
}

.mbl{
display:block;	
}
.pc{
display:none;	
}	
	
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {

.drw_bg{
background: transparent url(bg-mbl2.jpg) top center no-repeat; 
background-size: cover;
}

.mbl{
display:block;	
}
.pc{
display:none;	
}	
	
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {

.drw_bg{
background: transparent url(bg-mbl2.jpg) top center no-repeat; 
background-size: cover;
}

.mbl{
display:none;	
}
.pc{
display:block;	
}	
	
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {

.drw_bg{
background: transparent url(bg-pc.jpg) top center no-repeat; 
background-size: cover;
}

.mbl{
display:none;	
}
.pc{
display:block;	
}	
	
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {

.drw_bg{
background: transparent url(bg-pc.jpg) top center no-repeat; 
background-size: cover;
}	

.mbl{
display:none;	
}
.pc{
display:block;	
}
	
}

@font-face {
  font-family: sansarabic;
  src: url(font.woff);
}

div {
  font-family: sansarabic;
}
a:hover{
    text-decoration: none;

</style>  
  
</head>
<body class="drw_bg">
<div style="height:20px;"></div>
<div style="margin-left:2%;margin-right:2%">
<img src="header_az_draw.png" class="img-fluid mbl" alt="Responsive image">
<img src="header_az_draw_pc.png" class="img-fluid pc" alt="Responsive image">
</div>
<div style="height:30px;"></div>
<div style="text-align:center;">
<img src="FB-Cover.jpg" class="img-fluid" alt="Responsive image">
</div>
<div style="text-align:center;color:white;">
 <div style="height:30px;"></div>   




<div style="height:30px;"></div>




<form method="POST" name=WebToLeads1729050000000212695 onsubmit="javascript:document.charset=&quot;UTF-8&quot;;" action="">
<div style="height:30px;"></div>
<div style="margin-left:10%;margin-right:10%">
<div style="display:inline-block;width:100%;color:white;">
<div style="float:left;">User ID</div><div style="float:right;">معرف المستخدم</div>
</div>
<div style="text-align:center;background:#fbb715;color:#333333;border-radius:25px;padding:10px;font-size:20px;" >
<input type="text" style="width:100%;background:none;border:none;text-decoration:none;color:#333333;" name="login_user_name"></input>
</div>
<div style="color:white;text-align:center;" id="natid"></div>

</div>

<div style="height:30px;"></div>
<div style="margin-left:10%;margin-right:10%">
<div style="display:inline-block;width:100%;color:white;">
<div style="float:left;">Password</div><div style="float:right;">كلمة المرور</div>
</div>
<div style="text-align:center;background:#fbb715;color:#333333;border-radius:25px;padding:10px;font-size:20px;" >
<input type="password" style="width:100%;background:none;border:none;text-decoration:none;color:#333333;" name="login_user_pass"></input>
</div>
<div style="color:white;text-align:center;" id="natid"></div>

</div>

<div style="height:30px;"></div>
<div style="margin-left:10%;margin-right:10%">
<div style="text-align:center;background:#fbb715;color:#333333;border-radius:25px;padding:10px;font-size:20px;" >
<input type="submit" value="Login" style="width:100%;background:none;border:none;text-decoration:none;color:#333333;" ></input>
</div>

</form>

<div style="height:30px;"></div>



<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>

<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>
<div style="height:30px;"></div>

</body>
<style>

 .custom2-file-input::-webkit-file-upload-button {
  visibility: hidden;
}
.custom2-file-input::before {
  content: 'إختيار ملف ';
  display: inline-block;
  background: -webkit-linear-gradient(top, #f9f9f9, #e3e3e3);
  border: 1px solid #999;
  border-radius: 3px;
  padding: 5px 8px;
  outline: none;
  white-space: nowrap;
  -webkit-user-select: none;
  cursor: pointer;
  text-shadow: 1px 1px #fff;
  font-weight: 700;
  font-size: 10pt;
}
.custom2-file-input:hover::before {
  border-color: black;
}
.custom2-file-input:active::before {
  background: -webkit-linear-gradient(top, #e3e3e3, #f9f9f9);
}    

.custom-file-input:lang(en)~.custom-file-label::after {
    content: "إختيار ملف";
}
    
</style>
 <!-- Modal -->
  <div class="modal fade" id="myModal" role="dialog">
    <div class="modal-dialog">
    
      <!-- Modal content-->
      <div class="modal-content" style="direction:rtl;">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title" style="color:black">تم تسليم الهدية</h4>
        </div>
        <div class="modal-body">
          <p style="color:black;">
              يرجى تحميل خطاب الإقرار.
              </p>
              <div style="height:32px;"></div>
          <form name="myForm" action="redeem_gift.php?id=<?php echo $prize_id; ?>&natid=<?php echo $natid; ?>" method="post"
enctype="multipart/form-data" style="color:black;" onsubmit="return validateForm()">
 

<div class="custom-file mb-3">
      <input type="file" class="custom-file-input" id="customFile" name="file">
      <label class="custom-file-label" for="customFile">إقرار تسليم هداية:</label>
    </div>

<input type="hidden" name"id" value="<?php echo $prize_id; ?>" >
<input type="hidden" name"natid" value="<?php echo $natid; ?>" >
<br />
<div style="height:32px;"></div>
<input type="submit" name="submit" value="Submit" />

</form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
      
    </div>
  </div>

<script>
function validateForm() {
  let x = document.forms["myForm"]["file"].value;
  if (x == "") {
    alert("يرجى تحميل مذكرة التسليم");
    return false;
  }
}
</script>



</html>