<% response.buffer = true
ON ERROR RESUME NEXT
Response.AddHeader "XBuilder-Scope","exclude"
'Cookies
gc = Request.Cookies("gc")
IF (Request.Cookies("gc") <> "") THEN
gc = c(Left(gc_to_guid(gc), 40))
Else
gc = ""
END IF
target = Request.Querystring("target")
IF (target = "") THEN
target = "http://www.switzerland.isyours.com"
ELSE
target = left(c(target), 500)
IF left(target, 1) = "/" THEN
'This server ...
IF Request.ServerVariables("SERVER_PORT") <> "80" THEN
target = "http://" & Request.ServerVariables("SERVER_NAME") & ":" & Request.ServerVariables("SERVER_PORT") & target
Else
target = "http://" & Request.ServerVariables("SERVER_NAME")& target
End if
Else
IF left(target, 7) <> "http://" THEN
IF left(target, 7) <> "mailto:" THEN
target = "http://" & target
END IF
END IF
End if
END IF
referer = c(left(request.servervariables("http_referer"), 500))
IF referer = "" THEN
referer = lcase(request.servervariables("HTTP_HOST"))
END IF
sql="proc_www_external_links '"& target &"', '"& referer & "', '" & gc &"'"
db.Execute sql
'Set RS = Server.CreateObject("ADODB.Recordset")
'RS.open sql,db,adOpenKeyset,adLockPessimistic
'set RS=nothing
db.Close
Set db = Nothing
response.redirect target
%>