$x
";
exit();
}
function error($x) {
reply("$x");
}
function success($x) {
reply("\n$x");
}
db_init();
xml_header();
$auth = process_user_text($_GET["account_key"]);
$user = lookup_user_auth($auth);
if (!$user) {
error("no such user");
}
$hostid = get_int("hostid");
$host = lookup_host($hostid);
if (!$host || $host->userid != $user->id) {
error("no such host");
}
$venue = process_user_text($_GET["venue"]);
$result = mysql_query("update host set venue='$venue' where id=$hostid");
if ($result) {
success("");
} else {
error("database error");
}
?>