← Back
Editing: index.php
<?php require_once ("conn.php"); $ptitolo = "L'arte del Baseball in Maremma:"; require_once ("testacoda.php"); $ind = "y"; $sql = "SELECT *, date_format(data, '%d/%m/%Y %H:%i') AS data2 FROM news WHERE tipo=1 ORDER by data DESC LIMIT 5"; $ris = mysql_query($sql,$conn) or die($sql.": ".mysql_error()); while ($row = mysql_fetch_object($ris)) { if ($id=='') { $s = 400; while ($row->testo[$s]!=' ' && $s<strlen($row->testo)) $s++; $testo = substr ($row->testo, 0, $s); } else $testo = $row->testo; $news.= "<tr><td><div class=\"titolo\">$row->titolo</div><br><br> <img src=\"foto_news/$row->fotopic\" border=\"0\" alt=\"$row->titolo\" align=\"left\" hspace=\"5\" vspace=\"10\"> <span class=\"data\">$row->data2</span> <span class=\"news\">$testo</span>"; if ($id=='') $news.= "...<a href=\"news.php?id=$row->id\" title=\"leggi tutta la notizia\"><img src=\"leggi.png\" border=\"0\" align=\"right\"></a></div></td></tr>$rigaO"; else $news.= "</td></tr>"; } $sql = "SELECT id, titolo FROM news WHERE tipo=3 ORDER by data DESC LIMIT 5"; $ris = mysql_query($sql,$conn) or die($sql.": ".mysql_error()); while ($row = mysql_fetch_object($ris)) { $newsmondo.= "<div class=\"titolo\"><a href=\"news.php?id=$row->id\">$row->titolo</a></div>$rigaO2"; } echo "$testa <tr bgcolor=\"white\"> $rigaV <td> <table width=\"755\" cellspacing=\"0\" cellpadding=\"0\"> <tr><td valign=\"top\"> <table width=\"200\"> $countdown $ultimo $prossime $risultati $video $sponsor <tr><td align=\"center\" class=\"barra\"> --- notizie dal mondo --- </td></tr> <tr bgcolor=\"white\"><td align=\"center\"> $newsmondo </td></tr> </table> </td> $rigaV <td valign=\"top\"><table width=\"555\"> <tr><td align=\"right\" class=\"barra\"> </td></tr> <tr><td align=\"center\" class=\"titolo\"> <!--img src=\"stadio02.jpg\" border=\"0\" width=\"500\" height=\"334\" alt=\"Notti magiche allo Jannella\" hspace=\"10\"--> ECCO TONY TORCATO IL NUOVO 3B DEL BBC<br><img src=\"torcato.jpg\" border=\"0\" width=\"520\" height=\"259\" alt=\"\" hspace=\"10\"><br><img src=\"images/video3.gif\" align=\"absmiddle\"> <a href=\"http://www.geocities.com/torcatoism/torcato.wmv\">Guarda il video di una sua STREPITOSA presa!</a><br> </td></tr> $rigaO <tr><td align=\"right\" class=\"barra\"> --- ultime notizie --- </td></tr> $news </table></td></tr>$coda"; ?>
Save File
Cancel