[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/20/2009 at 12:42PM PDT, ID: 24828255
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Legacy code, need help removing tags from page

Asked by BDoellefeld in ColdFusion Application Server

Tags: Cold Fusion Check_Email CFX

Hi. I have this legacy web app that I am trying to get working in a 64-bit Server 2008 environment. I have a C++ CFX (specifically CHECK_EMAIL) that does not work under 64-bit.  I'm having trouble surgically removing the code for the tag without breaking the page. It is wrapped up in a bunch of <cfif> and <cfelseif> statements. I need a eagle eyed CF expert to help me. I want to remove the call on the CFX tag, and fix the open and closed <cfif> and <cfelseif>. Although its nice to have the email validation, saving the legacy app is more important. Code is attached.  

Upper middle of the code <cfx_check_email>
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
<cfif #ParameterExists(q_type)# is "NO">
	<cflocation url="../index.cfm">
</cfif>
 
	
<cfif #q_type# is "add">
	
	<cfset q_firstname = #Trim(q_firstname)#>
	<cfset q_lastname = #Trim(q_lastname)#>
	<cfset q_companyname = #Trim(q_companyname)#>
	<cfset q_division = #Trim(q_division)#>
	<cfset q_address1 = #Trim(q_address1)#>
	<cfset q_address2 = #Trim(q_address2)#>
	<cfset q_city = #Trim(q_city)#>
	<cfset q_state = #Trim(q_state)#>
	<cfset q_zip = #Trim(q_zip)#>
	<cfset q_country = #Trim(q_country)#>
	<cfset q_title = #Trim(q_title)#>
	<cfset q_email = #Trim(q_email)#>
	<cfset q_phone = #Trim(q_phone)#>
	<cfset q_fax = #Trim(q_fax)#>
	<cfset q_agent = #Trim(q_agent)#>
	<cfset q_intendedapp = #Trim(q_intendedapp)#>
	<cfset q_now = #Now()#>
 
	<!--- Check if they're already in the database --->
	<cfquery name="q_GetCustomer" datasource="#Application.Datasource#">
		SELECT RegEntryID
		FROM RegistrationInfo
		WHERE (EmailAddress='#q_email#') and (UserLastName='#q_lastname#')
	</cfquery>
	<cfif #q_GetCustomer.RecordCount# is not 0>
		<table>
		<tr>
			<td>You are already registered!
			</td>
		</tr>	
		<cfset q_RegID = #q_GetCustomer.RegEntryID#>
		<!--- Already in DB; look for reg number --->
		<cfquery name="q_GetRegNum" datasource="#Application.Datasource#">
			SELECT RegistrationNumber
			FROM DCCManagement
			WHERE (RegEntryID = #q_RegID#) and (RegistrationNumber <> 'pending') and
				(RegistrationNumber <> 'n/a') and (RegistrationNumber <> '')
		</cfquery>
		<cfif #q_GetRegNum.RecordCount# is not 0>
			<form action="_customer.cfm" method="post">
				<cfoutput>
				<input type="hidden" name="q_type" value="verify">
				<input type="hidden" name="q_RegID" value=#q_RegID#>
				</cfoutput>
			<tr>
				<td>Please provide your UserID# below.</td>
			</tr>
			<tr>
				<td>UserID Number: <input type="text" name="q_regnum" value="" size="15"></td>
			</tr>
			<tr>
				<td><input type="submit" value="Continue"></td>
			</tr>
			</form>
		<cfelse>
			<cfoutput>
			<tr>
				<td>To request additional products, <a href="ProductSelect.cfm?q_RegID=#q_RegID#">click here</a></td>
			</tr>
			</cfoutput>
		</cfif>
		</table>
 
	<cfelse>
		<cfset q_error = 0>
	    <cfif q_Email IS NOT "">
	    	
	        
	        <cfx_check_email email="#q_Email#">
		<cfif #check_email_level# is not 0>
	            <cfset q_error  = 1>
				<cfoutput>
	            <table>
				<tr>
					<td>#Check_Email_Message#</td>
				</tr>
				</table>
	            </cfoutput>
	        </cfif>
	        
	    </cfif> 
		<cfif q_Error>
			<cfoutput>
			<form action="NewCustomer.cfm" method="post">
				<input type="hidden" name="q_firstname" value="#q_firstname#">
				<input type="hidden" name="q_lastname" value="#q_lastname#">
				<input type="hidden" name="q_companyname" value="#q_companyname#">
				<input type="hidden" name="q_division" value="#q_division#">
				<input type="hidden" name="q_address1" value="#q_address1#">
				<input type="hidden" name="q_address2" value="#q_address2#">
				<input type="hidden" name="q_city" value="#q_city#">
				<input type="hidden" name="q_state" value="#q_state#">
				<input type="hidden" name="q_zip" value="#q_zip#">
				<input type="hidden" name="q_country" value="#q_country#">
				<input type="hidden" name="q_title" value="#q_title#">
				<input type="hidden" name="q_email" value="#q_email#">
				<input type="hidden" name="q_phone" value="#q_phone#">
				<input type="hidden" name="q_fax" value="#q_fax#">
				<input type="hidden" name="q_agent" value="#q_agent#">
				<input type="hidden" name="q_intendedapp" value="#q_intendedapp#">
				<table>
				<tr>
					<td><input type="submit" value="Return"></td>
				</tr>
				</table>
			</form>
			</cfoutput>
		<cfelse>
			<cftransaction>
			<cfquery name="q_RegistrationInfo" Datasource="#Application.Datasource#">
				INSERT INTO RegistrationInfo
					(CompanyName, CompanyDivision, CompanyAddress, CompanyAddress2, City, State, Zip, Country,
					UserFirstName, UserLastName, UserTitle, EmailAddress, PhoneNumber, FaxNumber,
					IntendedApp, SalesAgent, RecordCreation)
				VALUES
					('#q_CompanyName#', '#q_division#', '#q_address1#', '#q_address2#', '#q_city#', '#q_state#',
					'#q_zip#', '#q_country#', '#q_firstname#', '#q_lastname#', '#q_title#', '#q_email#', '#q_phone#',
					'#q_fax#', '#q_intendedapp#', '#q_agent#', #q_Now#)
			</cfquery>
			
			<cfquery name="q_RegistrationInfo2" Datasource="#Application.Datasource#">
				SELECT MAX(RegEntryID) AS New_ID
				FROM RegistrationInfo
			</cfquery>
			
			<cfset q_RegID=0>
			<cfoutput query="q_RegistrationInfo2">
				<cfset q_RegID=#New_ID#>
			</cfoutput>
			</cftransaction>
			<cflocation url="ProductSelect.cfm?q_RegID=#q_RegID#">
		</cfif>
	</cfif>
	
	
	
<cfelseif #q_type# is "edit">
	
	<cfset q_firstname = #Trim(q_firstname)#>
	<cfset q_lastname = #Trim(q_lastname)#>
	<cfset q_companyname = #Trim(q_companyname)#>
	<cfset q_division = #Trim(q_division)#>
	<cfset q_address1 = #Trim(q_address1)#>
	<cfset q_address2 = #Trim(q_address2)#>
	<cfset q_city = #Trim(q_city)#>
	<cfset q_state = #Trim(q_state)#>
	<cfset q_zip = #Trim(q_zip)#>
	<cfset q_country = #Trim(q_country)#>
	<cfset q_title = #Trim(q_title)#>
	<cfset q_email = #Trim(q_email)#>
	<cfset q_phone = #Trim(q_phone)#>
	<cfset q_fax = #Trim(q_fax)#>
	<cfset q_agent = #Trim(q_agent)#>
	<cfif #ParameterExists(q_platform)# is "yes">
		<cfset q_platform = #Trim(q_platform)#>
		<cfset q_agreement1 = #Trim(q_agree1)#>
		<cfset q_agreement2 = #Trim(q_agree2)#>
	</cfif>
	<cfset q_error = 0>
    <cfif q_Email IS NOT "">
        <cfx_check_email email="#q_Email#">
    	<cfif #check_email_level# is not 0>
            <cfset q_error  = 1>
			<cfoutput>
            <table>
			<tr>
				<td>#Check_Email_Message#</td>
			</tr>
			</table>
            </cfoutput>
        </cfif>
    </cfif> 
	<cfif q_Error>
		<cfoutput>
		<form action="../_siteadmin/EditCustomer.cfm" method="post">
			<input type="hidden" name="id" value="#id#">
			<input type="hidden" name="q_firstname" value="#q_firstname#">
			<input type="hidden" name="q_lastname" value="#q_lastname#">
			<input type="hidden" name="q_companyname" value="#q_companyname#">
			<input type="hidden" name="q_division" value="#q_division#">
			<input type="hidden" name="q_address1" value="#q_address1#">
			<input type="hidden" name="q_address2" value="#q_address2#">
			<input type="hidden" name="q_city" value="#q_city#">
			<input type="hidden" name="q_state" value="#q_state#">
			<input type="hidden" name="q_zip" value="#q_zip#">
			<input type="hidden" name="q_country" value="#q_country#">
			<input type="hidden" name="q_title" value="#q_title#">
			<input type="hidden" name="q_email" value="#q_email#">
			<input type="hidden" name="q_phone" value="#q_phone#">
			<input type="hidden" name="q_fax" value="#q_fax#">
			<input type="hidden" name="q_agent" value="#q_agent#">
			<input type="hidden" name="q_intendedapp" value="#q_intendedapp#">
			<input type="hidden" name="q_platform" value="#q_platform#">
			<input type="hidden" name="q_agree1" value="#q_agree1#">
			<input type="hidden" name="q_agree1term" value="#q_agree1term#">
			<input type="hidden" name="q_agree2" value="#q_agree2#">
			<input type="hidden" name="q_agree2term" value="#q_agree2term#">
			<input type="hidden" name="q_select" value="#q_select#">
			<input type="hidden" name="q_sortby" value="#q_sortby#">
			<cfif #ParameterExists(q_string)# is "yes">
				<input type="hidden" name="q_string" value="#q_string#">
			</cfif>
			<input type="hidden" name="q_qtype" value="#q_qtype#">
			<table>
			<tr>
				<td><input type="submit" value="Return"></td>
			</tr>
			</table>
		</form>
		</cfoutput>
	<cfelse>
		<cfquery name="q_RegistrationInfo" Datasource="#Application.Datasource#">
			UPDATE RegistrationInfo
			SET CompanyName='#q_CompanyName#',
				CompanyDivision='#q_division#',
				CompanyAddress='#q_address1#',
				CompanyAddress2='#q_address2#',
				City='#q_city#',
				State='#q_state#',
				Zip='#q_zip#',
				Country='#q_country#',
				UserFirstName='#q_firstname#',
				UserLastName='#q_lastname#',
				UserTitle='#q_title#',
				EmailAddress='#q_email#',
				PhoneNumber='#q_phone#',
				FaxNumber='#q_fax#',
				IntendedApp='#q_intendedapp#',
				SalesAgent='#q_agent#'
				<cfif #ParameterExists(q_platform)# is "yes">
					, PlatformSerialNo = '#q_platform#',
					LegalAgreement1 = '#q_agreement1#',
					<cfif #q_agree1term# is not "">
						Agreement1Termination = #q_agree1term#,
					</cfif>
					<cfif #q_agree2term# is not "">
						Agreement2Termination = #q_agree2term#,
					</cfif>				
					LegalAgreement2 = '#q_agreement2#'
				</cfif>
			WHERE RegEntryID=#id#
		</cfquery>
		<cfoutput>
		<cfset q_linktext = "q_qtype=#q_qtype#&q_select=#q_select#&q_sortby=#q_sortby#">
		<cfif #parameterExists(q_string)# is "Yes">
			<cfset q_linktext = "#q_linktext#&q_string=#URLEncodedFormat(q_string)#">
		</cfif>		
		<cflocation url="../_siteadmin/EditCustomer.cfm?#q_linktext#&id=#id#">
		</cfoutput>
	</cfif>
	 <!---<cflocation url="../_siteadmin/EditProductSelect.cfm?id=#id#"> --->
	<!--- 	<cflocation url="../_siteadmin/EProductSelect.cfm?id=#id#"> --->
	
<cfelseif #q_type# is "verify">
	<cfif (#ParameterExists(q_RegNum)# is "No") or (#ParameterExists(q_RegID)# is "No")>
		<cfabort>
	</cfif>
	<cfset q_RegNum = "#trim(q_regnum)#">
	<cfquery name="q_GetRegNum" datasource="#Application.Datasource#">
		SELECT RegistrationNumber
		FROM DCCManagement
		WHERE (RegEntryID = #q_RegID#) and (RegistrationNumber <> 'pending') and
			(RegistrationNumber <> 'n/a') and (RegistrationNumber <> '') and
			(RegistrationNumber = '#q_regnum#')
	</cfquery>
	<cfif #q_GetRegNum.RecordCount# is not 0>
		<cfoutput>
		<cflocation url="ProductSelect.cfm?q_RegID=#q_RegID#">
		</cfoutput>
	<cfelse>
		<table><tr><td>This UserID# is incorrect. </td></tr></table>
	</cfif>
</cfif>
[+][-]10/20/09 03:45 PM, ID: 25619412

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: ColdFusion Application Server
Tags: Cold Fusion Check_Email CFX
Sign Up Now!
Solution Provided By: Plucka
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625