PageRenderTime 62ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/CFML/old_recording_reports.cfm

https://gitlab.com/vince.omega/General-Code-Dump-From-Desktop
ColdFusion | 261 lines | 235 code | 25 blank | 1 comment | 0 complexity | dcacb52c0ecc254e647c8739c06f7f1d MD5 | raw file
  1. <cfinclude template="_recording_header.cfm">
  2. <cfif not IsDefined('form.limit_by')>
  3. <cfset form.limit_by = "0">
  4. </cfif>
  5. <cfif client.custtype eq "I">
  6. <cfset cust_codes = client.custcode>
  7. <cfelse>
  8. <cfset cust_codes = client.custlist>
  9. </cfif>
  10. <style>
  11. a.pager:link {color: white;}
  12. a.pager:visited {color: white;}
  13. a.pager:hover {color: white;}
  14. a.pager:active {color: white;}
  15. </style>
  16. <table style="width: 100%; background-color: #504B4B;" cellspacing="0">
  17. <tr>
  18. <td>
  19. <form action="" method="get">
  20. <table>
  21. <tr>
  22. <td style="font-size: 18px; color: #FFFFFF;">Status</td>
  23. <td style="font-size: 18px; color: #FFFFFF;">Sort</td>
  24. </tr>
  25. <tr>
  26. <td>
  27. <select name="status_selection">
  28. <option value="" <cfif isDefined('url.status_selection')><cfif '' eq url.status_selection>selected="selected"</cfif></cfif>>All</option>
  29. <option value="Open" <cfif isDefined('url.status_selection')><cfif 'Open' eq url.status_selection>selected="selected"</cfif></cfif>>Open</option>
  30. <option value="Completed" <cfif isDefined('url.status_selection')><cfif 'Completed' eq url.status_selection>selected="selected"</cfif></cfif>>Completed</option>
  31. </select>
  32. </td>
  33. <td>
  34. <select name="sort_selection">
  35. <option value="" <cfif isDefined('url.sort_selection')><cfif '' eq url.sort_selection>selected="selected"</cfif></cfif>>Select</option>
  36. <option value="Borrower" <cfif isDefined('url.sort_selection')><cfif 'Borrower' eq url.sort_selection>selected="selected"</cfif></cfif>>Borrower</option>
  37. <option value="Address" <cfif isDefined('url.sort_selection')><cfif 'Address' eq url.sort_selection>selected="selected"</cfif></cfif>>Address</option>
  38. </select>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td></td>
  43. <td></td>
  44. <td><input type="submit" name="submit" value="Filter" /></td>
  45. </tr>
  46. </table>
  47. </form>
  48. <cfif IsDefined('url.status_selection')>
  49. <cfset num_rows = 15>
  50. <cfif not IsDefined('url.page_offset')>
  51. <cfset url.page_offset = 0>
  52. </cfif>
  53. <CFOBJECT type="COM" action="CREATE" class="D3ADO.Recordset" name="COMObject">
  54. <CFSET COMParams = "w3HostName=SEARCHTEC&w3Exec=OMSW3&sessionid=#client.sessionid#&FUNCTION=RECORDING_REPORT&family=&page_offset=#url.page_offset#&num_rows=#num_rows#&custcode=#cust_codes#&order_status=#url.status_selection#&sort_by=#url.sort_selection#">
  55. <cfset temp = COMOBJECT.D3Open(#COMParams#)>
  56. <CFSET fldcount = COMObject.RecordCount>
  57. <CFSET temp2 = COMObject.Fields>
  58. <CFSET temp3 = temp2.Item("ROW_CNT")>
  59. <CFSET row_cnt = temp3.Value>
  60. <cfset num_pages = fix(row_cnt / num_rows)>
  61. <cfif 0 neq (row_cnt MOD num_rows)>
  62. <cfset num_pages = num_pages +1>
  63. </cfif>
  64. <cfif row_cnt eq 0>
  65. <font color="white">No Results Found.</font>
  66. <cfelse>
  67. <cfoutput>
  68. <table style="width: 100%;">
  69. <tr>
  70. <td>
  71. <a href="export_recordings.php?custcode=#cust_codes#&family=&status_selection=#URLEncodedFormat(url.status_selection)#&sort_selection=#URLEncodedFormat(url.sort_selection)#"><span style="color: white;"><font color="FF0612"><font size="+1"><i></i></font></span><img src="/images/excel.png" border="0" alt=""></a>
  72. </td>
  73. </tr>
  74. </table>
  75. <table style="width: 100%; background-color: ##888888;">
  76. <tr style="color: white; font-weight: bold;">
  77. <td>
  78. <cfif url.page_offset eq 0>
  79. <<
  80. <cfelse>
  81. <a class="pager" href="recording_reports.cfm?status_selection=#URLEncodedFormat(url.status_selection)#&sort_selection=#URLEncodedFormat(url.sort_selection)#&page_offset=0"><<</a>
  82. </cfif>
  83. </td>
  84. <td>
  85. <cfif url.page_offset eq 0>
  86. <
  87. <cfelse>
  88. <a class="pager" href="recording_reports.cfm?status_selection=#URLEncodedFormat(url.status_selection)#&sort_selection=#URLEncodedFormat(url.sort_selection)#&page_offset=#(url.page_offset-1)#"><</a>
  89. </cfif>
  90. </td>
  91. <td align="center">Page #(url.page_offset+1)# / #num_pages#</td>
  92. <td align="right">
  93. <cfif (url.page_offset+1) lt num_pages>
  94. <a class="pager" href="recording_reports.cfm?status_selection=#URLEncodedFormat(url.status_selection)#&sort_selection=#URLEncodedFormat(url.sort_selection)#&page_offset=#(url.page_offset+1)#">></a>
  95. <cfelse>
  96. >
  97. </cfif>
  98. </td>
  99. <td align="right">
  100. <cfif (url.page_offset+1) lt num_pages>
  101. <a class="pager" href="recording_reports.cfm?status_selection=#URLEncodedFormat(url.status_selection)#&sort_selection=#URLEncodedFormat(url.sort_selection)#&page_offset=#num_pages-1#">>></a>
  102. <cfelse>
  103. >>
  104. </cfif>
  105. </td>
  106. </tr>
  107. </table>
  108. <table style="width: 100%; background-color: ##FFFFFF;">
  109. <tr>
  110. <td>Order##</td>
  111. <td>Borrower</td>
  112. <td>Address</td>
  113. <td>County</td>
  114. <td>Doc&nbsp;Type</td>
  115. <td>Submitted&nbsp;&nbsp;</td>
  116. <td>Comments</td>
  117. <td>Tracking Status</td>
  118. <td>Comp</td>
  119. <td>Pdf</td>
  120. </tr>
  121. <cfset bg_color = 'CCCCCC'>
  122. <cfloop from="1" to="#fldcount#" index="fldloop">
  123. <CFSET temp2 = COMObject.Fields>
  124. <CFSET temp3 = temp2.Item("ORDER_IDS")>
  125. <CFSET order_id = temp3.Value>
  126. <CFSET temp2 = COMObject.Fields>
  127. <CFSET temp3 = temp2.Item("BORROWERS")>
  128. <CFSET borrower = temp3.Value>
  129. <CFSET temp2 = COMObject.Fields>
  130. <CFSET temp3 = temp2.Item("ADDRESSES")>
  131. <CFSET address = temp3.Value>
  132. <CFSET temp2 = COMObject.Fields>
  133. <CFSET temp3 = temp2.Item("COUNTIES")>
  134. <CFSET county = temp3.Value>
  135. <CFSET temp2 = COMObject.Fields>
  136. <CFSET temp3 = temp2.Item("DOC_TYPES")>
  137. <CFSET doc_type = temp3.Value>
  138. <CFSET temp2 = COMObject.Fields>
  139. <CFSET temp3 = temp2.Item("COMMENTS")>
  140. <CFSET comments = temp3.Value>
  141. <CFSET temp2 = COMObject.Fields>
  142. <CFSET temp3 = temp2.Item("COMP_BDS")>
  143. <CFSET comprehensive_bd_order_id = temp3.Value>
  144. <CFSET temp2 = COMObject.Fields>
  145. <CFSET temp3 = temp2.Item("COMP_BD_ORDER_DATES")>
  146. <CFSET comprehensive_bd_order_date = temp3.Value>
  147. <CFSET temp2 = COMObject.Fields>
  148. <CFSET temp3 = temp2.Item("STATUSES")>
  149. <CFSET status = temp3.Value>
  150. <CFSET temp2 = COMObject.Fields>
  151. <CFSET temp3 = temp2.Item("ORDER_DATES")>
  152. <CFSET order_date = temp3.Value>
  153. <cfset order_date_year = DateFormat(order_date, 'yyyy')>
  154. <cfset order_date_month = DateFormat(order_date, 'mm')>
  155. <cfset order_date_day = DateFormat(order_date, 'dd')>
  156. <cfif 'CCCCCC' eq bg_color>
  157. <cfset bg_color = 'FFFFFF'>
  158. <cfelse>
  159. <cfset bg_color = 'CCCCCC'>
  160. </cfif>
  161. <tr style="background-color: ###bg_color#; color: ##336799; font-weight: bold;">
  162. <td>
  163. <!--- <a href="edit_recording_details.cfm?order_id=#order_id#&status_selection=#URLEncodedFormat(url.status_selection)#&sort_selection=#URLEncodedFormat(url.sort_selection)#&page_offset=#URLEncodedFormat(url.page_offset)#" title="Click to edit">#order_id#</a> --->
  164. <a href="/secure/status2.cfm?order_id=#order_id#" target="new">#order_id#</a>
  165. </td>
  166. <td>#Replace(borrower,chr(253),'<br />','all')#</td>
  167. <td>#Replace(address,chr(253),'<br />','all')#</td>
  168. <td>#county#</td>
  169. <td>#doc_type#</td>
  170. <td>#order_date#</td>
  171. <td style="color: ##FF0000; text-align: center;"><cfif '' neq comments>*</cfif></td>
  172. <td>#Replace(status,chr(253),'<br />','all')#</td>
  173. <td>
  174. <cfif "" neq comprehensive_bd_order_id>
  175. <cfif Find('-', comprehensive_bd_order_id)>
  176. #comprehensive_bd_order_id#
  177. <cfelse>
  178. <cfif FileExists("\\\\fileserver\\pdf\\#comprehensive_bd_order_id#.pdf")>
  179. <a href="/virtual_pdf_reports/#comprehensive_bd_order_id#.pdf" title="#comprehensive_bd_order_id#" target="new"><img src="/images/pdfbl.png" border="0" /></a>
  180. <cfelse>
  181. <cfset comp_bd_year = Right(comprehensive_bd_order_date,2)>
  182. <cfset comp_bd_month = Left(comprehensive_bd_order_date,2)>
  183. <cfset comp_bd_day = Mid(comprehensive_bd_order_date,4,2)>
  184. <cfif FileExists("\\\\fileserver\\pdf_arc\\20#comp_bd_year#\\#comp_bd_month#\\#comp_bd_day#\\#comprehensive_bd_order_id#.pdf")>
  185. <a href="/virtual_pdf_report_archive/20#comp_bd_year#/#comp_bd_month#/#comp_bd_day#/#comprehensive_bd_order_id#.pdf" title="#comprehensive_bd_order_id#" target="new"><img src="/images/pdfbl.png" border="0" /></a>
  186. </cfif>
  187. </cfif>
  188. </cfif>
  189. </cfif>
  190. </td>
  191. <td>
  192. <cfset myfilter = "#order_id#*.pdf">
  193. <cfdirectory
  194. directory="\\\\fileserver\\e-recorded\\"
  195. name="myDirectory"
  196. sort="name ASC, size DESC"
  197. filter="#myfilter#">
  198. <cfloop query="myDirectory">
  199. <cfif FileExists("\\\\fileserver\\e-recorded\\#myDirectory.Name#")>
  200. <a href="/virtual_e-recorded_documents/#myDirectory.Name#" title="#myDirectory.Name#" target="new"><img src="/images/pdf_icon.gif" border="0" /></a>
  201. </cfif>
  202. </cfloop>
  203. <cfset myfilter = "#order_id#*.pdf">
  204. <cfdirectory
  205. directory="\\\\fileserver\\recording\\simplifile\\"
  206. name="myDirectory"
  207. sort="name ASC, size DESC"
  208. filter="#myfilter#">
  209. <cfloop query="myDirectory">
  210. <cfif FileExists("\\\\fileserver\\recording\\simplifile\\#myDirectory.Name#")>
  211. <a href="/virtual_recording_documents/#myDirectory.Name#" title="#myDirectory.Name#" target="new"><img src="/images/pdf_icon.gif" border="0" /></a>
  212. </cfif>
  213. </cfloop>
  214. <cfset myfilter = "#order_id#*.pdf">
  215. <cfdirectory
  216. directory="\\\\fileserver\\recording\\zip_pdfs\\"
  217. name="myDirectory"
  218. sort="name ASC, size DESC"
  219. filter="#myfilter#">
  220. <cfloop query="myDirectory">
  221. <cfif FileExists("\\\\fileserver\\recording\\zip_pdfs\\#myDirectory.Name#")>
  222. <a href="/virtual_recording_zip_pdfs/#myDirectory.Name#" title="#myDirectory.Name#" target="new"><img src="/images/pdf_icon.gif" border="0" /></a>
  223. </cfif>
  224. </cfloop>
  225. </td>
  226. </tr>
  227. <cfset tempx = COMObject.MoveNext()>
  228. </cfloop>
  229. </table>
  230. </cfoutput>
  231. </cfif>
  232. </cfif>
  233. <br />
  234. </td>
  235. </tr>
  236. </table>