Return to PTSD.ptsd. webservices documentation

PTSD_Demo.CFM Source Code


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>PTSD_Sample.cfm Source Code</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style>
.fld {
	font-size:12px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	color:#333333;
}
.hdr {
	color:#FFCC00;
	font-size: 12px;
	font-weight: bold;
}
.curr {
	font-size: 12px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
}

.temp {
	font-size:12px; 
	font-weight:bold; 
	color:#355797;
	font-family:Verdana, Arial, Helvetica, sans-serif;
}
</style>

</head>
<body>
<div align="right">
	<a href="/webservices/PTSD/documentation/ptsd.cfm" style="font-size:x-small;">Return to PTSD.ptsd. webservices documentation</a>
</div>
<h3>PTSD_Sample.CFM Source Code</h3> 
<cfparam name="mode" default="">

<cfparam name="lastLoc" default="">

<cfinvoke
	webservice="https://#variables.ServerName#/webservices/ptsd/ptsd.cfc?wsdl"
	method="PTSD_Program_Locator_query"
	returnvariable="PTSDQuery">
	<cfinvokeargument name="license" value="XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXXX" />
</cfinvoke>
	
	<cfif PTSDQuery.status EQ 0>
		<table cellpadding="2" cellspacing="1" style="border-style:dotted; border-color:#E1E1E1; border-width:thin" width="50%">
		<cfoutput query="PTSDQuery.results">	
		<cfif lastLoc neq fac_ID>
			<tr><td style="height:20px;"><span class="temp">#fac_name#</span></td></tr>
			<cfset lastLoc = fac_ID>
		</cfif>
		<tr>	
			<td>
				<span class="curr">
					<span class="fld">Program:</span> #Program#<br>
					<span class="fld">Address:</span> #address#<br>
					<span class="fld">City:</span> #city#<br>
					<span class="fld">State:</span> #state#<br>
					<span class="fld">Zip:</span> #zip#<br>
				</span>
				<hr>
			</td>
		</tr>
		</cfoutput>
		</table>
	<cfelse>
		<p align="center">
			<br />
			<h3 style="color:#CC0000;">Currently unable to retrieve the PTSD Programs.  Please try again soon.</h3>
		</p>
	</cfif>
</body>
</html>