%@ LANGUAGE="VBSCRIPT" %>
contemporary, beds , tables, chairs ,sculpture galleries, hand made, funky furniture - gallery
<%
' BEGINNING OF LOG FILE SECTION
dtNow = Now()
ourdatetime = FormatDateTime(dtNow, vbGeneralDate)
serverno = Request.ServerVariables("REMOTE_ADDR")
entrypage = Request.ServerVariables("SCRIPT_NAME")
referer = Request.ServerVariables("HTTP_REFERER")
'create a colour from the server no
dim servnos, first, second, third, fourth, combined
servnos = split(serverno,".")
first = Hex(servnos(0))
second= Hex(servnos(1))
third = Hex(servnos(2))
fourth = Hex(servnos(3))
combined = first & second & third
' create the domain variable from the referer - if there's no referer let the domain be blank
if not referer = "" then
check = split(referer, ".", 3)
domain = check(1)
end if
if referer = "" then
domain = referer
end if
' remove the asp extention from the page filename
dim chopup, thispage
chopup=split(entrypage,".")
thispage=chopup(0)
'open the log file for ammending
filename="log.dat"
Set fso = Server.CreateObject("Scripting.FileSystemObject")
configfile = Server.MapPath (filename)
Set file = fso.OpenTextFile (configfile, 8)
if not domain="woodenyareckon" then
if not referer = "" then
file.write ourdatetime & "......id: " & serverno & "......Person was refered to the " & thispage & " page by : " & referer & "" & "
" & vbCrLf
end if
' THE FOLLOWING LINE IS PRINTED WHEN A NEW VISITOR FIRST ARRIVES
' WHICH DIVERTS TO A PAGE THAT CALCULATES THE HOURS DIFFERENCE
' AND WRITES IT TO THE LOG FILE. IT THEN REDIRECTS BACK TO THIS PAGE,
' WHERE THE REDIRECTION SHOULDN'T HAPPEN AGAIN
' response.write "