<?
include("config.php");
	header("Content-Type: text/html;  charset=iso-8859-1",true);
	?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css.css" />  
<div align="center">
  <table width="600" border="0" align="center" cellpadding="2" cellspacing="0">
    <tr>
      <td width="54" bgcolor="#FCFCFC"><div align="center" class="style1">xxx</div></td>
      <td width="68" bgcolor="#FCFCFC"><div align="center" class="style1">Hora</div></td>
      <td width="91" bgcolor="#FCFCFC"><div align="center" class="style1">Data</div></td>
      <td width="172" bgcolor="#FCFCFC"><div align="center" class="style1">Titulo</div></td>
      <td width="103" bgcolor="#FCFCFC"><div align="center" class="style1">Autor</div></td>
      <td width="100" bgcolor="#FCFCFC"><div align="center" class="style1">Not&iacute;cia</div></td>
    </tr>

<?
$q	=	mssql_query("select * from noticias");
if(mssql_num_rows($q) == 0) die("Nenhuma noticia cadastrada no banco de dados!"); 
for($i=1;$i<=mssql_num_rows($q);$i++){
$a	=	mssql_fetch_array($q);
print("    <tr>
      <td><div align=\"center\">" .$i. "</div></td>
      <td><div align=\"center\">" .$a['hora']. "</div></td>
      <td><div align=\"center\">" .$a['data']. "</div></td>
      <td><div align=\"center\">" .$a['titulo']. "</div></td>
      <td><div align=\"center\">" .$a['autor']. "</div></td>
      <td><div align=\"center\"><span onclick=\"alert('" .$a['corpo']. "')\">ver</span></div></td>
    </tr>");
}
?>  </table>
</div>