% Dim sPath, filesys, count, getValue, update, twohrs sPath = Request.ServerVariables("Path_Translated") sPath = Left(sPath,InStrRev(sPath,"\")) & "counter.txt" Set filesys = CreateObject("Scripting.FileSystemObject") Set getValue = filesys.OpenTextFile(sPath,1,0) ' get the current value count = getValue.ReadLine If Request.Cookies("www.nasbydalsspa-rehab.nu")("recentvisitor") <> "yes" Then ' increment by 1 before displaying, 'cos they're a newbie count = Int(count) + 1 End If ' close file getValue.Close %> <% If Request.Cookies("www.nasbydalsspa-rehab.nu")("recentvisitor") <> "yes" Then ' only update the value in the text file if they're a newbie ' overwrite old text file with new one Set update = filesys.CreateTextFile(sPath) ' put new value in text file update.WriteLine(count) update.Close ' give them a cookie to make sure it doesn't count them more than once Response.Cookies("www.nasbydalsspa-rehab.nu")("recentvisitor") = "yes" ' make it expire in 2 hours' time twohrs = DateAdd("h", 2, Now) Response.Cookies("www.nasbydalsspa-rehab.nu").Expires = twohrs End If %> <% ' put a comma in the number count = FormatNumber(count, 0, 0, -1, -1) %>
Välkommen
till Näsbydals Spa-kur, Det
är lätt att hitta hit. Det ligger
centralt, med goda kommunikationer och fri parkering,
i hjärtat av Täby. Ett av Täby´s
"lill-centrum" |