1 neenan 1.1 <!--- Name: dsp_editProgramtypes.cfm
2 Purpose: It helps to edit the relation between existing program types and organization in your dummy program database.
3 It also transfers all the programTypeID values that the user selects to act_editProgramsTypes.cfm where
4 the actual action of inserting the association between the organization and its related program
5 types in table dOrgToProgramType.
6 Date created: 02/23/2005
7 Dependancy: URL.Orgid
8 Variables: ProgramTypeID - Unique ID of each ProgramType
9 ProgramType - Type of the Program organization
10 OrganizationName - Name of the organization
11
12 Functions:
13 Date changed: 02/23/2005 Prabin & Neena Creation and Documentation
14 --->
15
16 <cfquery name="progtypes" datasource="#Programsdb#">
17 Select ProgramType, ProgramTypeID
18 From dProgramTypes
19 Where Approved = 0
20 </cfquery>
21
22 neenan 1.1 <cfquery name="getORG" datasource="#Programsdb#">
23 SELECT OrganizationName
24 FROM dOrganization
25 WHERE OrgID = #URL.OrgID#
26 </cfquery>
27
28 <cfquery datasource="#programsdb#" name="getCheckedprograms">
29 SELECT OrgID, ProgramTypeID
30 FROM dOrgToProgramType
31 WHERE OrgID = #URL.OrgID#
32 </cfquery>
33
34 <cfset qryProgramTypeList = Valuelist(getCheckedprograms.ProgramTypeID)>
35
36 <!-- #BeginEditable "Content" -->
37 <table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
38 <tr>
39 <td>
40 <p>
41 <span class="subheading">
42 EDIT A PROGRAM <img src="../images/siteimage/dart.gif" border="0">
43 neenan 1.1 PROGRAM TYPES<img src="../images/siteimage/dart.gif" border="0"></span>
44 <span class="sublink2">Step 3 <img src="../images/siteimage/dart.gif" border="0"></span><br><br>
45 <cfoutput query="getORG"><strong>#OrganizationName#</strong></cfoutput><br>
46 Please select the program type(s) which describe your organization. <span class="redtext"><font style="color: red">* At least One</font></span><br><br>
47
48 <cfif #URL.fuseaction# IS "editprogramtypes">
49 <form name="editProgramsTypes" action="addeditprograms.cfm?fuseaction=EditServices&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return Validate(this)" method="post">
50 <cfelseif #URL.fuseaction# IS "editprogramtypes1">
51 <form name="editProgramsTypes" action="addeditprograms.cfm?fuseaction=EditServices1&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return Validate(this)" method="post">
52 </cfif>
53
54 <table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
55 <cfloop query="progtypes">
56 <tr>
57 <cfoutput>
58 <td colspan="2"><div class="formtext">
59 <input type="checkbox" name="ProgramTypeID" value="#ProgramTypeID#" <cfif ListFind(QryProgramTypeList, "#ProgramTypeID#")>CHECKED</cfif>>#ProgramType#</div>
60 </td>
61 </cfoutput>
62 </tr>
63 </cfloop>
64 neenan 1.1 <tr>
65 <td colspan="2"><div class="formtext">
66 <INPUT type="submit" value="Submit">
67 <INPUT type="reset" value="Reset"></div></td>
68 </tr>
69 </table>
70 </form>
71
72 </td>
73 </tr>
74 </table>
75 </p>
76 </body>
|