my $filename = $user_profile[20];
my @components = split(/./, $filename);
my $real_extension = $components[-1];
if (($filename =~ m/.jpg$/i) || ($filename =~ m/.gif$/i)){
chomp($user_profile[20]);
$user_profile[20] = "" if (($user_profile[20] eq 'http://') || ($user_profile[20] =~ /cp.cgi/ || /ultimatebb.cgi/ || /</));
my $this_img = ($user_profile[20] eq "") ? '' : qq!
<img src="$user_profile[20]" alt="" />
!;
}
if ($filename =~ m/.swf$/i) {
chomp($user_profile[20]);
$user_profile[20] = "" if (($user_profile[20] eq 'http://') || ($user_profile[20] =~ /cp.cgi/ || /ultimatebb.cgi/ || /</));
my $this_img = ($user_profile[20] eq "") ? '' : qq!
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="120" height="120">
<param name=movie value="$user_profile[20]">
<param name=quality value=high>
<embed src="$user_profile[20]" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="120" height="120">
</embed>
</object>
!;
}