".$legend."";
} else {
$list_type = "div";
$legend = "
".$legend."
";
}
$limit = $vars['limit'];
if (!$limit) $limit = 5;
// get the current page's owner
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
$page_owner = $_SESSION['user'];
set_page_owner($_SESSION['guid']);
}
$whos_portfolio = $_SESSION['guid'];
if (get_input('username')) {
$user = get_user_by_username(get_input("username"));
if ($user) {
$whos_portfolio = $user->guid;
}
}
$files = get_entities('object', 'file', $whos_portfolio, '', 10);
if (is_array($files) && sizeof($files) > 0) {
$files_div = "<".$list_type.">";
$files_div .= $legend;
$files_div .= "";
$files_div .= "".$list_type.">";
}
echo $files_div;
?>