-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathviewUsers.php
More file actions
72 lines (59 loc) · 1.5 KB
/
viewUsers.php
File metadata and controls
72 lines (59 loc) · 1.5 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
<?php
session_start();
include './Template.php';
include './DBConfig.php';
$mysql = new DBConfig();
$db = $mysql->getDBConfig();
$head = '';
$header = new Template("./header.php", array("head" => $head, "title" => "View Users","return"=>"viewUser.php","current_page"=>5));
$header->out();
?>
<!-- content-wrap -->
<div id="content-wrap">
<!-- content -->
<div id="content" class="clearfix">
<!-- main -->
<div id="main">
<div class="main-content">
<form action= "manageUser.php" method= "post">
<table class="view">
<tr><td class="bold"> Employee ID</td><td class="bold">Employee Name</td></tr>
<?php
$query= "SELECT first_name, last_name, uid FROM users WHERE access_level = '1' ORDER BY employee_status ASC, last_name ASC";
$result = $db->query($query);
if(mysqli_num_rows($result) != 0)
{
while($row= mysqli_fetch_row($result))
{
$n = $row[0] ." " . $row[1];
$id = $row[2];
echo'<tr><td>';
echo "<input type='radio' name='radio' value= '$id' > " ;
echo " " . $id . "</td><td> " . $n;
echo '</td></tr>';
}
?>
</table><table>
<tr>
<td><input type="submit" class="btn btn-info" value="Select User" name="submit"></td>
</tr></table>
<?php
}
else
echo "<tr>You have no users</tr>";
?>
</tbody>
</table></form>
</div>
<!-- /main -->
</div>
<!-- sidebar -->
<? include './sidebar.php'; ?>
<!-- content -->
</div>
<!-- /content-out -->
</div>
<!-- extra -->
<?php
include './footer.php';
?>