2002-12-06 21:37:30 +00:00
|
|
|
<?php
|
|
|
|
require_once("util.inc");
|
|
|
|
require_once("db.inc");
|
|
|
|
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-19 21:01:32 +00:00
|
|
|
$user = get_logged_in_user();
|
2003-03-21 04:38:55 +00:00
|
|
|
$hostid = $_GET["hostid"];
|
2003-03-19 21:01:32 +00:00
|
|
|
$result = mysql_query("select * from host where id = $hostid");
|
|
|
|
$host = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
2003-03-20 02:05:25 +00:00
|
|
|
if (!$host) {
|
|
|
|
echo "Couldn't find computer";
|
|
|
|
exit();
|
|
|
|
}
|
2002-12-06 21:37:30 +00:00
|
|
|
|
2003-03-20 02:05:25 +00:00
|
|
|
$private = false;
|
|
|
|
if ($user && $user->id == $host->userid) {
|
|
|
|
$private = true;
|
2002-12-06 21:37:30 +00:00
|
|
|
}
|
2003-03-20 02:05:25 +00:00
|
|
|
page_head("Computer summary", $user);
|
|
|
|
show_host($host, $private);
|
2003-03-19 21:01:32 +00:00
|
|
|
page_tail();
|
2002-12-06 21:37:30 +00:00
|
|
|
?>
|