-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
153 lines (139 loc) · 3.16 KB
/
header.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php
session_start();
date_default_timezone_set('America/New_York');
include 'dbh.inc.php';
if (isset($_SESSION['name'])) {
$fname = $_SESSION['name'];
$name = explode(" ", $fname);
}
?>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-W0E1Q0HER2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-W0E1Q0HER2');
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.jpg">
<link ref="apple-touch-icon" sizes="128x128" href="favicon.png">
</head>
<?php
if (!isset($_SESSION['email'])) {
echo '<div class="headertext2"><a class="loginlink" href="login.php">login</a> <a class="signuplink" href="signup.php">register</a> <a class="aboutlink" href="faq.php">about</a></div>';
} else {
echo '
<div class="headertext">
<div class="alt">
<a class="loginlink" href="home.php">home</a> <a class="signuplink" href="search.php">search</a> <a class="aboutlink" href="global.php">browse</a> <a class="otherlink" href="invite.php">invite</a> <a class="otherlink" href="faq.php">help</a> <a class="otherlink" href="logout.inc.php">logout</a>
</div></div>';
}
?>
<style type="text/css">
.headertext {
position: relative;
top: -58px;
z-index: 5;
text-align: right;
font-family: Tahoma,Verdana,Segoe,sans-serif;
color: #6D84B4;
color: black;
font-size: 12px;
left: -10px;
text-decoration: none;
}
.headertext2 {
position: relative;
top: -58px;
z-index: 5;
text-align: right;
font-family: Tahoma,Verdana,Segoe,sans-serif;
color: #6D84B4;
color: black;
font-size: 12px;
left: -10px;
text-decoration: none;
}
.welcometext {
font-size: 14px;
}
.headertext:hover {
color: #77C9F3;
}
.headertext2:hover {
color: #77C9F3;
}
.headertext2 a {
color: #A8B0CD;
font-size: 11px;
padding: 3px;
}
.headertext2 a:hover {
background-color: #526DA4;
color: white;
}
.loginlink {
color: white;
text-decoration: none;
}
.loginlink:hover {
color: #77C9F3;
}
.signuplink {
color: white;
text-decoration: none;
}
.signuplink:hover {
color: #77C9F3;
}
.aboutlink {
color: white;
text-decoration: none;
}
.aboutlink:hover {
color: #77C9F3;
}
.alt {
position: relative;
margin-left: 170px;
text-decoration: none;
color: white;
}
.otherlink {
color: white;
text-decoration: none;
}
.otherlink:hover {
color: #77C9F3;
}
.header {
height: 40px;
}
.headertext a {
color: #A8B0CD;
font-size: 11px;
padding: 3px;
}
.headertext a:hover {
background-color: #526DA4;
color: white;
}
@media only screen and (max-width:700px) {
.headertext {
left: -45px;
}
}
@media only screen and (max-width:500px) {
.headertext {
position: relative;
left: -100px;
}
.headertext2 {
position: relative;
left: -250px;
}
}
</style>