-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader2.php
More file actions
54 lines (42 loc) · 1.18 KB
/
header2.php
File metadata and controls
54 lines (42 loc) · 1.18 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
53
54
<?php
/**
* Created by PhpStorm.
* User: Charles
* Date: 11/18/13
* Time: 3:24 PM
*/
include 'functions.php';
session_start();
// create shopping cart
if (isset($_SESSION['cart']))
$toyCart = $_SESSION['cart'];
else {
$toyCart = new Cart;
$_SESSION['cart'] = $toyCart;
}
// login user
$userstr = '(Guest)';
if (isset($_SESSION['user']))
{
$user = $_SESSION['user'];
$loggedin = TRUE;
$userstr = "($user)";
}
else $loggedin = FALSE;
echo <<<_END
<!DOCTYPE html>
<head>
<link rel="shortcut icon" href="favicon.png">
<title>$appname</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/navbar-fixed-top.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
_END;
?>