-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtetris.html
More file actions
59 lines (57 loc) · 1.79 KB
/
tetris.html
File metadata and controls
59 lines (57 loc) · 1.79 KB
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
<?php
session_start();
if ($_GET["logout"]==1){
unset($_SESSION["username"]);
}
if(isset($_SESSION["username"])){
$username = $_SESSION["username"];
}else{
$username = null;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Play Tetris</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<script src="app.js" charset="utf-8"></script>
</head>
<body>
<div class="main">
<div class = "navbar">
<ul>
<li><a href="index.php">Home</a></li>
<div id="right">
<?php
if ($username){
echo "<li><a href='tetris.php?logout=1'>Logout</a></li>";
}else{
echo "<li><a href='index.php'>Login</a></li>";
}
?>
<li><a href="tetris.php">Play Tetris</a></li>
<li><a href="leaderboard.php">Leaderboard</a></li>
</div>
</ul>
</div>
<?php
if($username){
echo "<p id='top-right'>Logged in as: <scan id='user'>". $username . "</scan></p>";
}else{
echo "<p id='top-right'>Log in to save scores</p>";
}
?>
<div class="content-tetris">
<?php
include("game.php");
?>
</div>
<div id="GameOverScreen">
<?php
include"Gameover.php";
?>
</div>
</div>
</body>
</html>