PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/apphis.php

http://ebpls.googlecode.com/
PHP | 195 lines | 177 code | 15 blank | 3 comment | 22 complexity | e49ecc690fd634ba7f09d77f4da9e8a8 MD5 | raw file
  1. <?php
  2. require_once("lib/ebpls.lib.php");
  3. require_once("lib/ebpls.utils.php");
  4. require_once("ebpls-php-lib/utils/ebpls.search.funcs.php");
  5. global $ThUserData;
  6. require_once "includes/variables.php";
  7. include("lib/multidbconnection.php");
  8. $dbLink =Open($dbtype,$connecttype,$dbhost,$dbuser,$dbpass,$dbname);
  9. $user_id = $ThUserData[id];
  10. include"includes/bizlevel.php";
  11. $get = mysql_query("select * from ebpls_business_enterprise a, ebpls_owner c
  12. where a.owner_id='$owner_id' and
  13. a.business_id='$business_id' and
  14. a.owner_id=c.owner_id ");
  15. $d = mysql_fetch_assoc($get);
  16. $fullname = ucfirst($d["owner_first_name"])." ".ucfirst($d["owner_middle_name"])." ".ucfirst($d["owner_last_name"]);
  17. $bussname = ucfirst($d["business_name"]);
  18. ?>
  19. <script language='Javascript' src='includes/datepick/datetimepicker.js'></script>
  20. <link rel="stylesheet" href="stylesheets/default.css" type="text/css"/>
  21. <div align=right><a href="javascript:window.close();"><b>Close this Window [X]</b></a></div>
  22. <br><br>
  23. <script language="Javascript">
  24. function PaymentCommand(cmd,amt,paymde,paypart,or,natid,pens,bustax,busfee, buspen, busint,nbacktax)
  25. {
  26. //var trans_id
  27. var x,y,w,h
  28. // trans_id = document._FRM.trans_id.value;
  29. // center on screen
  30. if ( cmd == 'CASH' ) {
  31. w = 400
  32. h = screen.height - 100
  33. } else if ( cmd == 'CHECK' ) {
  34. w = 600
  35. h = screen.height - 100
  36. } else if ( cmd == 'CASHVIEW' ) {
  37. w = 400
  38. h = screen.height - 100
  39. } else if ( cmd == 'CHECKVIEW' ) {
  40. w = 600
  41. h = screen.height - 100
  42. } else if ( cmd == 'CHECKSTATUS' ) {
  43. w = 600
  44. h = screen.height - 200
  45. }
  46. x = screen.width/2 - w/2
  47. y = screen.height/2 - h/2
  48. strOption = 'toolbar=0,location=0,directories=0,menubar=0,resizable=0,scrollbars=1,status=1,width=' + w + ',height=' + h + ',screenX=' + x + ',screenY=' + y
  49. window.open ("ebplspay.php?&nature_id="+ natid + "&or1=" + or +"&paymde="+ paymde + "&owner_id=<?php echo $owner_id; ?>&permit_type=Business&istat=<?php echo $stat; ?>&pensked="+ pens +"&class_type=Permits&business_id=<?php echo $business_id; ?>&paypart="+ paypart + "&amtpay="+ amt + "&cmd=" + cmd + "&fee=" + busfee + "&ntax=" + bustax + "&penamt=" + buspen + "&surcharge=" + busint + "&exemption=<?php echo $totalexptax;?>&pmode=<?php echo $pmode;?>&paympart=" + paymde + "&sbacktax=" + nbacktax, cmd, strOption);
  50. }
  51. </script>
  52. <form name='_FRM'>
  53. <table border=0 align=left>
  54. <tr>
  55. <td> Owner Name: </td><td><?php echo stripslashes($fullname); ?></td>
  56. </tr>
  57. <tr>
  58. <td> Business Name: </td><td><?php echo stripslashes($bussname); ?></td>
  59. </tr>
  60. </table>
  61. <br><br>
  62. <table border=0 align=center>
  63. <tr>
  64. <td><h2>Application History </h2></td>
  65. </tr>
  66. <tr><td></td></tr>
  67. </table>
  68. <?php
  69. $get = mysql_query("select distinct(for_year), business_permit_code, application_date,
  70. transaction, steps, released, released_date from ebpls_business_enterprise_permit
  71. where owner_id='$owner_id' and released_date not like '0%' and
  72. business_id='$business_id' order by business_permit_id");
  73. ?>
  74. <table border=0 width="70%">
  75. <?php
  76. while ($d = mysql_fetch_assoc($get)) {
  77. ?>
  78. <tr>
  79. <td align="right" width=25%> Permit Number: </td>
  80. <td width=25%> <?php echo $d["business_permit_code"]; ?></td>
  81. <td align="right" width=25%> Application Date: </td>
  82. <td width=25%> <?php echo $d["application_date"];
  83. $yearend =$d["for_year"]."-12-31 23:59:59";
  84. ?></td>
  85. </tr>
  86. <tr>
  87. <td align="right"> Transaction: </td>
  88. <td> <?php echo $d["transaction"]; ?></td>
  89. <td align="right"> Status: </td>
  90. <td> <?php echo $d["steps"]; ?></td>
  91. </tr>
  92. <?php
  93. if ($d["released"]) {
  94. ?>
  95. <tr>
  96. <td align="right" width=25%> Released Date </td>
  97. <td width=25%> <?php echo $d["released_date"]; ?></td>
  98. </tr>
  99. <tr><td colspan=4 align="center">Payment History</td></tr>
  100. <tr>
  101. <td colspan=4 align="center">
  102. <?php
  103. $getphis = mysql_query("select * from ebpls_transaction_payment_or_details a,
  104. ebpls_transaction_payment_or b where
  105. a.or_no=b.or_no and
  106. a.trans_id='$owner_id' and a.payment_id='$business_id' and
  107. a. ts between '$d[application_date]' and '$yearend'");
  108. while ($p = mysql_fetch_assoc($getphis)) {
  109. ?>
  110. <table border=0>
  111. <tr>
  112. <td align="right" width=20%>OR Number: </td>
  113. <td width=20%><?php echo $p["payment_code"]; ?></td>
  114. <td align="right" width=20%>Payment Date: </td>
  115. <td width=20%><?php echo $p["or_date"]; ?></td>
  116. </tr>
  117. <tr>
  118. <td align="right" width=20%>Payment Type: </td>
  119. <td><?php echo $p["or_entry_type"]; ?></td>
  120. <td align="right" width=20%>Amount: </td>
  121. <td><?php echo number_format($p["amount_due"],2); ?></td>
  122. </tr>
  123. <?php
  124. if ($p["or_entry_type"]=='CHECK') {
  125. $gs = mysql_query("select * from ebpls_transaction_payment_check where
  126. or_no='$p[or_no]'");
  127. $gr = mysql_fetch_assoc($gs);
  128. ?>
  129. <tr>
  130. <td align="right" width=20%>Bank Name: </td>
  131. <td><?php echo $gr["check_name"]; ?></td>
  132. <td align="right" width=20%>Check Number: </td>
  133. <td><?php echo $gr["check_no"]; ?></td>
  134. </tr>
  135. <tr>
  136. <td align="right" width=20%>Check Date: </td>
  137. <td><?php echo $gr["check_issue_date"]; ?></td>
  138. <td align="right" width=20%>Status: </td>
  139. <td><?php echo $gr["check_status"]; ?></td>
  140. </tr>
  141. <?php
  142. if ($bpay==1 || $ulev==6 || $ulev==7 and $gr["check_status"]!='CLEARED') {
  143. ?> <tr>
  144. <td align="right" width=20%>Change Check Status: </td>
  145. <td>
  146. <?php
  147. if ($gr["check_status"]!='CLEARED') {
  148. ?>
  149. <a href='#' onClick='javascript:PaymentCommand("CHECKSTATUS",1,2,"3", "<?php echo $gr[check_id]; ?>", "<?php echo $p[payment_code]; ?>");'>
  150. <font color=blue>Change Status</font></a>
  151. <?php
  152. }
  153. }
  154. ?>
  155. </td>
  156. </tr>
  157. <?php
  158. }
  159. ?>
  160. </table>
  161. <?php
  162. }
  163. ?>
  164. </td>
  165. </tr>
  166. <tr>
  167. <td colspan=4><hr></td>
  168. </tr>
  169. <?php
  170. }
  171. }
  172. ?>
  173. </table>
  174. <br><br>
  175. <table border=0 align=center>
  176. <tr><td>
  177. <input type=button name=canit value=CLOSE onClick='javascript: window.close()'>
  178. </td></tr>
  179. </table>
  180. </form>