-
Notifications
You must be signed in to change notification settings - Fork 1
/
includes.php
63 lines (58 loc) · 1.98 KB
/
includes.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
<?php
//error_reporting(E_ALL);
//ini_set("display_errors",true);
require("config.php");
require("DatabaseUtil.php");
require("utilities.php");
require("user.php");
$db = new DatabaseUtil();
session_start();
$user = null;
if (isset($_SESSION['user'])) {
$user = &$_SESSION['user'];
}
$header=<<<HEADER
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta charset="UTF-8" />
<title>Regex Quest</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="index.js"></script>
<link rel="stylesheet" href="bootstrap.css" type="text/css"/>
<link rel="stylesheet" href="regexhero.css" type="text/css"/>
</head>
<body>
<div class="navbar navbar-inverse">
<div class="navbar-inner">
<div class="container">
<a href="/" class="brand">Regex Quest</a>
<a href="/login.php" class="navbar-text pull-right">Login</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="/">Home</a></li>
<li><a href="/tutorial.php">Get started</a></li>
<li><a href="/leaderboard.php">High Scores</a></li>
<li><a href="/about.php">About Regex Quest</a></li>
</ul>
</div>
</div>
</div>
</div>
HEADER;
$footer=<<<FOOTER
<hr />
<footer>
<div class="container">
<div class="btn-group">
<a class="btn btn-small" href="/tutorial.php">Regex Quest Tutorial</a>
<a class="btn btn-small" href="/leaderboard.php">Regex Quest Leaderboard</a>
<a class="btn btn-small" href="http://en.wikipedia.org/wiki/Regular_expression" target="_blank">About Regular Expressions</a>
<a class="btn btn-small" href="https://github.com/nruffilo/regexquest.com">Project GitHub</a>
</div>
</div>
</footer>
</body>
</html>
FOOTER;
?>