GIF89a
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<head>
<meta charset="utf-8">
<meta name="description"
content="" />
<meta name="keywords"
content="" />
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- title -->
<title>Viralhoga.com | Verify OTP</title>
<!-- favicon -->
<link rel="icon" type="image/x-icon" href="img/logo/favicon.png">
<!-- bootstrap css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<!-- magnific-popup css -->
<link rel="stylesheet" type="text/css" href="css/magnific-popup.css">
<!-- animate css -->
<link rel="stylesheet" type="text/css" href="css/animate.min.css">
<!-- bootstrap icon -->
<link rel="stylesheet" type="text/css" href="css/bootstrap-icons.css">
<!-- font-awesome css -->
<link rel="stylesheet" type="text/css" href="css/all.min.css">
<!--fether css -->
<link rel="stylesheet" type="text/css" href="css/feather.css">
<!-- owl css -->
<link rel="stylesheet" type="text/css" href="css/owl.carousel.min.css">
<link rel="stylesheet" type="text/css" href="css/owl.theme.default.min.css">
<!-- swiper-bundle css -->
<link rel="stylesheet" type="text/css" href="css/swiper-bundle.min.css">
<!-- slick slider css -->
<link rel="stylesheet" type="text/css" href="css/slick.css">
<!-- style css -->
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="css/ourstyle.css">
</head>
<body onLoad="startTimer()">
<!-- header start -->
<?php include('includes/navbar.php');
session_start();
if(!isset($_SESSION['otpCandidate']) || empty($_SESSION['otpCandidate']))echo "<script>window.location='/'</script>";
if(isset($_POST['signUp'])){
$insert_data = $obj->insert_registration_dtl('register');
if($insert_data=="success"){
unset($_SESSION['otpCandidate']);
if(isset($_SESSION['urlLink']) && !empty($_SESSION['urlLink'])){
echo "<script>window.location='$_SESSION[urlLink]'</script>";
}else echo "<script>window.location='index.php'</script>";
}else{
echo "<script>alert('OTP is not correct.');window.location='verify-otp.php'</script>";
}
}
?>
<!-- header end -->
<!-- main section start-->
<main>
<!-- breadcrumb start -->
<section class="breadcrumb-area">
<div class="container">
<div class="col">
<div class="row">
<div class="breadcrumb-index">
<!-- breadcrumb main-title start-->
<div class="breadcrumb-title">
<h2>Login</h2>
</div>
<!-- breadcrumb main-title end-->
<!-- breadcrumb-list start -->
<ul class="breadcrumb-list">
<li class="breadcrumb-item-link"> <a href="index.php">Home</a> </li>
<li class="breadcrumb-item-link"> <span>Verify OTP</span> </li>
</ul>
<!-- breadcrumb-list end -->
</div>
</div>
</div>
</div>
</section>
<!-- breadcrumb end -->
<section class="Exclusive-product bt">
<div class="container">
<div class="row">
<div class="col-lg-3 mt-4"></div>
<div class="col-lg-6 mt-4">
<div class="exclusive-product-wrap shadow p-4">
<div class="row">
<div class="newsletter-info">
<div class="subscribe_area">
<div class="subscribe-content">
<h2>Verify OTP</h2>
</div>
<div class="login_regwithfacgoogle mt-4">
<div class="registers">
<form method="post">
<div class="login-form-container">
<ul class="fill-form">
<li class="log-email">
<label>Enter OTP</label>
<input type="text" name="otp" class="input-full" maxlength="6" placeholder="Enter OTP" required>
</li>
</ul>
<div class="form-action-button">
<div class="read-agree w-100">
<button name="signUp" class="btn btn-danger px-4 w-100 " >Submit</button>
<span style="float:right" id="rsendOTP"><p id="timer">Resend OTP? </p></span>
</div>
</div>
</div>
</form>
<script>
function startTimer() {
var duration = 2 * 60; // 2 minutes in seconds
var display = document.getElementById('timer');
var timer = duration, minutes, seconds;
var interval = setInterval(function () {
minutes = parseInt(timer / 60, 10);
seconds = parseInt(timer % 60, 10);
minutes = minutes < 10 ? "0" + minutes : minutes;
seconds = seconds < 10 ? "0" + seconds : seconds;
display.textContent = minutes + ":" + seconds;
if (--timer < 0) {
clearInterval(interval);
//alert("Time's up!");
}
}, 1000);
}
setTimeout(function resendOTP(){
document.getElementById('rsendOTP').innerHTML='<a onClick="resendOTP()" style="cursor:pointer;margin-top: 15px;font-size: 14px;color: #dc3545;">Resend OTP?</a>';
},120000);
//rsend otp
function resendOTP(){
var mobile = '<?php echo $_SESSION['otpCandidate']?>';
myData = "mobile="+mobile;
jQuery.ajax({
type: "POST", // HTTP method POST or GET
url: "rsendotp.php", //Where to make Ajax calls
dataType:"text", // Data type, HTML, json etc.
data:myData, //Form variables
success:function(response){
//alert(response);
if(response==1){
window.location='verify-otp.php';
}
else alert('OTP request failed due to a technical issue. please try after some time...');
},
error:function (xhr, ajaxOptions, thrownError){
reg("#submitbtn").show(); //show submit button
reg("#LoadingImage").hide(); //hide loading image
alert(thrownError);
}
});
}
</script>
</div>
</div>
</div>
</div>
</div>
<div class="exclusive-content"> </div>
</div>
</div>
<div class="col-lg-3 mt-4"></div>
</div>
</div>
</section>
</main>
<!-- main section end-->
<!-- footer start -->
<?php include('includes/footer.php')?>
<!-- screen-bg start -->
<div class="screen-bg"></div>
<!-- screen-bg end -->
<!-- back-to-top start -->
<a href="javascript:void(0)" id="top" class="scroll"> <span><i class="feather-arrow-up"></i></span> </a>
<!-- back-to-top end -->
<!-- jquery -->
<script src="js/jquery-3.6.3.min.js"></script>
<!-- bootstrap js -->
<script src="js/bootstrap.min.js"></script>
<script src="js/popper.min.js"></script>
<!-- magnific-popup js -->
<script src="js/jquery.magnific-popup.min.js"></script>
<!-- owl js -->
<script src="js/owl.carousel.min.js"></script>
<!-- swiper-bundle js -->
<script src="js/swiper-bundle.min.js"></script>
<!-- slick js -->
<script src="js/slick.min.js"></script>
<!-- waypoints js -->
<script src="js/waypoints.min.js"></script>
<!-- counter js -->
<script src="js/counter.js"></script>
<!-- main js -->
<script src="js/main.js"></script>
</body>
</html>