$maxImgSize) { imageUploadError(_IMAGE_ERROR_SIZE . " (" . $sbConfig['imageSize'] . "kb)"); } } list($width, $height) = @getimagesize($imageLocation); // Check image width if ($rc){ if ( $width > $sbConfig['imageWidth']){ imageUploadError(_IMAGE_ERROR_WIDTH . " (" . $sbConfig['imageWidth'] . " pixels"); } } // Check image height if ($rc){ if ( $height > $sbConfig['imageHeight']){ imageUploadError(_IMAGE_ERROR_HEIGHT . " (" . $sbConfig['imageHeight'] . " pixels"); } } if ($rc) { // echo ''._IMAGE_UPLOADED."..."; if ($width<'100') { $code='[img]'.$sbs.'/uploaded/images/'.$newFileName.'[/img]'; }else{ $code='[img size='.$width.']'.$sbs.'/uploaded/images/'.$newFileName.'[/img]'; } if ( preg_match("/\[img\]/si", $message) ) { $message=str_replace("[img]",$code,$message); } else { $message=$message.' '.$code; } } ?>