2003-03-21 04:38:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("util.inc");
|
|
|
|
require_once("host.inc");
|
|
|
|
|
|
|
|
db_init();
|
|
|
|
$user = get_logged_in_user();
|
|
|
|
|
|
|
|
page_head("Merge host", $user);
|
|
|
|
|
|
|
|
$hostid = $_GET["hostid"];
|
|
|
|
$result = mysql_query("select * from host where id=$hostid");
|
|
|
|
$host = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
|
|
|
if (!$host || $host->userid != $user->id) {
|
|
|
|
echo "Host not found";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2003-03-21 21:45:34 +00:00
|
|
|
$t = time_str($host->create_time);
|
2003-03-21 04:38:55 +00:00
|
|
|
echo "
|
|
|
|
Sometimes BOINC assigns separate identities to the same host.
|
2003-03-21 21:45:34 +00:00
|
|
|
You can correct this by merging old identities with the newest one.
|
2003-03-21 04:38:55 +00:00
|
|
|
<form action=host_edit_action.php>
|
|
|
|
<input type=hidden name=hostid value=$hostid>
|
|
|
|
<p>
|
2003-03-21 21:45:34 +00:00
|
|
|
Merge $host->domain_name (created $t) with
|
2003-03-21 04:38:55 +00:00
|
|
|
<select name=targetid>
|
|
|
|
<option value=0> -
|
|
|
|
";
|
|
|
|
|
|
|
|
$result = mysql_query("select * from host where userid=$user->id");
|
|
|
|
while ($host2 = mysql_fetch_object($result)) {
|
2003-03-21 21:45:34 +00:00
|
|
|
if ($host->id == $host2->id) continue;
|
|
|
|
if ($host2->create_time < $host->create_time) continue;
|
2003-03-21 04:38:55 +00:00
|
|
|
if (!hosts_compatible($host, $host2)) continue;
|
2003-03-21 21:45:34 +00:00
|
|
|
$t = time_str($host2->create_time);
|
|
|
|
echo "<option value=$host2->id> $host2->domain_name (created $t)\n";
|
2003-03-21 04:38:55 +00:00
|
|
|
}
|
|
|
|
echo "
|
|
|
|
</select>
|
|
|
|
<input type=submit value='Merge host'>
|
|
|
|
</form>
|
|
|
|
";
|
|
|
|
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|