-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
69 lines (60 loc) · 2.14 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
<?php
if (isset($message)) {
foreach ($message as $message) {
echo '
<div class="message">
<span onclick="this.parentElement.remove();">'.$message.'</span>
</div>
';
}
}
function formatar($n){
return number_format($n, 2,',','.');
}
?>
<style type="text/css">
.heading {
padding: 10px 29px;
font-size: 12px;
}
</style>
<header class="header">
<div class="header-1">
<div class="flex">
<div class="share">
<a href="" class="bi bi-facebook"></a>
<a href="" class="bi bi-twitter"></a>
<a href="" class="bi bi-instagram"></a>
<a href="" class="bi bi-linkedin"></a>
</div>
<p><a href="login.php">Login</a> | <a href="register.php">Registrar</a></p>
</div>
</div>
<div class="header-2">
<div class="flex">
<a href="home.php" class="logo">Mambu&Paulina</a>
<nav class="navbar">
<a href="home.php">Início</a>
<a href="about.php">Sobre</a>
<a href="shop.php">Loja</a>
<a href="contact.php">Contacto</a>
<a href="orders.php">Pedidos</a>
</nav>
<div class="icons">
<div id="menu-btn" class="bi bi-list"></div>
<a href="search_page.php" class="bi bi-search"></a>
<div id="user-btn" class="bi bi-person-fill"></div>
<?php
$select_cart_number = mysqli_query($conn, "SELECT * FROM `cart` WHERE user_id = '$user_id'") or die('query failed');
$cart_rows_number = mysqli_num_rows($select_cart_number);
?>
<a href="cart.php"><i class="bi bi-cart-fill"></i><span>(<?php echo $cart_rows_number; ?>)</span></a>
</div>
<div class="user-box">
<p>username: <span><?php echo $_SESSION['user_name']; ?></span></p>
<p>email: <span><?php echo $_SESSION['user_email']; ?></span></p>
<a href="logout.php" class="delete-btn">Sair</a>
</div>
</div>
</div>
</header>