POSLEDNA NAVSTEVA

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

034
p034.html / p034.zip
Oznami, ze doslo ku zmenam na stranke od poslednej navstevy uzivatela.
6385b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<html> <head> <title> JavaScript DESTINATION - P034 </title> <script language="JavaScript"> <!-- var whichVersion = navigator.appVersion; var platform = ""; var netscapev = ""; var i = 1; if (whichVersion.substring(0,3) == "2.0") { netscapev="2" } else if (whichVersion.substring(0,3) == "3.0") { netscapev="3" } else if (whichVersion.substring(0,4,1) == "4.01") { netscapev="4.01" } else { netscapev="1" } while (i < whichVersion.length) { if (whichVersion.substring(i,i+1) == "(") { if (whichVersion.substring(i+1,i+4) == "Mac") { platform="Mac"; } else if (whichVersion.substring(i+1,i+6) == "Win16") { platform="Win"; } else if (whichVersion.substring(i+1,i+6) == "Win95") { platform="Win95"; } else if (whichVersion.substring(i+1,i+6) == "WinNT") { platform="WinNT"; } else { platform = "UNIX"; } break; } i = i + 1; } // --> </script> </head> <body> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name, value) { var argv = SetCookie.arguments; var argc = SetCookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function setLastHereOnCookie () { var rightNow = new Date() var expdate = new Date() expdate.setTime (expdate.getTime() + 60*(24 * 60 * 60 * 1000)) SetCookie ("lastHereOn", rightNow.getTime(), expdate, "/") } var lastVisit = GetCookie("lastHereOn") var htm = '<table width=10 cellspacing=0 cellpadding=2 border=0><tr><td valign=top rowspan=4 width=200></a></td>' Src='<tr><td width=300><br></td></tr><td width=10></td></tr><tr><td width=300><table width=300 cellspacing=0 cellpadding=3 border=0><tr><td width=1></td><td width=299>'; if (platform == "Win95" && netscapev=="2") { htm += Src +"Netscape 2.0 a Windows 95"; } else if (platform == "Win95" && netscapev=="3") { htm += Src +"Netscape 3.0 a Windows 95"; } else if (platform == "Win95" && netscapev=="4.01") { htm += Src +"Netscape 4.01 a Windows 95"; } else if (platform == "WinNT" && netscapev=="2") { htm += Src +"Netscape 2.0 a Windows NT"; } else if (platform == "WinNT" && netscapev=="3") { htm += Src +"Netscape 3.0 a Windows NT"; } else if (platform == "UNIX" && netscapev=="2") { htm += Src +"Netscape 2.0 a UNIX"; } else if (platform == "UNIX" && netscapev=="3") { htm += Src +"Netscape 3.0 a UNIX"; } else if (platform == "Win" && netscapev=="2") { htm += Src +"Netscape 2.0 a Windows 3.1"; } else if (platform == "Win" && netscapev=="3") { htm += Src +"Netscape 3.0 a Windows 3.1"; } else { htm += Src; } htm += "</td></tr><tr><td width=1></td><td width=299>"; if (lastVisit == null) { htm += "Za predchadzajuce 2 mesiace si nas nenavstivil." } else { var exp = 971010 var proc = 970909 var nut = 970808 var news = 970707 var sand = 970606 var soap = 961111 if (platform == "Mac") { lastVisit = lastVisit - (24 * 60 * 60 * 1000) } htm += "Odkedy si nas naposledy navstivil<br><b>" lastVisit = 1 * lastVisit var lastHereFormatting = new Date(lastVisit); 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 year = lastHereInDateFormat.substring(23,25) htm += dayOfWeek + ", " + dateMonth + " at " + timeOfDay htm += "</b>," var noChange=0 if (intLastVisit < exp) { noChange = 1 Src = '<a href="t001.html">clanok t001</a> bol aktualizovany' htm += "<br>Nas " + Src } if (intLastVisit < proc) { noChange = 1 Src = '<a href="t002.html">clanok t002</a> bol aktualizovany' htm += "<br>Nas " + Src } if (intLastVisit < nut) { noChange = 1 Src = '<a href="t003.html">clanok t003</a> bol aktualizovany' htm += "<br>Nas " + Src } if (intLastVisit < sand) { noChange = 1 Src = '<a href="t004.html">clanok t004</a> bol aktualizovany' htm += "<br>Nas " + Src } if (intLastVisit < soap) { noChange = 1 Src = '<a href="t005.html">clanok t005</a> bol aktualizovany' htm += "<br>Nas " + Src } if (intLastVisit < news) { noChange = 1 Src = '<a href="t006.html">clanok t006</a> bol aktualizovany' htm += "<br>Nas " + Src } if (noChange == 0) { htm += "<br>pribudlo niekolko aktualizacii nasich stranok..." } } setLastHereOnCookie() htm += "</td></tr><tr><td width=1></td><td width=299>" Src = '</td></tr>' htm += Src + "</table></tr></table>"; document.write(htm) // --> </script> </body> </html>
[ Navrat / BACK ]