1 neenan 1.1 <!--- Name: dsp_addnewcontact.cfm
2 Purpose: It helps to add new organization in your program database. It also transfers
3 all the form variable values to act_addcontact.cfm where the actual action of inserting the data
4 into the table(dcontacts) takes place.
5 Date created: 03/06/2005
6 Dependancy: URL.orgid
7 Variables: getOrgID.OrganizationName and GetOrgID.OrgId are used to display newly added organization name and ID.
8 Primary - Primary contact or not
9 FirstName - First Name of the contact(Required)
10 Middle - Middle name of the contact if applicable.
11 LastName - Phone Number of the organization (Required)
12 NameSuffix - Suffix such as Mr, Mrs or Miss
13 Title - Title of the contact
14 Address - Postal address of the contact
15 City- Contact's city name
16 Zip - Zip code for the contact's address
17 Country - Country of official residence.
18 WorkPhone_Area - Work Phone Area Number of the contact
19 WorkPhone_Prefix - Work Phone Prefix of the contact
20 WorkPhone_Num - Work Phone Number of the contact
21 WorkExtension - Extension if applicable
22 neenan 1.1 FaxNumber_Area - Fax Area Number of the contact
23 FaxNumber_Prefix - Fax Number Prefix of the contact
24 FaxNumber_Num - Fax Number of the contact
25 MobilePhone_Area - Mobile Phone Area of the contact
26 MobilePhone_Prefix - Mobile Phone Prefix of the contact
27 MobilePhone_Num - Mobile Phone Number of the contact
28 EmailName - Email of the contact
29 Functions:
30 Date changed:
31 03/1/2005 Prabin,Neena Created, Documentation
|
32 pKanel 1.3 03/25/2005 Neena Made changes so the existing contact state and country info is passed on to the next new contact being added.
33
|
34 neenan 1.1 --->
35 <cfoutput>
36
37 <cfquery name="GetOrgID" datasource="#ProgramsDB#">
38 Select Orgid,Organizationname
39 From dOrganization
40 Where orgid = #URL.orgid#
41 </cfquery>
42 </cfoutput>
43
44
|
45 pKanel 1.3 <cfquery name="contactinfo" datasource="#ProgramsDB#">
|
46 neenan 1.1 Select *
47 From dOrganization
48 Where orgid = #getorgid.orgid#
49 </cfquery>
50
51 <table width="100%" border="0" cellspacing="0" cellpadding="10" name="text">
52 <tr>
53 <td>
54 <p>
|
55 pKanel 1.3 <span class="subheading">
|
56 neenan 1.2 ADD A PROGRAM <!--- <img src="../images/siteimage/dart.gif" border="0"> --->
|
57 pKanel 1.3 CONTACT PERSON INFO <!--- <img src="../images/siteimage/dart.gif" border="0"> ---></span>
58 <span class="sublink2">Step 2 <!--- <img src="../images/siteimage/dart.gif" border="0"> ---></span><br><br>
59 <span class="redtext"><font style="color: red">* Required Fields</font></span><br><br>
|
60 neenan 1.1
61 <cfoutput>Organization Name: <strong>#getORGID.OrganizationName#</strong></cfoutput><br><br>
62
63 <cfif #URL.fuseaction# is "AddNewContacts">
|
64 pKanel 1.3 <form name="addContact" action="addeditprograms.cfm?fuseaction=AddMoreContacts&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return namevalidate(addContact)" method="post">
|
65 neenan 1.1 <cfelseif #URL.fuseaction# is "AddNewContacts1">
|
66 pKanel 1.3 <form name="addContact" action="addeditprograms.cfm?fuseaction=AddMoreContacts1&OrgID=<cfoutput>#URL.OrgID#</cfoutput>" onsubmit="return namevalidate(addContact)" method="post">
|
67 neenan 1.1 </cfif>
68
69
70 <table width="95%" border="0" cellspacing="0" cellpadding="5" bgcolor="#F4FFE9">
71 <tr>
72 <td><div class="formtext">Primary ? <font style="color: red" size="-1">* </font><a href="javascript:newWindow ('help1.cfm')"><font style="color: red" size="-1">Help</font></a></td>
73 <td><input type="checkbox" name="Primary" value="1"></div></td>
74 </tr>
|
75 pKanel 1.3 <cfoutput query="contactinfo">
76 <cfset fax=#contactinfo.faxNumber#>
77
|
78 neenan 1.1 <tr>
79 <td><div class="formtext">Prefix</td>
|
80 pKanel 1.3 <td><input type="text" name="Prefix" size="4"></div>
81 <input type="hidden" size="3" name="statename" value="#contactinfo.StateOrProvince#"></td>
|
82 neenan 1.1 </tr>
83 <tr>
84 <td><div class="formtext">First Name <font style="color: red">*</font></td>
|
85 pKanel 1.3 <td><input type="text" size="15" name="FirstName" onfocus="return getStateOption('addContact')">
|
86 neenan 1.1 <input type="hidden" name="FirstName_required" value="Please enter contact person's first name, or enter 'n/a'.">
87 </td>
88 </tr>
89 <tr>
90 <td><div class="formtext">Middle</td>
91 <td><input type="text" size="1" name="Middle"></div></td>
92 </tr>
|
93 pKanel 1.3
|
94 neenan 1.1 <tr>
95 <td><div class="formtext">Last Name <font style="color: red">*</font></td>
96 <td><input type="text" size="15" name="LastName">
97 <input type="hidden" name="LastName_required" value="Please enter contact person's last name, or enter 'n/a'.">
98 </td>
99 </tr>
100 <tr>
101 <td><div class="formtext">Suffix </td>
102 <td><input type="text" size="5" name="NameSuffix"></td>
103 </tr>
104 <tr>
105 <td><div class="formtext">Title</td>
106 <td><input type="text" size="20" name="Title"></td>
107 </tr>
108 <tr>
109 <td><div class="formtext">Address</td>
110 <td>
111 <input type="text" size="25" name="Address" value="#contactinfo.address1#">
|
112 pKanel 1.3
|
113 neenan 1.1 </div>
114 </td>
115 </tr>
116 <tr>
117 <td><div class="formtext">City</td>
118 <td align="justified" nowrap>
119 <input type="text" size="25" name="City" value="#contactinfo.city#"></div>
120 </td>
121 </tr>
122 <tr>
123 <td><div class="formtext">State</td>
|
124 pKanel 1.3 <td>
125 <select name="State">
126 <cfoutput query="getState">
127 <option value="#Abbr#" <cfif #Abbr# EQ #ContactInfo.stateOrProvince#> selected </cfif>>#State#</option>
128 </cfoutput>
129 </select>
130
131
132
133
134 </div>
|
135 neenan 1.1 </td>
136 </tr>
|
137 pKanel 1.3 </cfouput>
138 <cfoutput query="contactinfo">
|
139 neenan 1.1 <tr>
140 <td><div class="formtext">Zip</td>
141 <td align="justified" nowrap>
142 <input type="text" size="10" name="Zip" value="#Contactinfo.postalcode#"></div>
143 </td>
144 </tr>
145 <tr>
146 <td><div class="formtext">Country </td>
|
147 pKanel 1.3 <td><input type="text" size="18" name="Country" value="#Contactinfo.country#"></div>
|
148 neenan 1.1 </td>
149 </tr>
150
151 <cfset phone=#contactinfo.phone#>
152 <tr>
153 <td><div class="formtext">Work Phone</td>
154 <td><input type="Text" size="3" value="#gettoken(phone,1,"-")#" maxlength="3" name="WorkPhone_Area">-
155 <input type="Text" size="3" value="#gettoken(phone,2,"-")#" maxlength="3" name="WorkPhone_Prefix">-
156 <input type="Text" size="4" value="#gettoken(phone,3,"-")#" maxlength="4" name="WorkPhone_Num">
157 <font class="formtext">Ext.</font>
158 <input type="text" size="5" name="WorkExtension">
159 </td>
160 </tr>
|
161 pKanel 1.3
|
162 neenan 1.1 <tr>
163 <td><div class="formtext">Fax</td>
|
164 pKanel 1.3 <td><input type="Text" size="3" value="#gettoken(fax,1,"-")#" maxlength="3" name="FaxNumber_Area">-
165 <input type="Text" size="3" value="#gettoken(fax,1,"-")#" maxlength="3" name="FaxNumber_Prefix">-
166 <input type="Text" size="4" value="#gettoken(fax,1,"-")#" maxlength="4" name="FaxNumber_Num"></div>
|
167 neenan 1.1 </td>
168 </tr>
169 <tr>
170 <td><div class="formtext">Mobile Phone</td>
171 <td><input type="Text" size="3" maxlength="3" name="MobilePhone_Area">-
172 <input type="Text" size="3" maxlength="3" name="MobilePhone_Prefix">-
173 <input type="Text" size="4" maxlength="4" name="MobilePhone_Num"></div>
174 </td>
175 </tr>
176 <tr>
177 <td><div class="formtext">Email</td>
178 <td colspan="3"><input type="text" size="40" name="EmailName"></div></td>
179 </tr>
180 </cfoutput>
181 <tr>
182 <td> </td>
183 </tr>
184 <tr>
185 <td> </td>
186 <td><div class="formtext">
187
188 neenan 1.1 <INPUT type="submit" value="Add Contact">
189 <INPUT type="reset" value="Reset"></div>
190 </td>
191 </tr>
192 </table>
193 </form>
194
195 </td>
196 </tr>
197 </table>
198 </p>
|
199 pKanel 1.3 <!--- <cfinclude template="../cfi/global_footer.cfm"> --->
|