$yratio) { $rx = $pimgx; $ry = $img[1]/$xratio; } else if ($xratio < $yratio) { $rx = $img[0]/$yratio; $ry = $pimgy; } else { $rx = $pimgx; $ry = $pimgy; } return "width='".floor($rx)."' height='".floor($ry)."' border=0"; } else { // if (strstr($image, "image.projectjj.dk") || strstr($image, "images.projectjj.dk")) // $img = GetURLImageSize("/hotel/projectjj/WWW/subdomain/image/gfx/".eregi_replace(".*/([^/]+)$", "\\1", $image)); // else // $img = GetURLImageSize($image); $img = @getimagesize($image); if (!is_array($img)) { $img = array(); $img[0] = $pimgx; $img[1] = $pimgy; } if (($img[0] >= 1) && ($img[1] >= 1)) { $xratio = $img[0]/$pimgx; $yratio = $img[1]/$pimgy; if (($img[0] <= $pimgx) && ($img[1] <= $pimgy)) { $rx = $img[0]; $ry = $img[1]; } else if ($xratio > $yratio) { $rx = $pimgx; $ry = $img[1]/$xratio; } else if ($xratio < $yratio) { $rx = $img[0]/$yratio; $ry = $pimgy; } else { $rx = $pimgx; $ry = $pimgy; } $result = count_mysql_query("INSERT INTO uo_chat_images (width,height,sum) VALUES($img[0],$img[1],$crcimage)", $handler, "image.php: ChatImageSize() 2/2"); return "width='".floor($rx)."' height='".floor($ry)."' border=0"; } } return "width='$pimgx' height='$pimgy' border=0"; } ?>