-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser_accounts.php
More file actions
68 lines (65 loc) · 2.93 KB
/
user_accounts.php
File metadata and controls
68 lines (65 loc) · 2.93 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
<?php include('template/header.php');
include('class/view.php');
$display = new display();
$result = $display->user_accounts();
?>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="dashboard.php">Dashboard</a>
</li>
<li class="breadcrumb-item active">User accounts</li>
</ol>
<div class="card mb-3">
<div class="card-header">
<i class="fa fa-table"></i>
User Accounts
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-hover" width="100%" id="dataTable" cellspacing="0">
<thead>
<tr>
<th>Emp id</th>
<th>User id</th>
<th>Name</th>
<th>Role</th>
<th>Email id</th>
<th>Contact</th>
<th>Joined on</th>
<th></th>
</tr>
</thead>
<tbody>
<?php while($row = mysqli_fetch_assoc($result)){ ?>
<tr>
<td><?php echo $row['emp_id']; ?></td>
<td><?php echo $row['user_id']; ?></td>
<td><?php echo $row['emp_name']; ?></td>
<td><?php echo $row['emp_type']; ?></td>
<td><?php echo $row['email_id']; ?></td>
<td><?php echo $row['emp_cntct']; ?></td>
<td><?php echo $row['doj']; ?></td>
<td>
<div class="btn-group">
<a href='edit_account.php?emp_id={$row->emp_id}'>
<button class="btn btn-primary btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" onclick="window.location.href = 'edit_account.php?emp_id=<?php echo $row['emp_id']; ?>'">
Edit
</button>
</a>
<button type="button" class="btn btn-sm btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href='action/block_account.php?emp_id=<?php echo $row['emp_id']; ?>'>Block</a>
<a class="dropdown-item" href='action/delete_account.php?emp_id=<?php echo $row['emp_id']; ?>'>Delete</a>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
<?php include('template/footer.php');?>