<% @ LANGUAGE = "VBSCRIPT" %> <% 'option explicit 'Response.Buffer=true %> LifeSource - Chicagoland's Blood Center <% ' ----------------------------------------------------------------------------- Function SendReport(ByRef asToAddress) Dim loMailer ' Mailing object Dim lsBadLink ' The link that was not found Dim lsBody ' body text to be sent in email Dim lsReferer ' URL that refered site to this page Dim lsServerName ' Server Name Dim lsToAddress ' Address to send mail to Dim lsURL 'URL Dim lsBrowser 'Browser Dim lsQS 'Query String Dim lsIP 'Remote IP address '----- ' If the default GENERIC email address is provided If asToAddress = "bnelson@itxm.org" Then ' ' Create a generic email address to send the 404 error to ' ' (webmaster@domain.com) lsServerName = Request.ServerVariables("www.itxm.org") If LCase(Left(lsServerName, 4)) = "www." Then ' ' Cut off the "www." prefix lsServerName = Mid(lsServerName, 5) End If lsToAddress = "bnelson" & lsServerName Else ' ' Use the email address provided lsToAddress = asToAddress End If '----- ' Store the URL that refered the page lsReferer = Request.ServerVariables("HTTP_REFERER") lsServerName = Request.ServerVariables("REMOTE_HOST") lsURL = Request.ServerVariables("URL") lsBrowser =Request.ServerVariables("HTTP_USER_AGENT") lsQS = Request.ServerVariables("QUERY_STRING") lsIP = Request.ServerVariables("REMOTE_ADDR") lsREQUEST = Request.ServerVariables("REQUEST_METHOD") lsLogon = Request.ServerVariables("LOGON_USER") '----- ' Acquire the URL that was not found lsBadLink = Request.QueryString ' Remove the "404;" prefix lsBadLink = Replace(lsBadLink, "404;", "") '----- ' Compose a report lsBody = "The following file was not found:
" lsBody = lsBody & lsBadLink & "

" lsBody = lsBody & "Remote Host:
" lsBody = lsBody & lsServerName & "

" lsBody = lsBody & "Browser:
" lsBody = lsBody & lsBrowser & "

" lsBody = lsBody & "URL:
" lsBody = lsBody & lsURL & "

" lsBody = lsBody & "IP address of remote host:
" lsBody = lsBody & lsIP & "

" lsBody = lsBody & "Request Method:
" 'Works lsBody = lsBody & lsRequest & "

" 'Works 'lsBody = lsBody & lsLogon & "

" ' If there was a referer If Not lsReferer = "" Then ' Add the referer to the report lsBody = lsBody & "

The following page refered the link:
" lsBody = lsBody & lsReferer End If '--------------------------------- ' SEND THE MESSAGE '--------------------------------- ' Keep errors silent in case mailing object is not present, ' or the smtp properties do not allow for sending email. 'On Error Resume Next 'Response.write = (IsBody) ' Create the mailing object ' Collaboration Data Objects for NT Server (CDO) set loMailer= Server.CreateObject("CDO.Message") ' Set message properties loMailer.From = "bnelson@itxm.org" 'lsToAddress loMailer.To = "bnelson@itxm.org" 'lsToAddress 'loMailer.Importance = 2 loMailer.Subject = "Reporting 404 Error - LifeSource Web Site" loMailer.HTMLBody = lsBody ' Send the message loMailer.Send ' Release object from memory Set loMailer = Nothing ' Determine if we have succeded in sending the report If Err Then SendReport = False Else SendReport = True End If End Function ' ----------------------------------------------------------------------------- %>
HOME | NEWS & EVENTS | ABOUT US | CONTRIBUTIONS | CAREERS | VOLUNTEERS | CONTACT US  
LifeSource, Chicagoland's Blood Center

The page could not be found on the LifeSource Server (Error 404)

<% ' If a user went directly to this page (without errors) If Request.QueryString = "" Then ' Tell the user that this page is meant for handling missing pages %>

This page is not meant to be viewed on its own. It is here to capture and report missing web pages on this server.

<% Else ' Let the user know that the page is missing %>

It appears that you have stumbled upon a page that is not present on this web site. The page may have been renamed or removed from our site.  Please try another link or wait just a moment to be directed to our Home Page.

<% ' If we were able to send a report to the webmaster If SendReport("bnelson@itxm.org") Then ' Tell the user we sent a report %> A message has been sent to the webmaster about this missing page. <% End If %> We apologize for any inconvenience that this may have caused.

<% End If %>