كود يكشف متى دخلت الصفحه - خدمات ويب و Blogger

البحث بالمدونه

الاثنين

كود يكشف متى دخلت الصفحه

 المثال

الكود

<!-- يخبرك في متى زرت هذي الصفحه -->

<script type="text/javascript">

function getCookie(c_name) {

if(document.cookie.length>0)

{

c_start=document.cookie.indexOf(c_name + "=");

if (c_start!=-1)

{

c_start=c_start + c_name.length+1;

c_end=document.cookie.indexOf(";",c_start);

if (c_end==-1) c_end=document.cookie.length;

return unescape(document.cookie.substring(c_start,c_end));

}

}

return ""; }

function setCookie(c_name,value,expiredays)

{

var exdate=new Date();

exdate.setDate(exdate.getDate()+expiredays);

document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());

var x = document.cookie(username);

alert("sfs");

document.write(x); }

function showmessage ()

{

var days=421;

nextvisitmsg="حيإأك الله كانت هذي زيارتك الاخيره في [displaydate]";

var dat=new Date();

if(getCookie("visit")==""){

setCookie("visit", dat, days);

document.write("أنت تزور هذا الموقع لأول مرة ");

}

else

{

var p=getCookie("visit");

var pp=Date.parse(p);

var now = new Date();

now.setTime(pp);

var day = new Array("Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat");

var month = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");

var nd = now.getDate();

var ny = now.getDay();

ny = day[ny];

var nm = now.getMonth();

nm = month[nm];

yy = now.getFullYear();

var hh = now.getHours();

var ampm = "AM";

if(hh >= 12) {ampm = "PM"}

var mins = now.getMinutes();

var secs = now.getSeconds();

var dispDate = ny + ", " + nm + " " + nd + ", " + yy + " " + hh + ":" + mins + ":" + secs + " " + ampm;

document.write(nextvisitmsg.replace("\[displaydate\]", dispDate))

}

setCookie("visit", dat, days); }

function ctck()

{

var sds = document.getElementById("dum");

if(sds == null){

alert("You are using a free package.\n You are not allowed to remove the tag.\n");

}

var sdss = document.getElementById("dumdiv");

if(sdss == null){

alert("You are using a free package.\n You are not allowed to remove the tag.\n");

} } document.onload="ctck()"; showmessage ();

</script>

<div style="font-size: 10px;color: #dadada;" id="dumdiv">

&nbsp;</div>

<!-- يخبرك في متى زرت هذي الصفحه -->

وسلامتكم

ليست هناك تعليقات:

إرسال تعليق

تعريب وتطوير هايف السـ العجمي ـفراني