Cookienamekorrektur und eigene Optionen werden auch bei Temperaturen beachtet

This commit is contained in:
Robin Kloppe 2014-09-05 15:49:58 +02:00
parent 94a9d89f38
commit 58f16d53f7
3 changed files with 7 additions and 6 deletions

View file

@ -34,7 +34,6 @@ if($_SERVER['REQUEST_METHOD'] === 'POST'){
<h2 class="text-center trigger"><a href="#">Fahrradwetter in
<?php
$wetter = $daten->getWeather();
echo STADT .
'?</a> - '.$wetter[0]['rad'].'.</h2>
<div class="toggle_container">
@ -76,7 +75,7 @@ echo $daten->makeTable($wetter, 'rad', NULL, NULL, 'Fahrradwetter');
<option value="100">100%</option>
</select>
</div>
<button type="submit" class="button">Speichern</button>
<button type="submit" class="button">Speichern</button> Seite danach bitte neu laden.
</div>
<div class="col-md-3">
<label for="temperaturunten">Untere Temperatur</label>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View file

@ -124,8 +124,8 @@ class wetter {
}
// max. Temperatur
if(isset($_COOKIE['tempmax'])){
$tempMaxWert = $this->filter_cookie_int('tempmax');
if(isset($_COOKIE['temphigh'])){
$tempMaxWert = $this->filter_cookie_int('temphigh');
}else{
$tempMaxWert = 27;
}
@ -143,8 +143,10 @@ class wetter {
// Vielleicht, wenn Regenwahrscheinlichkeit größer als 40% oder
// Temperaturen nicht zwischen 15 und 24°C
// oder Wind 35 km/h oder schneller
if(empty($_COOKIE['wind']) && $regen >= 40 || $temp <= 15 || $temp > 24
|| $wind >= $windWert){
if(empty($_COOKIE['wind']) && $regen >= 40 ||
empty($_COOKIE['wind']) && $temp <= 15 ||
empty($_COOKIE['wind']) && $temp > 24 ||
$wind >= $windWert){
$fahrrad = '<a href="'. WETTERSTATION .'">Vielleicht</a>';
}