/
lhistory.php
executable file
·73 lines (67 loc) · 2.66 KB
/
lhistory.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
68
69
70
71
72
73
<?php
require_once 'init.php';
require_once LIB_PATH.'functions.lib.php';
require_once LIB_PATH.'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Log History";
$page_id = "11";
chkSecurity($page_id);
$log_list_q ="SELECT lh.id,
CONCAT(u.fname,' ',u.lname) AS fullname,
lh.ip_addr,
lh.time,
CONCAT(lc.notes,' ',lh.notes) AS notes ".
"FROM log_history lh
LEFT JOIN user u ON (u.id = lh.uid)
LEFT JOIN log_code lc ON (lc.id = lh.cid)
WHERE lh.del = '0'
ORDER BY lh.time DESC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($log_list_q);
$pagingResult->paginate();
$this_page = $_SERVER['PHP_SELF']."?".$pagingResult->getPageQString();
include THEME_DEFAULT.'header.php'; ?>
<//-----------------CONTENT-START-------------------------------------------------//>
<h1 class="page-header"><?=$page_title?> Page</h1>
<div class="panel panel-default">
<div class="panel-heading">
</div>
<div class="panel-body">
<?=$pagingResult->pagingMenu()?>
<br>
<table border="0" cellpadding="1" cellspacing="1" width="100%" class="table table-striped table-bordered table-condensed">
<thead>
<tr><th width="25" align="left"> <b>NO</b> </td>
<th width="*"> <b>NAME</b> </td>
<th width="*"> <b>IP ADDRESS</b> </td>
<th width="*"> <b>TIME</b> </td>
<th width="*"> <b>REMARKS</b> </td>
</tr>
</thead>
<tbody>
<?php
if ($pagingResult->getPageRows()>= 1) {
$count = $pagingResult->getPageOffset() + 1;
$result = $pagingResult->getPageArray();
while ($log_list_arr = mysql_fetch_array($result, MYSQL_ASSOC)) {?>
<tr align="left" valign="top">
<td width="25" align="left"> <?=$count?>.</td>
<td> <?=($log_list_arr["fullname"])?ucwords($log_list_arr["fullname"]):"-"?> </td>
<td> <?=($log_list_arr["ip_addr"])?ucwords($log_list_arr["ip_addr"]):"-"?> </td>
<td> <?=($log_list_arr["time"])?cplday('d M Y H:i:s',$log_list_arr["time"]):"-"?> </td>
<td> <?=($log_list_arr["notes"])?strtoupper($log_list_arr["notes"]):"-"?> </td>
</tr>
<?php $count++;
}
} else {?>
<tr><td colspan="5" align="center" bgcolor="#e5e5e5"><br />No Data Entries<br /><br /></td></tr>
<?php } ?>
</tbody>
</table>
</td></tr>
<?=$pagingResult->pagingMenu()?>
</div></div>
<//-----------------CONTENT-END-------------------------------------------------//>
<?php include THEME_DEFAULT.'footer.php';?>