-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.php
167 lines (140 loc) · 8.54 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bootstrap.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="col-12 justify-content-center align-content-center">
<div class="row mt-1 mb-1">
<div class="col-12 col-md-7 offset-lg-1 col-lg-5 col-xl-4 align-self-start mt-2 ">
<span class="text-start label1"><b>Welcome</b>
<?php
if (isset($_SESSION["u"])) {
$user = $_SESSION["u"]["fname"];
$email = "[email protected]";
$profileimg = Database::search("SELECT * FROM `profile_img` WHERE `user_email`='" . $_SESSION["u"]["email"] . "' ");
$pn = $profileimg->num_rows;
if ($pn == 1) {
$p = $profileimg->fetch_assoc();
?>
| <img class="rounded rounded-circle " width="30px" src="<?php echo $p["code"]; ?>" id="imgprev" />
<?php
} else {
?>
| <img class="rounded rounded-circle " width="30px" src="resources/demoProfileImg.jpg" id="imgprev" />
<?php
}
echo $user;
?>
</span> |
<a class="text-start label2 text-decoration-none text-dark" onclick="viewmsgmodalu('<?php echo $email; ?>');" >Help and Contact</a> |
<!-- href="[email protected]" -->
<!-- data-bs-toggle="modal" data-bs-target="#staticBackdrop" -->
<span class="text-start label2" onclick="signOut();"><i class="bi bi-box-arrow-left fs-5 ms-2 mt-2 text-black-50 out"></i></span>
<?php
} else {
?>
User | <a href="index.php">Sign in or register</a>
<!-- | <label class="text-primary text-decoration-underline" for="modal-btn">Sign in or register<i class="uil uil-expand-arrows"></i></label> | -->
<!-- <a class="text-start label2 text-decoration-none text-dark" href="[email protected]">Help and Contact</a> -->
<?php
}
?>
</div>
<div class="col-12 col-md-4 offset-md-1 offset-lg-4 offset-xl-5 col-lg-3 col-xl-2" style="text-align: end;">
<div class="row mt-1 mb-1 mt-lg-0 mb-lg-0">
<!-- <div class="col-1 col-md-2 col-lg-3 mt-2 ms-md-3 ms-lg-0">
<?php
if (isset($_SESSION["u"])) {
?>
<span class="text-start label2" onclick="goToAddProduct();">Sell</span>
<?php
} else {
?>
<span class="text-start label2 text-black-50" disabled>Sell</span>
<?php
}
?>
</div> -->
<div class="dropdown col-2 col-md-3 col-lg-6 me-3 me-sm-0 me-md-0">
<label class=" mt-2 dropdown-toggle" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-list mt-2 "></i> Menu
</label>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="watchlist.php"><i class="bi bi-heart-fill"></i> Watchlist</a></li>
<li><a class="dropdown-item" href="userprofile.php"><i class="bi bi-person-fill fs-5"></i> My Profile</a></li>
<li><a class="dropdown-item" href="purchasehistory.php"><i class="bi bi-clock-history fs-6"></i> Purchase History</a></li>
<!-- <li><a class="dropdown-item" href="sellerproductview.php">My Products</a></li> -->
<!-- <li><a class="dropdown-item" href="userprofile.php">My Profile</a></li> -->
<!-- <li><a class="dropdown-item" href="#">My Sellings</a></li> -->
<!-- <li><a class="dropdown-item" href="messages.php?email='<?php echo $_SESSION["u"]["email"]; ?>'">Message</a></li> -->
</ul>
</div>
<div class="col-2 col-lg-3 col-md-4 ms-2 ms-md-5 ms-lg-0 mt-1 text-end">
<div onclick="goToCart();" class="carticon"></div>
</div>
</div>
</div>
<!-- Button trigger modal -->
<!-- <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
Launch static backdrop modal
</button> -->
<!-- Modal -->
<?php
$email = "[email protected]";
?>
<div class="modal fade" onload="refresher('<?php echo $email; ?>');" id="mesgmodal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">Chat</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body bg-white" style="height: 550px;">
<div class="col-12 py-1 px-2">
<div class="row rounded shadow" style="height: 500px;">
<!-- <div class="col-12 col-lg-5 mx-lg-3 px-0">
<div class="bg-white">
<div class="bg-light px-4 py-2">
<h5 class="mb-0 py-1">Recent</h5>
</div>
<div class="message-box">
<div class="list-group rounded-0" id="rcv">
</div>
</div>
</div>
</div> -->
<div class="col-11 mx-auto px-0 mt-1" style="height: 430px;">
<div class="row px-1 py-5 text-white chatbox" id="chatrow">
<!-- massage load venne methana -->
</div>
</div>
<!-- text -->
<div class="col-12 bg-white mb-2">
<div class="row mb-2">
<div class="input-group">
<input id="msgtxt" type="text" placeholder="Type a message..." aria-describedby="sendbtn" class="form-control" style="border-radius: 20px;" />
<div class="input-group-appeng">
<button id="button-addon2" onclick="sendmessage('<?php echo $email; ?>');" class="btn btn-link fs-4 bi bi-cursor-fill"></button>
</div>
</div>
</div>
</div>
<!-- text -->
</div>
</div>
</div>
<!-- <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Understood</button>
</div> -->
<script src="script.js"></script>
<!-- <script src="bootstrap.bundle.js"></script> -->
</div>
</div>
</div>
</div>
</div>
</body>
</html>