-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgroupMember.php
More file actions
97 lines (81 loc) · 3.51 KB
/
groupMember.php
File metadata and controls
97 lines (81 loc) · 3.51 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
<?php
/**
* Subject: Administration of Groups members : User selection
* User: Frank
* Date: 07/08/2018
* Time: 21:59
*/
global $pageParameter;
$alert = 0;
if ($pageParameter > 0) {
//an Id was given
$id = $pageParameter;
$groupDetails = fctGroupList($id);
$userList = fctUsersNotGroup($id);
} else if ($pageParameter = 0) {
//a new Id creation
}
?>
<div class="container">
<div class="row mt-4">
<div class="col-md-6">
<h2><i class="fas fa-user text-primary" aria-hidden="true"></i> User selection</h2>
</div>
<div class="col-md-6 text-right">
<a class="btn text-muted" href="?id=<?= fctUrlOpensslCipher("groupDetail.php," . $id) ?>">
<h2>back to group page <i class="fas fa-angle-double-left " aria-hidden="true"></i></h2>
</a>
</div>
</div>
<div class="jumbotron pt-2 pb-5 bg-white">
<h5 class="collapse text-justify text-muted" id="collapseJumbo">Select one or several users to add to the group.</h5>
<hr>
<button class="collapseIcon" data-toggle="collapse" data-target="#collapseJumbo" aria-expanded="false" aria-controls="collapseJumbo">
<span id="collapseIconOpen" class="text-muted">show details <i class="fa fa-arrow-circle-down" aria-hidden="true"></i></span>
<span id="collapseIconClose" class="text-muted">hide details <i class="fa fa-arrow-circle-up" aria-hidden="true"></i></span>
</button>
</div>
<form name="editForm" action="groupPost.php" target="_self" method="post">
<input type="hidden" name="action" value="memberAdd">
<input type="hidden" name="id" value="<?= $id ?>">
<div class="row">
<div class="col-md-8"><h3>Available users for Group <?= $groupDetails[0]['grp_name'] ?></h3></div>
<div class="col-md-4"><input class="form-control " id="myInput" type="text" placeholder="Search.."/></div>
</div>
<table class="table table table-striped">
<thead>
<tr>
<th>select</th>
<th>name</th>
<th>lastname</th>
<th>email</th>
<th class="text-center">active</th>
</tr>
</thead>
<tbody id="myTable">
<?php foreach ($userList as $item) {
$item["usr_active"] == 1 ? $icon = "fa fa-check text-success" : $icon = "fa fa-times-circle text-danger";
?>
<tr>
<td><input type="checkbox" id="select" name="usr[]" value="<?= $item["usr_id"] ?>" /></td>
<td><?= $item["usr_name"] ?></td>
<td><?= $item["usr_lastname"] ?></td>
<td><?= $item["usr_email"] ?></td>
<td class="text-center"><h3><i class="<?= $icon ?>"></i></h3></td>
</tr>
<?php } ?>
</tbody>
</table>
<div class="container text-right">
<a href="?id=<?= fctUrlOpensslCipher("groupDetail.php," . $id) ?>">
<button type="button" class="btn btn-danger"><i class="fas fa-times-circle "></i> Cancel</button>
</a>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</form>
<div class="col mt-4">
<a class="btn text-muted" href="?id=<?= fctUrlOpensslCipher("groupDetail.php," . $id) ?>">
<h4>back to group page <i class="fas fa-angle-double-left " aria-hidden="true"></i></h4>
</a>
</div>
</div>