Rev 38 | Rev 49 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php include_once( 'header.php' ); ?>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Daily Data - Computer Asset Management Program</title>
<link rel="stylesheet" type="text/css" href="camp.css">
</head>
<body>
<?php include_once('menu.php'); ?>
<div id="content">
<?php
$device_id = $_GET['device_id'];
$data = queryDatabaseExtended(insertValuesIntoQuery(SQL_SHOW_DEVICE,array( 'device_id' => $device_id)));
$data = $data['data'][0];
?>
<table>
<tr>
<td>
<table border="1">
<tr>
<td>
ID
</td>
<td>
<?php print $data['ID']?>
</td>
</tr>
<tr><td>Site</td><td><?php print $data['Site']?></td></tr>
<tr><td>Type</td><td><?php print $data['Type']?></td></tr>
<tr><td>Name</td><td><?php print $data['Name']?></td></tr>
<tr><td>Serial Number</td><td><?php print $data['Serial']?></td></tr>
<tr><td>Notes</td><td><?php print $data['Notes']?></td></tr>
<tr><td>Restrictions</td><td><?php print $data['Restrictions']?></td></tr>
<tr><td>Part Of</td><td><?php print $data['Part Of']?></td></tr>
<tr><td>Added</td><td><?php print $data['Added']?></td></tr>
<tr><td>Removed</td><td><?php print $data['Removed']?></td></tr>
</table>
<td>
</tr>
<tr>
<td>
<?php
$sql = insertValuesIntoQuery(SQL_GET_MODULES,array( 'screen' => 'device view'));
$modules = queryDatabaseExtended( $sql );
if ( $modules ) {
$modules = $modules['data'];
$parameters = array( 'device_id' => $device_id );
foreach ( $modules as $report ) {
$module = $report['module'];
list($library, $function ) = explode (':', $report['path'] . $report['script']);
//print "$library - $function<br />\n";
require_once "$library";
if ( is_callable( $function ) ) {
$content = call_user_func( $function, $parameters );
if ( $content )
print "<div><h4>$module</h4>$content</div>\n";
}
}
}
print screenReports( 'main device screen', array( 'device_id' => $device_id, // the device ID
'device_name' => $data['Name'], // name of machine
'added_date' => $data['Added'], // date added
'removed_date' => $data['Removed'], // date removed
'count' => 5 ), // number of backup reports to show
false
);
/* Physical Attributes */
//print queryToTable( 'select attrib.name,device_attrib.value from device_attrib join attrib using (attrib_id) where device_attrib.removed_date is null and device_id = ' . $device_id );
?>
</td>
</tr>
</table>
</div>
</body>
</html>