<%@ LANGUAGE="VBSCRIPT" %> contemporary, beds , tables, chairs ,sculpture galleries, hand made, funky furniture - gallery

Choose a category :

SCULPTURE
LIGHTS
BEDS
CHOOKS
TABLES
CHAIRS
BOWLS
OTHER
<% ' 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 "
" & VbCrLf ' IF THERE WAS NO REFERER IE NEW VISITOR THEN LOG THIS PAGE VISITED if referer="" then file.write ourdatetime & "......id: " & serverno & "......Viewed the " & thispage & " page
" & vbCrLf end if ' CHECK TO SEE IF THERES A COOKIE IN THEIR COMPUTER lastvisit = Request.Cookies("woodenya") ' IF THERE IS SOMETHING IN THE COOKIE & THE DAY IS DIFFERENT THEN LOG A RETURNING VISITOR if not lastvisit = "" then ' GET THE DAY FROM THE COOKIE & THE CURRENT DATETIME xyz=split(ourdatetime,"/") abc=split(lastvisit,"/") dayfromcookie=abc(1) daynow=xyz(1) if not dayfromcookie = daynow then file.write " This is a returning visitor - They last visited " & lastvisit & "
" & VbCrLf end if end if ' SET A COOKIE Response.Cookies ("woodenya") = ourdatetime Response.Cookies ("woodenya").Expires = "Jan 31, 2004" end if 'add this page to the log file if its not a new visitor - ie has been to hoursdifference if domain="woodenyareckon" then file.write ourdatetime & "......id: " & serverno & "......Viewed the " & thispage & " page
" & vbCrLf end if file.Close ' END OF LOG FILE SECTION %>