function DoTeam($team, $in_list = TRUE) { if ($in_list) { echo '<li>'; } if (isset($team['notices'])) { echo '<a href="">'; } echo xml_escape($team['name']); if (isset($team['notices'])) { echo ' (' . count($team['notices']) . ' notices)'; echo '</a>'; } if (!empty($team['subteams'])) { echo '<ul>'; foreach ($team['subteams'] as $subteam) { DoTeam($subteam); } echo '</ul>'; } if ($in_list) { echo '</li>'; } return count($team['subteams']); }
function DoTeam($team, $in_list = TRUE) { if ($in_list) { echo '<li>' . "\n"; } echo '<input type="checkbox" name="filter_team_' . $team['id'] . '" value="' . $team['id'] . '" />' . "\n"; echo '<a href="' . vip_url('members/teams/' . $team['id']) . '">' . xml_escape($team['name']) . '</a>' . "\n"; if (!empty($team['subteams'])) { echo '<ul>' . "\n"; foreach ($team['subteams'] as $subteam) { DoTeam($subteam); } echo '</ul>' . "\n"; } if ($in_list) { echo '</li>' . "\n"; } echo '<br /><br />' . "\n"; return count($team['subteams']); }