2010-07-29 22:14:56 +00:00
|
|
|
<?php
|
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_numeric($vars['id'])) {
|
|
|
|
$sensor = dbFetchRow('SELECT * FROM sensors WHERE sensor_id = ?', array($vars['id']));
|
2010-08-01 14:17:06 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_numeric($sensor['device_id']) && ($auth || device_permitted($sensor['device_id']))) {
|
|
|
|
$device = device_by_id_cache($sensor['device_id']);
|
2010-08-01 14:17:06 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
// This doesn't quite work for all yet.
|
|
|
|
// $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename($sensor['sensor_class']."-" . $sensor['sensor_type'] . "-".$sensor['sensor_index'].".rrd");
|
|
|
|
$rrd_filename = get_sensor_rrd($device, $sensor);
|
2010-08-01 14:17:06 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$title = generate_device_link($device);
|
|
|
|
$title .= ' :: Sensor :: '.htmlentities($sensor['sensor_descr']);
|
|
|
|
$auth = true;
|
|
|
|
}
|
2010-08-01 14:17:06 +00:00
|
|
|
}
|