%Option Explicit%>
<%
' Name: offsite.asp
' Purpose: To warn a visitor to our site that they are leaving it.
' Author: Tony Loza
' Editor: VID 6.0
' History:
' - Kathy Becknek changed the code to allow for a spanish version.
' - 11/21/00 Tony changed check box form tag so that it does not point at
' Kathy's test directory in scriptlib.
' - 06/27/03 Tony changed the length of the URL displayed from 100 to 50.
'
' - 05/18/04 Paul decoded then URI Encoded the url string using server-side JScript.
'
' Parameters passed
dim cUrl
dim cChange
dim nURLMaxLen
dim cReturnURL
dim lang
dim textArray(12) 'an array for text messages on the page
lang=(Request.QueryString("lang"))
' Locate "url=" anywhere within the string, then select the rest, then un-encode the entire string and encode just the path
cUrl = JS_unescape(CStr(Request.ServerVariables("QUERY_STRING")))
cChange = trim(Request.QueryString("Change"))
nURLMaxLen = 50
if lang="esp" then
'save spanish variables
textArray(0)="Está usted saliendo del sitio en internet
" &_
"de la sede central de la
" &_
"Iglesia Evangélica Luterana en América (IELA)"
textArray(1)="Al hacer click en este enlace para continuar hacia:"
textArray(2)="La sede central de la IELA no se hace responsable del contenido y los enlaces que visite; estos son la responsabilidad de quienes auspician cada sitio individualmente."
textArray(3)="Gracias por su visita. Vuelva pronto."
textArray(4)="Regreso a la página anterior de la IELA."
textArray(5)="<- Seleccione aquí si desea siempre pasar a un enlace externo sin hacer click en éste. Usaremos una ciber-galleta para recordarle esta preferencia."
textArray(6)="o espere un momento"
textArray(7)="| compartiendolafe |"
textArray(8)="/co/offsite/spanish_images/spanish_text.gif"
textArray(9)="/co/offsite/spanish_images/spanish_left_upper.gif"
textArray(10)="/co/offsite/spanish_images/spanish_right_upper.gif"
textArray(11)="/co/offsite/spanish_images/spanish_left_lower.gif"
textArray(12)="/co/offsite/spanish_images/spanish_right_lower.gif"
else
'save english variables
textArray(0)="You are now leaving
" &_
"the Joseph Sittler Archives"
textArray(1)="Once you click this link to continue to:"
textArray(2)="the contents and links you see are beyond
the control of the Joseph Sittler Archives;
they are the responsibility of the individual Web hosts."
textArray(3)="Thank you for visiting; Please come again soon!"
textArray(4)="Go back to previous page."
textArray(5)="Check this box if you want to always be taken to an external link without clicking on it. A cookie will be used to remember this preference."
textArray(6)="or wait a few seconds"
textArray(7)=""
textArray(8)="/co/offsite/images/offsite_disclaimer_r1_c3.gif"
textArray(9)="/co/offsite/images/offsite_disclaimer_r1_c1.gif"
textArray(10)="/co/offsite/images/offsite_disclaimer_r1_c2.gif"
textArray(11)="/co/offsite/images/offsite_disclaimer_r2_c1.gif"
textArray(12)="/co/offsite/images/offsite_disclaimer_r2_c2.gif"
end if
' Save a cookie with information about a preferece
If cChange <> "" Then
Response.Cookies("offsite")("auto") = Request.QueryString("auto")
' If "auto" is not empty cookie will last many years else it will expire after browser is closed.
If Request.QueryString("auto") <> "" Then
Response.Cookies("offsite").Expires = #January 1, 2038#
Else
Response.Cookies("offsite").Expires = #January 1, 1999#
End If
End If
' Set ReturnURL to make it easy to go back a page.
If Request.QueryString("ReturnURL") <> "" Then
cReturnURL = Request.QueryString("ReturnURL")
Else
cReturnURL = Request.ServerVariables("HTTP_REFERER")
End If
%>
|