1 neenan 1.1 <!--- Name: act_addUser.cfm
2 Purpose: This functions as the action file to insert the information of the Initial user who is responsible for entering the
3 organization information accessing the Programadmin forms. Each time this page is called,the OutsideUsers table is
4 updated in the edit mode, else the new user is just added as a new record in the OutsideUsers table in the program database.
5 from the dOrgToService table using a query .Fresh records are then inserted for each of the services that the user had
6 selected in the dsp_addservices or dsp_editservices form. The new "Other" services are also inserted in the dservice
7 table and dorgtoservice table.
8 Date created: 02/23/2005
9 Dependancy: URL.URL.Vid - visitor Id - used only in the editing of the initial user.
10 Variables:
11
12 Functions:
13 Date changed:
14 02/24/2005 Prabin & Neena Created & Documentation
15 --->
16
17 <cfset Phone_Number='#form.Phone_Area#-#form.Phone_Prefix#-#form.Phone_Num#'>
18
19 <cfparam name="action" default="">
20 <cfset currdate=DateFormat(Now(),"mm/dd/yyy hh:mm:ss")>
21 <cfset userdate = currdate>
22 neenan 1.1
23 <cfif #URL.fuseaction# IS "GetOrganizations">
24 <cfquery name="UpdateOutsideUser" datasource="#programsdb#">
25 Update Outsideusers
26 Set fname = '#form.fname#',
27 lname = '#form.lname#',
28 Phone_Number = '#Phone_Number#',
29 Email ='#form.Email#',
30 Orgid = #URL.orgid#,
31 Vtime = '#currdate#'
32 where visitor_Id = #URL.vid#
33 </cfquery>
34
35 <cfelse>
36
37 <cfquery name="AddOutsideUser" datasource="#programsdb#">
38 Insert Into Outsideusers
39 (fname, lname, Phone_Number, Email, vtime)
40 Values ('#form.fname#',
41 '#form.lname#',
42 '#Phone_Number#',
43 neenan 1.1 '#form.Email#',
44 '#currdate#')
45 </cfquery>
46
47 </cfif>
48
49 <cfoutput> <input type="hidden" name="userdate" value="#userdate#"> </cfoutput>
|