2019-09-14 12:58:11 -04:00
<? php
2024-01-21 05:35:26 +00:00
$title = "sign up for the tilde.club!" ;
2019-09-14 14:29:05 -04:00
include __DIR__ . "/../header.php" ;
2021-09-12 17:24:57 -04:00
function esc ( $v ) {
return isset ( $_REQUEST [ $v ]) ? htmlspecialchars ( $_REQUEST [ $v ]) : "" ;
}
2019-09-14 14:29:05 -04:00
2024-01-19 16:00:43 -07:00
function isGmail ( $email ) {
2024-01-21 05:35:26 +00:00
return substr ( strrchr ( $email , "@" ), 1 ) === 'gmail.com' ;
2024-01-19 16:00:43 -07:00
}
2019-09-14 14:29:05 -04:00
2024-01-19 16:00:43 -07:00
$gmailError = false ;
if ( $_SERVER [ 'REQUEST_METHOD' ] === 'POST' ) {
2024-01-21 05:35:26 +00:00
if ( isGmail ( $_REQUEST [ 'email' ])) {
2024-01-19 16:00:43 -07:00
$gmailError = true ;
} else {
2024-01-21 05:35:26 +00:00
// Process the form here only if the email is not a Gmail address
2024-01-19 16:00:43 -07:00
include 'signup-handler.php' ;
}
}
?>
2024-01-21 05:35:26 +00:00
<?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; ?>
2019-09-14 14:29:05 -04:00
2024-01-21 05:35:26 +00:00
<h1 id="fancyboi">sign up to join tilde.club</h1>
2024-01-19 16:00:43 -07:00
<div class="grid">
<div class="row">
<div class="col">
<p>We're excited you're here! Let's get you signed up!</p>
2024-01-21 05:35:26 +00:00
<p>Fill out this form and we'll get back to you with account info</p>
2024-01-19 16:00:43 -07:00
<form method="post">
2024-01-21 05:35:26 +00:00
<div>
<p>your desired username (numbers and lowercase letters only, no spaces)</p>
<input class="form-control" name="username" value="<?=esc("username")?>" type="text" required>
</div>
<div>
<p>email to contact you with account info</p>
<input class="form-control" name="email" value="<?=esc("email")?>" type="text" required>
</div>
<div>
<p>what interests you about tilde.club? we want to make sure you're a real human being :)</p>
<textarea required class="form-control" name="interest" id="" cols="40" rows="7"><?=esc("interest")?></textarea>
</div>
<div>
<p>SSH public key</p>
<textarea required class="form-control" name="sshkey" id="" cols="40" rows="10"><?=esc("sshkey")?></textarea>
<p>if you don't have a key, don't worry! <a href="https://tilde.club/wiki/ssh.html">check out our guide to ssh keys</a> and make sure that you only put your pubkey here</p>
</div>
<p>
<em>signing up implies that you agree to abide by <a href="/wiki/code-of-conduct.html">our code of conduct</a></em>
<br>
no drama. be respectful. have fun. we're all trying, and we're all in this together :)
</p>
<p>you must be at least 13 years or older to sign up and use tilde.club.</p>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
</td>
</tr>
</table>
</div>
2020-05-06 01:52:26 -06:00
</div>
2024-01-20 22:01:29 -07:00
<?php include __DIR__."/../footer.php";