Update index.php

This commit is contained in:
deepend-tildeclub 2024-03-23 13:42:06 -06:00 committed by GitHub
parent ccf2ce5d15
commit f9ae044792
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 38 additions and 1 deletions

View File

@ -2,6 +2,43 @@
$title = "sign up for the tilde.club!";
include __DIR__."/../header.php";
<p>Sorry Signups are currently closed.</p>
function esc($v) {
return isset($_REQUEST[$v]) ? htmlspecialchars($_REQUEST[$v]) : "";
}
function isGmail($email) {
return substr(strrchr($email, "@"), 1) === 'gmail.com';
}
$gmailError = false;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isGmail($_REQUEST['email'])) {
$gmailError = true;
} else {
// Process the form here only if the email is not a Gmail address
include 'signup-handler.php';
}
}
?>
<?php if ($gmailError): ?>
<div class="alert alert-warning">
<strong>We don't accept Gmail addresses due to Google not allowing emails to go through due to a recent spam issue.</> </div>
<?php endif; ?>
<h1 id="fancyboi">sign up to join tilde.club</h1>
<div class="grid">
<div class="row">
<div class="col">
<p>Sorry Signups are currently closed. Come back soon!</p>
</td>
</tr>
</table>
</div>
</div>
<?php include __DIR__."/../footer.php";