summaryrefslogtreecommitdiffstats
path: root/includes/header.php
blob: b4020256ce99f287615ed26a77cd48f52242a4fa (plain)
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
65
66
67
68
69
70
71
72
73
<?PHP

function htmlHeader() {
?>
<!DOCTYPE html>
<html xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>pathery.com</title>

    <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" />
    <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);

		var fo = document.createElement('link');
		fo.rel = 'stylesheet';
		fo.type = 'text/css';
		fo.href = "http://fonts.googleapis.com/css?family=Cantarell:400,700";
		var l = document.getElementsByTagName('link')[0]; l.parentNode.insertBefore(fo, l);
    })();
    </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>";
}

?>