gica 0 Denunciar post Postado Julho 3, 2003 Oi Pessoal, To tentando colocar um javascript para mostrar as ultimas noticas mas ta dando erro no javascript. Alguem pelo amor de DEUS pode me dar uma luz.... <?php include "include_fns.php"; $conn = db_connect(); function ListaNoticias() { global $conn; $sql2 = "select * from stories ". "order by created desc"; $result2 = mysql_query($sql2, $conn); if (mysql_num_rows($result2)) { $n=0; while ($qry = mysql_fetch_array($result2)) { echo "messages[".$n."]=\"<font face='verdana' color='blue' size='1'><a href='page2.php?id=".$qry[id]."'>".$qry[headline]."</a></font>\";\n"; $n++; } } } ?> <html> <head> <title>ABCDAIDS</title> </head> <script language="JavaScript"> window.open("popup.htm","Janela","width=200,height=300,status=0,toolbar=0,menubar=0,status=0,scrollbars=0,men ubar=0,resizable=0"); </script> <style type="text/css"> .caixa { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; color: black; background:#ffffff; border-right:1px solid #CC0000; border-left:1px solid #CC0000; border-top:1px solid #CC0000; border-bottom:1px solid #CC0000; } .login { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; color:black; background:white; border-right:1px solid #666666; border-left:1px solid #666666; border-top:1px solid #666666; border-bottom:1px solid #666666; } </style> <style type="text/css">A:link {color:#093DDF; text-decoration: none } A:visited {color:#093DDF; text-decoration: none} A:active { color: red; text-decoration: none} A:hover { color: red; text-decoration: none} </style> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="547" border="0" cellspacing="1" cellpadding="3" height="200"> <tr> <td width="459" height="132" valign="top"> <div align="center"> <table width="461" border="0" cellspacing="1" cellpadding="1"> <tr> <td height="151" valign="top" width="131"> <table width="150" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#00CCCC"> <div align="center"><font size="2" face="Comic Sans MS" color="#FFFFFF"><b>Notícias</b></font></div> </td> </tr> <tr> <td bgcolor="#F5F5F5" height="72" valign="top"> <font face="Verdana, Arial, Helvetica, sans-serif"> <script language="JavaScript1.2"> var scrollerwidth=111; var scrollerheight=125; var scrollerbgcolor='#BFD3C'; var scrollerbackground='scrollerback.gif'; //configure the below variable to change the contents of the scroller var messages=new Array(); //var messages=new Array() <? ListaNoticias(); ?> if (messages.length>1) { i=40; } else { i=0; } function move1(whichlayer){ tlayer=eval(whichlayer); if (tlayer.top>0&&tlayer.top<=5){ tlayer.top=0; setTimeout("move1(tlayer)",3000); setTimeout("move2(document.main.document.second)",3000); return; } if (tlayer.top>=tlayer.document.height*-1){ tlayer.top-=5; setTimeout("move1(tlayer)",100); } else{ tlayer.top=scrollerheight; tlayer.document.write(messages); tlayer.document.close(); if (i==messages.length-1){ i=0; }else{ i++; } } } function move2(whichlayer){ tlayer2=eval(whichlayer); if (tlayer2.top>0&&tlayer2.top<=5){ tlayer2.top=0; setTimeout("move2(tlayer2)",3000); setTimeout("move1(document.main.document.first)",3000); return; } if (tlayer2.top>=tlayer2.document.height*-1){ tlayer2.top-=5; setTimeout("move2(tlayer2)",100); } else{ tlayer2.top=scrollerheight; tlayer2.document.write(messages); tlayer2.document.close(); if (i==messages.length-1) { i=0; }else{ i++; } } } function move3(whichdiv){ tdiv=eval(whichdiv); if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){ tdiv.style.pixelTop=0; setTimeout("move3(tdiv)",3000); setTimeout("move4(second2)",3000); return; } if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){ tdiv.style.pixelTop-=5; setTimeout("move3(tdiv)",100); } else{ tdiv.style.pixelTop=scrollerheight; tdiv.innerHTML=messages; if (i==messages.length-1){ i=0; }else{ i++; } } } function move4(whichdiv){ tdiv2=eval(whichdiv); if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){ tdiv2.style.pixelTop=0; setTimeout("move4(tdiv2)",3000); setTimeout("move3(first2)",3000); return; } if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){ tdiv2.style.pixelTop-=5; setTimeout("move4(second2)",100); } else{ tdiv2.style.pixelTop=scrollerheight; tdiv2.innerHTML=messages; if (i==messages.length-1){ i=0; }else{ i++; } } } function startscroll(){ if (document.all){ move3(first2); second2.style.top=scrollerheight; second2.style.visibility='visible'; } else if (document.layers){ document.main.visibility='show'; move1(document.main.document.first); document.main.document.second.top=scrollerheight+5; document.main.document.second.visibility='show'; } } window.onload=startscroll; </script> <ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgcolor=&{scrollerbgcolor}; background=&{scrollerbackground}; visibility=hide> <layer id="first" left=0 top=1 width=&{scrollerwidth};> <script language="JavaScript1.2"> if (document.layers){ document.write(messages[0]); } </script> </layer> <layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide> <script language="JavaScript1.2"> if (document.layers){ document.write(messages[1]); } </script> </layer> </ilayer> <script language="JavaScript1.2"> if (document.all){ document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">'); document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">'); document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">'); document.write(messages[0]); document.writeln('</div>'); document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0;visibility:hidden">'); document.write(messages[1]); document.writeln('</div>'); document.writeln('</div>'); document.writeln('</span>'); } </script> </font></td> </tr> <tr> <td bgcolor="#FFFFFF" valign="top"> </td> </tr> </table> <table width="149" border="0" cellspacing="0" cellpadding="0" height="71"> <tr> <td bgcolor="#DD0000"> <div align="center"><font color="#FF0000" size="2" face="Comic Sans MS"><b><font color="#FFFFFF">Tira-dúvidas</font></b></font></div> </td> </tr> <tr> <td height="2" valign="top" bgcolor="#F5F5F5"> <div align="right"> <table width="150" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="35" valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">O vírus HIV é transmitido através de picadas de<br> insetos ?</font></td> </tr> <tr> <td> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><font size="1" color="#CC0000"><a href="duvidas_formas17.htm"><font color="#FF0000">Saiba +</font></a></font></b></font></div> </td> </tr> </table> </div> </td> </tr> </table> <div align="center"> <table width="148" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"><a href="http://www.iavi.org/callforaction/portugues" target="_blank"><br> <img src="http://www.iavi.org/callforaction/callforaction_button_po.gif" border="0" width="120" height="70" alt="Quero apoiar as vacinas para a Aids"></a></div> </td> </tr> </table> </div> </td> <td height="151" width="8" valign="top"> <div align="center"><img src="images/home_div.gif" width="3" height="234"></div> </td> <td height="151" width="151" valign="top"> <table width="147" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="E97840"> <div align="center"><font color="#FF0000" size="2" face="Comic Sans MS"><b><font color="#FFFFFF">Você Sabia Que...</font></b></font></div> </td> </tr> <tr> <td height="81" bgcolor="#F5F5F5" valign="top"> <div align="right"> <table width="140" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="49" valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> Cesariana é necessário para soropositivas com carga viral maior que 1.000 cópias </font></td> </tr> <tr> <td height="2"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href="vcsabia.htm"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href="vcsabia.htm"><font color="#FF6633"><b>Saiba +</b></font></a></font><font color="#FF6633"></font></a></font></div> </td> </tr> </table> </div> </td> </tr> </table> <div align="center"> <table width="142" border="0"> <tr> <td bgcolor="#FFFFFF" valign="top" height="95" align="center"> <table width="141" border="0"> <tr> <td bgcolor="#FFCCCC" height="2"> <div align="center"><font size="2"><b><font face="Comic Sans MS" color="#FFFFFF">G = Gravidez</font></b></font></div> </td> </tr> </table> <table width="133" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="54" valign="middle"> <div align="center"><font size="2"><b><font size="2"><b><font face="Verdana, Arial, Helvetica, sans-serif" color="#CC3366"><a href="letrag.htm"><img src="images/gravidarindopeq.jpg" width="105" height="100" border="0" vspace="0" hspace="0" align="middle"></a></font></b></font><font face="Verdana, Arial, Helvetica, sans-serif" color="#CC3366"></font></b></font></div> </td> </tr> <tr> <td height="25" valign="top"> <div align="left"> <p><font size="2" face="Arial, Helvetica, sans-serif"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">D</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="1">urante a gravidez e no período de amamentação, a mulher pode transmitir o vírus da AIDS para o bebê. </font></font></p> </div> </td> </tr> <tr> <td> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><font size="1" color="#CC0000"><a href="letrag.htm"><font color="#FFCCCC">Saiba +</font></a></font></b></font></div> </td> </tr> </table> <div align="right"></div> <div align="right"></div> </td> </tr> </table> </div> </td> <td height="151" width="9" valign="top"><img src="images/home_div.gif" width="3" height="234"></td> <td height="151" width="146" valign="top"> <table width="146" border="0" cellspacing="0" cellpadding="0" height="57"> <tr> <td bgcolor="DD127B"> <div align="center"><font face="Comic Sans MS" size="2" color="#00CCCC"><font color="#000000"><b><font color="#FFFFFF">Boletim Epidemiológico</font></b></font></font><font color="#FFFFFF"><b><font size="2" face="Comic Sans MS"></font></b></font></div> </td> </tr> <tr> <td height="68" valign="top" bgcolor="#F5F5F5"> <div align="right"> <table width="140" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="44"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><font color="#FF0000"><b>NEW!!! </b></font>Novo Boletim Epidemiológico, de abril a dezembro/2002. <font color="#FF0000"> </font></font></td> </tr> <tr> <td height="9"> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><font size="1" color="#CC0000"><a href="boletim.htm"><font color="#CC0066">Saiba +</font></a></font></b></font></div> </td> </tr> </table> </div> </td> </tr> </table> <br> <table width="148" border="0" cellspacing="0" cellpadding="0" height="71"> <tr> <td bgcolor="#0099CC"> <div align="center"><font color="#FF0000" size="2" face="Comic Sans MS"><b><font color="#FFFFFF">Depoimentos</font></b></font></div> </td> </tr> <tr> <td height="46" valign="top" bgcolor="#F5F5F5"> <div align="right"> <table width="140" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="34"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Para as mulheres que talvez não estejam bem com seus maridos não traiam, não mintam não enganem a si mesmas.</font></td> </tr> <tr> <td> <div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><font size="1" color="#CC0000"><a href="depoimento49.htm"><font color="#0099CC">Saiba +</font></a></font></b></font><font size="1" color="#CC0000"><a href="depoimento36.htm"></a></font></b></font></div> </td> </tr> </table> </div> </td> </tr> </table> <br> <table width="146" border="0" cellspacing="0" cellpadding="0" height="69"> <tr> <td bgcolor="39B1BF"> <div align="center"><font color="#FF0000"><b><font size="2" face="Comic Sans MS" color="#FFFFFF">Novidaids</font></b></font></div> </td> </tr> <tr> <td height="85" bgcolor="#F5F5F5" valign="top"> <form action="http://www.abcdaids.com.br/cgi-abcdaids/mail.cgi" method=post> <center> </center> <div align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Receba em seu email novidades de nosso site:<br> </font> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <input type=text class=caixa name="address" size=15 value="email@com.br"> <br> <input type=radio name=action value=subscribe checked> <font color="black" size="1"> Assinar <input type=radio name=action value=remove> Remover</font></font> <input type="submit" value="Cadastrar" class=login name="submit"> </div> </form> </td> </tr> </table> </td> </tr> </table> </div> </td> <td width="139" height="132" valign="top" align="center"> <table width="102" border="0" cellspacing="0" cellpadding="0" height="129"> <tr> <td valign="top" height="307"> <div align="center"> <p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="120" height="60" align="absmiddle" vspace="3" hspace="0"> <param name=movie value="ajude.swf"> <param name=quality value=high> <embed src="ajude.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="120" height="60" align="absmiddle" vspace="3" hspace="0"> </embed> </object><br> <a href="rivaldo.htm"><img src="images/rivaldo.jpg" width="120" height="190" border="0"></a><br> <br> </p> </div> </td> </tr> </table> </td> </tr> </table> </body> </html> Compartilhar este post Link para o post Compartilhar em outros sites
gica 0 Denunciar post Postado Julho 3, 2003 http://www.abcdaids.com.br/miolo2.php Compartilhar este post Link para o post Compartilhar em outros sites