2005-11-14 18:38:09 +00:00
|
|
|
<?php
|
|
|
|
|
2007-10-30 18:16:29 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2005-11-14 18:38:09 +00:00
|
|
|
require_once("../inc/xml.inc");
|
|
|
|
|
2006-09-06 20:56:55 +00:00
|
|
|
xml_header();
|
2005-11-14 18:38:09 +00:00
|
|
|
|
2007-10-30 18:16:29 +00:00
|
|
|
$db = BoincDb::get();
|
|
|
|
if (!$db) xml_error($retval);
|
2005-11-14 18:38:09 +00:00
|
|
|
|
2008-06-11 19:36:10 +00:00
|
|
|
$auth = process_user_text(get_str("account_key"));
|
2007-10-30 18:16:29 +00:00
|
|
|
$user = BoincUser::lookup("authenticator='$auth'");
|
2005-11-14 18:38:09 +00:00
|
|
|
if (!$user) {
|
2006-09-06 20:56:55 +00:00
|
|
|
xml_error(-136);
|
2005-11-14 18:38:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$hostid = get_int("hostid");
|
|
|
|
|
2007-10-30 18:16:29 +00:00
|
|
|
$host = BoincHost::lookup_id($hostid);
|
2005-11-14 18:38:09 +00:00
|
|
|
if (!$host || $host->userid != $user->id) {
|
2006-09-06 20:56:55 +00:00
|
|
|
xml_error(-136);
|
2005-11-14 18:38:09 +00:00
|
|
|
}
|
|
|
|
|
2008-06-11 19:36:10 +00:00
|
|
|
$venue = process_user_text(get_str("venue"));
|
2005-11-14 18:38:09 +00:00
|
|
|
|
2007-10-30 18:16:29 +00:00
|
|
|
$result = $host->update("venue='$venue'");
|
2005-11-14 18:38:09 +00:00
|
|
|
if ($result) {
|
2006-09-06 20:56:55 +00:00
|
|
|
echo "<am_set_host_info_reply>
|
|
|
|
<success/>
|
|
|
|
</am_set_host_info_reply>
|
|
|
|
";
|
2005-11-14 18:38:09 +00:00
|
|
|
} else {
|
2006-09-06 20:56:55 +00:00
|
|
|
xml_error(-1, "database error");
|
2005-11-14 18:38:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|