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

File: [Development] / p2rx-programs / act_addorganization.cfm (download)
Revision: 1.2, Wed Mar 9 16:32:16 2005 UTC (4 years, 8 months ago) by neenan
Branch: MAIN
Changes since 1.1: +1 -1 lines
*** empty log message ***

<!--- 	Name:  act_addorganization.cfm
    	Purpose: This functions as the action file to insert the organizational information passed on from the dsp_addorganization.cfm form
		.The values are inserted into the dorganization table. The value of storedate (which is the date when the organization info is being inserted
		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
		form where the storedate acts as a key value to differentiate between various users using the same form.
		Date created: 02/24/2005
       	Dependancy: URL.Orgid 
		Variables: 	Currdate - Stores the current date/time value.
					Storedate - a hidden value which is a replica of the currdate to pass onto the next form.
					
		Functions: 
		Date changed: 
					02/24/2005			Prabin & Neena  Created
					02/24/2005			Neena		    Documentation
---> 

<cfif 	#form.Phone_Area# EQ "" OR 
	  	#form.Phone_Area# EQ "N/A" OR
		#form.Phone_Prefix# EQ "" OR
		#form.Phone_Prefix# EQ "N/A" OR
		#form.Phone_Num# EQ "" OR
		#form.Phone_Num# EQ "N/A"
	>
		<cfset FinalPhoneNumber="">

<cfelse>
		<cfset FinalPhoneNumber='#form.Phone_Area#-#form.Phone_Prefix#-#form.Phone_Num#'> 
</cfif>


<cfif 	#form.FaxNumber_Area# EQ "" OR 
	  	#form.FaxNumber_Area# EQ "N/A" OR
		#form.FaxNumber_Prefix# EQ "" OR
		#form.FaxNumber_Prefix# EQ "N/A" OR
		#form.FaxNumber_Num# EQ "" OR
		#form.FaxNumber_Num# EQ "N/A"
>
		<cfset FinalFaxNumber="">

<cfelse>
		<cfset FinalFaxNumber='#form.FaxNumber_Area#-#form.FaxNumber_Prefix#-#form.FaxNumber_Num#'> 
</cfif>


<cfif 	#form.Hotline_Area# EQ "" OR 
	  	#form.Hotline_Area# EQ "N/A" OR
		#form.Hotline_Prefix# EQ "" OR
		#form.Hotline_Prefix# EQ "N/A" OR
		#form.Hotline_Num# EQ "" OR
		#form.Hotline_Num# EQ "N/A"
>
		<cfset FinalHotline="">

<cfelse>
		<cfset FinalHotline='#form.Hotline_Area#-#form.Hotline_Prefix#-#form.Hotline_Num#'> 
</cfif>
<cfset currdate=DateFormat(Now(),"mm/dd/yyyy hh:mm:ss")> 
<!--- in order to insert a timestamp for the new organization to come over the conflict problem --->
<cfset storedate = currdate>


<cfquery name="InsertOrg" datasource="#programsdb#">
Insert Into dOrganization
				(OrganizationName, Phone, Extension, Division, FaxNumber, TimeZone, Address1, EmailName, GeoServiceID, Address2, Hotline, City, StateOrProvince, URL, PostalCode, Country, GraphicURL, Profile, Times, Visitor_Id)
		Values	('#form.OrganizationName#', 
				 '#FinalPhoneNumber#', 
				 '#form.Extension#', 
				 '#form.Division#', 
				 '#FinalFaxNumber#', 
				 '#form.TimeZone#', 
				 '#form.Address1#', 
				 '#form.EmailName#', 
				 #form.GeoServiceID#, 
				 '#form.Address2#', 
				 '#FinalHotline#', 				
				 '#form.City#', 
				 '#form.StateOrProvince#', 
				 '#form.URL#', 
				 '#form.PostalCode#', 
				 '#form.Country#', 
				 '#form.GraphicURL#', 
				 '#form.Profile#',
				 '#currdate#',
				  #vid#)
</cfquery>

<cfoutput> <input type="hidden" name="storedate" value="#storedate#">

 </cfoutput> 

CVS Admin
Powered by
ViewCVS 1.0-dev