if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
//[START] Wooya - autoresizator duzych grafik na forum
$img = FORUM."attachments/".$data['attach_name'];
if ($size=@getimagesize($img)) {
if ($size[0]>400) {
$y_prop = ceil($size[1]/($size[0]/400));
$res = "
".$size[0]."x".$size[1]." [".strtoupper(str_replace('.', '', $data['attach_ext']))."]
";
} else if ($size[1]>300) {
$x_prop = ceil($size[0]/($size[1]/300));
$res = "".$size[0]."x".$size[1]." [".strtoupper(str_replace('.', '', $data['attach_ext']))."]
";
} else {
$res = "
";
}
} else {
$res = "[img]".$img."[/img]";
}
echo "
\n".$data['user_name'].$locale['506']."
\n".$res;
//[END] Wooya - autoresizator duzych grafik na forum
} else {
echo "
\n".$data['user_name'].$locale['507']."
\n".$data['attach_name']."";
}
}