-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
52 lines (51 loc) · 1.67 KB
/
header.php
File metadata and controls
52 lines (51 loc) · 1.67 KB
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
<?php
if(isset($_SESSION['id'])){
$user = new User(array('id' => $_SESSION['id']));}
?>
<html>
<head>
<title>Home Page</title>
<link rel="stylesheet" href="./includes/css/style.css" />
<link rel="stylesheet" href="./includes/css/jquery-ui-1.10.3.custom.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
$(function() {
$("#accordion").accordion();
});
</script>
</head>
<body>
<div class="container">
<div class="top_Bar">
<?php
if(isset($_SESSION['id'])) {
echo ("<p>Welcome ". $user->email. " ");
}else {
echo "<p>Login</p>" ;
} ?>
</div>
<div class="login">
<?php if(isset($_SESSION['id']) ){ ?>
<br /><label> </label><a href="logout.php">Logout</a><br /><br />
<?php }else {?>
<br />
<form action="login.php" method="post">
<label>Email:</label><input type="text" name="email" />
<label>Password:</label><input type="password" name="password" /><br />
<label> </label><input value="Login" style="align:center" type="submit" /><br />
</form>
<?php } ?>
</div>
<div class="header">
<p>Space Commander</p>
</div>
<script type="text/javascript">
$(".top_Bar").click(
function(){
$(this).next().slideToggle(400);
},
function() {
$(this).next().slideToggle(400);
});
</script>