"); echo("

Frequencies

"); $i = '1'; $temps = mysql_query("SELECT * FROM sensors WHERE sensor_class='freq' AND device_id = '" . $device['device_id'] . "' ORDER BY sensor_index"); echo(''); echo('"); echo("
'); echo(''); while($temp = mysql_fetch_array($temps)) { if(is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } $graph_colour = str_replace("#", "", $row_colour); $temp_perc = $temp['sensor_current'] / $temp['sensor_limit'] * 100; $temp_colour = percent_colour($temp_perc); $temp_day = "graph.php?id=" . $temp['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=300&height=100"; $temp_week = "graph.php?id=" . $temp['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=300&height=100"; $temp_month = "graph.php?id=" . $temp['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=300&height=100"; $temp_year = "graph.php?id=" . $temp['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=300&height=100"; $temp_minigraph = ""; $temp_link = ""; $temp_link_c = $temp_link . "" . round($temp['sensor_current'],0) . "Hz"; $temp_link_b = $temp_link . $temp_minigraph . ""; $temp_link_a = $temp_link . $temp['sensor_descr'] . ""; $temp['sensor_descr'] = truncate($temp['sensor_descr'], 25, ''); echo(""); if($i == $rows) { echo("
$temp_link_a$temp_link_b$temp_link_c
"); } $i++; } echo("
"); echo("
"); echo(""); } ?>