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 02/24/2005 Prabin & Neena Created
14 02/24/2005 Neena Documentation
15 --->
16
17 <cfif #form.Phone_Area# EQ "" OR
18 #form.Phone_Area# EQ "N/A" OR
19 #form.Phone_Prefix# EQ "" OR
20 #form.Phone_Prefix# EQ "N/A" OR
21 #form.Phone_Num# EQ "" OR
22 neenan 1.1 #form.Phone_Num# EQ "N/A"
23 >
24 <cfset FinalPhoneNumber="">
25
26 <cfelse>
27 <cfset FinalPhoneNumber='#form.Phone_Area#-#form.Phone_Prefix#-#form.Phone_Num#'>
28 </cfif>
29
30
31 <cfif #form.FaxNumber_Area# EQ "" OR
32 #form.FaxNumber_Area# EQ "N/A" OR
33 #form.FaxNumber_Prefix# EQ "" OR
34 #form.FaxNumber_Prefix# EQ "N/A" OR
35 #form.FaxNumber_Num# EQ "" OR
36 #form.FaxNumber_Num# EQ "N/A"
37 >
38 <cfset FinalFaxNumber="">
39
40 <cfelse>
41 <cfset FinalFaxNumber='#form.FaxNumber_Area#-#form.FaxNumber_Prefix#-#form.FaxNumber_Num#'>
42 </cfif>
43 neenan 1.1
44
45 <cfif #form.Hotline_Area# EQ "" OR
46 #form.Hotline_Area# EQ "N/A" OR
47 #form.Hotline_Prefix# EQ "" OR
48 #form.Hotline_Prefix# EQ "N/A" OR
49 #form.Hotline_Num# EQ "" OR
50 #form.Hotline_Num# EQ "N/A"
51 >
52 <cfset FinalHotline="">
53
54 <cfelse>
55 <cfset FinalHotline='#form.Hotline_Area#-#form.Hotline_Prefix#-#form.Hotline_Num#'>
56 </cfif>
57 <cfset currdate=DateFormat(Now()"mm/dd/yyy hh:mm:ss")>
58 <!--- in order to insert a timestamp for the new organization to come over the conflict problem --->
59 <cfset storedate = currdate>
60
61
62 <cfquery name="InsertOrg" datasource="#programsdb#">
63 Insert Into dOrganization
64 neenan 1.1 (OrganizationName, Phone, Extension, Division, FaxNumber, TimeZone, Address1, EmailName, GeoServiceID, Address2, Hotline, City, StateOrProvince, URL, PostalCode, Country, GraphicURL, Profile, Times, Visitor_Id)
65 Values ('#form.OrganizationName#',
66 '#FinalPhoneNumber#',
67 '#form.Extension#',
68 '#form.Division#',
69 '#FinalFaxNumber#',
70 '#form.TimeZone#',
71 '#form.Address1#',
72 '#form.EmailName#',
73 #form.GeoServiceID#,
74 '#form.Address2#',
75 '#FinalHotline#',
76 '#form.City#',
77 '#form.StateOrProvince#',
78 '#form.URL#',
79 '#form.PostalCode#',
80 '#form.Country#',
81 '#form.GraphicURL#',
82 '#form.Profile#',
83 '#currdate#',
84 #vid#)
85 neenan 1.1 </cfquery>
86
87 <cfoutput> <input type="hidden" name="storedate" value="#storedate#">
88
89 </cfoutput>
|