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

 1 neenan 1.1 <!--- 	Name:  act_addorganization.cfm
 2                	Purpose: This functions as the action file to insert the organizational information passed on from the dsp_addorganization.cfm form
 3            		.The values are inserted into the dorganization table. The value of storedate (which is the date when the organization info is being inserted
 4            		into the table) is also passed onto the next form of dsp_contact so that the current organization info is visible on the dsp_addcontact
 5            		form where the storedate acts as a key value to differentiate between various users using the same form.
 6            		Date created: 02/24/2005
 7                   	Dependancy: URL.Orgid 
 8            		Variables: 	Currdate - Stores the current date/time value.
 9            					Storedate - a hidden value which is a replica of the currdate to pass onto the next form.
10            					
11            		Functions: 
12            		Date changed: 
13 pKanel 1.3 					02/24/2005		Prabin & Neena  Created
14            					02/24/2005		Neena		    Documentation
15            					08/22/2005		Prabin			added cfoutput to get the list of states.	
16 neenan 1.1 ---> 
17            
18 pKanel 1.3 <!--- New code inserted for adding new org id based on maximum + 1 of existing orgid Number --->
19            <cfquery name="getMaxOrgID" datasource="#programsdb#">
20            Select max(orgid) as MaxOrgID from dorganization 
21            </cfquery>
22            
23            <cfset neworgid = #getMaxOrgID.MaxOrgID# + 1> 
24            
25            <!--- earlier code continues here --->
26            
27 neenan 1.1 <cfif 	#form.Phone_Area# EQ "" OR 
28            	  	#form.Phone_Area# EQ "N/A" OR
29            		#form.Phone_Prefix# EQ "" OR
30            		#form.Phone_Prefix# EQ "N/A" OR
31            		#form.Phone_Num# EQ "" OR
32            		#form.Phone_Num# EQ "N/A"
33            	>
34            		<cfset FinalPhoneNumber="">
35            
36            <cfelse>
37            		<cfset FinalPhoneNumber='#form.Phone_Area#-#form.Phone_Prefix#-#form.Phone_Num#'> 
38            </cfif>
39            
40            
41            <cfif 	#form.FaxNumber_Area# EQ "" OR 
42            	  	#form.FaxNumber_Area# EQ "N/A" OR
43            		#form.FaxNumber_Prefix# EQ "" OR
44            		#form.FaxNumber_Prefix# EQ "N/A" OR
45            		#form.FaxNumber_Num# EQ "" OR
46            		#form.FaxNumber_Num# EQ "N/A"
47            >
48 neenan 1.1 		<cfset FinalFaxNumber="">
49            
50            <cfelse>
51            		<cfset FinalFaxNumber='#form.FaxNumber_Area#-#form.FaxNumber_Prefix#-#form.FaxNumber_Num#'> 
52            </cfif>
53            
54            
55            <cfif 	#form.Hotline_Area# EQ "" OR 
56            	  	#form.Hotline_Area# EQ "N/A" OR
57            		#form.Hotline_Prefix# EQ "" OR
58            		#form.Hotline_Prefix# EQ "N/A" OR
59            		#form.Hotline_Num# EQ "" OR
60            		#form.Hotline_Num# EQ "N/A"
61            >
62            		<cfset FinalHotline="">
63            
64            <cfelse>
65            		<cfset FinalHotline='#form.Hotline_Area#-#form.Hotline_Prefix#-#form.Hotline_Num#'> 
66            </cfif>
67 pKanel 1.3 
68            <cfset currdate= DateFormat(Now(),"mm/dd/yyyy") & " " & TimeFormat(Now(),"hh:mm:ss")> 
69 neenan 1.1 <!--- in order to insert a timestamp for the new organization to come over the conflict problem --->
70            <cfset storedate = currdate>
71            
72            <cfquery name="InsertOrg" datasource="#programsdb#">
73            Insert Into dOrganization
74 pKanel 1.3 				(Orgid,OrganizationName, Phone, Extension, Division, FaxNumber, TimeZone, Address1, EmailName, GeoServiceID, Address2, Hotline, City, StateOrProvince, URL, PostalCode, Country, GraphicURL, Profile, Times, Visitor_Id, UpdateStatus)
75            		Values	 (#neworgid#,
76            				 '#form.OrganizationName#', 
77 neenan 1.1 				 '#FinalPhoneNumber#', 
78            				 '#form.Extension#', 
79            				 '#form.Division#', 
80            				 '#FinalFaxNumber#', 
81            				 '#form.TimeZone#', 
82            				 '#form.Address1#', 
83            				 '#form.EmailName#', 
84            				 #form.GeoServiceID#, 
85            				 '#form.Address2#', 
86            				 '#FinalHotline#', 				
87            				 '#form.City#', 
88            				 '#form.StateOrProvince#', 
89            				 '#form.URL#', 
90            				 '#form.PostalCode#', 
91            				 '#form.Country#', 
92            				 '#form.GraphicURL#', 
93            				 '#form.Profile#',
94            				 '#currdate#',
95 pKanel 1.3 				  #userdate#,
96            				  '1')
97 neenan 1.1 </cfquery>
98            
99 pKanel 1.3 <cfoutput> <input type="hidden" name="storedate" value="#storedate#"> </cfoutput> 

CVS Admin
Powered by
ViewCVS 1.0-dev