-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.php
64 lines (59 loc) · 1.89 KB
/
main.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Your Home | PreBook</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" type="image/png" href="img/logo.png">
</head>
<body>
<?php
if (isset($_SESSION['username'])) {
?>
<nav>
<div class="logo">
<img src="img/logo.png"> <h1> PreBook</h1><span><i>Cheap, Reliable, Instant</i></span>
</div>
<ul>
<li class="special"><a href="buywelcome.php">Buy a Ticket</a></li>
<li><a href="comment.php">Movie Review</a></li>
<li><a href="history.php">Purchase History</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</nav>
<main>
<div class="bar">
<h2>Welcome, <?php print $_SESSION['username'] ?>!</h2>
<span class="aside"><i>...welcome home.</i></span>
</div>
<p>Want to book a movie ticket? You've come to the right place. Find movies, get showtimes and buy your tickets ahead of time to ensure you get the best seats--without having to wait in line.</p>
<a href="buywelcome.php"><button class="form-button">Book a movie ticket now</button></a>
</main>
<?php
}
else {
?>
<nav>
<div class="logo">
<img src="img/logo.png"> <h1> PreBook</h1><span><i>Cheap, Reliable, Instant</i></span>
</div>
</nav>
<main>
<div class="bar">
<h2>Oops...</h2>
<span class="aside"><i>you don't seem to be logged in, redirecting you to login page.</i></span>
</div>
<i class="fas fa-exclamation-triangle full-icon"></i>
</main>
<?php
header( "refresh:3;url=index.html" );
}
?>
<footer>
</footer>
</body>
</html>