1 neenan 1.1 <!--- Name: dsp_editservices.cfm
2 Purpose: It helps to edit the services offered by default for each program(these are selected from the service table)
3 and allows the user to even update the other new services added under resource, expertise or client.These fields are
4 extracted each time the page is loaded from the dservices database.It also transfers all the form variables to
5 act_addservices.cfm. The name of the existing services are extracted from the preapproved services in the
6 service table and the final services selected are stored in the dservices and the dOrgtoService tables.
7 Date created: 02/23/2005
8 Dependancy: URL.Orgid
9 Variables: ServiceID - Primary Key for each of the services to display the checkbox on the form.
10 Service - Name of the service existing in the Service database
11 OtherExpertise - Other New Expertise, entered by the current user.
12 OtherResources - Other New Resource, entered by the current user.
13 OtherClients - Other New Client , entered by the current user.
14 Functions:
15 Date changed:
16 02/23/2005 Prabin & Neena Documentation
|
19 neenan 1.1 --->
20
21
22 <cfquery name="expservices" datasource="#programsdb#">
23 Select Service, ServiceID, Type
24 From Service
25 Where Type = 'Expertise' and Approved = 0
26 </cfquery>
27
28 <cfquery name="getCheckedexpertise" datasource="#programsdb#" >
29 SELECT OrgID, ServiceID
30 FROM dOrgToService
31 WHERE OrgID = #URL.OrgID#
32 </cfquery>
33
34 <!--- <cfif #URL.fuseaction# is "Editservices"> --->
35
36 <cfquery name="GetOtherExpServices" datasource="#programsdb#">
37 SELECT s.Service, s.ServiceID, s.Type, os.OrgID
38 FROM dService AS s, dOrgToService AS os
39 WHERE s.Type='Expertise' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
40 neenan 1.1 </cfquery>
41 <!--- </cfif> --->
42
43 <cfset qryExpServiceList = Valuelist(getCheckedExpertise.ServiceID)>
44
45 <cfquery name="cliservices" datasource="#programsdb#">
46 Select Service, ServiceID, Type
47 From Service
48 Where Type = 'Clients' and Approved = 0
49 </cfquery>
50
51 <cfquery name="getCheckedClients" datasource="#programsdb#">
52 SELECT OrgID, ServiceID
53 FROM dOrgToService
54 WHERE OrgID = #URL.OrgID#
55 </cfquery>
56
57 <!--- <cfif #URL.fuseaction# is "Editservices"> --->
58
59 <cfquery name="GetOtherClientServices" datasource="#programsdb#">
60 SELECT s.Service, s.ServiceID, s.Type, os.OrgID
61 neenan 1.1 FROM dService AS s, dOrgToService AS os
62 WHERE s.Type='Clients' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
63 </cfquery>
64 <!---
65 </cfif> --->
66
67 <cfset qryClientsServiceList = Valuelist(getCheckedClients.ServiceID)>
68
69 <cfquery name="resservices" datasource="#programsdb#">
70 Select Service, ServiceID, Type
71 From Service
72 Where Type = 'Resources' and Approved = 0
73 </cfquery>
74
75 <cfquery datasource="#programsdb#" name="getCheckedResources">
76 SELECT OrgID, ServiceID
77 FROM dOrgToService
78 WHERE OrgID = #URL.OrgID#
79 </cfquery>
80
81 <!--- <cfif #URL.fuseaction# is "Editservices"> --->
82 neenan 1.1 <cfquery name="GetOtherResServices" datasource="#programsdb#">
83 SELECT s.Service, s.ServiceID, s.Type, os.OrgID
84 FROM dService AS s, dOrgToService AS os
85 WHERE s.Type='Resources' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
86 </cfquery>
87 <!--- </cfif> --->
88
89 <cfset qryResourcesServiceList = Valuelist(getCheckedResources.ServiceID)>
90
91 <cfquery name="getORG" datasource="#Programsdb#">
92 SELECT OrganizationName
93 FROM dOrganization
94 WHERE OrgID = #URL.OrgID#
95 </cfquery>
96
97
98 <table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
99 <tr>
100 <td>
101 <p>
|
115 neenan 1.1 </cfif>
116 <table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
117 <tr>
118 <td valign="top">
119 <div class="formtext"><strong>Area of Expertise</strong></div><br>
120 <div class="formtext">
121
122 <cfif #URL.fuseaction# is "Editservices1">
123 <cfloop query="expservices">
124 <cfoutput>
125 <input type="checkbox" name="ServiceID" value="#ServiceID#"
126 <cfif ListFind(qryExpServiceList, "#ServiceID#")>CHECKED</cfif>>
127 #Service#<br>
128 </cfoutput>
129 </cfloop>
130 </cfif>
131
132 <cfif #URL.fuseaction# is "Editservices">
133
134 <cfloop query="expservices">
135 <cfoutput>
136 neenan 1.1 <input type="checkbox" name="ServiceID" value="#ServiceID#"
137 <cfif ListFind(qryExpServiceList, "#ServiceID#")>CHECKED</cfif>>
138 #Service#<br>
139 </cfoutput>
140 </cfloop>
141
142 <cfoutput>
143 <cfif GetOtherExpServices.recordcount is not 0>
144 <input type="checkbox" name="OtherExpertise" value="#GetOtherExpServices.ServiceID#" checked>
145 <input type="text" name="Other1" value="#GetOtherExpServices.Service#">
146 <cfelse>
147 <input type="checkbox" name="OtherExpertise">Other <input type="text" size=10 name="Other1">
148 </cfif>
149 </cfoutput>
150 </cfif>
151
152
153
154 </div>
155 </td>
156
157 neenan 1.1 <td valign="top">
158 <div class="formtext"><strong>Resources Offered</strong></div><br>
159 <div class="formtext">
160
161
162 <cfif #URL.fuseaction# is "Editservices1">
163 <cfloop query="resservices">
164 <cfoutput>
165 <input type="checkbox" name="ServiceID" value="#ServiceID#"
166 <cfif ListFind(qryResourcesServiceList, "#ServiceID#")>CHECKED</cfif>>
167 #Service#<br>
168 </cfoutput>
169 </cfloop>
170
171 </cfif>
172
173
174 <cfif #URL.fuseaction# is "Editservices">
175 <cfloop query="resservices">
176 <cfoutput>
177 <input type="checkbox" name="ServiceID" value="#ServiceID#"
178 neenan 1.1 <cfif ListFind(qryResourcesServiceList, "#ServiceID#")>CHECKED</cfif>>
179 #Service#<br>
180 </cfoutput>
181 </cfloop>
182
183 <cfoutput>
184 <cfif GetOtherResServices.recordcount is not 0>
185 <input type="checkbox" name="OtherResources" value="#GetOtherResServices.ServiceID#" checked>
186 <input type="text" name="Other2" value="#GetOtherResServices.Service#">
187 <cfelse>
188 <input type="checkbox" name="OtherResources">Other <input type="text" size=10 name="Other2">
189 </cfif>
190 </cfoutput>
191 </cfif>
192
193 </div>
194 <!--- </td>
195
196 <td valign="top"> ---><br>
197 <div class="formtext"><strong>Clients Served</strong></div><br>
198 <div class="formtext">
199 neenan 1.1
200 <cfif #URL.fuseaction# is "Editservices1">
201 <cfloop query="cliservices">
202 <cfoutput>
203 <input type="checkbox" name="ServiceID" value="#ServiceID#"
204 <cfif ListFind(qryClientsServiceList, "#ServiceID#")>CHECKED</cfif>>
205 #Service#<br>
206 </cfoutput>
207 </cfloop>
208 </cfif>
209
210 <cfif #URL.fuseaction# is "Editservices">
211 <cfloop query="cliservices">
212 <cfoutput>
213 <input type="checkbox" name="ServiceID" value="#ServiceID#"
214 <cfif ListFind(qryClientsServiceList, "#ServiceID#")>CHECKED</cfif>>
215 #Service#<br>
216 </cfoutput>
217 </cfloop>
218
219 <cfoutput>
220 neenan 1.1 <cfif GetOtherClientServices.recordcount is not 0>
221 <input type="checkbox" name="OtherClients" value="#GetOtherClientServices.ServiceID#" checked>
222 <input type="text" name="Other3" value="#GetOtherClientServices.Service#">
223 <cfelse>
224 <input type="checkbox" name="OtherClients">Other <input type="text" size=10 name="Other3">
225 </cfif>
226 </cfoutput>
227 </cfif>
228
229 </div>
230 </td>
231 </tr>
232 <tr>
233 <td>
234
235 </td>
236 </tr>
237 <tr>
238 <td colspan="2"><div class="formtext">
239 <INPUT type="submit" value="Submit">
240 <INPUT type="reset" value="Reset"></div>
241 neenan 1.1 </td>
242 </tr>
243 </table>
244 </form>
245 </table>
|