1. sayfa
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz. Üye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
<? // Some configuration variables ! $maxWidth = 90; $maxHeight = 90; $maxCols = 5; $webDir = "http://localhost/images/"; $localDir = $_SERVER['DOCUMENT_ROOT']."/images/"; $AutorisedImageType = array ("jpg", "jpeg", "gif", "png"); ?> <center> <table border='1' cellspacing='5' cellpadding='5' style="border-collapse:collapse; border-style: dotted"> <tr> <? // Open localDir $dh = opendir($localDir); while (false !== ($filename = readdir($dh))) { $filesArray[] = $filename; } // Display and resize foreach ($filesArray as $images) { $ext = substr($images, strpos($images, ".")+1, strlen($images)); if( in_array($ext, $AutorisedImageType) ) { list($width, $height, $type, $attr) = @getimagesize( $localDir.$images ); $xRatio = $maxWidth / $width; $yRatio = $maxHeight / $height; if ( ($width <= $maxWidth) && ($height <= $maxHeight) ) { $newWidth = $width; $newHeight = $height; } else if (($xRatio * $height) < $maxHeight) { $newHeight = ceil($xRatio * $height); $newWidth = $maxWidth; } else { $newWidth = ceil($yRatio * $width); $newHeight = $maxHeight; } if($i == $maxCols) { echo "</tr><tr>"; $i = 0; } echo "<td align='center' valign='bottom' width='$maxWidth' height='$maxHeight'><img src='".$webDir.$images."' width='$newWidth' height='$newHeight'><br /><font style=\"font-family:verdana;font-size:9px;\">$images</font></td>"; $i++; } } ?> </tr> </table> </center>
quote:Orjinalden alıntı: SaLVaDoR <? // Some configuration variables ! $maxWidth = 90; $maxHeight = 90; $maxCols = 5; $webDir = "http://localhost/images/"; $localDir = $_SERVER['DOCUMENT_ROOT']."/images/"; $AutorisedImageType = array ("jpg", "jpeg", "gif", "png"); ?> <center> <table border='1' cellspacing='5' cellpadding='5' style="border-collapse:collapse; border-style: dotted"> <tr> <? // Open localDir $dh = opendir($localDir); while (false !== ($filename = readdir($dh))) { $filesArray[] = $filename; } // Display and resize foreach ($filesArray as $images) { $ext = substr($images, strpos($images, ".")+1, strlen($images)); if( in_array($ext, $AutorisedImageType) ) { list($width, $height, $type, $attr) = @getimagesize( $localDir.$images ); $xRatio = $maxWidth / $width; $yRatio = $maxHeight / $height; if ( ($width <= $maxWidth) && ($height <= $maxHeight) ) { $newWidth = $width; $newHeight = $height; } else if (($xRatio * $height) < $maxHeight) { $newHeight = ceil($xRatio * $height); $newWidth = $maxWidth; } else { $newWidth = ceil($yRatio * $width); $newHeight = $maxHeight; } if($i == $maxCols) { echo "</tr><tr>"; $i = 0; } echo "<td align='center' valign='bottom' width='$maxWidth' height='$maxHeight'><img src='".$webDir.$images."' width='$newWidth' height='$newHeight'><br /><font style=\"font-family:verdana;font-size:9px;\">$images</font></td>"; $i++; } } ?> </tr> </table> </center>
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.
< Bu mesaj bu kişi tarafından değiştirildi Guest-7A42F49E9 -- 10 Ağustos 2009; 14:46:46 >