You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.4 KiB
PHP

<?php
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
if (empty($IN_SITE)) {
die("Access denied.");
}
?>
<div class="container mt-4">
<div class="row justify-content-center">
<div class="card mb-4 col-lg-8">
<div class="card-body">
<div class="text-center">
<img class="img-fluid mb-4" style="max-height: 100px; min-width: 100px;" src="static/hachelogo.svg" alt="HACHE: Helena Area Christian Home Educators"/>
<h1>Renew Your Membership</h1>
<div class="card-text">
<p>
Please enter your email address below. You'll be
sent a verification code. This is to ensure nobody
else can view or change your family's information.
</div>
<?php
$msg = "";
if (!empty($_GET['msg'])) {
switch ($_GET['msg']) {
case "sessionexpired":
$msg = "You took too long and were automatically logged out. Please try again.";
break;
case "noemail":
$msg = "We don't have that email on file for any current families.";
break;
case "bademail":
$msg = "That email address doesn't look right. Please try again.";
break;
case "tooearly":
if (!empty($_GET['exp']) && is_numeric($_GET['exp'])) {
$msg = "This membership isn't expiring until " . date("F Y", $_GET['exp'] * 1) . " and cannot be renewed yet.";
} else {
$msg = "This membership isn't close enough to expiration and cannot be renewed yet.";
}
break;
}
}
if ($msg != "") {
?>
<div class="alert alert-danger">
<?php echo $msg; ?>
</div>
<?php
}
?>
<form action="./?page=verify" method="POST">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-at fa-fw"></i>
</span>
</div>
<input type="email" class="form-control" name="email" placeholder="family@example.com" autofocus />
<div class="input-group-append">
<button type="submit" class="btn btn-primary">Continue <i class="fas fa-chevron-right"></i></button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>