This repository was archived by the owner on Mar 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusers.php
More file actions
44 lines (37 loc) · 1.28 KB
/
users.php
File metadata and controls
44 lines (37 loc) · 1.28 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
<?php
require 'class.user.php';
if (!$_SESSION['user']) {
header('Location: login.php');
exit();
}
$timeclock = New user($_SESSION['user']);
$timeclock->template->print_head();
$timeclock->print_header();
?>
<div id="main">
<div id="content">
<?php
$q = $timeclock->get_all_users();
if (mysql_num_rows($q) > 0) {
echo '<table>';
echo '<tr><th>ID</th><th>Name</th><th>Email</th><th>Password</th><th>Active</th><th>Admin</th><th>Actions</th></tr>';
while ($r = mysql_fetch_assoc($q)) {
echo '<tr>';
echo '<td>'.$r['id'].'</td>';
echo '<td>'.$r['name'].'</td>';
echo '<td>'.$r['email'].'</td>';
echo '<td>XXXXX</td>';
echo '<td>'.$r['active'].'</td>';
echo '<td>'.$r['admin'].'</td>';
echo '<td> </td>';
echo '</tr>';
}
echo '<tr><td>New:</td><td><input type="text" name="name" /></td><td><input type="text" name="email" /></td><td><input type="text" name="password" /></td><td><select name="active"><option vlaue="1">Active</option><option vlaue="0">Not Active</option></select></td><td><select name="admin"><option vlaue="0">Not Admin</option><option vlaue="1">Admin</option></select></td><td><input type="submit" name="submit" value="Add" /></td></tr>';
echo '</table>';
}
?>
</div>
</div>
<?php
$timeclock->template->print_foot();
?>