connect(); try { $sqliteQuery = new SQLiteQuery($pdo); $resultNewest = $sqliteQuery->getMeteomeasurements(10, "DESC"); $resultFirst = $resultNewest[0]; $swissmetnetdata = getSwissMetNetMeasurement('KLO', './swissmetnet/', 'https://data.geo.admin.ch/ch.meteoschweiz.messwerte-aktuell/VQHA80.csv'); $htmlHeader = '
'; $htmlHeader .= '
'; $htmlHeader .= '
'; $htmlHeader .= '

Balcony '; $htmlHeader .= 'w'; $htmlHeader .= 'e'; $htmlHeader .= 'a'; $htmlHeader .= 't'; $htmlHeader .= 'h'; $htmlHeader .= 'e'; $htmlHeader .= 'r'; $htmlHeader .= '

'; $htmlHeader .= '
'; $htmlHeader .= '
'; $htmlHeader .= '
'; $htmlHeader .= '
'; $htmlHeader .= '
'; $htmlHeader .= '

Balcony (439m ü.M.) 🕒:

'; $htmlHeader .= '
' . $resultFirst['temperaturec'] . '°C
'; $htmlHeader .= '
' . $resultFirst['pressure'] . 'hPa
'; $htmlHeader .= '
' . $resultFirst['humidity'] . '%
'; $htmlHeader .= '

Zürich Kloten (426m ü.M.)  🕒:

'; $htmlHeader .= '
' . $swissmetnetdata['temperaturec'] . '°C
'; $htmlHeader .= '
' . $swissmetnetdata['pressure'] . 'hPa
'; $htmlHeader .= '
' . $swissmetnetdata['humidity'] . '%
'; $htmlHeader .= '
'; $htmlHeader .= '
'; $htmlHeader .= '
'; echo $htmlHeader; $htmlImageSlider = '
'; $dateISO8601 = date_format(date_create(), 'c'); foreach ($resultNewest as $row) { $htmlImageSlider .= ''; //$htmlImageSlider .= $dateISO8601.' - '.$row['timestamp'].' - '.formatTime($row['timestamp']).' ['.getUserLocale().']'; $htmlImageSlider .= formatTime($row['timestamp']); $htmlImageSlider .= ''; } $htmlImageSlider .= '
'; echo $htmlImageSlider; echo '

'; $htmlTabNavigation = '
'; $htmlTabNavigation .= ''; $htmlTabNavigation .= ''; $htmlTabNavigation .= ''; $htmlTabNavigation .= '
'; echo $htmlTabNavigation; $htmlCharts .= '
'; $htmlCharts .= '
'; $htmlCharts .= '

'; $htmlCharts .= '
'; $htmlCharts .= '

'; $htmlCharts .= '
'; $htmlCharts .= '
'; echo $htmlCharts; echo '

'; $result = $sqliteQuery->getAllMeteomeasurements(); $htmlDataTable = '
'; $htmlDataTable .= '
'; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; foreach ($result as $row) { $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; $htmlDataTable .= ''; } $htmlDataTable .= '
TimeTemperature °CTemperature FPressureHumidityPicture
' . formatDateTime($row['timestamp']) . '' . $row['temperaturec'] . '' . $row['temperaturef'] . '' . $row['pressure'] . '' . $row['humidity'] . '' . $row['imagefilename'] . '
'; $htmlDataTable .= '
'; $htmlDataTable .= '
'; echo $htmlDataTable; //var_dump($result); } catch (Exception $eQuery) { echo 'SQLite QUERY exception: '.$eQuery->getMessage(); } } catch (Exception $eConnect) { echo 'SQLite CONNECT exception: '.$eConnect->getMessage(); } } ?>