// Aceman Thumbnail of attachment on forumdisplay page if ($forumid==102) { $checkquery=$DB_site->query_first("SELECT postid FROM post WHERE threadid=".intval($thread['threadid'])." AND username='".addslashes($thread['postusername'])."' ORDER BY dateline ASC"); $avurl="http://www.scifi-meshes.com/forums/attachment.php?postid=" . $checkquery['postid']; $sizes = getimagesize($avurl); if ($sizes) { $newwidth=$sizes[0]; $newheight=$sizes[1]; if ($sizes[0] > 100) { $newwidth=100; $diff=$sizes[0]-100; $rat=100/$sizes[0]; $newheight=$sizes[1]*$rat; } $imagethumb="<img src=\"./attachment.php?postid=" . $checkquery['postid'] . "\" width=" . $newwidth . " height=" . $newheight . "><br>"; } } // END Aceman Hack