");
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['temp_current'] / $temp['temp_limit'] * 100;
$temp_colour = percent_colour($temp_perc);
$temp_day = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$day&to=$now&width=300&height=100";
$temp_week = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$week&to=$now&width=300&height=100";
$temp_month = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$month&to=$now&width=300&height=100";
$temp_year = "graph.php?id=" . $temp['temp_id'] . "&type=temperature&from=$year&to=$now&width=300&height=100";
$temp_minigraph = " ";
$temp_link = "";
$temp_link_b = $temp_link . "$temp_minigraph " . $temp['temp_current'] . "°C";
$temp_link_a = $temp_link . $temp['temp_descr'] . "";
$temp['temp_descr'] = truncate($temp['temp_descr'], 25, '');
echo("$temp_link_a | $temp_link_b | ");
if($i == $rows) { echo(" | ");
echo(" |
");
echo("