-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.php
More file actions
101 lines (96 loc) · 4.32 KB
/
user.php
File metadata and controls
101 lines (96 loc) · 4.32 KB
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
<?php
include_once 'config/Database.php';
include_once 'class/User.php';
$database = new Database();
$db = $database->getConnection();
$user = new User($db);
if (!$user->loggedIn()) {
header('Location: index.php');
}
$pageTitle = 'Manage Userss';
?>
<?php include ('inc/header.php'); ?>
<div class="container-xl">
<div class="row">
<div class="col">
<h2>Users</h2>
<div class="panel-heading">
<div class="row">
<div class="col-md-10">
<h3 class="panel-title"></h3>
</div>
<div class="col-md-2" align="right">
<button id="addUser" type="button" class="btn app-btn-primary" data-bs-toggle="modal"
data-bs-target="#add-user-modal" title="Add user">
<i class="fas fa-plus-circle"></i> Add User
</button>
</div>
</div>
</div>
<table id="userListing" class="table table-striped table-bordered">
<thead>
<tr>
<th>Sn.</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th></th>
</tr>
</thead>
</table>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="add-user-modal" tabindex="-1" aria-labelledby="add-user-modalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="add-user-modalLabel"><i class="fa fa-plus"></i> Edit User</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form method="post" id="userForm">
<div class="modal-body">
<div class="mb-3">
<label for="role" class="form-label">Role</label>
<select class="form-select" id="role" name="role">
<option value="">Select Role</option>
<option value="admin">Admin</option>
<option value="user">User</option>
</select>
</div>
<div class="mb-3">
<label for="first_name" class="form-label">First Name</label>
<input type="text" name="first_name" id="first_name" autocomplete="off" class="form-control"
placeholder="First name" />
</div>
<div class="mb-3">
<label for="last_name" class="form-label">Last Name</label>
<input type="text" class="form-control" id="last_name" name="last_name"
placeholder="Last name" />
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" placeholder="Email" />
</div>
<div class="mb-3">
<label for="password" class="form-label">New Password</label>
<input type="password" class="form-control" id="password" name="password"
placeholder="Password" />
</div>
</div>
<div class="modal-footer">
<input type="hidden" name="id" id="id" />
<input type="hidden" name="action" id="action" value="" />
<input type="submit" name="save" id="save" class="btn app-btn-primary" value="Save" />
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"
aria-label="Close">Close</button>
</div>
</form>
</div>
</div>
</div>
</div>
<?php
$jsFile = 'user.js';
include ('inc/footer.php');
?>