/
report.php
executable file
·84 lines (78 loc) · 2.94 KB
/
report.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
74
75
76
77
78
79
80
81
82
83
84
<?php
require_once 'init.php';
require_once LIB_PATH.'functions.lib.php';
require_once LIB_PATH.'paging.lib.php';
chkLicense();
chkSession();
$page_title = "Report";
$page_id = "12";
chkSecurity($page_id);
$ev_q = "SELECT e.id,
CONCAT(u.fname,' ',u.lname) AS fullname,
e.name AS evname,
e.ticker,
e.sdate,
e.edate,
e.createBy,
e.createDate,
e.qty_locket
FROM events e
INNER JOIN user u ON (u.id = e.createBy)
WHERE e.createBy = '".$_SESSION["uid"]."' AND e.del = '0'
ORDER BY e.sdate DESC ";
$pagingResult = new Pagination();
$pagingResult->setPageQuery($ev_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="sub-header">
<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 valign="middle">
<th width="25"> <b>NO.</b></td>
<th width="*" align="left"> <b>NAME</b></td>
<th width="*" align="left"> <b>START DATE</b> </td>
<th width="*" align="left"> <b>END DATE</b> </td>
<th width="*" align="left"> <b>LOCKET</b> </td>
<th width="*" align="center"> <b>CMD</b></td>
</tr>
</thead>
<tbody>
<?php
if ($pagingResult->getPageRows()>= 1) {
$count = $pagingResult->getPageOffset() + 1;
$result = $pagingResult->getPageArray();
while ($array = mysql_fetch_array($result, MYSQL_ASSOC)) { ?>
<tr valign="top">
<td align="left"> <?=$count?>. </td>
<td align="left"> <?=($array["evname"])?ucwords($array["evname"]):"-";?> </td>
<td align="left"> <?=($array["sdate"])?cplday('D, j M Y',$array["sdate"]):"-";?> </td>
<td align="left"> <?=($array["edate"])?cplday('D, j M Y',$array["edate"]):"-";?> </td>
<td align="left"> <?=($array["qty_locket"])?$array["qty_locket"]:"-";?> </td>
<td width="60" align="center" valign="middle">
<a title="View Details" class="btn btn-default" href="./report_det.php?evid=<?=$array["id"]?>">
<span class="glyphicon glyphicon-stats"></span>
DASHBOARD
</a>
</td>
</tr>
<?php $count++;
}
} else { ?>
<tr><td colspan="6" align="center" bgcolor="#e5e5e5"><br />No Data Entries<br /><br /></td></tr>
<?php } ?></tbody>
</table>
<?=$pagingResult->pagingMenu();?>
<br>
</div>
</div>
<//-----------------CONTENT-END-------------------------------------------------//>
<?php include THEME_DEFAULT.'footer.php'; ?>