TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 05:13:39 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,105
  • Total Topics: 21,213
  • Online today: 310
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 283
  • Total: 284
  • lurkalot

Problem with a phpbox

Started by LEKO22, November 24, 2008, 02:34:58 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LEKO22

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>';


IchBin

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

LEKO22

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.

IchBin

Well, others have got it to work. So I don't know what your problem is unless you help me to help you.