<?php header('Content-Type: application/javascript'); require '../includes/_func.php'; require '../includes/config.inc.php'; $data_labels = ""; $data_dates = ""; $result = query("select DATE_FORMAT(date, '%Y-%m') as date,ROUND(AVG(light),2) as light from #day where YEAR(date) = YEAR(NOW()) group by MONTH(date) order by date", $check); $data_light = ""; $light_min = null; $light_max = null; for ($j = 1; $j <= 12; $j++) { //label $data_labels .= '"' . mesic_nazev($j) . '"' . ($j < 12 ? ', ' : ''); //Data dates $data_dates .= '"' . mesic_nazev($j) . date(" Y") . '"' . ($j < 12 ? ', ' : ''); //Data $search = searchForDate(date("Y-") . ($j < 10 ? '0' : '') . $j, $result); $data_light .= (!is_null($search) ? '"' . $result[$search]['light'] . '"' : '') . ($j > 0 ? ', ' : ''); if (!is_null($search)) { if (is_null($light_min)) { $light_min = $result[$search]['light']; } if (is_null($light_max)) { $light_max = $result[$search]['light']; } if ($result[$search]['light'] < $light_min) { $light_min = $result[$search]['light']; } if ($result[$search]['light'] > $light_max) { $light_max = $result[$search]['light'];
</div> <br /> <div class="Row"> <div class="Column2"> Den v týdnu: <?php echo den_nazev(date("w")); ?> <br /> Den v roce: <?php echo date("z") + 1; ?> <br /> </div> <div class="Column2"> Měsíc: <?php echo mesic_nazev(date("n")); ?> <br /> Týden v roce: <?php echo date("W") + 0, date("W") % 2 == 0 ? ' (sudý)' : ' (lichý)'; ?> <br /> </div> <div class="Column2"> <?php if (strlen($sun_rise) > 0) { echo 'Slunce vychází: ', $sun_rise; } ?> <br /> <?php