<% '############################## '## Get Browser and Script Name '## get the name of the current script for the navbar and header graphics ScriptName = Request.ServerVariables("SCRIPT_NAME") '## get the name of the browser to wrap in browser-specific tags UserAgent = Request.ServerVariables("HTTP_USER_AGENT") '###################################################################################### '## HTTP Header Data Capture On Error Resume Next '## Capture the referring URL and the browser strReferrer = Request.ServerVariables("HTTP_REFERER") strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") strRemoteAddr = Request.ServerVariables("REMOTE_ADDR") strRemoteHost = Request.ServerVariables("REMOTE_HOST") strRemoteUser = Request.ServerVariables("REMOTE_USER") '###################################################################################### '## Spider/Bot Detection IF instr(1,strUserAgent,"Perl",1) > 0 OR instr(1,strUserAgent,"Bot",1) > 0 OR instr(1,strUserAgent,"Spider",1) > 0 OR instr(1,strUserAgent,"Scooter",1) > 0 OR instr(1,strUserAgent,"Link",1) > 0 OR instr(1,strUserAgent,"URL",1) > 0 OR instr(1,strUserAgent,"Sidewinder",1) > 0 OR instr(1,strUserAgent,"Slurp",1) > 0 OR instr(1,strUserAgent,"Radiation",1) > 0 OR instr(1,strUserAgent,"Ultraseek",1) > 0 OR instr(1,strUserAgent,"WebCompass",1) > 0 OR instr(1,strUserAgent,"Java",1) > 0 OR instr(1,strUserAgent,"crawler",1) > 0 OR instr(1,strUserAgent,"Crescent",1) > 0 OR instr(1,strUserAgent,"eGain",1) > 0 OR instr(1,strUserAgent,"ia_archiver",1) > 0 OR instr(1,strUserAgent,"Super",1) > 0 OR instr(1,strUserAgent,"Scanner",1) > 0 then strBOT = "TRUE" END IF '###################################################################################### '## Referrer Logging IF NOT Request.Cookies("tourVisitBefore") = "TRUE" then '## OPEN TEXT FILE Set objFSO = CreateObject("Scripting.FileSystemObject") Set objNewFile = objFSO.OpenTextFile("d:/209.237.144.31/tour/site_log.txt", 8) IF strBOT = "TRUE" THEN '## WRITE TO TEXT FILE WITH BOT FLAG objNewFile.WriteLine strReferrer & "|" & FormatDateTime(Now,vbShortDate) & "|" & FormatDateTime(Now,vbShortTime) & "|*BOT* " & strUserAgent & "|" & strRemoteAddr & "|" & strRemoteHost & "|" & strRemoteUser & "|" & ScriptName ELSE '## WRITE TO TEXT FILE objNewFile.WriteLine strReferrer & "|" & FormatDateTime(Now,vbShortDate) & "|" & FormatDateTime(Now,vbShortTime) & "|" & strUserAgent & "|" & strRemoteAddr & "|" & strRemoteHost & "|" & strRemoteUser & "|" & ScriptName END IF '## CLOSE TEXT FILE objNewFile.Close END IF '###################################################################################### '## Cookie Setting '## Adds 1 month onto todays date so the cookie will expire 1 month from now NewDate = DateAdd("d", 1, FormatDateTime(Now,vbGeneralDate)) '## This sets the cookie so that the next time the user comes back they will skip the splash page Response.Cookies("tourVisitBefore") = "TRUE" Response.Cookies("tourVisitBefore").expires = cdate(NewDate) '###################################################################################### '## Define some variables articleID = Request("articleID") folder = Request("folder") print = Request("print") '###################################################################################### '## Browser Determination '## get the name of the browser to wrap in browser-specific tags UserAgent = Request.ServerVariables("HTTP_USER_AGENT") IF Request.Cookies("Browser") = "" then if (instr(1,UserAgent,"Mozilla",1) > 0 OR instr(1,UserAgent,"MSIE",1) > 0) AND instr(1,UserAgent,"4.",1) > 0 THEN '## Adds 1 month onto today date so the cookie will expire 1 month from now NewerDate = DateAdd("m", 1, FormatDateTime(Now,vbGeneralDate)) '## This sets the cookie so that the next time the user comes back they will skip the splash page Response.Cookies("Browser") = "CSS" Response.Cookies("Browser").expires = cdate(NewerDate) end if END IF '###################################################################################### '## Set Text Size IF NOT Request("Size") = "" THEN IF Request("Size") = "Large" THEN Response.Cookies("TextSize") = "Large" Response.Cookies("TextSize").expires = #10/10/2001# ELSEIF Request("Size") = "Normal" THEN Response.Cookies("TextSize") = "Normal" Response.Cookies("TextSize").expires = #10/10/2001# ELSEIF Request("Size") = "Small" THEN Response.Cookies("TextSize") = "Small" Response.Cookies("TextSize").expires = #10/10/2001# END IF ELSEIF Request.Cookies("TextSize") = "" THEN Response.Cookies("TextSize") = "Normal" Response.Cookies("TextSize").expires = #10/10/2001# END IF '############################## '## Colors IF uCase(print) = "TRUE" THEN b_bgcolor = "#ffffff" b_text = "#000000" b_link = "#000000" b_vlink = "#000000" small = "#000000" title = "#000000" MonthTable = "#ffffff" ELSE b_bgcolor = "#003333" b_text = "#cccc99" b_link = "#cc9933" b_vlink = "#999999" small = "#ffffff" title = "#ffff99" MonthTable = "#000000" END IF %> <% '###################################################################################### '## HTTP Header Data Capture On Error Resume Next '## Capture the referring URL and the browser strReferrer = Request.ServerVariables("HTTP_REFERER") strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") strRemoteAddr = Request.ServerVariables("REMOTE_ADDR") strRemoteHost = Request.ServerVariables("REMOTE_HOST") strRemoteUser = Request.ServerVariables("REMOTE_USER") %> Paris Roselli - European Tour 2000-2001
Back to Index
Send Email to Paris
Den Haag Links

  <% IF Request("action") = "email" AND emailValid(Request("strEmail")) AND NOT (Request("strName") = "" OR Request("strMessage") = "") THEN EMAIL_SENT ELSE EMAIL_FORM END IF %>
<% SUB EMAIL_FORM %>
Send email to Paris:
" size="30" maxlength="60" tabindex="02" accesskey="n">
" size="30" maxlength="60" tabindex="04" accesskey="e">
" size="30" maxlength="60" tabindex="06" accesskey="s">

Please be sure to fill out your name, email address, subject, and message. If you forget to enter one of these, the page will reload, but you'll have to figure out which one you forgot because I don't have time yet to build those features.
  
<% END SUB %> <% SUB EMAIL_SENT %> <% on error resume next '## Save Original Referrer in the Session '## Generate Email Set Message = Server.CreateObject("SMTPsvg.Mailer") Message.QMessage = true Message.FromName = Request("strName") Message.ContentType = "text" Message.FromAddress = Request("strEmail") '## Add Additional Receipients. Message.AddRecipient "Adrian Roselli","roselli@earthlink.net" 'Message.AddRecipient "Paris Roselli","paris@roselli.org" Message.Subject = Request("strSubject") Message.RemoteHost = "mail.roselli.org" Body = vbcrlf Body = Body & Request("strMessage") & vbcrlf Body = Body & vbcrlf Body = Body & "========" & vbcrlf Body = Body & "Sender Information:" & vbcrlf Body = Body & vbcrlf Body = Body & "Date/Time:" & vbTab & FormatDateTime(Now,vbShortDate) & ", " & FormatDateTime(Now,vbShortTime) & vbcrlf Body = Body & "Referrer:" & vbTab & strReferrer & vbcrlf Body = Body & "User Agent:" & vbTab & strUserAgent & vbcrlf Body = Body & "IP Address:" & vbTab & strRemoteHost & vbcrlf Body = Body & vbTab & "http://www.wpi.edu/cgi-bin/nslookup?" & strRemoteHost & vbcrlf Body = Body & vbTab & "http://www.www.arin.net/whois" & vbcrlf '## Compose message and send Message.BodyText = Body if Message.SendMail then end if %>
Email Sent.
<% END SUB %> <% Public Function emailValid(eAddr) '## Make sure the field is not empty, or else abort function IF eAddr = "" OR IsEmpty(eAddr) THEN emailValid = False Exit Function END IF '## if not 6 characters or more after trimming and replacing, then fail IF NOT instr(1,eAddr,"@",1) > 0 OR NOT instr(1,eAddr,".",1) > 0 OR NOT Len(Trim(eAddr)) > 5 THEN emailValid = False ELSE emailValid = True END IF End Function %>