Publisher is the useful and powerful WordPress Newspaper , Magazine and Blog theme with great attention to details, incredible features...

[diario_shortcode template=”card_img” colunas=”4″ s=”internofolha” numero_de_parceiros=”4″ mono_post=”sim” colunas=”4″ top=”4″]

Mostrar Banner 1 vez por IP = Cokkies

<script type=’text/javascript’>//<![CDATA[

function setCookie(cname,cvalue,exdays){
var d = new Date();
d.setTime(d.getTime()+(exdays*24*60*60*1000));
var expires = “expires=”+d.toGMTString();
document.cookie = cname + “=” + cvalue + “; ” + expires;
}

function getCookie(cname){
var name = cname + “=”;
var ca = document.cookie.split(‘;’);
for(var i=0; i<ca.length; i++){
var c = ca[i].trim();
if (c.indexOf(name)==0) return c.substring(name.length,c.length);
}
return “”;
}

function MostrarImagen(){
var verimg=getCookie(“unaporip”);
if (verimg!=””){
//No hacer nada porque ya tiene la cookie
}else{
setCookie(“unaporip”,”1″,1); //1 dia
document.write(‘<img src=”http://i.imgur.com/K11poEd.png” id=”Image1″ alt=”” border=”0″ style=””></div>’);
}
}
MostrarImagen();

//]]></script>