forked from vern/website
Finishing touches
Signed-off-by: Skylar "The Cobra" Widulski <cobra@vern.cc>
This commit is contained in:
parent
fe17adaa38
commit
506fcadec9
|
@ -26,6 +26,7 @@
|
|||
return $str;
|
||||
}
|
||||
$err = $email = $code = $code_err = '';
|
||||
$confirmed = false;
|
||||
if (!empty($_GET['action']))
|
||||
if (!empty($_GET['email']))
|
||||
if (filter_var(sanitize($_GET['email']), FILTER_VALIDATE_EMAIL))
|
||||
|
@ -60,6 +61,7 @@
|
|||
$message = "You have been " . ($_GET['action'] == "sub" ? "added to" : "removed from") . " the ~vern announcement mailing list";
|
||||
|
||||
mail($email, $subject, $message, $headers);
|
||||
$confirmed = true;
|
||||
} else {
|
||||
$code_err = 'Incorrect code';
|
||||
}
|
||||
|
@ -96,7 +98,7 @@
|
|||
<span><input type="submit" value="Submit" style="width:100px;height:40px;font-size:20px"></span>
|
||||
</form><br>
|
||||
<?php
|
||||
} else {
|
||||
} else if (!$confirmed) {
|
||||
?>
|
||||
<div class=h><h1 id=confirm>Confirm Action</h1> <a aria-hidden=true href=#confirm>#confirm</a></div>
|
||||
<p>A confirmation code was sent to <?php echo htmlspecialchars($email); ?></p>
|
||||
|
@ -113,6 +115,13 @@
|
|||
<br>
|
||||
<span><input type="submit" value="Confirm" style="width:100px;height:40px;font-size:20px"></span>
|
||||
</form><br>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<meta http-equiv="refresh" content="5;url=/en/" />
|
||||
<div class=h><h1 id=thanks>Confirmed</h1> <a aria-hidden=true href=#thanks>#thanks</a></div>
|
||||
<p>You have received an e-mail confirming the action as well.</p>
|
||||
<p>You will be redirected back <a href=/en/>home</a> in 5 seconds.</p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
<?php
|
||||
} else {
|
||||
?>
|
||||
<meta http-equiv="refresh" content="5;url=http://<?php echo htmlspecialchars($_SERVER['HTTP_HOST']); ?>" />
|
||||
<meta http-equiv="refresh" content="5;url=/en/" />
|
||||
<div class=h><h1 id=thanks>Thank you for signing up.</h1> <a aria-hidden=true href=#thanks>#thanks</a></div>
|
||||
<p>An admin will review your request, and an e-mail will be sent if your registration is successful.</p>
|
||||
<p>You will be redirected back <a href=/en/>home</a> in 5 seconds.</p>
|
||||
|
|
Loading…
Reference in New Issue