-
Notifications
You must be signed in to change notification settings - Fork 1
/
header1.php
139 lines (137 loc) · 2.99 KB
/
header1.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.jpg">
</head>
<body>
<?php
ob_start();
session_start();
include 'includes/dbh.inc.php';
if (isset($_SESSION['name'])) {
$fname = $_SESSION['name'];
$name = explode(" ", $fname);
}
?>
<center>
<div class="blue">
<a href="index.php"><img src="logo.png" class="logo"/></a>
<?php
if(isset($_SESSION['email'])) {
echo '<a href="includes/logout.inc.php" class="link">logout</a>
<a href="signup.php" class="link">privacy</a>
<a href="login.php" class="link">account</a>
<a href="login.php" class="link">home</a>';
echo '<div class="thelinks"><a href="profile.php?id='.$_SESSION['id'].'" class="biglinks">Profile</a> ';
echo '<a href="editprofile.php" class="small-links">edit</a>
<a href="" class="biglinks">Friends</a>
<a href="networks.php" class="biglinks">Networks</a> ';
$email = $_SESSION['email'];
$sql2 = "SELECT * FROM messages WHERE toemail = '$email' AND status = 'Unread'";
$result2 = $conn->query($sql2);
if(mysqli_num_rows($result2) > 0) {
echo '<a href="inbox.php" class="biglinks">Inbox ('.mysqli_num_rows($result2).')</a> ';
} else {
echo '<a href="inbox.php" class="biglinks">Inbox</a> ';
}
echo '</div>';
} else {
echo '<a href="tour.php" class="link">tour</a>
<a href="signup.php" class="link">sign up</a>
<a href="login.php" class="link">login</a>';
}
if(isset($_SESSION['email'])) {
$top = "top: 12px;";
} else {
$top = "top: 15px;";
}
?>
<div class="blueline"></div>
</div>
<?php
include 'loginarea.php';
?>
</center>
<style>
body {
font-family: Tahoma,Verdana,Segoe,sans-serif;
}
.blue {
background: #3B5998;
height: 55px;
width: 770px;
display: inline-block;
}
.logo {
height: 29px;
width: 120px;
position: relative;
<?php
echo $top;
?>
margin-top: 4px;
display: flex;
margin-right: auto;
}
.link {
color: #B9BCCB;
font-family: Tahoma,Verdana,Segoe,sans-serif;
margin-left: 10px;
font-size: 11px;
float: right;
position: relative;
right: 17px;
top: -20px;
text-decoration: none;
cursor: pointer;
z-index: 5;
}
.link:hover {
color: white;
text-decoration: underline;
}
.blueline {
position: relative;
top: 15px;
height: 6px;
background: #6D84B4;
}
.biglinks {
position: relative;
z-index: 5;
font-weight: bolder;
color: white;
font-size: 16px;
padding:3px;
text-decoration: none;
font-family: Calibri;
}
.biglinks:hover {
background: #6E86B9;
color: white;
padding:3px;
}
.thelinks {
display: block;
text-align: left;
margin-top: -23px;
position: relative;
left: 135px;
top: -1px;
}
.small-links {
color: #7189B9;
font-size: 14px;
font-family: Calibri;
text-decoration: none;
margin-left: 10px;
}
.small-links:hover {
text-decoration: underline;
color: white;
}
</style>
</body>
</html>