-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
43 lines (35 loc) · 899 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
require("includes.php");
if (isset($_POST['email'])) {
$user_check = User::login($_POST['email'],$_POST['passwd']);
if ($user_check !== false) {
$user = $user_check;
$_SESSION['user'] = &$user;
} else {
echo "Email/password combination failed\n<br/>";
}
}
?>
<?php
echo $header;
if ($user != null) {
?>
<div id="content">
<a href="regexhero.php" class="button">Play Regex Hero</a>
<?php
} else {
?>
<div class="hero-unit">
<div class="container">
<h1>Regex Quest</h1>
<p>Face challenging code problems and emerge victorious, with <em>the power of regular expressions</em>.</p>
<p class="main-cta"><a href="/signup.php" class="btn btn-large btn-primary">Create your hero profile</a></p>
<p class="small">or just <a href="/tutorial.php">play the tutorial</a></p>
</div>
</div>
<div id="content">
</div>
<?php
}
echo $footer;
?>