= '5') { $sql = "SELECT * FROM `frequency` AS V, `devices` AS D WHERE V.device_id = D.device_id ORDER BY D.hostname, V.freq_descr"; } else { $sql = "SELECT * FROM `frequency` AS V, `devices` AS D, devices_perms as P WHERE V.device_id = D.device_id AND D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' ORDER BY D.hostname, V.freq_descr"; } $query = mysql_query($sql); echo(''); echo(''); $row = 1; while($freq = mysql_fetch_array($query)) { if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } $weekly_freq = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$week&to=$now&width=500&height=150"; $freq_popup = "', LEFT);\" onmouseout=\"return nd();\"> " . $freq['freq_descr'] . ""; if($freq['freq_current'] >= $freq['freq_limit']) { $alert = 'alert'; } else { $alert = ""; } $freq_day = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$day&to=$now&width=300&height=100"; $freq_week = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$week&to=$now&width=300&height=100"; $freq_month = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$month&to=$now&width=300&height=100"; $freq_year = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$year&to=$now&width=300&height=100"; $freq_minigraph = "".$freq['hostname']." - ".$freq['freq_descr']; $freq_minigraph .= "
', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\" >"; echo("\n"); if($_GET['optb'] == "graphs") { ## If graphs echo(""); } # endif graphs $row++; } echo("
Device Sensor Current Range limit Notes
" . generatedevicelink($freq) . " $freq_popup $freq_minigraph $alert " . $freq['freq_current'] . "Hz " . $freq['freq_limit_low'] . "Hz - " . $freq['freq_limit'] . "Hz " . (isset($freq['freq_notes']) ? $freq['freq_notes'] : '') . "
"); $daily_graph = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$day&to=$now&width=211&height=100"; $daily_url = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$day&to=$now&width=400&height=150"; $weekly_graph = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$week&to=$now&width=211&height=100"; $weekly_url = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$week&to=$now&width=400&height=150"; $monthly_graph = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$month&to=$now&width=211&height=100"; $monthly_url = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$month&to=$now&width=400&height=150"; $yearly_graph = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$year&to=$now&width=211&height=100"; $yearly_url = "graph.php?id=" . $freq['freq_id'] . "&type=frequency&from=$year&to=$now&width=400&height=150"; echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("', LEFT);\" onmouseout=\"return nd();\"> "); echo("
"); ?>