|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/www/FusionChart/Code/CFM/DB_JS_dataURL/ |
Upload File : |
<cfsilent>
<!---
This page is invoked from Default.cfm. When the user clicks on a pie
slice in Default.cfm, the factory Id is passed to this page. We need
to get that factory id, get information from database and then write XML.
First, get the factory Id
--->
<cfset FactoryId = URL.FactoryId>
<cfset intCounter = 0>
<!--- Generate the chart element string --->
<cfset strXML = "<chart palette='2' caption='Factory " & FactoryId &" Output ' subcaption='(In Units)' xAxisName='Date' showValues='1' labelStep='2' >">
<!--- Now, we get the data for that factory --->
<cfquery name="qry" datasource="dev">
select * from Factory_Output where FactoryId=#FactoryId#
</cfquery>
<cfloop query="qry">
<cfset strXML = strXML & "<set label='" & datePart("d",qry.DatePro) & "/" & datePart("m",qry.DatePro) & "' value='" & qry.Quantity & "'/>">
</cfloop>
<!--- Close <chart> element --->
<cfset strXML = strXML & "</chart>">
<!---
Just write out the XML data
NOTE THAT THIS PAGE DOESN'T CONTAIN ANY HTML TAG, WHATSOEVER
--->
</cfsilent><cfoutput>#strXML#</cfoutput>