Пример #1
0
        $tried = true;
    }
    if (!$tried) {
        $list = get_teams("id>0", $params->active);
    }
    return $list;
}
$user = get_logged_in_user(false);
$submit = get_str("submit", true);
$xml = get_str("xml", true);
if ($submit || $xml) {
    $params = new StdClass();
    $params->keywords = get_str('keywords', true);
    $params->country = get_str("country", true);
    $params->type = get_int("type", true);
    $params->active = get_str('active', true);
    $list = search($params);
    if ($xml) {
        show_teams_xml($list);
    } else {
        show_teams_html($list, $params);
    }
} else {
    page_head(tra("Find a team"), 'document.form.keywords.focus()');
    echo tra("You can team up with other people with similar interests, or from the same country, company, or school.") . "<p>" . tra("Use this form to find teams that might be right for you.") . "</p>\n";
    team_search_form(null);
    if (isset($_COOKIE['init'])) {
        echo "<p>\n            " . tra("%1I'm not interested%2 in joining a team right now.", "<a href=home.php>", "</a>");
    }
    page_tail();
}
Пример #2
0
        $tried = true;
    }
    if (!$tried) {
        $list = get_teams("id>0", $params->active);
    }
    return $list;
}
$user = get_logged_in_user(false);
$submit = get_str("submit", true);
$xml = get_str("xml", true);
if ($submit || $xml) {
    $params = null;
    $params->keywords = get_str('keywords', true);
    $params->country = get_str("country", true);
    $params->type = get_str("type", true);
    $params->active = get_str('active', true);
    $list = search($params);
    if ($xml) {
        show_teams_xml($list);
    } else {
        show_teams_html($list);
    }
} else {
    page_head(tra("Find a team"), 'document.form.keywords.focus()');
    echo tra("You can team up with other people with similar interests, or from the same country, company, or school.") . "<p>" . tra("Use this form to find teams that might be right for you.") . "</p>\n";
    team_search_form($params);
    if (isset($_COOKIE['init'])) {
        echo "<p>\n            " . tra("%1I'm not interested%2 in joining a team right now.", "<a href=home.php>", "</a>");
    }
    page_tail();
}