session_start();
include 'connessione.php';
$SQL = "SELECT * FROM contenuti WHERE id='1'";
$ris=mysql_query($SQL) or die("Query non esatta"); // mysql_query: Crea la tabella di selezione
$n = mysql_num_rows($ris);
if ($n<1) {
header("Location: home.php");
exit(0);
}
$rs=mysql_fetch_array($ris,MYSQL_ASSOC);
include 'testa.php';
?>
/* Function controllo foto */
function controllo_foto($iddi,$dir) {
$root="public/".$dir."/".$iddi;
$fotog=$root.".gif";
$fotob=$root.".png";
$fotoj=$root.".jpg";
$path1="";
if (file_exists($fotoj))
$path1=$fotoj;
else if (file_exists($fotog))
$path1=$fotog;
else if (file_exists($fotob))
$path1=$fotob;
else
$path1="";
return $path1;
}
/* FINE Function */
$root=controllo_foto("1","chi_siamo");
if(file_exists($root)) {
list($width, $height, $type, $attr) = getimagesize($root);
$stile="";
if($width > 300)
$stile="id=\"chi_siamo\"";
?>
}?>
|
include 'coda.php'; ?>