. require_once("../inc/boinc_db.inc"); require_once("../inc/util.inc"); require_once("../inc/host.inc"); check_get_args(array("hostid", "detail")); $user = get_logged_in_user(); $hostid = get_int("hostid"); $host = BoincHost::lookup_id($hostid); if (!$host || $host->userid != $user->id) { error_page("We have no record of that computer"); } $detail = get_int('detail', true); page_head(tra("Merge computers")); $t = time_str($host->create_time); echo tra("Sometimes BOINC assigns separate identities to the same computer by mistake. You can correct this by merging old identities with the newest one.")."

"; $all_hosts = BoincHost::enum("userid=$user->id"); $nhosts = 1; $hosts = array(); foreach ($all_hosts as $host2) { if ($host->id == $host2->id) continue; if (!hosts_compatible($host, $host2, $detail)) continue; $hosts[] = $host2; $nhosts++; if ($nhosts==500) break; } if ($nhosts == 1) { echo "
".tra("No hosts are eligible for merging with this one."); if (!$detail) { echo "

".tra("Show details")." "; } page_tail(); exit(); } echo "

" .tra("Check the computers that are the same as %1 (created %2, computer ID %3):", $host->domain_name, $t, $host->id)."

"; start_table(); row_heading_array(array("", tra("name"), tra("created"), tra("computer ID"))); $i = 1; foreach ($hosts as $host2) { $t = time_str($host2->create_time); $x = $host2->domain_name; if ($x == "") { $x = "[".tra("no hostname")."]"; } row_array(array( "id>", $x, "$t", "$host2->id" )); $i++; } end_table(); echo "

Select all

Unselect all

"; if (!$detail) { echo "

".tra("Show details")." "; } page_tail(); ?>