= '5') { $sql = "SELECT * FROM `temperature` AS T, `devices` AS D WHERE T.device_id = D.device_id ORDER BY D.hostname, T.temp_index, T.temp_descr"; } else { $sql = "SELECT * FROM `temperature` AS T, `devices` AS D, devices_perms as P WHERE T.device_id = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, T.temp_index, T.temp_descr"; } $query = mysql_query($sql); echo('
Device | Sensor | Current | Alert | Notes | ||
---|---|---|---|---|---|---|
" . generatedevicelink($temp) . " | $temp_popup | $temp_minigraph | $alert | " . $temp['temp_current'] . " °C | " . $temp['temp_limit'] . " °C | " . (isset($temp['temp_notes']) ? $temp['temp_notes'] : '') . " |
");
$daily_graph = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$day&to=$now&width=211&height=100";
$daily_url = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$day&to=$now&width=400&height=150";
$weekly_graph = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$week&to=$now&width=211&height=100";
$weekly_url = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$week&to=$now&width=400&height=150";
$monthly_graph = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$month&to=$now&width=211&height=100";
$monthly_url = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$month&to=$now&width=400&height=150";
$yearly_graph = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$year&to=$now&width=211&height=100";
$yearly_url = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$year&to=$now&width=400&height=150";
echo("', LEFT);\" onmouseout=\"return nd();\">
|