|
|
|
|
File: [Development] / p2rx-programs / include / dsp_servicesfororg.cfm
(download)
Revision: 1.3, Thu Jun 15 00:31:48 2006 UTC (3 years, 5 months ago) by nbisbee Branch: MAIN CVS Tags: HEAD Changes since 1.2: +7 -7 lines Added code to account for P2Rx server being down |
<!--- Name: dsp_ServicesforOrg.cfm
Purpose: This file will get the services 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: Service
ServiceID
Date changed:
05/01/2006 Prabin Kanel Created file
05/12/2006 Prabin Kanel Documentation
06/14/2006 Terry Huss Added lines 19-22 in case P2Rx server is down
--->
<cftry>
<cfoutput>
<cfhttp method="GET" url="http://www.p2rx.org/webservices/p2rx/getservicesByOrg.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/getservicesByOrg.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">
<cfoutput>
<td width="100">
<strong>Clients</strong>
</td></cfoutput>
<td>
<CFLOOP from="1" to="#intNumberOfTerms#" index="intCounter">
<cfoutput>
<cfif #strOutput.List[intCounter].Type# EQ "Clients">
#strOutput.List[intCounter].Service#,
</CFIF>
<cfset meta_keywords = Meta_keywords & "#strOutput.List[intCounter].Service# , ">
</cfoutput>
</CFLOOP>
<BR><BR>
</td>
</TR>
</TabLE>
<table class="regtext">
<tr valign="top">
<cfoutput>
<td width="100">
<strong>Expertise</strong>
</td></cfoutput>
<td>
<CFLOOP from="1" to="#intNumberOfTerms#" index="intCounter">
<cfoutput>
<cfif #strOutput.List[intCounter].Type# EQ "Expertise">
<a href="index.cfm?pageAction=searchByService&ServiceID=#strOutput.List[intCounter].ServiceID#&Region=#Region#&Format=WDDX##Header" class="subheading">#strOutput.List[intCounter].Service#,</a>
</CFIF>
<cfset meta_keywords = Meta_keywords & "#strOutput.List[intCounter].Service# , ">
</cfoutput>
</CFLOOP>
<BR><BR>
</td>
</TR>
</TabLE>
<table class="regtext">
<tr valign="top">
<cfoutput>
<td width="100">
<strong>Resources</strong>
</td></cfoutput>
<td>
<CFLOOP from="1" to="#intNumberOfTerms#" index="intCounter">
<cfoutput>
<cfif #strOutput.List[intCounter].Type# EQ "Resources">
#strOutput.List[intCounter].Service#,
</CFIF>
<cfset meta_keywords = Meta_keywords & "#strOutput.List[intCounter].Service# , ">
</cfoutput>
</CFLOOP>
<BR><BR>
</td>
</TR>
</TabLE>
</CFIF>
<cfcatch type="Any">
The service type data was not provided. The administrator has been notified.
</cfcatch>
</cftry>
| CVS Admin |
Powered by ViewCVS 1.0-dev |