<?php
$account=getAccounts($users['id']);
echo getBreadCrumb("Validate");
if (!isset($_POST['code'])) {
}
else{
	$code=$_POST['code'];
	
	if(checkCode($users['id'],$code)==true){
		echo getPanel("danger","Unable to Validate","The code didn't match please re-enter the code sent to your email.");
	}elseif(checkCode($users['id'],$code)==false){
		echo getPanel("success","Account Validated",'Your account has been validated please <a href="index.php?p=create">Create a character</a>.');
		validateAccount($users['id']);
	}else{
		echo getPanel("danger","Unable to Validate","Something went wrong, please try again.");
	}
}
?>
