To all our National Support Sites, Developers, Co-workers, Users, Supporters and to all our friends, fellow Fusioneers and your families we wish you all a Merry Christmas and a Happy New Year !
// Validate numeric input
function isnum($value) {
return (preg_match("/^[0-9]+$/", $value));
}
// Validate bbcode images
function isImage($matches) {
$im = $matches[1].str_replace(array("?","&","="),"",$matches[3]).$matches[4];
if (list($width, $height, $type, $attr) = @getimagesize($im)) {
$ret = "";
} else {
$ret = "[img]Image Blocked[/img]";
}
return $ret;
}
$ubbs1[10] = '#\[img\](.*?)\[/img\]#si';
$ubbs2[10] = '';
$ubbs1[10] = "#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#sie";
$ubbs2[10] = "''";
for ($i=0;$i < $ubbitems;$i++) $message = preg_replace($ubbs1, $ubbs2, $message);
$message = preg_replace_callback("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#si","isImage",$message);