-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.php
129 lines (120 loc) · 5.19 KB
/
index.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
<?php
include_once 'Processes/logged.php';
include_once 'includes/db.php';
$getCategory = mysqli_query($conn, "SELECT * FROM categories");
if (isset($_SESSION['data'])) {
$uid = $_SESSION['data']['id'];
$getProducts = mysqli_query($conn, "SELECT * FROM bag WHERE user_id = '$uid'");
}
if (!logged()) {
header("Location: Login/index.php");
exit();
}
if (!logged()) {
header("Location: Login/index.php");
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include_once 'includes/head.inc.php'; ?>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Apple</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand" href="index.php"><i class="fab fa-apple"></i></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto">
<?php foreach ($getCategory as $categ) { ?>
<li class="nav-item">
<a class="nav-link" href="Products/index.php?categName=<?php echo $categ['category_name']; ?>"><?php echo $categ['category_name']; ?></a>
</li>
<?php } ?>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" tabindex="-1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-shopping-bag"></i>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="Bag/index.php">Bag <span class="text-primary"><?php echo mysqli_num_rows($getProducts); ?></span></a>
<?php if (admin()) : ?>
<a class="dropdown-item" href="Admin/index.php">Admin</a>
<?php endif; ?>
<div class="dropdown-divider"></div>
<form action="Processes/logout.php" method="POST">
<button class="dropdown-item" type="submit">Log Out</button>
</form>
</div>
</li>
</ul>
</div>
</nav>
<!-- NAVBAR END -->
<div class="hero__container">
<img src="images/phone__ulbbo0vgyf6y_mediumtall.png" alt="item">
<img src="images/airpods__b0941p5gmwj6_largetall.png" alt="item">
<img src="images/watch__csqqcayzqueu_mediumtall.png" alt="item">
</div>
<div class="hero__secondContainer">
<div class="text-light">
<p class="display-4" style="font-weight: bold;">iPhone 12 Pro</p>
<p class="h3">It's a leap year.</p>
<p class="lead">From $41.62/mo. or $999 before trade-in.</p>
<p class="lead">Buy directly from Apple with special carrier offers.</p>
</div>
</div>
<div class="hero__thirdContainer">
<div class="top">
<img src="images/logo__dcojfwkzna2q_largetall.png" alt="red-logo">
<p class="display-4" style="font-weight: bold;">Give something wonderful.</p>
</div>
<div class="bottom">
<img src="images/phone__ulbbo0vgyf6y_largetall.png" alt="item">
<img src="images/watch__csqqcayzqueu_mediumtall.png" alt="item">
<img src="images/ipad__bq6djchifrbm_largetall.png" alt="item">
</div>
</div>
<!-- hero containers end -->
<div class="showcase__gallery" style="display: flex;">
<div class="row">
<div class="col">
<img src="images/iphone_12_us__fo0stbby242m_large.jpg" alt="grid-item">
<div class="text-dark">
<p class="display-4">iPhone 12</p>
<p class="h3">Blas past fast.</p>
<p class="lead">From $29.12/mo. or $699 before trade‑in.</p>
<p class="lead">Buy directly from Apple with special carrier offers..</p>
</div>
</div>
<div class="col">
<img src="images/tile__cauwwcyyn9hy_large.jpg" alt="grid-item">
<div class="text-dark">
<p class="display-4"></p>
</div>
</div>
</div>
<div class="row">
<div class="col">
<img src="images/tile__cauwwcyyn9hy_medium.jpg" alt="grid-item">
<div class="text-dark">
<p class="display-4"></p>
</div>
</div>
<div class="col">
<img src="images/bee.jpg" alt="grid-item">
<div class="text-dark">
<p class="display-4"></p>
</div>
</div>
</div>
</div>
<!-- gallery end -->
<?php include_once 'includes/footer.inc.php'; ?>
</body>
</html>