real_escape_string($_REQUEST["id"]); if ($result = $mysqli->query($sql)) { $obj = $result->fetch_object(); $nome = stripslashes($obj->nome); $descrizione = stripslashes($obj->descrizione); $imgname = "images/porti/thumb/keywest.jpg"; $imgwidth = "978"; $imgheight = "200"; if (file_exists("./imgdestinazioni/" . $obj->immagine)) { $maxwidth = 978; $maxheight = 200; $scale = 1; list($width,$height) = getimagesize("./imgdestinazioni/" . $obj->immagine); if ($height > $maxheight && $width > $maxwidth) { $scaleH = $maxheight / $height; $scaleW = $maxwidth / $width; $scale = max($scaleH, $scaleW); } else if ($height > $maxheight) { $scale = $maxheight / $height; } else if ($width > $maxwidth) { $scale = $maxwidth / $width; } $imgname = "imgdestinazioni/" . $obj->immagine; $imgwidth = $width * $scale; $imgheight = $height * $scale; // echo "$imgwidth -- $imgheight --- $scale
"; } } ?>
Dettaglio Destinazioni