-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadministration.php
115 lines (106 loc) · 5.61 KB
/
administration.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
<?php include("./includes/nav.php"); ?>
<div class="side-bar ui bg-dark white">
<?php include("./includes/sideBar.php"); ?>
</div>
<style>
.event {
visibility: hidden;
transition: 0.3s;
}
table tr:hover .event {
visibility: visible;
}
</style>
<div class="ui main">
<div class="container-fluid m-0">
<div class="row p-0">
<div class="col-md-8">
<h3 class="bg-success p-2 text-center text-white">Administrators and users</h3>
<div class="card card-body" id="adminResult">
<table class="table table-active table-success table-bordered table-sm table-responsive-sm table-striped">
<thead>
<tr>
<th> Name </th>
<th> Second Name </th>
<th> Email </th>
<th> Status </th>
<th> Level </th>
<th> Actions </th>
</tr>
</thead>
<tbody>
<?php while ($rowAdm = mysqli_fetch_assoc($admin_run)) : ?>
<?php $id = $rowAdm['id_admin'];
$user = $rowAdm['username'];
$full = $rowAdm['sname'];
$email = $rowAdm['email'];
$status = $rowAdm['status'];
$auth = $rowAdm['auth'];
?>
<tr class="text-bold">
<td><?= $user; ?></td>
<td><?= $full; ?></td>
<td><?= $email; ?></td>
<td><?= $status; ?></td>
<td><?= $auth; ?></td>
<td>
<div class="btn-group event">
<a href="administration.php?edit=<?php print $id; ?>" class="btn btn-sm btn-info"><i class="icon edit"></i></a>
<a href="administration.php?delete=<?php print $id; ?>" class="btn btn-sm btn-danger"><i class="icon trash"></i></a>
</div>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
<div class="col-md-4">
<?php include('./includes/signup-data.php'); ?>
<h3 class="text-center text-white bg-success p-2">Events</h3>
<div class="card card-body">
<form action="" method="post" autocomplete="off">
<?php include('./error.php'); ?>
<div class="form-row">
<div class="form-group col-md-6">
<label for="username"><i class="icon user"></i>Username</label>
<input type="text" name="username" id="username" placeholder="Username" class="form-control">
</div>
<div class="form-group col-md-6">
<label for="sname"><i class="icon user"></i>Second name</label>
<input type="text" name="sname" id="sname" placeholder="Second name" class="form-control">
</div>
</div>
<div class="form-group">
<label for="email"><i class="icon mail"></i>Email</label>
<input type="text" name="email" id="email" placeholder="Email@gmail.com" class="form-control">
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label for="pass_1"><i class="icon lock"></i>Password</label>
<input type="password" name="password_1" id="pass_1" placeholder="Password" class="form-control">
</div>
<div class="form-group col-md-6">
<label for="pass_2"><i class="icon lock"></i>Retype pass</label>
<input type="password" name="password_2" id="pass_2" placeholder="Confirm Password" class="form-control">
</div>
<div class="form-group col-md-12">
<label for="level">Level</label>
<select name="level" id="level" class="form-control">
<option">-- select --</option>
<option value="0">Admin</option>
<option value="1">Users</option>
<option value="2">Super sers</option>
</select>
</div>
</div>
<div class="form-group">
<button type="submit" name="registerAdm" class="btn btn-success btn-block"><i class="icon send"></i>Sign Up</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php include('./footer.php'); ?>