2003-03-06 00:42:18 +00:00
|
|
|
<?php
|
|
|
|
|
2007-10-28 15:03:14 +00:00
|
|
|
require_once("../inc/boinc_db.inc");
|
2007-03-06 18:22:04 +00:00
|
|
|
require_once("../inc/util.inc");
|
2003-03-06 00:42:18 +00:00
|
|
|
|
2007-03-06 18:22:04 +00:00
|
|
|
$user = get_logged_in_user();
|
2003-03-06 00:42:18 +00:00
|
|
|
|
2007-03-06 18:22:04 +00:00
|
|
|
$venue = get_venue("venue");
|
|
|
|
$hostid = get_int("hostid");
|
2003-03-06 00:42:18 +00:00
|
|
|
|
2007-10-28 15:03:14 +00:00
|
|
|
$host = BoincHost::lookup_id($hostid);
|
2007-03-06 18:22:04 +00:00
|
|
|
if (!$host) {
|
|
|
|
error_page("No such host");
|
|
|
|
}
|
|
|
|
if ($host->userid != $user->id) {
|
|
|
|
error_page("Not your host");
|
|
|
|
}
|
|
|
|
|
2007-11-06 21:18:27 +00:00
|
|
|
$retval = $host->update("venue='$venue'");
|
2007-03-06 18:22:04 +00:00
|
|
|
if ($retval) {
|
|
|
|
page_head("Host venue updated");
|
|
|
|
if ($venue == '') {
|
|
|
|
$venue = '(none)';
|
2003-03-06 00:42:18 +00:00
|
|
|
}
|
2007-03-06 18:22:04 +00:00
|
|
|
echo "
|
|
|
|
The venue of this host has been set to <b>$venue</b>.
|
|
|
|
<p>
|
|
|
|
This change will take effect the next time the
|
|
|
|
host communicates with this project.
|
|
|
|
<p>
|
|
|
|
<a href=show_host_detail.php?hostid=$hostid>Return to host page</a>.
|
|
|
|
";
|
|
|
|
page_tail();
|
|
|
|
} else {
|
|
|
|
db_error_page();
|
|
|
|
}
|
|
|
|
|
2003-03-06 00:42:18 +00:00
|
|
|
?>
|