-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.dash.php
851 lines (760 loc) · 47.5 KB
/
admin.dash.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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
<?php
include "includes/headerDash.php";
include "includes/adminStats.php";
include "includes/messaging.php";
?>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary shadow position-fixed fixed-top">
<div class="container">
<div class="navbar-brand d-grid">
<a href="#"><img src="images/newLogo3.png" alt="" class="img_size"></a>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="profile_detail d-flex align-items-center justify-content-between text-white">
<ul class="navbar-nav ms-auto mb-2 mb-md-0">
<li class="d-flex align-items-center me-4">
<span class="material-icons-sharp cursor" title="Notifications" onclick="show('dashbody_6','btn6');">
notifications
</span>
</li>
<li class="d-flex align-items-center">
<div class="photo bg-black rounded-circle overflow-hidden" id="userphoto">
<img src="<?= $staff_photo ?>" alt="" class="img_size">
</div>
<div class="dropdown me-3">
<a class="text-white dropdown-toggle" role="button" data-bs-toggle="dropdown">
</a>
<ul class="dropdown-menu px-2">
<li class="d-flex align-items-center">
<span class="material-icons-sharp">
person
</span>
<a class="dropdown-item cursor" data-bs-toggle="modal" data-bs-target="#profileEdit">
My Profile
</a>
</li>
<li class="d-flex align-items-center">
<span class="material-icons-sharp">
logout
</span>
<a class="dropdown-item cursor" href="models/logout.php">
Logout
</a>
</li>
<!-- <li><a class="dropdown-item" href="#">Something else here</a></li> -->
</ul>
</div>
<div class="row">
<p class="m-0 p-0 ps-2 name"><?= $staff_info["firstname"] ?> <?= $staff_info["lastname"] ?></p>
<small class="position"><?= $staff_info["position"] ?></small>
</div>
</li>
</ul>
</div>
</div>
</nav>
<div class="pad"></div>
<main>
<div class="row mx-0">
<!-- alerts -->
<!-- alerts -->
<div aria-live="polite" aria-atomic="true" class="position-relative">
<!-- Position it: -->
<!-- - `.toast-container` for spacing between toasts -->
<!-- - `top-0` & `end-0` to position the toasts in the upper right corner -->
<!-- - `.p-3` to prevent the toasts from sticking to the edge of the container -->
<div class="toast-container top-0 end-0 p-3">
<!-- Then put toasts within -->
<div class="toast" id="toast1" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<span class="material-icons-sharp rounded me-2 text-danger">
warning
</span>
<strong class="me-auto">Error Message</strong>
<small class="text-muted">just now</small>
<button type="button" class="btn-close" onclick="closeAlert()"></button>
</div>
<div class="toast-body bg-danger text-white toast1Msg">
........
</div>
</div>
<div class="toast" id="toast2" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<span class="material-icons-sharp rounded me-2 text-success">
warning
</span>
<strong class="me-auto">Success Message</strong>
<small class="text-muted">just now</small>
<button type="button" class="btn-close" onclick="closeAlert2()"></button>
</div>
<div class="toast-body bg-success text-white " id="toast2Msg">
........
</div>
</div>
</div>
</div>
<!-- alerts -->
<!-- alerts -->
<!-- ASIDE -->
<!-- ASIDE -->
<aside class="bg-white col d-none d-lg-grid p-3 pt-5">
<div class="dash_navigation">
<ul class="navbar-nav">
<li class="nav-item nav_item nav_item2 d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_1','btn1');" id="btn1">
<span class="material-icons-sharp text-primary">
dashboard
</span>
<p class="align-self-center my-auto ms-3">Dashboard</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_2','btn2');" id="btn2">
<span class="material-icons-sharp text-primary">
person_add_alt
</span>
<p class="align-self-center my-auto ms-3">New Staff</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_3','btn3');" id="btn3">
<span class="material-icons-sharp text-primary">
people_alt
</span>
<p class="align-self-center my-auto ms-3">All Staff</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_4','btn4');" id="btn4">
<span class="material-icons-sharp text-primary">
people_alt
</span>
<p class="align-self-center my-auto ms-3">All Patient</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_5','btn5');" id="btn5">
<span class="material-icons-sharp text-primary">
question_answer
</span>
<p class="align-self-center my-auto ms-3">Enquiry</p>
</li>
<li class="nav-item nav_item d-flex align-items-center justify-content-start p-2" onclick="show('dashbody_6','btn6');" id="btn6">
<span class="material-icons-sharp text-primary">
email
</span>
<p class="align-self-center my-auto ms-3">Messages <span class="badge badge-pill badge-danger bg-danger">0</span></p>
</li>
</ul>
</div>
</aside>
<!-- ASIDE -->
<!-- ASIDE -->
<!-- CHANGING DASHBOARD -->
<!-- CHANGING DASHBOARD -->
<div class="dashbody col-10 p-5 overflow-y-scroll">
<!-- dash body 1 -->
<!-- dash body 1 -->
<div id="dashbody_1" class="page">
<div class="body_1">
<p>Dashboard Admin #<span class="staffID"><?= $staff_info['Staff_id'] ?></span></p>
</div>
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white">Hospital Stats</h5>
<div class="card-body row px-4">
<div class="col">
<div class="details d-flex align-items-center">
<span class="material-icons-sharp me-2 span_1 fs-1 text-primary">
reorder
</span>
<div class="details_2">
<small class="mb-5 fw-bold">Number of Staff</small>
<h4 class="noStaff"><?= $staffcount ?></h4>
<small class="text-muted">last updated: <?= $today ?></small>
</div>
</div>
</div>
<div class="col">
<div class="details d-flex align-items-center">
<span class="material-icons-sharp me-2 span_1 fs-1 text-danger">
reorder
</span>
<div class="details_2">
<small class="mb-5 fw-bold">Registered Patients</small>
<h4 class="noPatient"><?= $patcount ?></h4>
<small class="text-muted">last updated: <?= $today ?></small>
</div>
</div>
</div>
<div class="col">
<div class="details d-flex align-items-center">
<span class="material-icons-sharp me-2 span_1 fs-1 text-info">
reorder
</span>
<div class="details_2">
<small class="mb-5 fw-bold">Total Revenue</small>
<h4 class="revenue">₦<?= number_format($deposits, 2) ?></h4>
<small class="text-muted">last updated: <?= $today ?></small>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="body_3">
<div class="row gap-3">
<div class="col-8">
<div class="card shadow border-0 rounded-0">
<div class="d-flex card-header align-items-center bg-white">
<span class="material-icons-sharp text-primary m-0">
sync_alt
</span>
<h5 class="m-0 mx-3">
Activity Log
</h5>
</div>
<div class="card-body row px-4">
<table class="table table-hover" id="rDiv1">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Position</th>
<th scope="col">Time</th>
<th scope="col">Day</th>
<th scope="col">Activity</th>
</tr>
</thead>
<tbody id="data-output3">
<?php include "models/display_user_log.php" ?>
</tbody>
</table>
</div>
</div>
</div>
<!-- <div class="col">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
supervised_user_circle
</span>
Your Patients
</h5>
<div class="card-body row px-4">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Patient ID</th>
<th scope="col">Patient Name</th>
<th scope="col">Last Visit</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>244332</td>
<td>Gregory Aishat</td>
<td>12/34/2222</td>
</tr>
</tbody>
</table>
</div>
</div>
</div> -->
</div>
</div>
</div>
<!-- dash body 1 -->
<!-- dash body 1 -->
<!-- dash body 2 -->
<!-- dash body 2 -->
<div id="dashbody_2" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
person_add_alt
</span>
Add New Staff
</h5>
<div class="card-body px-2">
<form class="row g-3 px-3" id="addStaff">
<div class="col-md-3">
<label for="inputState" class="form-label">Staff Position</label>
<select id="inputState" class="form-select" name="position">
<option value="Doctor">Doctor</option>
<option value="Nurse">Nurse</option>
<option value="Accountant">Accountant</option>
<option value="Blogger">Blogger</option>
</select>
</div>
<div class="col-md-3">
<label for="inputEmail" class="form-label">Firstname</label>
<input type="text" class="form-control" name="firstname">
</div>
<div class="col-md-3">
<label for="inputEmail" class="form-label">Lastname</label>
<input type="text" class="form-control" name="lastname">
</div>
<div class="col-md-3">
<label for="inputEmail" class="form-label">Email</label>
<input type="text" class="form-control" name="email">
</div>
<div class="col-md-3">
<label for="inputEmail" class="form-label">Phone</label>
<input type="text" class="form-control" name="phone">
</div>
<div class="col-md-3">
<label class="form-label">Gender</label>
<div class="row ">
<div class="form-check col">
<input type="radio" class="btn-check" id="btn-check-outlined1" autocomplete="off" name="gender" value="male">
<label class="btn btn-outline-primary" for="btn-check-outlined1">
<span class="material-icons-sharp fs-2">
man
</span>
</label>
</div>
<div class="form-check col">
<input type="radio" class="btn-check" id="btn-check-outlined2" autocomplete="off" name="gender" value="female">
<label class="btn btn-outline-primary" for="btn-check-outlined2">
<span class="material-icons-sharp fs-2">
woman
</span>
</label>
</div>
</div>
</div>
<div class="col">
<label for="exampleFormControlInput1" class="form-label">House Address</label>
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="address"></textarea>
</div>
<div class="col-12 text-center">
<button type="submit" class="btn btn-primary text-white w-100" id="addStaffBtn" onclick="addStaff()"> Save
Record
<!-- <div class="spinner-border text-light" role="status">
<span class="visually-hidden">Loading...</span>
</div> -->
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- dash body 2 -->
<!-- dash body 2 -->
<!-- dash body 3 -->
<!-- dash body 3 -->
<div id="dashbody_3" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
people_alt
</span>
Record of all Staff
</h5>
<div class="card-body px-2">
<div class="row g-3 px-3">
<div class="col-md-12">
<label for="inputState" class="form-label">Input Staff ID or Name</label>
<form action="" id="staffInp">
<div class="input-group mb-0">
<input type="text" class="form-control" placeholder="Staff ID" name="staff_id" id="staff">
<button class="btn btn-outline-primary" type="submit" id="searchstaff" onclick="searchStaff('searchstaff')">Search
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="body_2 mb-4" style="display: none;" id="resultStaff1">
<div class="card shadow border-0 rounded-0">
<div class="card-body px-2">
<div class="row g-3 px-3">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">Photo</th>
<th scope="col">ID</th>
<th scope="col">Position</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<th scope="col">Address</th>
<th scope="col">Start Date</th>
</tr>
</thead>
<tbody id="data-output6">
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="body_2 mb-4" id="resultStaff2">
<div class="card shadow border-0 rounded-0">
<div class="card-body px-2">
<div class="row g-3 px-3">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Photo</th>
<th scope="col">ID</th>
<th scope="col">Position</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<th scope="col">Address</th>
<th scope="col">Start Date</th>
</tr>
</thead>
<tbody id="data-output1">
<?php
$i = 1;
while ($result2 = mysqli_fetch_assoc($sql2)) { ?>
<tr>
<td><?= $i ?></td>
<td><img src="images/staff<?= $result2['photo'] ?>" class="img_size2"></td>
<td><?= $result2['Staff_id'] ?></td>
<td><?= $result2['position'] ?></td>
<td><?= $result2['firstname'] ?> <?= $result2['lastname'] ?></td>
<td><?= $result2['email'] ?></td>
<td><?= $result2['phone'] ?></td>
<td><?= $result2['address'] ?></td>
<td><?= $result2['created_at'] ?></td>
</tr>
<?php $i++ ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- dash body 3 -->
<!-- dash body 3 -->
<!-- dash body 4 -->
<!-- dash body 4 -->
<div id="dashbody_4" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
people_alt
</span>
Record of all Patient
</h5>
<div class="card-body px-2">
<div class="row g-3 px-3">
<div class="col-md-12">
<label for="inputState" class="form-label">Input Patient ID or Name</label>
<form action="" id="patInp">
<div class="input-group mb-0">
<input type="text" class="form-control" placeholder="Patient ID" name="patient_id" id="pat">
<button class="btn btn-outline-primary" type="submit" id="searchpat" onclick="searchPat('searchpat')">Search
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="body_2 mb-4" style="display: none;" id="resultPat1">
<div class="card shadow border-0 rounded-0">
<div class="card-body px-2">
<div class="row g-3 px-3">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">Photo</th>
<th scope="col">ID</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<th scope="col">Address</th>
<th scope="col">Age</th>
<th scope="col">Reg. By</th>
<th scope="col">Reg. Date</th>
</tr>
</thead>
<tbody id="data-output5">
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="body_2 mb-4" id="resultPat2">
<div class="card shadow border-0 rounded-0">
<div class="card-body px-2">
<div class="row g-3 px-3">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Photo</th>
<th scope="col">ID</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<th scope="col">Address</th>
<th scope="col">Age</th>
<th scope="col">Reg. By</th>
<th scope="col">Reg. Date</th>
</tr>
</thead>
<tbody id="data-output">
<?php
$i = 1;
while ($result3 = mysqli_fetch_assoc($sql3)) { ?>
<tr>
<td><?= $i ?></td>
<td><img src="images/patient<?= $result3["photo"] ?>" class="img_size2"></td>
<td><?= $result3['patient_id'] ?></td>
<td><?= $result3['firstname'] ?> <?= $result3['lastname'] ?></td>
<td><?= $result3['email'] ?></td>
<td><?= $result3['phone'] ?></td>
<td><?= $result3['address'] ?></td>
<td><?= $result3['age'] ?></td>
<td><?= $result3['nurse_in_charge'] ?></td>
<td><?= $result3['created_at'] ?></td>
</tr>
<?php $i++ ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- dash body 4 -->
<!-- dash body 4 -->
<!-- dash body 5 -->
<!-- dash body 5 -->
<div id="dashbody_5" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
question_answer
</span>
Comments, Questions and Enquiry
</h5>
<div class="card-body px-2">
<table class="table table-hover table-primary">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Message/Question</th>
<th scope="col">Date sent</th>
</tr>
</thead>
<tbody id="data-output2">
<?php
$i = 1;
while ($result90 = mysqli_fetch_assoc($sql90)) { ?>
<tr>
<td><?= $i ?></td>
<td><?= $result90['name'] ?></td>
<td><?= $result90['email'] ?></td>
<td><?= $result90['enquiry'] ?></td>
<td><?= $result90['date'] ?></td>
</tr>
<?php $i++ ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- dash body 5 -->
<!-- dash body 5 -->
<!-- dash body 6 -->
<!-- dash body 6 -->
<div id="dashbody_6" class="page" style="display: none;">
<div class="body_2 mb-4">
<div class="card shadow border-0 rounded-0">
<h5 class="card-header bg-white d-flex align-items-center gap-2">
<span class="material-icons-sharp text-primary">
dashboard
</span>
NHMH Messaging software
</h5>
<div class="card-body px-4">
<div class="row">
<div class="col-4">
<h3>Chats</h3>
<div class="card-body bg-light rounded-3 p-1 d-flex align-items-center">
<span class="material-icons-sharp text-primary me-2">
search
</span>
<input type="text" class="form-control bg-light text-primary border-0" id="searchUsers" placeholder="Search Users...." value="">
</div>
<div class="users mt-2">
<?php
if (!$msql10) {
// The query failed, so display the error message
echo "Error: " . mysqli_error($conn);
} else {
// The query was successful, so process the results
while ($mresult10 = mysqli_fetch_assoc($msql10)) {
$outgoing_id = $staff_info['unique_id'];
$msql11 = mysqli_query($conn, "SELECT * FROM nhmh_internal_messages_db WHERE (incoming_msg_id = {$mresult10['unique_id']}
OR outgoing_msg_id = {$mresult10['unique_id']}) AND (outgoing_msg_id = {$outgoing_id}
OR incoming_msg_id = {$outgoing_id}) ORDER BY msg_id DESC LIMIT 1");
$row11 = mysqli_fetch_assoc($msql11);
(mysqli_num_rows($msql11) > 0) ? $result = $row11['message'] : $result = "No message available";
(strlen($result) > 20) ? $msg = substr($result, 0, 20) . '...' : $msg = $result;
if (isset($row11['outgoing_msg_id'])) {
($outgoing_id == $row11['outgoing_msg_id']) ? $you = "You: " : $you = "";
} else {
$you = "";
}
?>
<div class="card-body d-flex align-items-start gap-2 border-bottom cursor" data-userMsgId="<?= $mresult10['unique_id'] ?>">
<form action="" id="messageForm">
<input type="hidden" name="incoming_id" id="incoming_id">
<input type="hidden" name="outgoing_id" value="<?= $staff_info['unique_id'] ?>">
</form>
<img src="images/staff<?= $mresult10['photo'] ?>" alt="" class="bg-primary img_wrap rounded">
<div class="row">
<div class="d-flex align-items-center mb-0 col-12 ">
<h6><?= $mresult10['position'] ?> <?= $mresult10['firstname'] ?></h6>
<!-- <small class="text-muted mx-auto">09:24</small> -->
</div>
<small class="col-12"><?= $you . $msg ?></small>
</div>
<?php if (($mresult10['status']) == "Offline now") { ?>
<span class="badge badge-pill badge-danger bg-light">0</span>
<?php } else { ?>
<span class="badge badge-pill badge-danger bg-success">0</span>
<?php } ?>
</div>
<?php
}
}
?>
</div>
</div>
<div class="col-8 bg-light p-2">
<div class="card-body bg-white" id="msgUI1" style="display: none;">
<div class="card-header d-flex bg-white gap-4">
<span class="material-icons-sharp cursor" onclick="closeMsg()">
clear
</span>
<img src="" id="msgUIimg" class="bg-primary img_size">
<div class=" mb-0">
<h6 id="msgUIname">Doctor Olamide</h6>
<small class="text-muted mx-auto" id="msgUIstatus">Active now</small>
</div>
</div>
<div class="card-body bg-light msg-body d-fl" id="msg_blank">
</div>
<div class="card-body bg-white ">
<form class="d-flex align-items-center" id="sendMessage">
<input type="hidden" name="incoming" id="incoming_id1">
<input type="hidden" name="outgoing" value="<?= $staff_info['unique_id'] ?>">
<input type="text" class="form-control bg-light border-0" id="send" placeholder="Send Message" name="message">
<button type="submit" class="btn btn-primary" onclick="insertChat()">
<span class="material-icons-sharp text-white ">
send
</span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- dash body 6 -->
<!-- dash body 6 -->
</div>
</div>
</main>
<!-- Modal for dash profile-->
<!-- Modal for dash profile-->
<div class="modal fade" id="profileEdit" tabindex="-1" aria-labelledby="signinLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content rounded-0">
<div class="modal-header">
<h1 class="modal-title fs-5" id="signinLabel">Admin Profile</h1>
<button type="button" class="btn-close bg-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body"><small>You can edit your profile. To see the effect of update, logout and login back.</small>
<form action="" id="updateProfile" class="">
<div class="bg-danger card p-1 mb-1 text-center errMsg text-white" style="display: none;">
<p class="mb-0">success</p>
</div>
<div class="row">
<div class="col-md-6">
<label for="inputEmail4" class="form-label">First Name</label>
<input type="text" class="form-control inp1" name="first_name" value="<?= $staff_info['firstname'] ?>">
<input type="hidden" name="user_id" id="hideID" value="<?= $staff_info['unique_id'] ?>">
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Last Name</label>
<input type="text" class="form-control inp2" name="last_name" value="<?= $staff_info['lastname'] ?>">
</div>
</div>
<div class="row">
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Email</label>
<input type="text" class="form-control inp3" name="email" value="<?= $staff_info['email'] ?>">
</div>
<div class="col-md-6">
<label for="inputEmail4" class="form-label">Phone</label>
<input type="text" class="form-control inp4" name="phone" value="<?= $staff_info['phone'] ?>">
</div>
</div>
<div class="row">
<div class="col-md-12">
<label for="inputEmail4" class="form-label">Address</label>
<textarea class="form-control inp5" name="address" id="exampleFormControlTextarea2" rows="3"><?= $staff_info['address'] ?></textarea>
</div>
</div>
<div class="row mt-2 border-top p-2 pb-2">
<small class="text-danger">You can change your picture</small>
<div class="col-md-12">
<div class="input-group mb-3">
<input type="file" class="form-control" name="profile_photo" id="inputGroupFile02">
</div>
</div>
</div>
<div class="modal-footer justify-content-center">
<button type="button" class="btn btn-primary text-white px-5 w-100" onclick="updateProfiles('updateBtn')" id="updateBtn">Save
Changes
</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Modal for dash profile-->
<!-- Modal for dash profile-->
<script src="javascript/inactivity.js"></script>
<script src="javascript/updateStaff.js"></script>
<script src="javascript/adminOpr.js"></script>
<script src="javascript/getMessages.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
<script src="javascript/navigate.js"></script>
</body>
</html>
<script type="text/javascript">
$(document).ready(function() {
setInterval(function() {
// $('#activity').load(window.location.href + " #activity");
$('#rDiv1').load(window.location.href + " #rDiv1");
}, 5000);
});
</script>