function foto1_presente($record,$tabella)
{
require ("mysql.php");
$ind= mysql_query (" SELECT * FROM $tabella WHERE id=$record",$db);
$a=mysql_result($ind,0,'foto1_thumb');
if ($a == "") return false;
else return true;
}
function visualizza_testi_annuncio($record,$tabella)
{
require ("mysql.php");
$annuncio = mysql_query("SELECT * FROM $tabella WHERE id=".$record,$db);
$pr=mysql_result($annuncio,0,'prezzo');
echo "<table width='80%' height='330' border='0' align='center' class='tabella_testi' ><tr><td height='10'></td></tr>";
echo "<tr><td width='15'></td><td width='13%' height=\'30\'><b>Titolo: </b></td><td><b>".mysql_result($annuncio,0,'titolo')."</b></td></tr>";
echo "<tr><td width='15'></td><td width='13%' height=\'30\'><b>Categoria: </b></td><td>".mysql_result($annuncio,0,'categoria')."</td></tr>";
echo "<tr><td width='15'></td><td width='13%' height=\'30\'><b>Località: </b></td><td>".mysql_result($annuncio,0,'localita')."</td></tr>";
echo "<tr><td width='15'></td><td height=\'30\'><b>Prezzo: </b></td><td>$pr ";
if ($pr!='Trattative riservate') echo "€";
echo "</td></tr>";
echo "<tr ><td height=\'150\'width='10'></td><td valign=\'top\'><b>Descrizione: </b></td><td class='testo_descrizione' valign=\'top\'>".mysql_result($annuncio,0,'descrizione')."</td><td width='15'></td></tr>";
if (mysql_result($annuncio,0,'anno_fabbricazione')!='0')
{
echo "<tr><td width='10'></td><td height=\'30\'><b>Anno : </b>"."</td><td>";
echo mysql_result($annuncio,0,'anno_fabbricazione')."</td></tr>";
}
echo "<tr><td width='13'></td><td height=\'30\'><b>Privato/Azienda: </b>"."</td><td>".mysql_result($annuncio,0,'privato_azienda')."</td></tr>";
echo "<tr><td width='13'></td><td height=\'30\'><b>Vendita/Affitto: </b>"."</td><td>".mysql_result($annuncio,0,'vendita_affitto')."</td></tr>";
echo "<tr><td height='40'></td></tr></table>";
}