affitti.php (che adesso utilizzo per gestire delle news ho cambiato solo le descrizioni dei campi)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>News - Sezione di aggiornamento</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>


<body bgcolor="#999999" text="#FFFFFF">
<p><img src="../images/object1264150268.png" align="absmiddle"> <font size="+3"><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Amministrazione
del Sito </strong></font>


<table width="100%" border="0">
</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
<tr>
<td width="20%" valign="top">
<p><a href="affittipr.php">Corsi</a></p>
<p><a href="affitti.php">News</a></p>
<p><br>
</p></td>
<td width="80%" valign="top"><font size="+1"><em><strong>Elenco
delle news</strong></em></font><br>
<br>


<?php


global $id_aff;
global $affitti;
global $img;
global $img_small;
global $descrizione;
global $zona;
global $cod_aff;
global $rif;


//Connessione
include 'conn.php';
//Leggo i dati dal DB
$dati=mysql_query("select id_aff, affitti, descrizione, zona, img_small from AFFITTI order by affitti");
//Controllo che siano caricati i dati
if (mysql_num_rows($dati)>0) {
while ($rs=mysql_fetch_array($dati, MYSQL_BOTH)) {
echo "<img src='../admin/images/".$rs["img_small"]."' border='0' align='absmiddle'> -
".$rs["affitti"]."<br><a href=classi.php?id_aff=".$rs["id_aff"].">
</a> <br>
<a href='aff_modifica.php?id_aff=".$rs["id_aff"]."'>Modifica questa news</A><br><br>
<a href='aff_elimina.php?id_aff=".$rs["id_aff"]."'>Elimina questa news</a><br><br>"
;
}
}
echo "<br><br><a href='aff_modifica.php?id_aff=0'>Inserisci una news</A><br>"
?>


</body>
</html>