<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/_scripts/sessions.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/_functions/users.functions.php');
$confirm = confirmEmail($_GET);
$page_title = 'Confirm email';
require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/header.php');
?>
<section>
<article>
<h2>Confirm your email address</h2>
<?php if(empty($confirm['errors'])): ?>
<h3>Thanks for confirming your email address, <?php echo $_SESSION['email']; ?></h3>
<p>
You will now need to use that email address to log in.
</p>
<?php else: ?>
<ul class="errors">
<?php foreach($confirm['errors'] as $msg): ?>
<li><?php echo $msg; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</article>
</section>
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/footer.php');
?>