2002-12-06 21:37:30 +00:00
|
|
|
<?php
|
|
|
|
require_once("db.inc");
|
2003-08-22 05:36:25 +00:00
|
|
|
require_once("util.inc");
|
2002-12-06 21:37:30 +00:00
|
|
|
require_once("user.inc");
|
2003-03-17 22:37:49 +00:00
|
|
|
require_once("host.inc");
|
2002-12-06 21:37:30 +00:00
|
|
|
|
|
|
|
db_init();
|
2003-03-21 04:38:55 +00:00
|
|
|
$hostid = $_GET["hostid"];
|
2003-12-10 19:46:08 +00:00
|
|
|
$ipprivate = $_GET["ipprivate"];
|
2004-01-06 22:09:19 +00:00
|
|
|
$host = lookup_host($hostid);
|
2003-03-20 02:05:25 +00:00
|
|
|
if (!$host) {
|
|
|
|
echo "Couldn't find computer";
|
|
|
|
exit();
|
|
|
|
}
|
2004-01-06 22:09:19 +00:00
|
|
|
$private = false;
|
|
|
|
$user = get_logged_in_user();
|
|
|
|
if ($user || $user->id == $host->userid) {
|
|
|
|
$private = true;
|
2002-12-06 21:37:30 +00:00
|
|
|
}
|
2003-06-17 22:28:01 +00:00
|
|
|
|
2003-03-20 02:05:25 +00:00
|
|
|
page_head("Computer summary", $user);
|
2003-12-10 19:46:08 +00:00
|
|
|
show_host($host, $private, $ipprivate);
|
2003-03-19 21:01:32 +00:00
|
|
|
page_tail();
|
2002-12-06 21:37:30 +00:00
|
|
|
?>
|