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

CVS Admin
Powered by
ViewCVS 1.0-dev