//WOOYA - Validate bbcode images function isImage($matches) { $res = ""; if (!isNum($matches[1])) { $img = $matches[1].str_replace(array(".php","?","&","="),"",$matches[3]).$matches[4]; $size = @getimagesize($img); if ($size[0]) { if (verify_image($img)) { if ($size[0]>400) { $y_prop = ceil($size[1]/($size[0]/400)); $res = "
".$img."
".$size[0]."x".$size[1]." [".str_replace(".", "", strtoupper($matches[4]))."]
"; } else if ($size[1]>300) { $x_prop = ceil($size[0]/($size[1]/300)); $res = "
".$img."
".$size[0]."x".$size[1]." [".str_replace(".", "", strtoupper($matches[4]))."]
"; } else { $res = "".$img.""; } } else { $res = "WARNING! Propably exploit image found! [$img]"; //'http://'.$_SERVER['SERVER_NAME'].FUSION_REQUEST.FUSION_QUERY; } } else { $res = "[img]".$matches[1].$matches[3].$matches[4]."[/img]"; } } else { $img = $matches[3].str_replace(array(".php","?","&","="),"",$matches[5]).$matches[6]; $size = @getimagesize($img); if ($size[0]) { if (verify_image($img)) { if ($size[0]>$matches[1]) { if ($size[0]>400) { $y_prop = ceil($size[1]/($size[0]/400)); $res = "
".$img."
".$size[0]."x".$size[1]." [".str_replace(".", "", strtoupper($matches[6]))."]
"; } else if ($size[1]>300) { $x_prop = ceil($size[0]/($size[1]/300)); $res = "
".$img."
".$size[0]."x".$size[1]." [".str_replace(".", "", strtoupper($matches[6]))."]
"; } else { $res = "
".$img."
".$size[0]."x".$size[1]." [".str_replace(".", "", strtoupper($matches[6]))."]
"; } } else { $res = "".$img.""; } } else { $res = "WARNING! Propably exploit image found! [$img]"; } } else { $res = "[img]".$matches[1].$matches[3].$matches[4]."[/img]"; } } unset($size); return $res; } //WOOYA - Validate bbcode images