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();
|
2002-12-06 21:37:30 +00:00
|
|
|
$hostid = $HTTP_GET_VARS["hostid"];
|
2003-03-19 21:01:32 +00:00
|
|
|
page_head("Computer stats");
|
2002-12-06 21:37:30 +00:00
|
|
|
|
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);
|
2002-12-06 21:37:30 +00:00
|
|
|
|
2003-03-19 21:01:32 +00:00
|
|
|
if ($host) {
|
|
|
|
if ($host->userid != $user->id) {
|
|
|
|
echo "Not your computer\n";
|
2002-12-06 21:37:30 +00:00
|
|
|
} else {
|
2003-03-19 21:01:32 +00:00
|
|
|
show_host($host, true);
|
2002-12-06 21:37:30 +00:00
|
|
|
}
|
|
|
|
} else {
|
2003-03-19 21:01:32 +00:00
|
|
|
echo "Couldn't find host or user.<p>";
|
2002-12-06 21:37:30 +00:00
|
|
|
}
|
2003-03-19 21:01:32 +00:00
|
|
|
page_tail();
|
2002-12-06 21:37:30 +00:00
|
|
|
?>
|