= '5') { $sql = "SELECT * FROM `sensors` AS S, `devices` AS D WHERE S.sensor_class='humidity' AND S.device_id = D.device_id ORDER BY D.hostname, S.sensor_index, S.sensor_descr"; } else { $sql = "SELECT * FROM `sensors` AS S, `devices` AS D, devices_perms as P WHERE S.sensor_class='humidity' AND S.device_id = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, S.sensor_index, S.sensor_descr"; } $query = mysql_query($sql); echo('
Device | Sensor | Current | Alert | Notes | ||
---|---|---|---|---|---|---|
" . generatedevicelink($humidity) . " | $humidity_popup | $humidity_minigraph | $alert | " . $humidity['sensor_current'] . " % | " . $humidity['sensor_limit'] . " % | " . (isset($humidity['sensor_notes']) ? $humidity['sensor_notes'] : '') . " |
");
$daily_graph = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$day&to=$now&width=211&height=100";
$daily_url = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$day&to=$now&width=400&height=150";
$weekly_graph = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$week&to=$now&width=211&height=100";
$weekly_url = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$week&to=$now&width=400&height=150";
$monthly_graph = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$month&to=$now&width=211&height=100";
$monthly_url = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$month&to=$now&width=400&height=150";
$yearly_graph = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$year&to=$now&width=211&height=100";
$yearly_url = "graph.php?id=" . $humidity['sensor_id'] . "&type=humidity&from=$year&to=$now&width=400&height=150";
echo("', LEFT);\" onmouseout=\"return nd();\">
|