(file) Return to dsp_programtypefororg.cfm CVS log (file) (dir) Up to [Development] / p2rx-programs / include

File: [Development] / p2rx-programs / include / dsp_programtypefororg.cfm (download)
Revision: 1.2, Wed Jun 14 18:47:18 2006 UTC (3 years, 5 months ago) by nbisbee
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +5 -0 lines
Added code to account for P2Rx server being down

<!--- 	Name:  dsp_ProgramTypeFororg.cfm
    	Purpose: This file will get the program types associated with an organization from 
				p2rx central programs directory and display it for the user.
		Date created: 05/01/2006 
       	Dependancy: PageAction
					URL - for CFHTTP
					region - Number of region
					Orgid - Unique identifier of each organization
		Variables: 	ProgramType
					ProgramTypeID
		Date changed: 
					05/01/2006     	Prabin Kanel	Created file
					05/12/2006		Prabin Kanel	Documentation
					06/14/2006		Terry Huss		Added lines 21-23 in case P2Rx server is down
--->


<cftry>
	<cfoutput>
		<cfhttp method="GET" url="http://www.p2rx.org/webservices/p2rx/getProgramTypeByOrg.cfm?region=#region#&orgid=#orgid#&format=#format#" resolveurl="no"></cfoutput>
		<!---<cfoutput>#cfhttp.statuscode#</cfoutput>--->
			<cfif #cfhttp.statuscode# EQ "404 Not Found">
			<cfoutput>
		<cfhttp method="GET" url=			"http://wrrc.p2pays.org/webservices/p2rx/getProgramTypeByOrg.cfm?region=#region#&orgid=#orgid#&format=#format#" resolveurl="no"></cfoutput>			</cfif> 
			<cfwddx action="WDDX2CFML" input="#cfhttp.fileContent#" output="strOutput">		
			<CFSET intNumberOfTerms = ArrayLen(strOutput.List)>
			<CFIF #intNumberofTerms# GTE 0>
			<table class="regtext"><tr valign="top">
					<td width="100"><strong>Program Types:</strong></td>
					<td>
					<CFLOOP from="1" to="#intNumberOfTerms#" index="intCounter">

						<cfoutput>
							<a href="index.cfm?pageAction=searchByProgramType&ProgramTypeID=#strOutput.List[intCounter].ProgramTypeID#&Region=#Region#&Format=WDDX##Header" class="subheading">#strOutput.List[intCounter].ProgramType#</a>
								&nbsp;&nbsp;						
							<cfset meta_keywords = Meta_keywords & "#strOutput.List[intCounter].ProgramType# , ">
						</cfoutput>
					</CFLOOP>	
						<BR><BR>
						
				</td>
			</TR></TabLE></CFIF>
		<cfcatch type="Any">
			The program type data was not provided. The administrator has been notified.
		</cfcatch>
	</cftry>

CVS Admin
Powered by
ViewCVS 1.0-dev