summaryrefslogtreecommitdiffstats
path: root/includes/header.php
diff options
context:
space:
mode:
authorraylu <raylu@cmu.edu>2011-04-07 00:27:27 -0400
committerraylu <raylu@cmu.edu>2011-04-07 00:27:27 -0400
commitf8c9eb5220afaf2f9a62f9a176a45913240f4081 (patch)
tree99775178acfcef6e86e39184be0ac96083042f1b /includes/header.php
downloadpathery-f8c9eb5220afaf2f9a62f9a176a45913240f4081.tar.xz
Initial import from Dropbox
Diffstat (limited to 'includes/header.php')
-rw-r--r--includes/header.php67
1 files changed, 67 insertions, 0 deletions
diff --git a/includes/header.php b/includes/header.php
new file mode 100644
index 0000000..53c1a82
--- /dev/null
+++ b/includes/header.php
@@ -0,0 +1,67 @@
+<?PHP
+
+function htmlHeader() {
+?>
+<!DOCTYPE html>
+<html xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <link href="css/mapstyle.css" rel="stylesheet" type="text/css" />
+ <link href="css/pagestyle.css" rel="stylesheet" type="text/css" />
+ <link href="css/statsstyle.css" rel="stylesheet" type="text/css" />
+ <title>Snapems.com Mazegame</title>
+
+ <script src="js/ajax.js" type="text/javascript"></script>
+ <script src="js/mapspecs.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-371072-3']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+</head>
+<?
+}
+
+function htmlfooter() {
+
+}
+
+function topbar($links) {
+ echo '<div class="topbar">';
+
+ $page = $_GET[page];
+ if ($page == '')
+ $page = 'home';
+ $first = true;
+ foreach ($links as $key => $value) {
+ if ($first)
+ $first = false;
+ else
+ echo ' | ';
+ if ($page == $key)
+ echo "<b><a href='?page=$key'>$value</a></b>";
+ else
+ echo "<a href='?page=$key'>$value</a>";
+ }
+
+ echo "\t<div class='lfloat'>";
+ if ($_SESSION['accepted'] == 1) {
+ echo "Logged in as <a href='?page=cp' title='change name'>$_SESSION[displayName]</a>.\n";
+ echo "<a href='?page=logout'>Logout</a>";
+ if ($_SESSION['displayName'] == 'noname')
+ echo "<a href='?page=cp' title='change name'>Update your name</a>";
+ } else
+ echo "<a href='?page=login'>Sign in using Google</a>";
+
+ echo "\t</div>";
+ echo "</div>";
+}
+
+?>