-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
34 lines (30 loc) · 1.22 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
<?php
session_start();
echo "<!DOCTYPE html>\n<html><head>";
require_once 'functions.php';
$userstr='(Guest)';
if(isset($_SESSION['user'])){
$user=$_SESSION['$user'];
$loggedin=TRUE;
$userstr="($user)";
}
else $loggedin=FALSE;
echo"<title>$appname$userstr</title><link rel='stylesheet'"."href='styles.css' type='text/css'>"
."</head><body><center><canvas id='logo' width='624'"."height='96'>$appname</canvas></center>".
"<div class='appname'>$appname$userstr</div>"."<script src='javascript.js'></script>";
if($loggedin)
echo "<br><ul class='menu'>".
"<li><a href='members.php?view=$user'>Home</a></li>".
"<li><a href='members.php'>Members</a></li>".
"<li><a href='friends.php'>Friends</a></li>".
"<li><a href='messages.php'>Messages</a></li>".
"<li><a href='profile.php'>Edit Profile</a></li>".
"<li><a href='logout.php'>Logout</a></li></ul><br>";
else
echo "<br><ul class='menu'>".
"<li>< a href='index.php'>Home</a></li>".
"<li><a href='signup.php'>Sign up</a></li>".
"<li><a href='login.php'>Login</a></li></ul><br>".
"<span class='info'>⇒You must be log in into".
"view this page.</span><br><br>";
?>