-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemperatureyear.php
More file actions
executable file
·94 lines (83 loc) · 9.35 KB
/
Copy pathtemperatureyear.php
File metadata and controls
executable file
·94 lines (83 loc) · 9.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
####################################################################################################
# CREATED FOR HOMEWEATHERSTATION MB SMART TEMPLATE #
# https://weather34.com/homeweatherstation/index.html #
# #
# Release: July 2019 #
# #
# https://www.weather34.com #
####################################################################################################
include('livedata.php');header('Content-type: text/html; charset=utf-8');date_default_timezone_set($TZ);?>
<div class="topframe">
<div class="tempminthisyear">
<?php //temperture min year
if ($weather["temp_units"]=='C' && $weather["tempymin"]>30){echo "<maxtempred>",$weather["tempymin"] ;echo "</maxtempred><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymin"]>24){echo "<maxtemporange>",$weather["tempymin"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymin"]>20){echo "<maxtemporange>",$weather["tempymin"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymin"]>18){echo "<maxtempyellow>",$weather["tempymin"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymin"]>12){echo "<maxtempyellow>",$weather["tempymin"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymin"]>=10){ echo "<maxtempgreen>", $weather["tempymin"] ;echo "</maxtempgreen><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymin"]>-50){ echo "<maxtempblue>", $weather["tempymin"] ;echo "</maxtempblue><wunit>°".$weather["temp_units"] ; }
//non metric
if ($weather["temp_units"]=='F' && $weather["tempymin"]>86){echo "<maxtempred>",$weather["tempymin"] ;echo "</maxtempred><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymin"]>75.2){echo "<maxtemporange>",$weather["tempymin"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymin"]>68){echo "<maxtemporange>",$weather["tempymin"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymin"]>64.4){echo "<maxtempyellow>",$weather["tempymin"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymin"]>53.6){echo "<maxtempyellow>",$weather["tempymin"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymin"]>=42.8){ echo "<maxtempgreen>", $weather["tempymin"] ;echo "</maxtempgreen><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymin"]>-50){ echo "<maxtempblue>", $weather["tempymin"] ;echo "</maxtempblue><wunit>°".$weather["temp_units"] ; }
?></div></wunit>
<div class="tmonthmax"><?php echo $weather["tempymintime2"]?></div>
<div class="tmonthconv"><?php
if ($weather["temp_units"]=='C'){ echo anyToF($weather["tempymin"])."°F";}
else if ($weather["temp_units"]=='F'){echo anyToC($weather["tempymin"])."°C";}
?></div>
<div class="tempavgthisyear">
<?php //temperture min year
if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>30){echo "<maxtempred>",$weather["tempyearavg"] ;echo "</maxtempred><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>24){echo "<maxtemporange>",$weather["tempyearavg"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>20){echo "<maxtemporange>",$weather["tempyearavg"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>18){echo "<maxtempyellow>",$weather["tempyearavg"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>12){echo "<maxtempyellow>",$weather["tempyearavg"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>=10){ echo "<maxtempgreen>", $weather["tempyearavg"] ;echo "</maxtempgreen><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempyearavg"]>-50){ echo "<maxtempblue>", $weather["tempyearavg"] ;echo "</maxtempblue><wunit>°".$weather["temp_units"] ; }
//non metric
if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>86){echo "<maxtempred>",$weather["tempyearavg"] ;echo "</maxtempred><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>75.2){echo "<maxtemporange>",$weather["tempyearavg"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>68){echo "<maxtemporange>",$weather["tempyearavg"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>64.4){echo "<maxtempyellow>",$weather["tempyearavg"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>53.6){echo "<maxtempyellow>",$weather["tempyearavg"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>=42.8){ echo "<maxtempgreen>", $weather["tempyearavg"] ;echo "</maxtempgreen><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempyearavg"]>-50){ echo "<maxtempblue>", $weather["tempyearavg"] ;echo "</maxtempblue><wunit>°".$weather["temp_units"] ; }
?></div></wunit>
<div class="tyearavg"><a class="weather34tipty" data-weather34tipty="<?php echo date('M')?> Max:<?php echo $weather["tempmmax"]."° Min: ".$weather["tempmmin"]."°"?>">
<span style="font-weight:400;">Average</span></a></div>
<div class="tavgconv"><?php
if ($weather["temp_units"]=='C'){ echo anyToF($weather["tempyearavg"])."°F";}
else if ($weather["temp_units"]=='F'){echo anyToC($weather["tempyearavg"])."°C";}
?></div>
<div class="yearwordtempbig">Temperature</div>
<div class="tempmaxthisyear">
<?php //temperture min year
if ($weather["temp_units"]=='C' && $weather["tempymax"]>30){echo "<maxtempred>",$weather["tempymax"] ;echo "</maxtempred><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymax"]>24){echo "<maxtemporange>",$weather["tempymax"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymax"]>20){echo "<maxtemporange>",$weather["tempymax"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymax"]>18){echo "<maxtempyellow>",$weather["tempymax"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymax"]>12){echo "<maxtempyellow>",$weather["tempymax"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymax"]>=10){ echo "<maxtempgreen>", $weather["tempymax"] ;echo "</maxtempgreen><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='C' && $weather["tempymax"]>-50){ echo "<maxtempblue>", $weather["tempymax"] ;echo "</maxtempblue><wunit>°".$weather["temp_units"] ; }
//non metric
if ($weather["temp_units"]=='F' && $weather["tempymax"]>86){echo "<maxtempred>",$weather["tempymax"] ;echo "</maxtempred><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymax"]>75.2){echo "<maxtemporange>",$weather["tempymax"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymax"]>68){echo "<maxtemporange>",$weather["tempymax"] ;echo "</maxtemporange><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymax"]>64.4){echo "<maxtempyellow>",$weather["tempymax"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymax"]>53.6){echo "<maxtempyellow>",$weather["tempymax"] ;echo "</maxtempyellow><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymax"]>=42.8){ echo "<maxtempgreen>", $weather["tempymax"] ;echo "</maxtempgreen><wunit>°".$weather["temp_units"] ; }
else if ($weather["temp_units"]=='F' && $weather["tempymax"]>-50){ echo "<maxtempblue>", $weather["tempymax"] ;echo "</maxtempblue><wunit>°".$weather["temp_units"] ; }
?>
</div></wuunit>
<div class="tyearmax"> <?php echo $weather["tempymaxtime2"]?></div>
<div class="tyearconv"><?php
if ($weather["temp_units"]=='C'){ echo anyToF($weather["tempymax"])."°F";}
else if ($weather["temp_units"]=='F'){echo anyToC($weather["tempymax"])."°C";}
?></div>