2010-08-13 18:48:10 +00:00
|
|
|
<?php
|
2010-08-10 12:16:00 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_numeric($vars['id'])) {
|
|
|
|
$service = dbFetchRow('SELECT * FROM services WHERE service_id = ?', array($vars['id']));
|
2010-08-10 12:16:00 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
if (is_numeric($service['device_id']) && ($auth || device_permitted($service['device_id']))) {
|
|
|
|
$device = device_by_id_cache($service['device_id']);
|
2010-08-10 12:16:00 +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('service-'.$service['service_type'].'-'.$service['service_id'].'.rrd');
|
2010-08-10 12:16:00 +00:00
|
|
|
|
2015-07-10 13:36:21 +02:00
|
|
|
$title = generate_device_link($device);
|
|
|
|
$title .= ' :: Service :: '.htmlentities($service['service_type']);
|
|
|
|
$auth = true;
|
|
|
|
}
|
2010-08-10 12:16:00 +00:00
|
|
|
}
|