TinyPortal
Development => Resources => Topic started by: LEKO22 on November 24, 2008, 02:34:58 AM
Hi , i want make a block that scrolls 4 images, the images are generated with the time etc, my code is here, it dont give any error, but dont show any image.Im using it on a phpbox, can someone help me?
setlocale(LC_TIME, "es_ES");
$otro = mktime(0,0,0,date("m"),date("d"),date("Y"));
$anio = strftime("%Y",$otro);
$mes_num = strftime("%m",$otro);
$mes_numuni = date(n) ;
$mes_ente = strftime("%B",$otro);
$mes_tres= strtolower(date("M"));
$hoy = strftime("%d",$otro);
$hoy = strtolower($hoy);
$diahoy=strtolower(strftime("%A",$otro));
$hoy_uni = date (j);
$hoy_dia = date (z);
$hoy_dia1 = date (z);
if (strlen($hoy_dia)==2) {
$hoy_dia="0".$hoy_dia;
}
echo'
<center>
<ilayer id="l1">
<layer id="l2">
<div id="l1">
<div id="l3" style="position:relative">
</div>
</div>
</layer>
</ilayer>
<script language="JavaScript">
<!--
var bannerArray = new Array();
var myCount=0;
// Banner Code Assignment
bannerArray[0] = "<a href="http://www.laventanita.net/sexy/Ellas/"'.$hoy_dia.'".jpg" TARGET="_blank"><img src="http://www.laventanita.net/sexy/Ellas/"'.$hoy_dia.'".jpg" width="140" border=0></a>";
bannerArray[1] = "<a href="http://www.ensenada.net/secciones/chica/fotos/"'.$anio.'"-"'.$mes_num.'"-"'.$hoy.'".jpg" TARGET="_blank"><img src="http://www.ensenada.net/secciones/chica/fotos/"'.$anio.'"-"'.$mes_num.'"-"'.$hoy.'".jpg" width="140" border=0></a>";
bannerArray[2] = "<a href="http://www.vipchick.com/a/"'.$anio.'"/"'.$mes_num.'"-"'.$mes_tres.'"/vipchick.com_"'.$hoy.'".jpg" TARGET="_blank"><img src="http://www.vipchick.com/a/"'.$anio.'"/"'.$mes_num.'"-"'.$mes_tres.'"/vipchick.com_"'.$hoy.'".jpg" width="140" border=0></a>";
bannerArray[3] = "<a href="http://personal.telefonica.terra.es/web/chicachic/a/"'.$hoy_dia.'".jpg" TARGET="_blank"><img src="http://personal.telefonica.terra.es/web/chicachic/a/"'.$hoy_dia.'".jpg" width="140" border=0></a>";
bannerRotate();
function bannerRotate() {
if(myCount > bannerArray.length-1){myCount=0;}
// Write out rotation
if (document.all){ // it is IE
document.all.l3.innerHTML=bannerArray[myCount];
}
else if (document.layers){ // it is NN
document.layers.l1.document.layers.l2.document.open();
document.layers.l1.document.layers.l2.document.write(bannerArray[myCount]);
document.layers.l1.document.layers.l2.document.close();
}
setTimeout("bannerRotate()", 3000);
myCount++;
}
// -->
</script>
</center>';
That looks like the code that I fixed. Those functions I believe are depricated in javascript using the document layers. If you read the rest of the topic you got that code from you would have seen that I fixed that.
http://www.tinyportal.net/index.php?topic=7747
Quote from: IchBinâ,,¢ on November 24, 2008, 02:56:51 AM
That looks like the code that I fixed. Those functions I believe are depricated in javascript using the document layers. If you read the rest of the topic you got that code from you would have seen that I fixed that.
http://www.tinyportal.net/index.php?topic=7747
I changed the bannerRotate function like you describe and still not working.
Well, others have got it to work. So I don't know what your problem is unless you help me to help you.