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
85
86
87
88
89
90
91
92
93
94
95
96
|
<?php require_once(__DIR__ . '/../checkuser.php');
$sql = "SELECT * FROM sup_contract contract INNER JOIN v_cm_customer_support customer ON contract.customer_id = customer.cust_id where contract.status = ? and contract.deleted = ? and contract.contract_to <= ? and contract.contract_to >= ? order by contract.contract_to DESC"; $parameters = array(1, 0, date("Y-m-d", strtotime("+2 month")), date("Y-m-d"));
if (!($sth = $dbh->prepare($sql))) { throw new Exception("sql prepare statement failure: $sql"); } $sth->setFetchMode(PDO::FETCH_ASSOC); if (!$sth->execute($parameters)) { throw new Exception("sql execute statement failure: $sql"); } $contract_info = $sth->fetchAll();
?>
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
<?php require(__DIR__ . '/../inc/_head_meta.php'); ?>
<?php require(__DIR__ . '/../inc/_head_css.php'); ?>
<style type="text/css"> body { padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ padding-bottom: 40px; }
tr td{ background-color: #FFFF33 !important; } </style>
<?php require(__DIR__ . '/../inc/_head_script.php'); ?>
</head> <body>
<?php require(__DIR__ . '/../inc/_navbar.php'); ?>
<div class="container">
<h2>Contract Alert</h2>
<table class="table table-striped"> <caption class="text-left hide"><h2>Contract Alert</h2></caption> <thead> <tr> <th> </th> <th>Number</th> <th>Customer</th> <th>Period</th> <th>Contract Type</th> <th>Status</th> </tr> </thead> <tbody> <?php foreach ($contract_info as $contract) { ?> <tr > <td> <a href="../contract/modifyform.php?id=<?= $contract['contract_id'] ?>" target="_blank" class="btn"><i class="icon-pencil"></i></a> </td> <td><?= $contract['contract_id'] ?></td> <td><?= h($contract['company_name']) ?></td> <td><?= h($contract['contract_from'] . " to " . $contract['contract_to']) ?></td> <td><?= h(contract_type($contract['contract_type'])) ?></td> <td><?= h(Contract::statusOptions($contract['status'])) ?></td> </tr> <?php } ?> </tbody> </table>
<?= $pagination ?>
<div class="scroll_to_top"> <a href="#" class="btn btn-link btn-mini scroll-to-top">Scroll to Top</a> </div>
<script type="text/javascript"> $(function () { $('.scroll-to-top').click(function (event) { event.preventDefault(); scrollToTop(); }); }); </script>
<?php require(__DIR__ . '/../inc/_footer.php'); ?>
</div> <!-- /container --> </body> </html>
|