-
Notifications
You must be signed in to change notification settings - Fork 0
/
topbar.php
300 lines (216 loc) · 9.1 KB
/
topbar.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<?php include 'db_connect.php' ?>
<div id="content-wrapper" class="d-flex flex-column">
<!-- Main Content -->
<div id="content">
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<i class="fa fa-bars"></i>
</button>
<!-- Topbar Search -->
<style>
.img-profile{
height:3%;
}
ul{
float:left;
}
</style>
<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Nav Item - Search Dropdown (Visible Only XS) -->
<li class="nav-item dropdown no-arrow mx-1">
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-envelope fa-fw"></i>
<span class="badge badge-danger badge-counter" id="showhde"> </span>
<script>
$('#showhde').click(function() {
$(this).toggleClass('badge badge-counter');
});
</script>
</a>
<!-- Dropdown - Alerts -->
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="alertsDropdown">
<h6 class="dropdown-header">
Messages
</h6>
<?php if($_SESSION['login_type'] == 1): ?>
<div class="scroller" id="style-2">
<?php
$mis = $conn->query("SELECT m.id , u.middlename, m.datemess FROM mess as m, users as u where m.name = u.id ORDER by m.id desc limit 3");
while($row=$mis->fetch_assoc()):
?>
<a class="dropdown-item d-flex align-items-center" href="http://localhost/mxp/index.php?page=supmess">
<div class="mr-3">
<div class="icon-circle bg-primary">
<i class="fas fa-file-alt text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">Bonjour Support</div>
<span class="font-weight-bold">Société <?php echo $row['middlename'] ?> </span>
<div class="small text-gray-500">à envoyer un message à <?php echo date('g:ia', strtotime($row['datemess']))?> </div>
</div>
</a>
<?php endwhile; ?>
</div>
<?php else: ?>
<div class="scroller" id="style-2">
<?php
$usdd = $_SESSION['login_id'];
$ms = $conn->query("select name,id,datemess from mess where user_id = '".$usdd."' ORDER by id desc limit 3");
while($row=$ms->fetch_assoc()):
?>
<a class="dropdown-item d-flex align-items-center" href="http://localhost/mxp/index.php?page=messages">
<div class="mr-3">
<div class="icon-circle bg-primary">
<i class="fas fa-file-alt text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">Bonjour <?php echo $_SESSION['login_middlename'] ?></div>
<span class="font-weight-bold">Mr <?php echo $row['name'] ?> </span>
<div class="small text-gray-500"> vous à envoyer un message à <?php echo date('g:ia', strtotime($row['datemess']))?></div>
</div>
</a>
<?php endwhile; ?>
</div>
<?php endif; ?>
</li>
<!-- Nav Item - Alerts -->
<li class="nav-item dropdown no-arrow mx-1">
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-bell fa-fw"></i>
<span class="badge badge-danger badge-counter" id="showhide"> </span>
<script>
$('#showhide').click(function() {
$(this).toggleClass('badge badge-counter');
});
</script>
</a>
<!-- Dropdown - Alerts -->
<div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="alertsDropdown">
<h6 class="dropdown-header">
Notifications
</h6>
<style>
.scroller {
width: 300px;
height: 150px;
overflow-y: scroll;
scrollbar-color: blue;
scrollbar-width: thin;
}
/*
* STYLE 2
*/
#style-2::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
background-color: #F5F5F5;
}
#style-2::-webkit-scrollbar
{
width: 12px;
background-color: #F5F5F5;
}
#style-2::-webkit-scrollbar-thumb
{
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
background-color: #D62929;
}
</style>
<?php if($_SESSION['login_type'] != 1): ?>
<div class="scroller" id="style-2">
<?php
$usdd = $_SESSION['login_id'];
$sec = $conn->query("select s.title,a.date_created from answers as a, survey_set as s where a.survey_id = s.id and a.user_id = '".$usdd."' ORDER by a.date_created desc limit 3
");
while($row=$sec->fetch_assoc()):
?>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-primary">
<i class="fas fa-file-alt text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">Bonjour <?php echo $_SESSION['login_middlename'] ?></div>
<span class="font-weight-bold">Nouvelle Réponse <?php echo $row['title'] ?> </span>
<div class="small text-gray-500"> à <?php echo $row['date_created'] ?></div>
</div>
</a>
<?php endwhile; ?>
</div>
<?php else: ?>
<div class="scroller" id="style-2">
<?php
$usdd = $_SESSION['login_id'];
$sec = $conn->query("select s.title,a.date_created, u.middlename from answers as a, survey_set as s, users as u where a.survey_id = s.id and u.id = a.user_id ORDER by a.date_created desc limit 5;
");
while($row=$sec->fetch_assoc()):
?>
<a class="dropdown-item d-flex align-items-center" href="#">
<div class="mr-3">
<div class="icon-circle bg-primary">
<i class="fas fa-file-alt text-white"></i>
</div>
</div>
<div>
<div class="small text-gray-500">Client <?php echo $row['middlename'] ?></div>
<span class="font-weight-bold">nouvelle insertion <?php echo $row['title'] ?> </span>
<div class="small text-gray-500"> à <?php echo $row['date_created'] ?></div>
</div>
</a>
<?php endwhile; ?>
</div>
<?php endif; ?>
</li>
<!-- Nav Item - Messages -->
<div class="topbar-divider d-none d-sm-block"></div>
<!-- Nav Item - User Information -->
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-2 d-none d-lg-inline text-gray-600 small"><?php echo ucwords($_SESSION['login_middlename']) ?></span>
<?php
$md = $_SESSION['login_id'];
$img = '3135715.png';
$im = $conn->query("SELECT filename from image where userdi = '".$md."' ORDER BY id DESC LIMIT 1");
while ($row = $im->fetch_assoc()) :
$img = $row['filename'] ;
?>
<img class="img-profile" src="image/<?php echo $img ?>" />
<?php endwhile; ?>
</a>
<!-- Dropdown - User Information -->
<?php $md = $_SESSION['login_id']; ?>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="index.php?page=manage_user&id=<?php echo $md; ?>">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
Mon Profile
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
Se déconnecter
</a>
</a>
</div>
</li>
</ul>
</nav>
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>
<!-- End of Topbar -->