Added hide-ip-address functionality

svn path=/trunk/boinc/; revision=2774
This commit is contained in:
Matt Lebofsky 2003-12-10 19:46:08 +00:00
parent 76ce035063
commit aa22672c38
2 changed files with 9 additions and 3 deletions

View File

@ -17,11 +17,16 @@ function location_form($host) {
return $x; return $x;
} }
function show_host($host, $private) { function show_host($host, $private, $ipprivate) {
start_table(); start_table();
row1("Computer information"); row1("Computer information");
if ($private) { if ($private) {
row2("IP address", "$host->last_ip_addr<br>(same the last $host->nsame_ip_addr times)"); if ($ipprivate) {
row2("IP address", "$host->last_ip_addr<br>(same the last $host->nsame_ip_addr times)");
}
else {
row2("IP address", "<a href=show_host_detail.php?hostid=$host->id&private=1&ipprivate=1>Show IP address</a>");
}
row2("Domain name", $host->domain_name); row2("Domain name", $host->domain_name);
$x = $host->timezone/3600; $x = $host->timezone/3600;
row2("Time zone", "UTC - $x hours"); row2("Time zone", "UTC - $x hours");

View File

@ -7,6 +7,7 @@
db_init(); db_init();
$hostid = $_GET["hostid"]; $hostid = $_GET["hostid"];
$private = $_GET["private"]; $private = $_GET["private"];
$ipprivate = $_GET["ipprivate"];
$result = mysql_query("select * from host where id = $hostid"); $result = mysql_query("select * from host where id = $hostid");
$host = mysql_fetch_object($result); $host = mysql_fetch_object($result);
mysql_free_result($result); mysql_free_result($result);
@ -22,6 +23,6 @@
} }
page_head("Computer summary", $user); page_head("Computer summary", $user);
show_host($host, $private); show_host($host, $private, $ipprivate);
page_tail(); page_tail();
?> ?>