-
Notifications
You must be signed in to change notification settings - Fork 10
/
permissions.php
122 lines (72 loc) · 4 KB
/
permissions.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
<?php include 'app/inc/header.php'; ?>
<!--====== Start Main Wrapper Section======-->
<section class="d-flex" id="wrapper">
<?php include 'app/inc/sidebar.php'; ?>
<div class="page-content-wrapper">
<!-- Header BreadCrumb -->
<div class="content-header">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="dashboard.php"><i class="material-icons">home</i>Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Permissions details</li>
</ol>
</nav>
</div>
<!-- Header BreadCrumb -->
<?php
$completeProfile = $usr->profileCompleteNotify($userEmail, $userid);
if (isset($completeProfile)) {
echo $completeProfile;
}
?>
<!-- Create New User -->
<div class="main-content">
<div class="card bg-white">
<div class="card-body mt-3 mb-3">
<div class="permissions">
<div class="form-group row">
<div class="col-md-2">Permissions</div>
<div class="col-md-8">
<table class="table table-striped table-bordered">
<?php
$rolelist = $rol->selectAllRole();
if ($rolelist) {
while ($result = $rolelist->fetch_assoc()) {
?>
<tr>
<td>
<?php if ($result['status'] == '1') { ?>
<h5 class="mb-2"><span class="badge badge-warning text-white"><?php echo $result['rolename']; ?></span></h5>
<?php }else{ ?>
<h5 class="mb-2"><span class="badge badge-secondary text-white"><?php echo $result['rolename']; ?></span></h5>
<?php } ?>
<div>
<?php
$list = explode(',', $result['permission_items']);
foreach ($list as $item)
{
if ($item) { ?>
<span class="mr-4"><i class="material-icons md-18 text-success">check_circle</i> <?php echo $item; ?></span>
<?php }else{ ?>
<span class="mr-4"><i class="material-icons md-18 text-danger">check_circle</i> Nothing</span>
<?php } ?>
<?php }
?>
</div>
</td>
</tr>
<?php }}else{ echo "<script>window.location='permissions.php';</script>"; }?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Create New User-->
</div>
<!-- main-content -->
</div>
</section>
<!--====== End Main Wrapper Section======-->
<?php include 'app/inc/footer.php'; ?>