-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathaprove.php
67 lines (58 loc) · 2.08 KB
/
aprove.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
<?php
include('adhead.php');
if($_SESSION['userdata']['is_admin']==1){
if(isset($_GET['action']))
{
$id=$_GET['id'];
if($_GET['action']=='yes')
{
$ap=1;
$adm = new adminwrk();
$admc = new dbcon();
$sho = $adm->yesno($ap,$id,$admc->conn);
}
elseif($_GET['action']=='no')
{
$ap=0;
$adm = new adminwrk();
$admc = new dbcon();
$sho = $adm->yesno($ap,$id,$admc->conn);
}
}
include('adsidebar.php'); ?>
<nav class="nav nav-pills nav-justified col-sm-10">
<a class="nav-link btn-light " href="allusers.php">All Users</a>
<a class="nav-link btn-light active" href="aprove.php">Pending/Blocked Users</a>
<a class="nav-link btn-light" href="aprovedusr.php">Approved Users</a>
</nav>
<div>
<h3 class="text-center">Pending/Blocked Users</h3>
<table id="tbl" class="container-fluid col-lg-10 mr-lg-2 table table-responsive table-hover table-bordered table-striped">
<thead>
<!-- <th>User id</th> -->
<th onclick='sortTable(1,tbl)'>Name ⇩</th>
<th onclick='sortTable(2,tbl)'>Email ⇩</th>
<th onclick='sortTable(3,tbl)'>Date of signup ⇩</th>
<th onclick='sortTable(4,tbl)'>Mobile ⇩</th>
<th>Approve/Block</th>
<!-- <th>Delete</th> -->
</thead>
<tbody>
<?php
$adm = new adminwrk();
$admc = new dbcon();
$show = $adm->aprove($admc->conn);
foreach($show as $key=>$val)
{
echo "<tr><td>".$val['name']."</td><td>".$val['user_name']."</td><td>".$val['dateofsignup']."</td><td>".$val['mobile']."</td><td><a class='btn btn-success' href='aprove.php?action=yes&id=".$val['user_id']."'>Approve</a></td></tr>"; //<td><a class='btn btn-danger' href='aprove.php?action=no&id=".$val['user_id']."'>Delete</a></td></tr>";
}
?>
</tbody>
</table>
</div>
<?php
}
else{
echo '<h1 class="text-center text-weight-bold text-dark">You Are not Authorised</h1>';
}
include('adfoot.php'); ?>