# --------------------- explanation Soil condition------------------------------------------------------- # first the box # now the table and headings echo '<table class="genericTable small" style="width: auto; "><tbody> <tr> <td style = "border-bottom: 1px solid grey;">' . langtransstr('Buttton text') . '</td> <td style = "border-bottom: 1px solid grey;">' . langtransstr('Explanation') . '</td> </tr>'; $soilArr = array(0, 10, 25, 60, 100, 230); $textArr[1] = langtransstr('Saturated Soil. Occurs for a day or two after irrigation.'); $textArr[2] = langtransstr('Soil is adequately wet (except coarse sands which are drying out at this range)'); $textArr[3] = langtransstr('Usual range to irrigate or water (except heavy clay soils).') . '<br />' . langtransstr('Irrigate at the upper end of this range in cool humid climates and with higher water-holding capacity soils.'); $textArr[4] = langtransstr('Usual range to irrigate heavy clay soils'); $textArr[5] = langtransstr('Soil is becoming dangerously dry for maximum production.'); for ($i = 1; $i < count($soilArr); $i++) { $smArr = getSoilMoistIndex($soilArr[$i]); echo ' <tr> <td style = "border-bottom: 1px solid grey;"> <div style="font-size: 80%; color: ' . $smArr['tc'] . '; border: 1px inset; border-radius: 5px; background-color: ' . $smArr['color'] . '; height: 28px; margin: 1px; width: 160px;">' . langtransstr($smArr['text']) . '<br />(' . $smArr['range'] . ') </div> </td> <td style = "border-bottom: 1px solid grey; padding: 5px;">' . $textArr[$i] . ' </td> </tr>'; } echo ' </tbody></table> <!-- end of explanationl --> <br />'; # --------------------- records -------------------------------------------------------
echo '<td style = "border-bottom: 1px solid grey;">' . langtransstr('Min') . '</td>'; echo '<td style = "border-bottom: 1px solid grey;">' . langtransstr('Max') . '</td>'; } echo '<td style = "border-bottom: 1px solid grey;">' . langtransstr('Actual') . '</td>'; echo '<td colspan="2" style = "text-align: center; border-bottom: 1px solid grey;">' . langtransstr('Grow conditions') . '</td>'; echo '<td style = "border-bottom: 1px solid grey;">' . langtransstr('Actual') . '</td>'; if (!$tempOnly) { echo '<td style = "border-bottom: 1px solid grey;">' . langtransstr('Max') . '</td>'; echo ' <td style = "border-bottom: 1px solid grey;">' . langtransstr('Min') . '</td>'; } echo '</tr>' . PHP_EOL; echo '<!-- loop for ' . $SITE['soilCount'] . ' sensors -->'; // printf( "%3.0f", for ($i = 1; $i <= $SITE['soilCount']; $i++) { $stArr = getSoilTempIndex($ws['soilTempAct'][$i]); $smArr = getSoilMoistIndex($ws['moistAct'][$i]); echo '<tr>'; echo '<td>' . $SITE['soilDepth_' . $i] . '</td>'; if (!$tempOnly) { echo '<td style="">' . round($ws['moistMinToday'][$i]) . '</td>'; echo '<td style="">' . round($ws['moistMaxToday'][$i]) . '</td>'; } echo '<td style=";">' . round($ws['moistAct'][$i]) . '</td>'; echo '<td style="text-align: center;">'; echo ' <div style="font-size: 80%; color: ' . $smArr['tc'] . '; border: 1px inset; border-radius: 5px; background-color: ' . $smArr['color'] . '; height: 28px; margin: 1px; width: 160px;">' . langtransstr($smArr['text']) . '<br />(' . $smArr['range'] . ')</div></td>'; echo '<td style="text-align: center;">'; echo ' <div style="font-size: 80%; color: ' . $stArr['tc'] . '; border: 1px inset; border-radius: 5px; background-color:' . $stArr['color'] . '; height: 28px; margin: 1px; width: 160px;">' . langtransstr($stArr['text']) . '<br />(' . $stArr['range'] . ')</div></td>'; echo '<td style="">' . round($ws['soilTempAct'][$i]) . '</td>'; if (!$tempOnly) { echo '<td style="">' . round($ws['soilTempMaxToday'][$i]) . '</td>'; echo '<td style="">' . round($ws['soilTempMinToday'][$i]) . '</td>';