<?php

//NOT USED PLEASE DELETE LATER
	include("login-var.php");

	if ($exist == true) {
		$filename = $udir . $username . ".txt";
		$file = fopen($filename,"r");
			$readed = fread($file,filesize($filename));
			fclose($file);
		$rearray = explode("\r\n",$readed);

		$hashf = $rearray[0];
	}
	else {
		header("Location: wrong-pass.html");
	}

	//Verify it and tell what to do if
		$pstat = password_verify($enteredpw, $hashf);
		
		if($userexploit) {
			if($pstat) {
				header("Location: index.php");
			}
			else {
				header("Location: wrong-pass.html");
			}
		}
		else {
			header("Location: anti-exploit.html");
		}
?>