$max_char){ $stringa_tagliata=substr($stringa, 0,$max_char); $last_space=strrpos($stringa_tagliata," "); $stringa_ok=substr($stringa_tagliata, 0,$last_space); return $stringa_ok."...";} else{return $stringa;} } $operazione=$_GET['operazione']; $codice_scheda=$_GET['codice_scheda']; echo " REGGINA NEWS
"; require("menu.php"); echo "
"; require("left.php"); echo "
"; require("banner_centrale.php"); echo "
"; if ($operazione=='leggi_scheda'){ $sql_scheda = "select * from reggina_storia where codice='$codice_scheda'"; $result_scheda = mysql_query($sql_scheda) or die ("Couldn't execute SQL SCHEDA"); while ($row = mysql_fetch_array($result_scheda)) { $id = $row["id"]; $titolo = $row["titolo"]; $testo = $row["testo"]; echo "
$titolo
"; $sql_imgnews = "select * from reggina_usdimage where codice='$codice_scheda' order by posizione asc limit 1"; $result_imgnews = mysql_query($sql_imgnews) or die ("Couldn't execute SQL IMMAGINE"); while ($row = mysql_fetch_array($result_imgnews)) { $id = $row["id"]; $immagine = $row["immagine"]; $didascalia = $row["didascalia"]; echo "\"$didascalia\""; } echo " $testo
"; $sql_imgnews = "select * from reggina_usdimage where codice='$codice_scheda' and id<>'$id' order by posizione asc"; $result_imgnews = mysql_query($sql_imgnews) or die ("Couldn't execute SQL IMMAGINE"); if (mysql_num_rows($result_imgnews) <> 0) { echo "
Galleria fotografica
"; while ($row = mysql_fetch_array($result_imgnews)) { $id = $row["id"]; $immagine = $row["immagine"]; $didascalia = $row["didascalia"]; echo "
"; } } } } else { include('config/paginazione.inf.php'); $query = "select * from reggina_storia where visibile='si' order by posizione asc"; $res = paging($query,10,5); if (!$res[0]) { echo "
Non vi sono paragrafi
"; } else { echo "
" .$res[1]; echo "
"; while($dati = mysql_fetch_array($res[0])) { $id = $dati["id"]; $titolo = $dati["titolo"]; $testo = $dati["testo"]; $codice = $dati["codice"]; $testo = str_replace($format,$no_format,$testo); $testo = TagliaStringa($testo, 370); echo "
$titolo
"; $sql_imgnews = "select * from reggina_usdimage where codice='$codice' order by posizione asc limit 1"; $result_imgnews = mysql_query($sql_imgnews) or die ("Couldn't execute SQL IMMAGINE"); while ($row = mysql_fetch_array($result_imgnews)) { $id = $row["id"]; $immagine = $row["immagine"]; $didascalia = $row["didascalia"]; echo "\"$didascalia\""; } echo "$testo
[leggi ancora]
"; } } } echo "
"; require("right.php"); echo "
"; require("sponsor.php"); echo "
"; require("banner_grande.php"); echo "
"; require("footer.php"); echo "
"; ?>