2005-11-14 18:38:09 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-11-14 18:38:09 +00:00
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
?>
|