From aa22672c389b1b66c0113d8c94db70e099b023fe Mon Sep 17 00:00:00 2001 From: Matt Lebofsky Date: Wed, 10 Dec 2003 19:46:08 +0000 Subject: [PATCH] Added hide-ip-address functionality svn path=/trunk/boinc/; revision=2774 --- html/user/host.inc | 9 +++++++-- html/user/show_host_detail.php | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/html/user/host.inc b/html/user/host.inc index d7b7cb714c..0401099c08 100644 --- a/html/user/host.inc +++ b/html/user/host.inc @@ -17,11 +17,16 @@ function location_form($host) { return $x; } -function show_host($host, $private) { +function show_host($host, $private, $ipprivate) { start_table(); row1("Computer information"); if ($private) { - row2("IP address", "$host->last_ip_addr
(same the last $host->nsame_ip_addr times)"); + if ($ipprivate) { + row2("IP address", "$host->last_ip_addr
(same the last $host->nsame_ip_addr times)"); + } + else { + row2("IP address", "id&private=1&ipprivate=1>Show IP address"); + } row2("Domain name", $host->domain_name); $x = $host->timezone/3600; row2("Time zone", "UTC - $x hours"); diff --git a/html/user/show_host_detail.php b/html/user/show_host_detail.php index 2679badfd8..ea256523a8 100644 --- a/html/user/show_host_detail.php +++ b/html/user/show_host_detail.php @@ -7,6 +7,7 @@ db_init(); $hostid = $_GET["hostid"]; $private = $_GET["private"]; + $ipprivate = $_GET["ipprivate"]; $result = mysql_query("select * from host where id = $hostid"); $host = mysql_fetch_object($result); mysql_free_result($result); @@ -22,6 +23,6 @@ } page_head("Computer summary", $user); - show_host($host, $private); + show_host($host, $private, $ipprivate); page_tail(); ?>