Zadnji obisk piškotek
Petek, 9 januar, 2009dodali, da je to vzglavja
<script Language="javascript">
<! - Original: Mattias Sjöberg ->
<! - Begin
var expDays = 30;
var exp = new Date ();
exp.setTime (exp.getTime () + (expDays * 24 * 60 * 60 * 1000));
Kdo funkcijo (info) (
var VisitorName = GetCookie ("VisitorName")
if (VisitorName == null) (
VisitorName = poziv ("Kdo ste?");
SetCookie ("VisitorName", VisitorName, exp);
)
vrnitev VisitorName;
)
Ko funkcijo (info) (
var rightNow = new Date ()
var WWHTime = 0;
WWHTime = GetCookie ("WWhenH")
WWHTime = WWHTime * 1
var lastHereFormatting = new Date (WWHTime);
var intLastVisit = (lastHereFormatting.getYear () * 10000) + (lastHereFormatting.getMonth () * 100) + lastHereFormatting.getDate ()
var lastHereInDateFormat = "" + lastHereFormatting;
var dayOfWeek = lastHereInDateFormat.substring (0,3)
var dateMonth = lastHereInDateFormat.substring (4,11)
var timeOfDay = lastHereInDateFormat.substring (11,16)
var leto = lastHereInDateFormat.substring (23,25)
var WWHText = dayOfWeek + "," + dateMonth + "na" + timeOfDay
SetCookie ("WWhenH", rightNow.getTime (), exp)
vrnitev WWHText
)
Funkcija Count (info) (
var WWHCount = GetCookie ("WWHCount")
if (WWHCount == null) (
WWHCount = 0;
)
else (
WWHCount + +;
)
SetCookie ("WWHCount", WWHCount, exp);
vrnitev WWHCount;
)
funkcija, ki () (
VisitorName = poziv ("Kdo ste?");
SetCookie ("VisitorName", VisitorName, exp);
SetCookie ("WWHCount ', 0, exp);
SetCookie ("WWhenH ', 0, exp);
)
Funkcija getCookieVal (offset) (
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
vrnitev unescape (document.cookie.substring (offset, endstr));
)
Funkcija GetCookie (ime) (
var ARG = ime + "=";
var Alen = arg.length;
Člen var = document.cookie.length;
var i = 0;
while (i <Člen) (
var j = i + Alen;
if (document.cookie.substring (i, j) == ARG)
vrnitev getCookieVal (j);
i = document.cookie.indexOf ("", i) + 1;
if (i == 0) break;
)
vrnitev null;
)
Funkcija SetCookie (ime, vrednost) (
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var poteče = (argc> 2)? argv [2]: null;
var path = (argc> 3)? argv [3]: null;
var domain = (argc> 4)? argv [4]: null;
var varno = (argc> 5)? argv [5]: false;
document.cookie = ime + "=" + pobeg (vrednost) +
((Poteče == null)? ": ("; Izteče = "+ expires.toGMTString ())) +
((Pot == null)? ": ("; Path = "+ pot)) +
((Domena == null)? ": ("; Domain = "+ domena)) +
((Varna == true)? "Varne": ");
)
Funkcija DeleteCookie (ime) (
var exp = new Date ();
exp.setTime (exp.getTime () - 1);
var cval = GetCookie (ime);
document.cookie = ime + "=" + cval + "; poteče =" + exp.toGMTString ();
)
/ / End ->
</ Script>
dodali, da je to telo oddelek
<script Language="javascript">
document.write ("Zdravo" + Kdo () + ". ste tukaj je" + Count () + "čas (s). Zadnji čas je bil" + Ko () +".");
</ Script>
