//Seleziono le news in base all'ordinamento
$strSQL="SELECT * FROM infonews WHERE vhome=1 AND citta='$citta' ORDER BY chiave DESC";
$new=mysql_query($strSQL,$db)or die("ERRORE QUERY". mysql_error());
$news=mysql_fetch_array($new);
//seleziono autore o hostel che l'ha scritta
if($news[id_autore]!=0){
$strSQL="SELECT * FROM autore WHERE chiave='$news[id_autore]'";
$a=mysql_query($strSQL,$db);
$autore=mysql_fetch_array($a);
$autor_who=$autore[author];
$autor=$autore[nome].' '.$autore[cognome];
}
else{
$strSQL="SELECT * FROM structureData WHERE id=$news[id_hostel] Limit 1";
$a=mysql_query($strSQL,$db);
$autore=mysql_fetch_array($a);
$autor_who=$autore[author];
$autor=$autore[name];
}
$link=str_replace(' ', '%20', $news[categoria]);
$CATEGORIA=strtoupper($news[categoria]);
$strSQL="SELECT * FROM nazioni WHERE nazione='".$news[nazione]."'";
$cont=mysql_query($strSQL,$db);
$cont=mysql_fetch_array($cont);
if ($cont[continente]=="1") $continente="Africa";
if ($cont[continente]=="2") $continente="America";
if ($cont[continente]=="3") $continente="Asia" ;
if ($cont[continente]=="4") $continente="Europe" ;
if ($cont[continente]=="5") $continente="Oceania";
//print_r($cont);
//echo $cont.$continente;
$link1=str_replace(' ', '%20',$news[nazione]);
?>