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

  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
 17            ---> 
 18            
 19            
 20            <cfquery name="expservices" datasource="#programsdb#">
 21            Select Service, ServiceID, Type
 22 neenan 1.1 From Service
 23            Where Type = 'Expertise' and Approved = 0
 24            </cfquery>
 25            
 26            <cfquery name="getCheckedexpertise" datasource="#programsdb#" >
 27            		SELECT OrgID, ServiceID
 28            		FROM dOrgToService
 29            		WHERE OrgID = #URL.OrgID#
 30            </cfquery> 
 31            
 32            <!--- <cfif #URL.fuseaction# is "Editservices"> --->
 33            
 34             <cfquery name="GetOtherExpServices" datasource="#programsdb#">
 35            SELECT s.Service, s.ServiceID, s.Type, os.OrgID
 36            FROM dService AS s, dOrgToService AS os
 37            WHERE s.Type='Expertise' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
 38            </cfquery>
 39            <!--- </cfif> --->
 40            
 41            <cfset qryExpServiceList = Valuelist(getCheckedExpertise.ServiceID)>
 42            
 43 neenan 1.1 <cfquery name="cliservices" datasource="#programsdb#">
 44            Select Service, ServiceID, Type
 45            From Service
 46            Where Type = 'Clients' and Approved = 0
 47            </cfquery>
 48            
 49            <cfquery name="getCheckedClients" datasource="#programsdb#">
 50            		SELECT OrgID, ServiceID
 51            		FROM dOrgToService
 52            		WHERE OrgID = #URL.OrgID#
 53            </cfquery> 
 54            
 55            <!--- <cfif #URL.fuseaction# is "Editservices"> --->
 56            
 57            <cfquery name="GetOtherClientServices" datasource="#programsdb#">
 58            SELECT s.Service, s.ServiceID, s.Type, os.OrgID
 59            FROM dService AS s, dOrgToService AS os
 60            WHERE s.Type='Clients' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
 61            </cfquery> 
 62            <!--- 
 63            </cfif> --->
 64 neenan 1.1 	
 65            <cfset qryClientsServiceList = Valuelist(getCheckedClients.ServiceID)>
 66            
 67            	<cfquery name="resservices" datasource="#programsdb#">
 68            	Select Service, ServiceID, Type
 69            	From Service
 70            	Where Type = 'Resources' and Approved = 0
 71            	</cfquery>
 72            
 73             <cfquery datasource="#programsdb#" name="getCheckedResources">
 74            		SELECT OrgID, ServiceID
 75            		FROM dOrgToService
 76            		WHERE OrgID = #URL.OrgID#
 77            </cfquery> 
 78            
 79            <!--- <cfif #URL.fuseaction# is "Editservices"> --->
 80            	 <cfquery name="GetOtherResServices" datasource="#programsdb#">
 81            		SELECT s.Service, s.ServiceID, s.Type, os.OrgID
 82            		FROM dService AS s, dOrgToService AS os
 83            		WHERE s.Type='Resources' and Approved = 1 And s.serviceID = os.ServiceID And orgId= #URL.OrgID#
 84            	 </cfquery> 
 85 neenan 1.1 <!--- </cfif> --->
 86            	
 87            <cfset qryResourcesServiceList = Valuelist(getCheckedResources.ServiceID)>
 88            
 89            <cfquery name="getORG" datasource="#Programsdb#">
 90            	SELECT 	OrganizationName
 91            	FROM	dOrganization
 92            	WHERE	OrgID = #URL.OrgID#
 93            </cfquery>
 94            
 95            
 96            <table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
 97                    <tr> 
 98                      <td> 
 99                        <p>	
100            			<span class="subheading">
101            				EDIT A PROGRAM <img src="../images/siteimage/dart.gif" border="0">
102            				SERVICES<img src="../images/siteimage/dart.gif" border="0"></span> &nbsp;
103            				<span class="sublink2">Step 4<img src="../images/siteimage/dart.gif" border="0"></span><br><br>
104            			<cfoutput query="getORG"><strong>#OrganizationName#</strong></cfoutput><br>
105            			Please select the service(s) which describe your organization.<br>
106 neenan 1.1 			<span class="redtext"><font style="color: red">* At least One</font></span><br><br>
107            
108            <cfif #URL.fuseaction# Is "EditServices1">
109            	<form name="addservices" action="addeditprograms.cfm?fuseaction=EditFinalProcess1&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return Validate1(this)" method="post">
110            <cfelseif #URL.fuseaction# Is "EditServices">
111            		<form name="addservices" action="addeditprograms.cfm?fuseaction=EditFinalProcess&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return Validate1(this)" method="post">
112            </cfif>
113            <table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
114            		<tr>
115            			<td valign="top">
116            				<div class="formtext"><strong>Area of Expertise</strong></div><br>
117            				<div class="formtext">
118            				
119            				<cfif #URL.fuseaction# is "Editservices1">
120            					<cfloop query="expservices">
121            						<cfoutput>
122            							<input type="checkbox" name="ServiceID" value="#ServiceID#"
123            							<cfif ListFind(qryExpServiceList, "#ServiceID#")>CHECKED</cfif>>
124            								#Service#<br>
125            						</cfoutput>
126            					</cfloop>
127 neenan 1.1 				</cfif>
128            					
129            				<cfif #URL.fuseaction# is "Editservices">
130            					
131            					<cfloop query="expservices">
132            						<cfoutput>
133            							<input type="checkbox" name="ServiceID" value="#ServiceID#"
134            							<cfif ListFind(qryExpServiceList, "#ServiceID#")>CHECKED</cfif>>
135            								#Service#<br>
136            						</cfoutput>
137            					</cfloop>
138            
139            						<cfoutput>
140            							<cfif GetOtherExpServices.recordcount is not 0>
141            							<input type="checkbox" name="OtherExpertise" value="#GetOtherExpServices.ServiceID#" checked>
142            							<input type="text" name="Other1" value="#GetOtherExpServices.Service#">
143            							<cfelse>
144            							<input type="checkbox" name="OtherExpertise">Other <input type="text" size=10 name="Other1">
145            							</cfif>
146                            		</cfoutput> 
147            				</cfif>
148 neenan 1.1 				
149            				
150            				
151            					 </div>
152            			</td>
153            
154            			<td valign="top">
155            				<div class="formtext"><strong>Resources Offered</strong></div><br>
156            					<div class="formtext">
157            					
158            					
159            					<cfif #URL.fuseaction# is "Editservices1">
160            					<cfloop query="resservices">
161            						<cfoutput>
162            							<input type="checkbox" name="ServiceID" value="#ServiceID#"
163            							<cfif ListFind(qryResourcesServiceList, "#ServiceID#")>CHECKED</cfif>>
164            								#Service#<br>
165            						</cfoutput>
166            						</cfloop>
167            						
168            					</cfif>
169 neenan 1.1 					
170            					
171            					<cfif #URL.fuseaction# is "Editservices">
172            						<cfloop query="resservices">
173            						<cfoutput>
174            							<input type="checkbox" name="ServiceID" value="#ServiceID#"
175            							<cfif ListFind(qryResourcesServiceList, "#ServiceID#")>CHECKED</cfif>>
176            								#Service#<br>
177            						</cfoutput>
178            						</cfloop>
179            								
180            						<cfoutput>
181            							<cfif GetOtherResServices.recordcount is not 0>
182            								<input type="checkbox" name="OtherResources" value="#GetOtherResServices.ServiceID#" checked>
183            								<input type="text" name="Other2" value="#GetOtherResServices.Service#">
184            							<cfelse>
185            								<input type="checkbox" name="OtherResources">Other <input type="text" size=10 name="Other2">
186            							</cfif>
187            						</cfoutput> 
188            					</cfif>
189            								
190 neenan 1.1 					</div>
191            			<!--- </td>
192            
193            			<td valign="top"> ---><br>
194            				<div class="formtext"><strong>Clients Served</strong></div><br>
195            					<div class="formtext">
196            					
197            					<cfif #URL.fuseaction# is "Editservices1">
198            					<cfloop query="cliservices">
199            						<cfoutput>
200            							<input type="checkbox" name="ServiceID" value="#ServiceID#"
201            							<cfif ListFind(qryClientsServiceList, "#ServiceID#")>CHECKED</cfif>>
202            								#Service#<br>
203            						</cfoutput>
204            					</cfloop>
205            					</cfif>
206            					
207            					<cfif #URL.fuseaction# is "Editservices">
208            					<cfloop query="cliservices">
209            						<cfoutput>
210            							<input type="checkbox" name="ServiceID" value="#ServiceID#"
211 neenan 1.1 							<cfif ListFind(qryClientsServiceList, "#ServiceID#")>CHECKED</cfif>>
212            								#Service#<br>
213            						</cfoutput>
214            					</cfloop>
215            					
216            						 <cfoutput>
217            							<cfif GetOtherClientServices.recordcount is not 0>
218            								<input type="checkbox" name="OtherClients" value="#GetOtherClientServices.ServiceID#" checked>
219            								<input type="text" name="Other3" value="#GetOtherClientServices.Service#">
220            							<cfelse>
221            								<input type="checkbox" name="OtherClients">Other <input type="text" size=10 name="Other3">
222            							</cfif>
223            						 </cfoutput> 
224            					</cfif>
225            								
226            					</div>
227            			</td>
228            		</tr>
229            		<tr> 
230                  		<td>&nbsp;
231            				
232 neenan 1.1 			</td>
233                	</tr>
234            		<tr> 
235                  		<td colspan="2"><div class="formtext">
236            				<INPUT type="submit" value="Submit">
237            	  			<INPUT type="reset" value="Reset"></div>
238            			</td>
239                	</tr>
240            </table>
241            </form>
242            </table>

CVS Admin
Powered by
ViewCVS 1.0-dev