".$legend.""; } else { $list_type = "div"; $legend = "

".$legend."

"; } $limit = $vars['limit']; if (!$limit) $limit = 9999; // 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_tasks = $_SESSION['guid']; if (get_input('username')) { $user = get_user_by_username(get_input("username")); if ($user) { $whos_tasks = $user->guid; } } $tasks = get_entities('object', 'task', $whos_tasks, '', $limit); if (is_array($tasks) && sizeof($tasks) > 0) { $tasks_div = "<".$list_type.">"; $tasks_div .= $legend; $tasks_div .= ""; $tasks_div .= ""; } echo $tasks_div; ?>