team lookup XML

svn path=/trunk/boinc/; revision=9242
This commit is contained in:
David Anderson 2006-01-16 06:04:16 +00:00
parent 782d76dd30
commit 92409fdb82
2 changed files with 21 additions and 0 deletions

View File

@ -476,3 +476,11 @@ David 15 Jan 2006
eah_server_status.php (removed) eah_server_status.php (removed)
sample_server_status.php (removed) sample_server_status.php (removed)
server_status.php (removed) server_status.php (removed)
David 15 Jan 2006
- user web: add optional team_id argument to team_lookup.php
(returns XML description of a particular team)
html/
user/
team_lookup.php

View File

@ -11,7 +11,20 @@ $team_name = $_GET["team_name"];
$name_lc = strtolower($team_name); $name_lc = strtolower($team_name);
$name_lc = escape_pattern($name_lc); $name_lc = escape_pattern($name_lc);
$format = get_str("format", true); $format = get_str("format", true);
$team_id = get_int("team_id", true);
if ($team_id) {
$team = lookup_team($team_id);
require_once ('../inc/xml.inc');
xml_header();
if ($team) {
show_team_xml($team);
} else {
echo "<error>\nno such team\n</error>\n";
}
exit();
}
$query = "select * from team where name like '%$name_lc%'"; $query = "select * from team where name like '%$name_lc%'";
$result_list = mysql_query($query); $result_list = mysql_query($query);