popup para thumbnail

function usr_popup ($columns, $col, $param)
{
#{alias:img_upload......:f_u:usr_popup:h:100:h:500:_#TIT_PUBL:.thumb:_#RESU_PUB}

$parameters = split(":",$param);

list($func,$thumb_type_atr1, $thumb_val1, $popup_type_atr2, $popup_val2,$alt,$class,$leyenda) = $parameters;

$filepath = $columns[$col][0][value];

$string2array = explode("/",$filepath);

$serverpath=IMG_UPLOAD_PATH.$string2array [count($string2array)-2]."/".$string2array [count($string2array)-1];

$urlpath =$string2array [count($string2array)-3]."/".$string2array [count($string2array)-2]."/".$string2array [count($string2array)-1];

$phpthumb = "http://".$_SERVER['SERVER_NAME']."/".AA_BASE_DIR."img.php?src=/".$urlpath."&".$popup_type_atr2."=".$popup_val2;
$a = getimagesize($phpthumb);
$ancho=$a[0];
$alto=$a[1];

if (is_file($serverpath)) {
$popup=".$alt.";
}
else {
$popup="";
}

return $popup;

}