2005-11-14 18:38:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/xml.inc");
|
|
|
|
|
2006-09-06 20:56:55 +00:00
|
|
|
xml_header();
|
2005-11-14 18:38:09 +00:00
|
|
|
|
2006-09-06 20:56:55 +00:00
|
|
|
$retval = db_init_xml();
|
|
|
|
if ($retval) xml_error($retval);
|
2005-11-14 18:38:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
$auth = process_user_text($_GET["account_key"]);
|
|
|
|
$user = lookup_user_auth($auth);
|
|
|
|
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");
|
|
|
|
|
|
|
|
$host = lookup_host($hostid);
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
$venue = process_user_text($_GET["venue"]);
|
|
|
|
|
|
|
|
$result = mysql_query("update host set venue='$venue' where id=$hostid");
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
?>
|