49 |
rodolico |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/*
|
|
|
4 |
* This is the callable library for the license module.
|
|
|
5 |
* routines are assumed to be called from other modules, returning
|
|
|
6 |
* HTML data.
|
|
|
7 |
* All routines will receive one array containing the parameters to
|
|
|
8 |
* be used. Parameters may be
|
|
|
9 |
* client_id - A client_id to be used for queries
|
|
|
10 |
* device_id - A device_id to be used for queries
|
|
|
11 |
* site_id - A site_id to be used for queries
|
|
|
12 |
* htmlDirectory - the HTML path to the module
|
|
|
13 |
*/
|
|
|
14 |
|
|
|
15 |
function sysinfoView ( $parameters ) {
|
|
|
16 |
// this is an array containing the columns we will display in the
|
|
|
17 |
// query. The query will be generated as
|
|
|
18 |
// select $key '$value', $key '$value
|
|
|
19 |
|
|
|
20 |
if ( isset( $parameters['device_id'] ) ) {
|
|
|
21 |
$query =
|
|
|
22 |
"select
|
|
|
23 |
min(concat(date(report_date),' (v', version, ')' )) 'First Sysinfo Report',
|
|
|
24 |
max(concat(date(report_date),' (v', version, ')' )) 'Latest Sysinfo Report'
|
|
|
25 |
from sysinfo_report
|
|
|
26 |
where device_id = $parameters[device_id]";
|
|
|
27 |
return queryToTable( $query );
|
|
|
28 |
}
|
|
|
29 |
}
|
|
|
30 |
|
|
|
31 |
?>
|
|
|
32 |
|