-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
98 lines (91 loc) · 4.21 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--Import Google Icon Font-->
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="https://fonts.googleapis.com/css?family=Paytone+One" rel="stylesheet">
<title>COM-OUT.COM</title>
<style media="screen">
.container{
font-family: 'Paytone One', sans-serif;
}
</style>
</head>
<script type="text/javascript">
function cart(){
document.getElementById("count").innerHTML =1+parseInt(document.getElementById("count").innerHTML);
var str="cart.php";
$.ajax({
type: 'POST',
url: str,
data: { Product_ID: id },
success: function(response) {}
});
}
</script>
<body>
<?php include 'connect.php'; ?>
<?php if (isset($_SESSION['user']) && $_SESSION['user'] == "admin"): ?>
<nav>
<div class="nav-wrapper #01579b light-blue darken-4">
<a href="index.php" class="brand-logo"><img src="img/logo1.png" alt="" style="width:60%;"></a>
<ul id="nav-mobile" class="right">
<li><a href="report.php" class="waves-effect waves-light btn-large #1e88e5 blue darken-1"><i class="material-icons left">list</i>รายการสินค้า</a></li>
<li><a href="addproduct.php" class="waves-effect waves-light btn-large #1e88e5 blue darken-1"><i class="material-icons left">input</i>Add Product</a></li>
<li>Administrator</li>
<li><a href="Logout.php">Logout</a></li>
</ul>
</div>
</nav>
<?php elseif (isset($_SESSION['user'])) : ?>
<nav>
<div class="nav-wrapper #01579b light-blue darken-4">
<a href="index.php" class="brand-logo"><img src="img/logo1.png" alt="" style="width:60%;"></a>
<ul id="nav-mobile" class="right">
<li><a href="paidcart.php?ID=<?php echo $_SESSION['user']; ?>"><i class ="medium material-icons left">shopping_cart</i><span id="count" class="new badge red" data-badge-caption=""><?php echo $_SESSION['count']; ?></span></a></li>
<li><a href="myproduct.php"><i class ="medium material-icons left">shop</i>สินค้าของฉัน</a></li>
<li><?php echo $_SESSION['username']; ?></li>
<li><a href="setting.php?Acc=1"><i class="medium material-icons left">settings</i>ตั้งค่าบัญชี</a></li>
<li><a href="Logout.php">Logout</a></li>
</ul>
</div>
</nav>
<?php elseif (isset($notlog) && $notlog) : ?>
<nav>
<div class="nav-wrapper #01579b light-blue darken-4">
<a href="index.php" class="brand-logo"><img src="img/logo1.png" alt="" style="width:60%;"></a>
<ul id="nav-mobile" class="right">
<li><a href="#"><i class ="medium material-icons left">shopping_cart</i><span id="count" class="new badge red" data-badge-caption="">0</span></a></li>
<li><a href="#"><i class ="medium material-icons">payment</i></a></li>
<li><a href="Login.php">Login </a></li>
</ul>
</div>
</nav>
<?php endif; ?>
<br>
<!-- <div class="container">
<div class="row">
<div class="col s12">
<nav>
<div class="nav-wrapper #01579b light-blue darken-4">
<form>
<div class="input-field">
<input id="search" type="search" required>
<label class="label-icon" for="search"><i class="material-icons">search</i></label>
<i class="material-icons">close</i>
</div>
</form>
</div>
</nav>
</div>
</div>
</div> -->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>