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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
<?php include_once("common.php"); if (!isset($_SESSION['member'])) { header("Location: login.php"); exit; }
include_once('default_values.php'); $defaultValues = getDefaultValues();
$orderdate = isset($_GET['orderdate']) ? $_GET['orderdate'] : ""; $orderno = isset($_GET['orderno']) ? $_GET['orderno'] : "";
require_once('../webadmin/configure.php'); $sql_cno = mysql_real_escape_string($_SESSION['member']['cno']); $sql = "SELECT * FROM payment_history WHERE cno = '$sql_cno' AND recordstatus = '1'"; $sql .= strlen($orderno) ? " AND order_no like '%" . mysql_real_escape_string($orderno) . "%'" : ""; $sql .= strlen($orderdate) ? " AND payment_date = '" . mysql_real_escape_string($orderdate) . "'" : ""; $sql .= " ORDER BY id ASC"; $result = mysql_query($sql); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <title>Glorious Company</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <!-- Select Calendar --> <link type="text/css" href="css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /> <!-- <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> --> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" src="js/jquery.sparkline.min.js"></script> <script type="text/javascript"> $(function() { $( "#orderdate" ).datepicker( { dateFormat: 'yy-mm-dd'} ); // $(".sparkbullet").sparkline('html', { // type: 'bullet', // width: '80px', // height: '12px', // chartRangeMin: 0, // chartRangeMax: 100, // targetWidth: 0, // targetColor: '#D8B33E', // performanceColor: '#000000', // rangeColors: ['#231F20','#D8B33E','#7f94ff'], // tooltipFormat: '' // }); }); </script> <style type="text/css"> .list-txt a { text-decoration:none; color: white; } .list-txt { line-height: 20px; } .desc-width { max-width: 180px; } @media print { input[type=submit] { display: none; } } .bg1 { background-color: rgba(0, 0, 0, 0.5); background-image: none; } </style> <!--[if lt IE 9]> <style type="text/css"> .bg1 { /* background-color: #403F42; */ background-color: transparent; background-image: url(images/bg1.png); background-repeat: repeat; } </style> <![endif]--> <!-- End Select Calendar --> </head> <body> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!-- Header --> <tr> <td height="73"><table width="930" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="220"><a href="../" target="_blank"><img src="images/logo.png" width="263" height="80" border="0"/></a></td> <td align="right"><span class="header">Welcome [<?=$_SESSION['member']['ccontactp']?>]</span> <!-- <span class="login"><a href="change_password.php">Change password</a></span> --><a href="logout.php"><img src="images/btn_logout.png" border="0" align="absmiddle"/></a></td> </tr> </table></td> </tr> <tr> <td><table width="930" border="0" align="center" cellspacing="0" cellpadding="0"> <tr> <td align="right"><a href="order_history.php"><img src="images/menu_orderhistory.png" width="200" height="35" border="0" /></a><a href="payment.php"><img src="images/menu_paymenthistory.png" width="200" height="35" border="0" /></a><a href="order_status.php"><img src="images/menu_orderstatus.png" width="200" height="35" border="0" /></a></td> </tr> </table></td> </tr> <tr> <td height="5" class="headerline"></td> </tr> <!-- End Header --> <tr> <td height="450" align="center" valign="top"><table width="930" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="50" class="bg1 text-left top"><table width="500" border="0" cellspacing="0" cellpadding="0" style="float:left;border-right: 1px solid #58585A;"> <tr> <td class="title text-left top"><b>Company Info</b></td> </tr> <tr> <td class="txt text-left top"><strong>Customer No.: <?=$_SESSION['member']['cno']?></strong></td> </tr> <tr> <td class="company text-left top"><strong><?=$_SESSION['member']['ccompany']?></strong></td> </tr> <tr> <td height="60" class="txt text-left top"><?=$_SESSION['member']['caddress']?></td> </tr> </table> <table width="400" border="0" cellspacing="0" cellpadding="0" style="float:right;"> <tr> <td class="title"><b>Contact Person</b></td> </tr> <tr> <td class="txt"><strong><?=$_SESSION['member']['ccontactp']?></strong></td> </tr> <tr> <td class="txt">Tel: <?=$_SESSION['member']['ctel']?></td> </tr> <tr> <td class="txt">Fax: <?=$_SESSION['member']['cfax']?></td> </tr> <tr> <td class="txt">Mail: <?=$_SESSION['member']['cmail']?></td> </tr> </table></td> </tr> <tr> <td height="50" class="text-left top"><?=htmlentities($_GET['msg'])?> </td> </tr> <tr> <td height="40" class="text-left top"><div style="float:left"><img src="images/icon_title.png" width="25" height="20" align="top" /><span class="title">PAYMENT HISTORY</span></div> <div style="float:right"><form action="payment.php" method="get">Bill Date <input id="orderdate" name="orderdate" type="text" class="searchinput" value="<?=$orderdate?>" /> Bill No. <input name="orderno" type="text" class="searchinput" value="<?=$orderno?>" /> <input name="submit" type="submit" value="" style="background-image: url(images/btn_search.png); background-color: transparent; width: 20px; height: 20px; border: 0px; vertical-align: middle" /> </form></div></td> </tr> <tr> <td class="text-left top"><table width="930" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="list-titleborder border-right list-bg1 text-left top" style="min-width:70px">Date</td> <td class="list-titleborder border-right list-bg1 text-left top" style="min-width:60px">Bill No.</td> <td class="list-titleborder border-right list-bg1 text-left top desc-width">Description</td> <td class="list-titleborder border-right list-bg1 text-left top">Currency</td> <td class="list-titleborder border-right list-bg1 text-left top">Amount</td> <td class="list-titleborder border-right list-bg1 text-left top">Outstanding</td> <td class="list-titleborder border-right list-bg1 text-left top" style="min-width:70px">Last Payment</td> <td class="list-titleborder border-right list-bg1 text-left top">Status</td> <?php //<td class="list-titleborder list-bg1 text-left top">Progress Rate</td> ?> </tr> <?php while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { //$rowColor = $i++ % 2 == 0 ? 'list-bg2' : 'list-bg1'; $rowColor = 'list-bg1'; ?> <tr> <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['payment_date']?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['order_no']?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top desc-width"><?=$row['desc']?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['currency']?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> top tdalignright"><?=number_format($row['total_amount'],2)?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> top tdalignright"><?=number_format($row['outstand'],2)?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['last_payment_date']?></td> <td class="list-txt border-bottom border-right <?=$rowColor?> text-left top"><?=$row['status_str']; //$defaultValues['order_status']['status'][$row['status']]?></td> <?php /* <td class="list-txt border-bottom <?=$rowColor?> text-left top"><span class="sparkbullet">0, 0, 100, <?=floatval($row['progress_rate'])?>, 0</span></td> */ ?> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> <!-- Footer --> <tr> <td class="footer">COPYRIGHT © 2012 GLORIOUS COMPANY. ALL RIGHTS RESERVED</td> </tr> </table> </body> </html>
|