<?php
session_start();
include 'api/apikey.php';
$val=array();
$val=$_REQUEST;
if(!EMPTY($val['0']['code']))
{
    $code=$val['0']['code'];
}
if(ISSET($_SESSION['user_email']))
{
    $email=$_SESSION['user_email'];
}
if(!EMPTY($code))
{
$to = $email;
$subject = "EMAIL VERIFICATION CODE";
$txt = 'Your verification code is- '.$code;
$headers = "From: apurbakarar7063@gmail.com" . "\r\n" .
"CC: apurbakarar7063@gmail.com";

if(mail($to,$subject,$txt,$headers))
{
 //echo 'mail send successfully';
}
else
{
	//echo 'Not send';
}
}



?>
<!DOCTYPE html>
<html>
<head>
  <title></title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
   <link rel="stylesheet" type="text/css" href="css/style2.css">
   
   <!-----		sweet alert css and js link	---->
	<link rel="stylesheet" href="dist/sweetalert.css">
	<script src="dist/sweetalert.min.js"> </script>
</head>
<body>
    <div class="container">
    <div class="login-signup">
      <div class="row">
        <div class="col-sm-6 col-sm-offset-3 nav-tab-holder">
        <ul class="nav nav-tabs row" role="tablist">
          <li role="presentation" class="active col-sm-12"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Email verification window</a></li>
          
        </ul>
      </div>

      </div>


      <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="home">
          <div class="row">

            <div class="col-sm-6 col-sm-offset-3">
              <article role="login">
                <h3 class="text-center"><i class="fa fa-lock"></i>USER</h3>
                <form class="signup"  method="post">
                  
                  <div class="form-group">
                    <input type="hidden" id="user_email" value="<?php if(isset($email)){echo $email;} ?>">
                    <input type="password" class="form-control" name="verify_box" placeholder="Enter the 6 digit code" maxlength="6" id="verify_box">
		    <div id="verify_error" style="color:red"></div>
                  </div>
				  
                  <div id="err" style="color:red"></div>
                  <div class="form-group">
                    <input type="button" class="btn btn-success btn-block"  value="Verify" name="login_check" 
                    id="verify_btn">
                  </div>
                </form>

              </article>
            </div>

            <div class="col-sm-6">
              
            </div>

          </div>
          <!-- end of row -->
        </div>
        <!-- end of home -->


  </div>
  </div>
    <script src="https://code.jquery.com/jquery-2.2.4.min.js"   integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="   crossorigin="anonymous"></script>
    <script src="<?php echo $apiurl;?>/custom.js"></script>
</body>
</html>