';
// $tablelayout .= ''.$d.' | ';
$part1 = ''; // NEW - beteljuice
$part2 = ''; // NEW - beteljuice
for ($m = 1; $m <= 12; $m++) {
if ($d <= cal_days_in_month(CAL_GREGORIAN, $m, $tableYear)) {
$theDate = mktime(0,0,0,$m,$d,$tableYear); // NEW - beteljuice
$theDay = $dy[date('w', $theDate)]; // NEW - beteljuice
$id = $d."-".$mn[(int)$m - 1];
// $tablelayout .= ' | '.$theDay.''; // NEW - mcrossley
$part2 .=' | '') {
if ($whatdata == 'windgust' && $data_arr[0] > 0) {
$col = gustColour($data_arr[0]);
// $tablelayout .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"';
$part2 .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"'; // NEW - beteljuice
}
if ($whatdata == 'windspd' && $data_arr[0] > 0) {
$col = windColour($data_arr[0]);
// $tablelayout .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"';
$part2 .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"'; // NEW - beteljuice
}
if ($whatdata == 'maxtemp' || $whatdata == 'mintemp' || $whatdata == 'avgtemp' || $whatdata == 'minmaxt') {
$col = tempColour($data_arr[0]);
// $tablelayout .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"';
$part2 .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"'; // NEW - beteljuice
}
if ($whatdata == 'rainfall' && $data_arr[0] > 0.2) {
$col = rainColour($data_arr[0]);
// $tablelayout .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"';
$part2 .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"'; // NEW - beteljuice
}
if ($whatdata == 'windrun') {
$col = runColour($data_arr[0]);
// $tablelayout .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"';
$part2 .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"'; // NEW - beteljuice
}
}
// $tablelayout .= '>';
$part2 .= '>'; // NEW - beteljuice
// $tablelayout .= $data_arr[0];
$part2 .= $data_arr[0]; // NEW - beteljuice
if ($dayfilecol2 > 0) {
// $tablelayout .= ' | '') {
$col = tempColour($data_arr[1]);
// $tablelayout .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"';
$part2 .= ' style="background-color:#' . $col[0] . '; color:#' . $col[1] . '"'; // NEW - beteljuice
}
// $tablelayout .= '>';
$part2 .= '>'; // NEW - beteljuice
// $tablelayout .= $data_arr[1];
$part2 .= $data_arr[1]; // NEW - beteljuice
// $tablelayout .= ' | ';
$part2 .= ''; // NEW - beteljuice
}
} else {
// $tablelayout .= ' 0) {
// $tablelayout .= 'colspan="2" ';
$part2 .= 'colspan="2" '; // NEW - beteljuice
}
// $tablelayout .= '>';
$part2 .= '>'; // NEW - beteljuice
}
// $tablelayout .= ' | ';
$part2 .= ''; // NEW - beteljuice
}
$tablelayout .= $part1 .= ' ' .$d. '' . $part2; // NEW - beteljuice
$tablelayout .= "
\n";
}
$tablelayout .= "