แบบ : รายการ |'; ?> สูง 100px | '; ?> กว้าง 200px |'; ?> พื้นเหลือง |'; ?> พื้นเทา |'; ?> เฟรม '; ?>
ลำดับชื่อแฟ้มภาพขนาดแฟ้ม (bytes)วันที่"; else echo ""; } else { if ($tot > 500) exit; $first = (($start * $tot) - ($tot - 1)); $last = ($start * $tot); if ($i >= $first && $i <= $last) { echo "$i\n"; } } } } } if ($type == "filename") echo "
"; $i = 0; $d = opendir($myfolder); while ($list = readdir($d)) { $elist = base64_encode($list); if ((strtolower(substr($list,-4)) == ".jpg" || strtolower(substr($list,-4)) == ".gif" || strtolower(substr($list,-4)) == ".png")) { if ($list != "ta1.gif" && $list != "ta2.gif" && $list != "ta3.gif" && $list != "thaiabc_tag.gif") { $i = $i + 1; if ($type == "filename") { if ($i % 2 ==0) $bg = $filename_bg1; else $bg = $filename_bg2; echo "
$i$list ". number_format(filesize($myfolder . $list)) ."". date("F d Y H:i:s", filemtime($myfolder . $list)) . "
"; else echo ""; $tpage = round(($i / $tot) + 0.499); ?>
'; } echo "
จำนวน ภาพ หน้าที่ : _". $j. "_"; } echo '
"; if ($type=="t6") echo ""; ?>
( Validator : xhtml) # # # #
$max_size && $_SERVER["SERVER_NAME"] == 'www.thaiall.com' && (!isset($_GET["pass"]) || $_GET["pass"] != "ไทย")) { echo "

คำว่า thai สะกดเป็นภาษาไทยว่าอย่างไร
กรอกในช่องว่าเพื่อตรวจสอบก่อนดูภาพขนาดใหญ่
"; exit; } list($width, $height, $image_type) = getimagesize($myfolder . $f); switch ($image_type) { case 1: $dest = imagecreatefromgif($myfolder . $f); break; case 2: $dest = imagecreatefromjpeg($myfolder . $f); break; case 3: $dest = imagecreatefrompng($myfolder . $f); break; default: return ''; break; } $src = imagecreatefromgif('thaiabc_tag.gif'); $bg_color = imagecolorat($src, 1,1); imagecolortransparent($src, $bg_color); imagecopymerge($dest, $src, 1, 1, 1, 1, 300, 50, 70); // (dest, src, dest_x, dest_y , src_x, src_y, src_w, src_h, 0to100) switch ($image_type) { case 1: header('Content-Type: image/gif'); imagegif($dest); break; case 2: header('Content-Type: image/jpeg'); imagejpeg($dest); break; case 3: header('Content-Type: image/png'); imagepng($dest); break; } imagedestroy($dest); imagedestroy($src); } else { header('Content-Type: image/jpeg'); imagejpeg(thumb($f,$myfolder)); } exit; } // http://th2.php.net/manual/en/function.imagecreatefromjpeg.php function thumb($f,$myfolder) { global $h,$w; $mh = split(":",$h); $mw = split(":",$w); $max_width = $mh[1]; $max_height = $mw[1]; $source_pic = $f; list($width, $height, $image_type) = getimagesize($myfolder . $f); switch ($image_type) { case 1: $src = imagecreatefromgif($myfolder. $f); break; case 2: $src = imagecreatefromjpeg($myfolder. $f); break; case 3: $src = imagecreatefrompng($myfolder. $f); break; default: return ''; break; } $x_ratio = $max_width / $width; $y_ratio = $max_height / $height; if( ($width <= $max_width) && ($height <= $max_height) ){ $tn_width = $width; $tn_height = $height; }elseif (($x_ratio * $height) < $max_height){ $tn_height = ceil($x_ratio * $height); $tn_width = $max_width; }else{ $tn_width = ceil($y_ratio * $width); $tn_height = $max_height; } $tmp = imagecreatetruecolor($tn_width,$tn_height); if(($image_type == 1) || ($image_type==3)) { imagealphablending($tmp, false); imagesavealpha($tmp,true); $transparent = imagecolorallocatealpha($tmp, 255, 255, 255, 127); imagefilledrectangle($tmp, 0, 0, $tn_width, $tn_height, $transparent); } imagecopyresampled($tmp,$src,0,0,0,0,$tn_width, $tn_height,$width,$height); $final_image =$tmp; return $final_image; } ?>