boinc/html/user/host_venue_action.php

41 lines
841 B
PHP
Raw Normal View History

<?php
require_once("../inc/db.inc");
require_once("../inc/util.inc");
db_init();
$user = get_logged_in_user();
$venue = get_venue("venue");
$hostid = get_int("hostid");
$host = lookup_host($hostid);
if (!$host) {
error_page("No such host");
}
if ($host->userid != $user->id) {
error_page("Not your host");
}
$retval = mysql_query("update host set venue='$venue' where id = $hostid");
if ($retval) {
page_head("Host venue updated");
if ($venue == '') {
$venue = '(none)';
}
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();
}
?>