<% //NORMALIZZAZIONE TESTO function togli_br($testo) { $testo=str_replace("
","",$testo); $testo=str_replace("
","",$testo); return($testo); } function stampa($testo) { $testo=str_replace("´","´",$testo); $testo=str_replace("'","´",$testo); $testo=htmlentities($testo); $testo=str_replace("<","<",$testo); $testo=str_replace(">",">",$testo); $testo=str_replace("
","
",$testo); $testo=str_replace("","",$testo); $testo=str_replace("","",$testo); return($testo); } //QUESTA FUNZIONE ESTRA LE NEWS DA UNA DATA CARTELLA CHE HANNO LA DATA DI PUBBLICAZIONE VALIDA function news_home($id) { $rs=mysql_query("SELECT * FROM articoli WHERE 0001111000_dataJpubblicazione<='".date("Y-m-d")."' AND 0001111000_dataJscadenza>='".date("Y-m-d")."' AND visibile='SI' AND id_argomento=$id order by data_pubb DESC, ora_pubb DESC"); if (mysql_num_rows($rs)==0) return; while($dati=mysql_fetch_array($rs)) { $titolo=htmlentities($dati["0301111101_titolo"]); $occhiello="".htmlentities($dati["0001111101_occhiello"])."
"; $testo=$dati["0007111100_testo"]; if (strlen($testo)>200) $testo=substr($testo,0,200).".... "; else $testo=$testo." "; $testo=htmlentities($testo); $testo=togli_br($testo); echo("$titolo
$occhiello$testo

"); } } //QUESTA FUNZIONE SCRIVE A VIDEO UNA NEWS COMPLETA function news_stampa($id) { //PRENDO IL RECORD $rs2=mysql_query("SELECT * FROM articoli WHERE id=$id"); $dati2=mysql_fetch_array($rs2); //PRENDO LA CARTELLA $rs=mysql_query("SELECT * FROM argomenti WHERE id=".$dati2["id_argomento"]); $dati=mysql_fetch_array($rs); echo("argomento della notizia
"); echo("".strtoupper($dati["titolo"])."
"); echo("testo della notizia
"); $foto=$dati2["0008111000_foto"]; $dexfoto=stampa($dati2["0001111000_didascalia"]); //scrivi("". echo ("".stampa($dati2["0301111101_titolo"])."
"); echo (stampa($dati2["0001111101_occhiello"])."

"); if ($foto!="") echo("(Foto:$dexfoto)

"); if ($dati2["0001111000_luogo"]!="") echo ("".stampa($dati2["0001111000_luogo"]).". "); echo (stampa($dati2["0007111100_testo"])); echo("

infromazioni aggiuntive sul documento
"); if ($dati2["0001111000_urlJapprofondimento"]!="") echo("link di approfondimento ".$dati2["0001111000_urlJapprofondimento"]."
"); if ($dati2["0001111000_emailJapprofondimento"]!="") echo("email di approfondimento ".$dati2["0001111000_emailJapprofondimento"]."
"); if ($dati2["0006111000_allegatoJ1"]!="") echo("documento allegato da scaricare ".$dati2["0006111000_allegatoJ1"]."
"); if ($dati2["0006111000_allegatoJ2"]!="") echo("secondo documento allegato da scaricare ".$dati2["0006111000_allegatoJ2"]."
"); //SCRIVO IL NOME DI AUTORE $rs5=mysql_query("SELECT * FROM utenti WHERE id=".$dati2["id_utente"]); $dati5=mysql_fetch_array($rs5); echo("autore del documento ".stampa($dati5["nome"])." ".stampa($dati5["cognome"])."

"); } %>