-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path07_export.cfm
106 lines (85 loc) · 3.81 KB
/
07_export.cfm
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
<!---* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
FILE NAME report_page.cfm
AUTHOR [email protected]
PROJECT Inspections - Reporting Page
PAGE DESCRIPTION
Report page for Unit Inspections
DEVELOPMENT HISTORY
DATE WHO VERSION DESCRIPTION
======== === ======= ===============================
02-10-20 KDW 1.0 Original Development
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --->
<!--- Declare Variables --->
<cfif isdefined("Form.rdoRptType")>
<cfset Variables.sRptType = #Form.rdoRptType#>
<cfelse>
<cfset Variables.sRptType = "1">
</cfif>
<table width="75%" cellpadding="0" cellspacing="0" border="0" class="outsidebordernoside" align="center">
<tr>
<td>
<table width="75%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td class="navbottom">
Inspection Report
</td>
<td class="navbottom"><a href="javascript:window.history.back()" class="backButton"></a></td>
</tr>
<tr>
<td class="navbar" align="center">
<form action="" name="frmInspection" method="post">
<table width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
<td align="right" valign="top" class="navbar">View:</td>
<td align="left" height="20" class="navbar outsidebordernoside" width="40%">
<input type="radio" value="1" name="rdoRptType" <cfif #Variables.sRptType# EQ 1>checked</cfif> />Detail</br>
<input type="radio" value="2" name="rdoRptType" <cfif #Variables.sRptType# EQ 2>checked</cfif>/>Summary</br>
<input type="radio" value="3" name="rdoRptType" <cfif #Variables.sRptType# EQ 3>checked</cfif>/>Worksheet
</td>
<td colspan="2" width="40%"> </td>
</tr>
<tr><td height="1" colspan="4"></td></tr>
<tr>
<td align="center"></td>
<td align="center">
<input type="submit" name="submit" value="View Report" class="button">
</td>
<td colspan="2" width="40%"> </td>
</tr>
<tr>
<td colspan="4" align="center" height="20" class="navbar">
<div id="myDesc"></div>
</td>
</tr>
</table>
</form>
<td></td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<cfif isdefined("FORM.Submit") OR isdefined("FORM.bSubmit")>
<cfset sUrl = "#getPageContext().getRequest().getRequestURI()#" />
<cfset ext = "\.(cfm?.*|[^.]+)" />
<cfset sPath = trim(sUrl) />
<cfset sEndDir = reFind("/[^/]+#ext#$", sPath) />
<cfset basePath = left(sPath, sEndDir) />
<cfif #FORM.rdoRptType# EQ 1>
<cfhttp method="get" url="http://#CGI.SERVER_NAME#/#basePath#/csv/inspectionDetail.csv" name="get_Details">
<cfinclude template="07_export/report_page_detail.cfm" />
<cfelseif #FORM.rdoRptType# EQ 2>
<cfhttp method="get" url="http://#CGI.SERVER_NAME#/#basePath#/csv/inspectionSummary.csv" name="get_Summary">
<cfinclude template="07_export/report_page_summary.cfm" />
<cfelse>
<!--- This is the file from the demo (look in the '07_DOWNLOAD' folder)--->
<cfhttp method="get" url="http://#CGI.SERVER_NAME#/#basePath#/csv/inspectionData.csv" name="get_Summary">
<cfinclude template="07_export/report_page_export_worksheet.cfm" />
</cfif>
</cfif>
</td>
</tr>
</table>
</script>