<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/_functions/users.functions.php');
$fix = fixPassword($_GET, $_POST);
$page_title = 'Fix password';
require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/header.php');
?>
<section>
<article class="half–blocks">
<div>
<h2>Fix your password</h2>
<?php if(isset($_GET['hash'])): ?>
<p>
Enter a new password for your account.
</p>
<?php else: ?>
<p>
Please follow these instructions.
</p>
<?php endif; ?>
</div>
<div>
<?php if(!empty($fix)): ?>
<ul class="errors">
<?php foreach($fix['errors'] as $msg): ?>
<li><?php echo $msg; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?php if(isset($_GET['hash'])): ?>
<form class="standard–form" action="" method="post">
<label for="password">New password</label>
<input type="password" name="password" id="password" placeholder="New password" />
<button type="submit">Update my password</button>
</form>
<?php else: ?>
<h3>Check your email</h3>
<ol>
<li>Check your email and spam folder for an email from tampabaynetworkers.com</li>
<li>Follow the email's instructions and click the included link.</li>
<li>Create a new password for you account when prompted.</li>
</ol>
<?php endif; ?>
</div>
<div></div>
</article>
</section>
<?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/_includes/footer.php');
?>