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/www/zeeroprice.skilladders.com/loginbycookie.php
<? require_once "application_top.php";
if(isset($_COOKIE["simu"]) && ($_COOKIE["simu"])){
$decdcook = explode("|",decode($_COOKIE["simu"]));

$userid = $decdcook[0];
$mobileno = $decdcook[1];
$db->where('mobno',$mobileno);
$db->where('userid',$userid);
$rowu = $db->getOne('register');

	if($rowu){
		if($rowu['istatus']==0){
			header('location:verifyac.php?id='.encode($rowu["emailid"]));exit;
		}
		
		$_SESSION['useridsess']=$rowu['userid'];
		$_SESSION['mobnoSess']=$rowu['mobno'];
		$_SESSION['fullnamesession']=substr($rowu['fullname'],0,20);
		$_SESSION['freeCoins']=$rowu['freePoints'];
		$_SESSION['walletSess']=$rowu['points'];
		$_SESSION['vendorsess']=1; //everyone is vendor now
		$_SESSION['agfbsess']= 1;//loggedin from this site
		$_SESSION['dpsess']=$rowu['pic1'];
		$_SESSION['msg']="<b>You have successfully logged In</b>";
		
			if($rowu['isvendor']){
				$redirect_url = HTTP_SERVER.'index.php';
			}else{
				$redirect_url = HTTP_SERVER.'index.php';
			}			
			$redirect_url = (isset($_SESSION['redirect_url'])) ? $_SESSION['redirect_url'] : $redirect_url;
			unset($_SESSION['redirect_url']);
			header("Location: $redirect_url", true, 303);
			exit;
			//header("location:shop-online.php");exit;
		}else{
			//delete cookie
			setcookie("simu","",time()-3600);
			$_SESSION['msg'] = "<b>Wrong Username or Password</b>";
			header("location:".HTTP_SERVER."login.php");exit;
		}
}else{
	//delete cookie
	setcookie("simu","",time()-3600);
	$_SESSION['msg']="<b>Invalid access</b>";
	header("location:".HTTP_SERVER."login.php");exit;
}
?>