forked from kamshory/ZKLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.php
49 lines (42 loc) · 827 Bytes
/
test.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
<?php
include "zklibrary.php";
$zk = new ZKLibrary('192.168.1.102', 4370);
$zk->connect();
$zk->disableDevice();
$users = $zk->getUser();
?>
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;">
<thead>
<tr>
<td width="25">No</td>
<td>UID</td>
<td>ID</td>
<td>Name</td>
<td>Role</td>
<td>Password</td>
</tr>
</thead>
<tbody>
<?php
$no = 0;
foreach($users as $key=>$user)
{
$no++;
?>
<tr>
<td align="right"><?php echo $no;?></td>
<td><?php echo $key;?></td>
<td><?php echo $user[0];?></td>
<td><?php echo $user[1];?></td>
<td><?php echo $user[2];?></td>
<td><?php echo $user[3];?></td>
</tr>
<?php
}
?>
</tbody>
</table>
<?php
$zk->enableDevice();
$zk->disconnect();
?>