-
Notifications
You must be signed in to change notification settings - Fork 31
/
newEmptyPHP1.php
850 lines (722 loc) · 39.1 KB
/
newEmptyPHP1.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
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
<?php
session_start();
include("db_connect.php");
if(isset($_COOKIE['adminid'])&&$_COOKIE['adminemail']){
$userid=$_COOKIE['adminid'];
$useremail=$_COOKIE['adminemail'];
$sqluser ="SELECT * FROM Administrator WHERE Password='$userid' && Email='$useremail'";
$retrieved = mysqli_query($db,$sqluser);
while($found = mysqli_fetch_array($retrieved))
{
$firstname = $found['Firstname'];
$sirname= $found['Sirname'];
$emails = $found['Email'];
$id= $found['id'];
}
}else{
header('location:index.php');
exit;
}
?>
<!DOCTYPE HTML>
<html>
<head>
<title>admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Glance Design Dashboard Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="admin/css/bootstrap.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="admin/css/style.css" rel='stylesheet' type='text/css' />
<!-- font-awesome icons CSS -->
<link href="admin/css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons CSS-->
<!-- side nav css file -->
<link href='admin/css/SidebarNav.min.css' media='all' rel='stylesheet' type='text/css'/>
<!-- //side nav css file -->
<!-- js-->
<script src="admin/js/jquery-1.11.1.min.js"></script>
<script src="admin/js/modernizr.custom.js"></script>
<!--webfonts-->
<link href="//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i&subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet">
<!--//webfonts-->
<!-- chart -->
<script src="admin/js/Chart.js"></script>
<!-- //chart -->
<!-- Metis Menu -->
<script src="admin/js/metisMenu.min.js"></script>
<script src="admin/js/custom.js"></script>
<link href="admin/css/custom.css" rel="stylesheet">
<!--//Metis Menu -->
<script src="script/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="script/sweetalert.css">
<!-- <script src="jquery.js"></script> -->
<link href="css/animate.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="css/bootstrap-dropdownhover.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css"/>
<script src='https://code.jquery.com/jquery-1.12.4.js'></script>
<script src='https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.1/js/buttons.flash.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.1/js/buttons.html5.min.js'></script>
<script src='https://cdn.datatables.net/buttons/1.5.1/js/buttons.print.min.js'></script>
<script>
$(document).ready(function() {
$('#example').DataTable( {
} );
} );
</script>
<script type="text/javascript">
$(document).on("click", ".open-Delete", function () {
var myValue = $(this).data('id');
swal({
title: "Are you sure?",
text: "You want to remove this staff from the database!",
type: "warning",
showCancelButton: true,
cancelButtonColor: "red",
confirmButtonColor: "green",
confirmButtonText: "Yes, remove!",
cancelButtonText: "No, cancel!",
closeOnConfirm: false,
closeOnCancel: false,
buttonsStyling: false
},
function(isConfirm){
if (isConfirm) {
var vals=myValue;
$.ajax ({
type : 'POST',
url: "upload.php",
data: { Valuedel: vals},
success: function(result) {
if(result=="ok"){
swal({title: "Deleted!", text: "Staff has been deleted from the database.", type: "success"},
function(){
location.reload();
}
);
}
}
}); } else {
swal("Cancelled", "This user is safe :)", "error");
}
});
});
</script>
<script type="text/javascript">
$(document).on("click", ".open-Updatepicture", function () {
var myTitle = $(this).data('id');
$(".modal-body #bookId").val(myTitle);
});
</script>
<!-- requried-jsfiles-for owl -->
<!-- //requried-jsfiles-for owl -->
</head>
<script type="text/javascript">
$(document).on("click", ".open-Passwords", function () {
var myT = $(this).data('id');
var myTitle = $(this).data('ie');
var myp = $(this).data('if');
var mym = $(this).data('ig');
var myn = $(this).data('ih');
var myk = $(this).data('ij');
var mykm = $(this).data('ik');
$(".modal-title #oldname").val(myTitle);
$(".modal-body #oldname").val(myTitle);
$(".modal-body #oldpass").val(mykm);
$(".modal-body #ss").val(myp);
$(".modal-body #bb").val(mym);
$(".modal-body #cc").val(myn);
$(".modal-body #dd").val(myk);
$(".modal-body #staffid").val(myT);
});
</script>
<?php if(isset($_SESSION['memberadded'])){?>
<script type="text/javascript">
$(document).ready(function(){
swal({title: "Successful!", text: "Staff added successfully!!.", type: "success"});
});
</script>
<?php
session_destroy();
}?>
<?php if(isset($_SESSION['memberexist'])){?>
<script type="text/javascript">
$(document).ready(function(){
sweetAlert("Oops...", "There is already a staff with those details in the database", "error");
});
</script>
<?php
session_destroy();}
?>
<?php if(isset($_SESSION['emptytextboxes'])){?>
<script type="text/javascript">
$(document).ready(function(){
sweetAlert("Oops...", "You did not fill all the textboxes on the form", "error");
});
</script>
<?php
session_destroy();}
?>
<?php if(isset($_SESSION['tutor'])){?>
<script type="text/javascript">
$(document).ready(function(){
swal({
title: "User removed successfully",
text: "Do you want to remove another one?",
type: "success",
showCancelButton: true,
confirmButtonColor: "green",
confirmButtonText: "OK!",
closeOnConfirm: true,
closeOnCancel: true,
buttonsStyling: false
},
function(isConfirm){
if (isConfirm) {
window.location ="administrator.php?id=2";
}
else {
window.location ="administrator.php";
}
});
});
</script>
<?php
session_destroy();}
?>
<?php if(isset($_SESSION['cat'])){?>
<script type="text/javascript">
$(document).ready(function(){
sweetAlert("Oops...", "This category already in the system", "error");
});
</script>
<?php
session_destroy();}
?>
<?php if(isset($_SESSION['category'])){?>
<script type="text/javascript">
$(document).ready(function(){
swal({
title: "Category added successfully",
text: "Do you want to add another one?",
type: "success",
showCancelButton: true,
confirmButtonColor: "green",
confirmButtonText: "OK!",
closeOnConfirm: true,
closeOnCancel: true,
buttonsStyling: false
},
function(isConfirm){
if (isConfirm) {
window.location ="administrator.php?id=3";
}
else {
window.location ="administrator.php";
}
});
});
</script>
<?php
session_destroy();}
?>
<?php if(isset($_SESSION['del'])){?>
<script type="text/javascript">
$(document).ready(function(){
swal({
title: "Category Deleted",
text: "Do you want to delete another one?",
type: "success",
showCancelButton: true,
confirmButtonColor: "green",
confirmButtonText: "OK!",
closeOnConfirm: true,
closeOnCancel: true,
buttonsStyling: false
},
function(isConfirm){
if (isConfirm) {
window.location ="administrator.php?id=4";
}
else {
window.location ="administrator.php";
}
});
});
</script>
<?php
session_destroy();}
?>
<?php if(isset($_SESSION['pass'])) {?>
<script type="text/javascript">
$(document).ready(function(){
swal({title: "Successful!", text: "Staff details edited!!.", type: "success"});
});
</script>
<?php session_destroy(); }?>
<?php $sqlid ="SELECT * FROM Users Order BY id DESC";
$ret = mysqli_query($db,$sqlid);
while($found = mysqli_fetch_array($ret))
{
$idsx=$found['id'];
}
$sqluse ="SELECT * FROM Inorg ORDER BY id DESC ";
$retrieve = mysqli_query($db,$sqluse);
while($foundk = mysqli_fetch_array($retrieve))
{
$name = $foundk['name'];
$website= $foundk['website'];
$phone= $foundk['Phone'];
$year= $foundk['year'];
$mail= $foundk['email'];
$idz= $foundk['id'];
}
?>
<div id="Taxreceipted" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="font-size: 14px; font-family: Times New Roman;color:black;">
<div class="modal-header" style="background:#222d32">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" style="font-weight: bold;color: #F0F0F0"><center>
PRINT IDs IN BULK
</center></h4>
</div>
<div class="modal-body" >
<form action="printbulk.php" method="post">
<div class="input-group" style="margin-bottom:10px">
<span class="input-group-addon">From</span>
<input id="text" type="number" class="form-control" name="startpoint" >
</div>
<div class="input-group" style="margin-bottom:10px">
<span class="input-group-addon">To</span>
<input type="number" class="form-control" name="endpoint" >
</div>
<div class="input-group">
<span class="input-group-addon">Employee id starts @</span>
<input id="msg" type="text" class="form-control" name="receiptrange" placeholder="" value="<?php echo$idsx; ?>" readonly="readonly">
</div>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success" value="Submit" id="btns1" name="Change">
</div>
</form>
</div>
</div>
</div>
<div id="Passwords" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="font-size: 14px; font-family: Times New Roman;color:black;">
<div class="modal-header" style="background:#222d32">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" style="font-family: Times New Roman;color:#F0F0F0;"><center>
Edit details of <input style="border: none;background:#222d32" type="text" id="oldname" value="" readonly="readonly" />
</center></h4>
</div>
<div class="modal-body" >
<center>
<form method="post" action="upload.php" enctype='multipart/form-data'>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Firstname:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="mfname" id='oldname'></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Sirname:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="msname" id='ss'></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;">Department:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="minstitution" id='cc'></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Rank:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="mrank" id='dd'></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Email:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="memail" id='bb'></span></p>
<p ><span style="font-size: 18px; font-weight: bold;"> Staff ID:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="mid" id='oldpass'></span></p>
Add profile picture:<input name='filed' type='file' id='filed' >
<input type="hidden" name="page" id="staffid"/>
</center>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success" value="Reset" id="amendreceipt" name="resetpass">
<button type="button" class="btn btn-success" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<div id="Updatepicture" class="modal fade" role="dialog">
<div class="modal-dialog" style="float:right;width:20%">
<!-- Modal content-->
<div class="modal-content" style="font-size: 14px; font-family: Times New Roman;color:black;">
<div class="modal-header" style="background:#222d32">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">
</h4>
</div>
<div class="modal-body" >
<center><p></p>
<form method="post" action="upload.php" enctype='multipart/form-data'>
<p style="margin-bottom:10px;">
Select picture<input name='file2' type='file' id='file2' >
</p>
<p>
<input name='id' type='hidden' value='' id='bookId'>
<input name='category' type='hidden' value='Administrator'>
<input type="hidden" name="page" value="users.php"/>
</p>
</center>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success" value="Change" id="btns1" name="Change">
</div>
</div>
</form>
</div>
</div>
<div id="Useradd" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="font-size: 14px; font-family: Times New Roman;color:black;">
<div class="modal-header" style="background:#222d32">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" style="font-weight: bold;color: #F0F0F0"><center>
ADD STAFF DETAILS
</center></h4>
</div>
<div class="modal-body" >
<center>
<form method="post" action="upload.php" enctype='multipart/form-data' style="width: 98%;">
<p style="margin-bottom:10px;">
<span style="font-size: 15px; font-weight: bold;"><input type="checkbox" name="pro"> Pro </span>
<span style="font-size: 15px; font-weight: bold;"><input type="checkbox" name="dr"> Dr </span>
<span style="font-size: 15px; font-weight: bold;"><input type="checkbox" name="mr"> Mr </span>
<span style="font-size: 15px; font-weight: bold;"><input type="checkbox" name="mrs"> Mrs </span>
<span style="font-size: 15px; font-weight: bold;"><input type="checkbox" name="miss"> Miss</span>
</p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Firstname:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="mfname"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Sirname:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="msname"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;">Department:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="minstitution"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Rank:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="memail"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Email:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="mphone"></span></p>
<p ><span style="font-size: 18px; font-weight: bold;"> Staff ID:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="mpassword"></span></p>
Add profile picture:<input name='filed' type='file' id='filed' >
<input type="hidden" name="page" value="admin.php"/>
</center>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success" value="Submit" id="addmember" name="addmember">
<button type="button" class="btn btn-success" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<div id="Initialisation" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="font-size: 14px; font-family: Times New Roman;color:black;">
<div class="modal-header" style="background:#222d32">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" style="font-weight: bold;color: #F0F0F0"><center>
SYSTEM INFORMATION INITIALISATION
</center></h4>
</div>
<form method="post" action="upload.php" enctype='multipart/form-data'>
<div class="modal-body" >
<center>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Org Name:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="orgname"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Phone:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="orgphone"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Email:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="orgemail"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Website:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="orgwebsite"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;">Active Year:<label style="color: red;font-size:20px;">*</label><input style="width:270px;" type="text" name="orgyear"></span></p>
Attach Organisation Logo:(<h7 style="color:red">Make sure it is a transparent image</h7>)<input name='filed' type='file' id='filed' >
<input type="hidden" name="page" value="admin.php"/>
</center>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success" value="Finish" id="addmember" name="orginitial">
<button type="button" class="btn btn-success" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<div id="Initialisation2" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" style="font-size: 14px; font-family: Times New Roman;color:black;">
<div class="modal-header" style="background:#222d32">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title" style="font-weight: bold;color: #F0F0F0"><center>
EDIT SYSTEM INFORMATION
</center></h4>
</div>
<form method="post" action="upload.php" enctype='multipart/form-data'>
<div class="modal-body" >
<center>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Org Name:<label style="color: red;font-size:20px;">*</label>
<input style="width:270px;" type="text" name="orgname" value="<?php if(isset($name)){echo$name;} ?>"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Phone:<label style="color: red;font-size:20px;">*</label>
<input style="width:270px;" type="text" name="orgphone" value="<?php if(isset($phone)){echo$phone;} ?>"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Email:<label style="color: red;font-size:20px;">*</label>
<input style="width:270px;" type="text" name="orgemail" value="<?php if(isset($mail)){echo$mail;} ?>"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;"> Website:<label style="color: red;font-size:20px;">*</label>
<input style="width:270px;" type="text" name="orgwebsite" value="<?php if(isset($website)){echo$website;} ?>"></span></p>
<p style="margin-bottom:10px;"><span style="font-size: 18px; font-weight: bold;">Active Year:<label style="color: red;font-size:20px;">*</label>
<input style="width:270px;" type="text" name="orgyear" value="<?php if(isset($year)){echo$year;} ?>"></span></p>
Attach Organisation Logo:(<h7 style="color:red">Make sure it is a transparent image</h7>)<input name='filed' type='file' id='filed' >
<input type="hidden" name="page" value="admin.php"/>
<input type="hidden" name="pageid" value="<?php echo$idz; ?>"/>
</center>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-success" value="Update" id="addmember" name="orgupdate">
<button type="button" class="btn btn-success" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<body class="cbp-spmenu-push">
<div class="main-content">
<div class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
<!--left-fixed -navigation-->
<aside class="sidebar-left">
<nav class="navbar navbar-inverse">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".collapse" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php
$sqln ="SELECT * FROM Inorg ";
$rgetb = mysqli_query($db,$sqln);
$numb=mysqli_num_rows($rgetb);
if($numb!=0){
while($foundl = mysqli_fetch_array($rgetb))
{
$profile= $foundl['pname'];
}
echo"<center><img src='media/$profile' width='70%' height='140px' alt=''></center>";
}
else{
?>
<h1>
<a class="navbar-brand" href="index.html"><span class="fa fa-area-chart">
</span>MAIN MENU<span class="dashboard_text"></span>
</a>
</h1>
<?php } ?>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="sidebar-menu">
<li class="header">
<h4>Administrator</h4>
</li>
<li class="treeview">
<a href="admin.php">
<i class="fa fa-tv"></i> <span>Control Panel</span>
</a>
</li>
<li class="treeview">
<a href="#">
<i class="fa fa-cog"></i>
<span>Initialisation</span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li><a data-toggle='modal' data-id='' href='#Initialisation' class='open-Initial'><i class="fa fa-plus"></i>Add System Info</a></li>
<li><a data-toggle='modal' data-id='' href='#Initialisation2' class='open-Initial2'><i class="fa fa-minus"></i>Edit System Info</a></li>
</ul>
</li>
<li class="treeview">
<a data-toggle='modal' data-id='' href='#Useradd' class='open-adduser'><i class="fa fa-user"></i>Add Employee</a>
</li>
<li class="treeview">
<a href="bulk.php" ><i class='fa fa-print'></i>Bulk registration</a>
</li>
<li class="treeview">
<a href="bulk.php" ><i class='fa fa-print'></i>Sample form</a>
</li>
<li class="treeview">
<a data-toggle='modal' href="#Taxreceipted" class="Open-Taxreceipted"><i class='fa fa-print'></i>Bulk printing</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</nav>
</aside>
</div>
<!--left-fixed -navigation-->
<!-- header-starts -->
<div class="sticky-header header-section">
<div class="header-left">
<!--toggle button start-->
<button id="showLeftPush"><i class="fa fa-bars"></i></button>
<!--toggle button end-->
<!--notification menu end -->
<div class="clearfix"> </div>
</div>
<div class="header-right">
<!--search-box-->
<div class="profile_details" >
<ul>
<li class="dropdown profile_details_drop">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<div class="profile_img">
<span class="prfil-img">
<?php
$sql ="SELECT * FROM Profilepictures WHERE ids='$id' && Category='User'";
$rget = mysqli_query($db,$sql);
$num=mysqli_num_rows($rget);
if($num!=0){
while($found = mysqli_fetch_array($rget))
{
$profile= $found['name'];
}
echo"<img src='admin/images/$profile' height='50px' width='50px' alt=''>";
}
else{
echo"<img src='admin/images/profile.png' height='50px' width='50px' alt=''>";
}
?>
</span>
<div class="user-name" >
<p style="color:#1D809F;"><?php if(isset($sirname))
{echo"<strong>".$firstname." ".$sirname."! </strong>";} ?>
</p>
<span>Administrator <img src='admin/images/dot.png' height='15px' width='15px' alt=''>
</span>
</div>
<i class="fa fa-angle-down lnr"></i>
<i class="fa fa-angle-up lnr"></i>
<div class="clearfix"></div>
</div>
</a>
<ul class="dropdown-menu drp-mnu">
<li>
<a data-toggle='modal' data-id='<?php echo$id; ?>' href='#Updatepicture' class='open-Updatepicture'><i class="fa fa-user"></i>Change profile picture</a>
</li>
<li> <a href="logout.php"><i class="fa fa-sign-out"></i> Logout</a> </li>
</ul>
</li>
</ul>
</div>
<div class="clearfix"> </div>
</div>
<div class="clearfix"> </div>
</div>
<!-- //header-ends -->
<!-- main content start-->
<div id="page-wrapper" >
<div class="main-page" >
<div class="charts">
<div class="mid-content-top charts-grids">
<div class="middle-content">
<h4 class="title">Users</h4>
<!-- start content_slider -->
<div class="alert alert-info">
<i class="fa fa-envelope"></i> This screen displays 50 records use the search box to spool more records
</div>
<table id="example" class="display nowrap" style="width:100%">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>STAFF ID</th>
<th>RANK</th>
<th>DEPARTMENT</th>
<th>CONTACTS</th>
<th>PRINT</th>
<th>EDIT</th>
<th>DELETE</th>
</tr>
</thead>
<tbody>
<?php $sqlmember ="SELECT * FROM Users ";
$retrieve = mysqli_query($db,$sqlmember);
$count=0;
while($found = mysqli_fetch_array($retrieve))
{
$title=$found['Mtitle'];$firstname=$found['Firstname'];$sirname=$found['Sirname'];$rank=$found['Rank'];
$id=$found['id'];$dept=$found['Department'];$contact=$found['Email'];
$count=$count+1; $get_time=$found['Time']; $time=time(); $pass=$found['Staffid'];
$names=$firstname." ".$sirname;
echo"<tr> <td>$id</td>
<td>$title $firstname $sirname</td>
<td>$pass</td>
<td>$contact</td>
<td>$dept</td>
<td>$rank</td>
<td>
<a href='card.php?id=$id' class='btn btn-success' title='click to print report' ><span class='glyphicon glyphicon-print' style='color:white;'></span></a>
</td>
<td>
<a data-toggle='modal' data-id='$id' data-ie='$firstname' data-if='$sirname' data-ig='$rank' data-ih='$dept' data-ij='$contact' data-ik='$pass' class='open-Passwords btn btn-info' title='edit user details' href='#Passwords'><span class='glyphicon glyphicon-edit' style='color:white;'></span></a>
</td>
<td>
<a data-id='$id' class='open-Delete btn btn-danger' title='delete user' ><span class='glyphicon glyphicon-trash' style='color:white;'></span></a>
</td>
</tr>";
}
?>
</tbody>
</table>
<button id="clear-all-button">Clear All Filters</button>
</div>
</div>
<!--//sreen-gallery-cursual---->
</div>
</div>
</div>
<!--footer-->
<div class="footer">
<p>© 2018 Attainment . All Rights Reserved | Design and developed by [email protected]
</p>
</div>
<!--//footer-->
</div>
<!-- new added graphs chart js-->
<script src="admin/js/Chart.bundle.js"></script>
<script src="admin/js/utils.js"></script>
<!-- Classie --><!-- for toggle left push menu script -->
<script src="admin/js/classie.js"></script>
<script>
var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
showLeftPush = document.getElementById( 'showLeftPush' ),
body = document.body;
showLeftPush.onclick = function() {
classie.toggle( this, 'active' );
classie.toggle( body, 'cbp-spmenu-push-toright' );
classie.toggle( menuLeft, 'cbp-spmenu-open' );
disableOther( 'showLeftPush' );
};
function disableOther( button ) {
if( button !== 'showLeftPush' ) {
classie.toggle( showLeftPush, 'disabled' );
}
}
</script>
<!-- //Classie --><!-- //for toggle left push menu script -->
<!--scrolling js-->
<script src="admin/js/jquery.nicescroll.js"></script>
<script src="admin/js/scripts.js"></script>
<!--//scrolling js-->
<!-- side nav js -->
<script src='admin/js/SidebarNav.min.js' type='text/javascript'></script>
<script>
$('.sidebar-menu').SidebarNav()
</script>
<!-- Bootstrap Core JavaScript -->
<script src="admin/js/bootstrap.js""> </script>
<!-- //Bootstrap Core JavaScript -->
<script src="css/bootstrap-dropdownhover.js"></script>
</body>