MOON
Server: Apache
System: Linux ip-208-109-13-31.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els4.x86_64 #1 SMP Sat Aug 31 06:58:57 UTC 2024 x86_64
User: durgeshpandey215 (1013)
PHP: 8.1.29
Disabled: NONE
Upload Files
File: /home/durgeshpandey215/public_html/zeeroprice.skilladders.com/verifyac.php
<?include "application_top.php";
	$id = isset($_REQUEST['id'])? decode($_REQUEST['id']) : "";
	if(!$id){ $_SESSION['msg']="Invalid access"; header('location:index.php');exit; }
	$db->where('mobno',$id);
	$rowu = $db->getOne('register');
	
	if(isset($_REQUEST['verifycode'])){
		$verifycode = isset($_REQUEST['verifycode'])? $_REQUEST['verifycode'] : "";
		
			if($rowu['verified']){
				$_SESSION['msg'] = "Your account is already active. Please login below";
			}else{
				if($rowu['verifycode']==$verifycode){
				$updatedata = array(
					'verified'=> 1,
					'istatus'=> 1
				);
				$db->where('mobno',$id);
				$db->update('register',$updatedata);
				$_SESSION['msg'] = "Congratulations! Your account is now active, Please login below";
				}else{
					$_SESSION['msg']="Invalid code.";
					
					header("location:verifyac.php?id=".encode($id));exit;
				}
			}
			
			header("location:login.php");exit;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<? require_once "scripts.php";?>
	
</head>
<body>

	<? $pagename = 'login'; require "header.php";?>
	<div class="w3-container"><!--w3-twothird starts here -->

			<h1>Verify your account</h1>
			<br/>
			<center><h3>
			
				Please enter the verification code sent to your email id
			</h3>
			<br/>
			<form action="<?=$_SERVER['PHP_SELF'];?>" method="post" id="commonform">
			<?=$rowu['verifycode'];?><br/>
			Verification code.* <input type="text" name="verifycode" class="textclass required" placeholder="Verification code" maxlength="8"/>
			<input type="hidden" name="id" value="<?=encode($id);?>" />
			<input type="submit" name="register" class="button" value=" Verify "/>
	
			</form>
			<br/>
			<script>
			$(document).ready(function(){
			$('#resendcode').on('click', function(){
				$("#successDiv").html("Processing please wait...");
				$.ajax({url:"ajax_resendcode.php?id=<?=encode($id);?>", success:function(result){
					if(result == 1){ 
						$('#successDiv').val('');
						$("#successDiv").html(result);
					}else{
						$("#successDiv").html(result);
					}
				}});
			});
			});
			</script>
			<div id="successDiv">
			<a href="javascript:void(0);" id="resendcode">Resend verification code</a>
			</center>
			
			</div>
		
	<br/><br/>
	</div><!--w3-twothird ends here -->
	<? include "footer.php";?>
</body>
</html>