|
|
|
|
File: [Development] / p2rx-programs / dsp_editservices.cfm
(download)
Revision: 1.3, Fri Aug 26 16:08:20 2005 UTC (4 years, 2 months ago) by pKanel Branch: MAIN CVS Tags: HEAD Changes since 1.2: +11 -9 lines Enhancements made to resolve programs added or udpated by Outsite users. |
<!--- Name: dsp_editservices.cfm
Purpose: It helps to edit the services offered by default for each program(these are selected from the service table)
and allows the user to even update the other new services added under resource, expertise or client.These fields are
extracted each time the page is loaded from the dservices database.It also transfers all the form variables to
act_addservices.cfm. The name of the existing services are extracted from the preapproved services in the
service table and the final services selected are stored in the dservices and the dOrgtoService tables.
Date created: 02/23/2005
Dependancy: URL.Orgid
Variables: ServiceID - Primary Key for each of the services to display the checkbox on the form.
Service - Name of the service existing in the Service database
OtherExpertise - Other New Expertise, entered by the current user.
OtherResources - Other New Resource, entered by the current user.
OtherClients - Other New Client , entered by the current user.
Functions:
Date changed:
02/23/2005 Prabin & Neena Documentation
08/15/2005 Terry Added URL variable for skipping step (line 106)
08/15/2005 Terry Documentation
--->
<cfquery name="expservices" datasource="#programsdb#">
Select Service, ServiceID, Type
From Service
Where Type = 'Expertise' and Approved = 0
</cfquery>
<cfquery name="getCheckedexpertise" datasource="#programsdb#" >
SELECT OrgID, ServiceID
FROM dOrgToService
WHERE OrgID = #URL.OrgID#
</cfquery>
<!--- <cfif #URL.fuseaction# is "Editservices"> --->
<cfquery name="GetOtherExpServices" datasource="#programsdb#">
SELECT s.Service, s.ServiceID, s.Type, os.OrgID
FROM dService AS s, dOrgToService AS os
WHERE s.Type='Expertise' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
</cfquery>
<!--- </cfif> --->
<cfset qryExpServiceList = Valuelist(getCheckedExpertise.ServiceID)>
<cfquery name="cliservices" datasource="#programsdb#">
Select Service, ServiceID, Type
From Service
Where Type = 'Clients' and Approved = 0
</cfquery>
<cfquery name="getCheckedClients" datasource="#programsdb#">
SELECT OrgID, ServiceID
FROM dOrgToService
WHERE OrgID = #URL.OrgID#
</cfquery>
<!--- <cfif #URL.fuseaction# is "Editservices"> --->
<cfquery name="GetOtherClientServices" datasource="#programsdb#">
SELECT s.Service, s.ServiceID, s.Type, os.OrgID
FROM dService AS s, dOrgToService AS os
WHERE s.Type='Clients' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
</cfquery>
<!---
</cfif> --->
<cfset qryClientsServiceList = Valuelist(getCheckedClients.ServiceID)>
<cfquery name="resservices" datasource="#programsdb#">
Select Service, ServiceID, Type
From Service
Where Type = 'Resources' and Approved = 0
</cfquery>
<cfquery datasource="#programsdb#" name="getCheckedResources">
SELECT OrgID, ServiceID
FROM dOrgToService
WHERE OrgID = #URL.OrgID#
</cfquery>
<!--- <cfif #URL.fuseaction# is "Editservices"> --->
<cfquery name="GetOtherResServices" datasource="#programsdb#">
SELECT s.Service, s.ServiceID, s.Type, os.OrgID
FROM dService AS s, dOrgToService AS os
WHERE s.Type='Resources' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
</cfquery>
<!--- </cfif> --->
<cfset qryResourcesServiceList = Valuelist(getCheckedResources.ServiceID)>
<cfquery name="getORG" datasource="#Programsdb#">
SELECT OrganizationName
FROM dOrganization
WHERE OrgID = #URL.OrgID#
</cfquery>
<table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
<tr>
<td>
<p>
<span class="subheading">
EDIT A PROGRAM <img src="../images/siteimage/dart.gif" border="0">
SERVICES<img src="../images/siteimage/dart.gif" border="0"></span>
<span class="sublink2">Step 4<img src="../images/siteimage/dart.gif" border="0"></span><br><br>
<cfoutput query="getORG"><strong>#OrganizationName#</strong></cfoutput><br>
Please select the service(s) which describe your organization
or click <a href="addeditprograms.cfm?fuseaction=EditFinalProcess1&OrgID=<cfoutput>#URL.OrgID#</cfoutput>&skip=1"><strong>here</strong></a> to proceed to the next step.<br>
<span class="redtext"><font style="color: red">* At least One</font></span><br><br>
<cfif #URL.fuseaction# Is "EditServices1">
<form name="addservices" action="addeditprograms.cfm?fuseaction=EditFinalProcess1&OrgID=<cfoutput>#URL.OrgID#</cfoutput>&skip=0" onsubmit="return Validate1(this)" method="post">
<cfelseif #URL.fuseaction# Is "EditServices">
<form name="addservices" action="addeditprograms.cfm?fuseaction=EditFinalProcess&OrgID=<cfoutput>#URL.OrgID#</cfoutput>&skip=0" onsubmit="return Validate1(this)" method="post">
</cfif>
<table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
<tr>
<td valign="top">
<div class="formtext"><strong>Area of Expertise</strong></div><br>
<div class="formtext">
<cfif #URL.fuseaction# is "Editservices1">
<cfloop query="expservices">
<cfoutput>
<input type="checkbox" name="ServiceID" value="#ServiceID#"
<cfif ListFind(qryExpServiceList, "#ServiceID#")>CHECKED</cfif>>
#Service#<br>
</cfoutput>
</cfloop>
</cfif>
<cfif #URL.fuseaction# is "Editservices">
<cfloop query="expservices">
<cfoutput>
<input type="checkbox" name="ServiceID" value="#ServiceID#"
<cfif ListFind(qryExpServiceList, "#ServiceID#")>CHECKED</cfif>>
#Service#<br>
</cfoutput>
</cfloop>
<cfoutput>
<cfif GetOtherExpServices.recordcount is not 0>
<input type="checkbox" name="OtherExpertise" value="#GetOtherExpServices.ServiceID#" checked>
<input type="text" name="Other1" value="#GetOtherExpServices.Service#">
<cfelse>
<input type="checkbox" name="OtherExpertise">Other <input type="text" size=10 name="Other1">
</cfif>
</cfoutput>
</cfif>
</div>
</td>
<td valign="top">
<div class="formtext"><strong>Resources Offered</strong></div><br>
<div class="formtext">
<cfif #URL.fuseaction# is "Editservices1">
<cfloop query="resservices">
<cfoutput>
<input type="checkbox" name="ServiceID" value="#ServiceID#"
<cfif ListFind(qryResourcesServiceList, "#ServiceID#")>CHECKED</cfif>>
#Service#<br>
</cfoutput>
</cfloop>
</cfif>
<cfif #URL.fuseaction# is "Editservices">
<cfloop query="resservices">
<cfoutput>
<input type="checkbox" name="ServiceID" value="#ServiceID#"
<cfif ListFind(qryResourcesServiceList, "#ServiceID#")>CHECKED</cfif>>
#Service#<br>
</cfoutput>
</cfloop>
<cfoutput>
<cfif GetOtherResServices.recordcount is not 0>
<input type="checkbox" name="OtherResources" value="#GetOtherResServices.ServiceID#" checked>
<input type="text" name="Other2" value="#GetOtherResServices.Service#">
<cfelse>
<input type="checkbox" name="OtherResources">Other <input type="text" size=10 name="Other2">
</cfif>
</cfoutput>
</cfif>
</div>
<!--- </td>
<td valign="top"> ---><br>
<div class="formtext"><strong>Clients Served</strong></div><br>
<div class="formtext">
<cfif #URL.fuseaction# is "Editservices1">
<cfloop query="cliservices">
<cfoutput>
<input type="checkbox" name="ServiceID" value="#ServiceID#"
<cfif ListFind(qryClientsServiceList, "#ServiceID#")>CHECKED</cfif>>
#Service#<br>
</cfoutput>
</cfloop>
</cfif>
<cfif #URL.fuseaction# is "Editservices">
<cfloop query="cliservices">
<cfoutput>
<input type="checkbox" name="ServiceID" value="#ServiceID#"
<cfif ListFind(qryClientsServiceList, "#ServiceID#")>CHECKED</cfif>>
#Service#<br>
</cfoutput>
</cfloop>
<cfoutput>
<cfif GetOtherClientServices.recordcount is not 0>
<input type="checkbox" name="OtherClients" value="#GetOtherClientServices.ServiceID#" checked>
<input type="text" name="Other3" value="#GetOtherClientServices.Service#">
<cfelse>
<input type="checkbox" name="OtherClients">Other <input type="text" size=10 name="Other3">
</cfif>
</cfoutput>
</cfif>
</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td colspan="2"><div class="formtext">
<INPUT type="submit" value="Submit">
<INPUT type="reset" value="Reset"></div>
</td>
</tr>
</table>
</form>
</table>
| CVS Admin |
Powered by ViewCVS 1.0-dev |