-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetscrap_mailtool_send.cfm
326 lines (273 loc) · 13.2 KB
/
netscrap_mailtool_send.cfm
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<CFIF PARAMETEREXISTS(SCRAP_ID) IS 0>
<CFLOCATION URL="./netscrap.cfm">
</CFIF>
<CFQUERY NAME="get_scrap_detail" DATASOURCE="netscrap">
SELECT *
FROM netscrap_articles
WHERE scrap_id = #form.scrap_id#
</CFQUERY>
<CFSET EMail = #form.mailtool_recip_email#>
<CFIF #EMail# is "">
<CFSET #EMail_Level# = "1">
<CFSET #EMail_Message# = "No e-mail address was supplied.">
<CFELSEIF #FindNoCase('@',EMail)# is 0>
<CFSET #EMail_Level# = "2">
<CFSET #EMail_Message# = "No @ sign detected. An @ sign is part of every e-mail address.">
<CFELSEIF #Right(EMail,1)# is "@">
<CFSET #EMail_Level# = "3">
<CFSET #EMail_Message# = "An @ sign cannot be the last character of the e-mail address.">
<CFELSEIF #Left(EMail,1)# is "@">
<CFSET #EMail_Level# = "4">
<CFSET #EMail_Message# = "An @ sign cannot be the first character of the e-mail address.">
<CFELSEIF #FindNoCase('@',EMail,(FindNoCase('@',EMail) + 1))# is not 0>
<CFSET #EMail_Level# = "5">
<CFSET #EMail_Message# = "A valid e-mail address contains only one @ sign.">
<CFELSEIF #FindNoCase('.',Email)# is 0>
<CFSET #EMail_Level# = "6">
<CFSET #EMail_Message# = "No period detected. An e-mail address contains at least one period.">
<CFELSEIF #Right(EMail,1)# is ".">
<CFSET #EMail_Level# = "7">
<CFSET #EMail_Message# = "The last character of the e-mail address cannot be a period.">
<CFELSEIF #Left(EMail,1)# is ".">
<CFSET #EMail_Level# = "8">
<CFSET #EMail_Message# = "The first character of the e-mail address cannot be a period.">
<CFELSEIF #FindNoCase(',',EMail)# is not 0>
<CFSET #EMail_Level# = "9">
<CFSET #EMail_Message# = "A valid e-mail address cannot contain a comma. If you have a Compuserve account, substitute a period for the comma in your Compuserve ID, like so: <B>[email protected]</B>.">
<CFELSEIF #FindNoCase(' ',EMail)# is not 0>
<CFSET #EMail_Level# = "10">
<CFSET #EMail_Message# = "You cannot have a space as part of a single e-mail address.">
<CFELSEIF #FindNoCase('*',EMail)# is not 0>
<CFSET #EMail_Level# = "11">
<CFSET #EMail_Message# = "You cannot have an asterisk in an e-mail address.">
<CFELSEIF #FindNoCase(')',EMail)# is not 0>
<CFSET #EMail_Level# = "12">
<CFSET #EMail_Message# = "You cannot have a close parenthesis sign in an e-mail address.">
<CFELSEIF #FindNoCase('(',EMail)# is not 0>
<CFSET #EMail_Level# = "13">
<CFSET #EMail_Message# = "You cannot have an open parenthesis sign in an e-mail address.">
<CFELSEIF #FindNoCase(CHR(62),EMail)# is not 0>
<CFSET #EMail_Level# = "14">
<CFSET #EMail_Message# = "You cannot have a greater than sign in an e-mail address.">
<CFELSEIF #FindNoCase(CHR(60),EMail)# is not 0>
<CFSET #EMail_Level# = "15">
<CFSET #EMail_Message# = "You cannot have a less than sign in an e-mail address.">
<CFELSEIF #FindNoCase(':',EMail)# is not 0>
<CFSET #EMail_Level# = "16">
<CFSET #EMail_Message# = "You cannot have a colon in an e-mail address.">
<CFELSEIF #FindNoCase(';',EMail)# is not 0>
<CFSET #EMail_Level# = "17">
<CFSET #EMail_Message# = "You cannot have a semicolon in an e-mail address.">
<CFELSEIF #FindNoCase(CHR(34),EMail)# is not 0>
<CFSET #EMail_Level# = "18">
<CFSET #EMail_Message# = "You cannot have a double quote in an e-mail address.">
<CFELSE>
<CFSET #EMail_Level# = "0">
<CFSET #EMail_Message# = "No problem. This is a good e-mail address.">
</CFIF>
<CFSET EMail2 = #form.mailtool_sender_email#>
<CFIF #EMail2# is "">
<CFSET #EMail2_Level# = "1">
<CFSET #EMail2_Message# = "No e-mail address was supplied.">
<CFELSEIF #FindNoCase('@',EMail2)# is 0>
<CFSET #EMail2_Level# = "2">
<CFSET #EMail2_Message# = "No @ sign detected. An @ sign is part of every e-mail address.">
<CFELSEIF #Right(EMail2,1)# is "@">
<CFSET #EMail2_Level# = "3">
<CFSET #EMail2_Message# = "An @ sign cannot be the last character of the e-mail address.">
<CFELSEIF #Left(EMail2,1)# is "@">
<CFSET #EMail2_Level# = "4">
<CFSET #EMail2_Message# = "An @ sign cannot be the first character of the e-mail address.">
<CFELSEIF #FindNoCase('@',EMail2,(FindNoCase('@',EMail2) + 1))# is not 0>
<CFSET #EMail2_Level# = "5">
<CFSET #EMail2_Message# = "A valid e-mail address contains only one @ sign.">
<CFELSEIF #FindNoCase('.',EMail2)# is 0>
<CFSET #EMail2_Level# = "6">
<CFSET #EMail2_Message# = "No period detected. An e-mail address contains at least one period.">
<CFELSEIF #Right(EMail2,1)# is ".">
<CFSET #EMail2_Level# = "7">
<CFSET #EMail2_Message# = "The last character of the e-mail address cannot be a period.">
<CFELSEIF #Left(EMail2,1)# is ".">
<CFSET #EMail2_Level# = "8">
<CFSET #EMail2_Message# = "The first character of the e-mail address cannot be a period.">
<CFELSEIF #FindNoCase(',',EMail2)# is not 0>
<CFSET #EMail2_Level# = "9">
<CFSET #EMail2_Message# = "A valid e-mail address cannot contain a comma. If you have a Compuserve account, substitute a period for the comma in your Compuserve ID, like so: <B>[email protected]</B>.">
<CFELSEIF #FindNoCase(' ',EMail2)# is not 0>
<CFSET #EMail2_Level# = "10">
<CFSET #EMail2_Message# = "You cannot have a space as part of a single e-mail address.">
<CFELSEIF #FindNoCase('*',EMail2)# is not 0>
<CFSET #EMail2_Level# = "11">
<CFSET #EMail2_Message# = "You cannot have an asterisk in an e-mail address.">
<CFELSEIF #FindNoCase(')',EMail2)# is not 0>
<CFSET #EMail2_Level# = "12">
<CFSET #EMail2_Message# = "You cannot have a close parenthesis sign in an e-mail address.">
<CFELSEIF #FindNoCase('(',EMail2)# is not 0>
<CFSET #EMail2_Level# = "13">
<CFSET #EMail2_Message# = "You cannot have an open parenthesis sign in an e-mail address.">
<CFELSEIF #FindNoCase(CHR(62),EMail2)# is not 0>
<CFSET #EMail2_Level# = "14">
<CFSET #EMail2_Message# = "You cannot have a greater than sign in an e-mail address.">
<CFELSEIF #FindNoCase(CHR(60),EMail2)# is not 0>
<CFSET #EMail2_Level# = "15">
<CFSET #EMail2_Message# = "You cannot have a less than sign in an e-mail address.">
<CFELSEIF #FindNoCase(':',EMail2)# is not 0>
<CFSET #EMail2_Level# = "16">
<CFSET #EMail2_Message# = "You cannot have a colon in an e-mail address.">
<CFELSEIF #FindNoCase(';',EMail2)# is not 0>
<CFSET #EMail2_Level# = "17">
<CFSET #EMail2_Message# = "You cannot have a semicolon in an e-mail address.">
<CFELSEIF #FindNoCase(CHR(34),EMail2)# is not 0>
<CFSET #EMail2_Level# = "18">
<CFSET #EMail2_Message# = "You cannot have a double quote in an e-mail address.">
<CFELSE>
<CFSET #EMail2_Level# = "0">
<CFSET #EMail2_Message# = "No problem. This is a good e-mail address.">
</CFIF>
<HTML>
<HEAD>
<CFIF #EMail_Level# IS "0" and #EMail2_Level# IS "0">
<meta http-equiv="Refresh" content="4; URL=/netscrap.cfm">
</CFIF>
<META NAME="Author" CONTENT="Mailtool Results">
<TITLE>NetScrap(TM) Mailtool Results</TITLE>
</HEAD>
<BODY BGCOLOR="#DDDDDD" TEXT="#000000" LINK="#5678AF" VLINK="#888888" ALINK="#FF0000">
<CENTER>
<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 BGCOLOR="#000000" WIDTH=600><TR><TD ALIGN=CENTER>
<CFOUTPUT QUERY="get_scrap_detail">
<TABLE CELLPADDING=3 CELLSPACING=0>
<TR><TD>
<FONT FACE="ARIAL,GENEVA" SIZE=1 COLOR=##FFFFFF>
: <A HREF="./netscrap.cfm">Netscrap(TM)</A> : <A HREF="./netscrap.cfm?cat_show=#URLEncodedFormat(scrap_category)#">#scrap_category#</A> : <A HREF="./netscrap_detail.cfm?scrap_id=#scrap_id#">Netscrap ###scrap_id#</A> : MailTool : Results :
</FONT>
</TD></TR>
</TABLE>
</CFOUTPUT>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF" WIDTH=598><TR><TD>
<MAP NAME="scrapnav">
<AREA SHAPE="RECT" COORDS="450,0,520,14" HREF="/netscrap_feedback.cfm">
<AREA SHAPE="RECT" COORDS="529,0,591,14" HREF="/netscrap_sitemap.cfm">
</MAP>
<IMG SRC="/images/netscrap_plain.jpg" WIDTH=600 USEMAP="#scrapnav" BORDER=0>
<CFIF #EMail_Level# IS "0" and #EMail2_Level# IS "0">
<cfcookie
name="cookie_id_name"
value="#form.mailtool_sender_name#"
expires="NEVER"
>
<cfcookie
name="cookie_id_email"
value="#form.mailtool_sender_email#"
expires="NEVER"
>
<cffile action="APPEND"
file="D:\FTP\chrisg2003\Htdocs\admin\netscrap_mailtool.log"
output="%%#DateFormat(Now(), 'mm-dd-yy')#%%,%%#form.mailtool_sender_email#%%,%%#form.mailtool_recip_email#%%,%%#scrap_id#%%,%%#REMOTE_HOST#%%">
<cfmail
query="get_scrap_detail"
to="#form.mailtool_recip_email#"
from="[email protected]"
subject="NetScrap(TM): #scrap_title#"
server="scriptmail.intermedia.net">
Hey #form.mailtool_recip_name#:
#form.mailtool_sender_name# (#form.mailtool_sender_email#) has chosen this NetScrap(TM) article to send to you!
From #form.mailtool_sender_name#:
#mailtool_message#
----- Begin NetScrap(TM) -----
#scrap_title#
#scrap_article#
<CFIF #scrap_url_description# IS NOT "">
#scrap_url_description#:
#scrap_url#
</CFIF>
----- End NetScrap(TM) -----
http://www.netscrap.com/netscrap_detail.cfm?scrap_id=#scrap_id#
This NetScrap(TM) message was sent to you from the Mailtool on
http://www.netscrap.com/ NetScrap(TM)'s goal is to collect as much
internet junk (jokes for now) as possible with the hopes of
finding the authors of this stuff. We're just trying to make
sense of all this scrap floating around the net!
Feel free to forward it, but come to http://www.netscrap.com/ and
find something better to send.
<CFIF get_scrap_detail.scrap_owner IS "">
Claim it: Did you do this? Do you own it? Can you prove it?
NetScrap(TM)'s mission is to reunite jokes like this with their
creators.
Take credit for your fine work:
http://www.netscrap.com/netscrap_credit.cfm?scrap_id=#scrap_id#
<CFELSE>
Allegedly perpetrated by:
#get_scrap_detail.scrap_owner#
Do you have more info on the author? Let us know:
http://www.netscrap.com/netscrap_credit.cfm?scrap_id=#scrap_id#
</CFIF>
If you feel this service has been abused, please contact
[email protected] with the details of your situation.
</cfmail>
<TABLE BORDER=0 CELLPADDING=5 WIDTH=600><TR><TD>
<P ALIGN=RIGHT>
<FONT FACE="ARIAL BLACK" SIZE=5>
Success!
</FONT>
</P>
<P ALIGN=LEFT>
<FONT FACE="ARIAL,GENEVA" SIZE=-1>
<CFOUTPUT QUERY="get_scrap_detail">
Looks like everything worked! We didn't find any trouble with your
email addresses. Search again for some other great bits
of NetScrap(TM).
</CFOUTPUT>
</FONT>
</P>
<CFELSE>
<CFOUTPUT QUERY="get_scrap_detail">
<FORM ACTION="./netscrap_mailtool_send.cfm" METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="hidden" NAME="scrap_id" value="#scrap_id#">
<INPUT TYPE="hidden" NAME="mailtool_sender_name_required" value="You MUST enter your name">
<INPUT TYPE="hidden" NAME="mailtool_sender_email_required" value="You MUST enter your email address">
<INPUT TYPE="hidden" NAME="mailtool_recip_name_required" value="You MUST enter your friend's name">
<INPUT TYPE="hidden" NAME="mailtool_recip_email_required" value="You MUST enter your friend's email address">
<TABLE BORDER=0 CELLPADDING=5 WIDTH=600><TR><TD>
<P ALIGN=RIGHT>
<FONT FACE="ARIAL BLACK" SIZE=5 COLOR=##FF0000>
ERROR!
</FONT>
</P>
<P ALIGN=LEFT>
<FONT FACE="ARIAL,GENEVA" SIZE=-1>
For your Email Address you entered: <b>#form.mailtool_sender_email#</b><BR>
<b>Problem:</b> #EMail2_Message#
<P>
For your Email Address you entered: <b>#form.mailtool_recip_email#</b><BR>
<b>Problem:</b> #EMail_Message#<BR>
</FONT>
</P>
<P ALIGN=LEFT>
<FONT FACE="ARIAL,GENEVA" SIZE=-1>
You are about to send the <B>#scrap_title#</B> NetScrap(TM) message to your friend.
You must fill out every field on this form with valid information.
The message is optional.
</FONT>
</P>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4>
<TR VALIGN=TOP><TD><FONT FACE="ARIAL,GENEVA" SIZE=-1>Your Name:</FONT></TD><TD><input type="Text" name="mailtool_sender_name" value="#form.mailtool_sender_name#" size="35" maxlength="50"></TD></TR>
<TR VALIGN=TOP><TD><FONT FACE="ARIAL,GENEVA" SIZE=-1>Your Email Address:</FONT></TD><TD><INPUT TYPE="Text" NAME="mailtool_sender_email" value="#form.mailtool_sender_email#" SIZE="35" MAXLENGTH="50"></TD></TR>
<TR VALIGN=TOP><TD><FONT FACE="ARIAL,GENEVA" SIZE=-1>Recipient's Name:</FONT></TD><TD><INPUT TYPE="Text" NAME="mailtool_recip_name" value="#form.mailtool_recip_name#" SIZE="35" MAXLENGTH="50"></TD></TR>
<TR VALIGN=TOP><TD><FONT FACE="ARIAL,GENEVA" SIZE=-1>Recipient's Email Address:</FONT></TD><TD><INPUT TYPE="Text" NAME="mailtool_recip_email" value="#form.mailtool_recip_email#" SIZE="35" MAXLENGTH="50"></TD></TR>
<TR VALIGN=TOP><TD><FONT FACE="ARIAL,GENEVA" SIZE=-1>A short message:</FONT></TD><TD><textarea name="mailtool_message" cols="30" rows="3" wrap="PHYSICAL">#form.mailtool_message#</textarea></TD></TR>
<TR VALIGN=TOP><TD><FONT FACE="ARIAL,GENEVA" SIZE=-1></FONT></TD><TD><input type="Submit" name="MAILIT" value=" SENDITOFF! Again "></TD></TR>
</TABLE>
</FORM>
</CFOUTPUT>
</CFIF>
</TD></TR></TABLE>
<PRE><FONT COLOR=#FFFFFF>
---------------------------------------------------------------------------
75 Chars Wide</FONT></PRE>
<cfinclude template="./netscrap_footer.cfm">
</TD></TR></TABLE>
</TD></TR></TABLE>
</CENTER>
</BODY>
</HTML>