-
Notifications
You must be signed in to change notification settings - Fork 0
/
dewpointmod.php
197 lines (189 loc) · 17.5 KB
/
dewpointmod.php
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?php include('livedata.php');?>
<div class="modulecaption2"><?php echo $lang['Dewpoint']; ?> °<?php echo $weather["temp_units"]?></div>
<div class="button button-dial">
<div class="button-dial-top"></div>
<realfeel>
<?php
if ($weather["temp_units"]=='C' && $weather["dewpoint"]>=20){ echo $lang['Discomfort'];}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]>=15){ echo $lang['Feels Warm'];}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]>=10){ echo $lang['Comfortable'];}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]>=5 ){ echo $lang['Cooler'];}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]>-50 ){ echo $lang['Feels Colder'];}
//non metric
if ($weather["temp_units"]=='F' && $weather["dewpoint"]>=68){ echo $lang['Discomfort'];}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]>=59){ $lang['Feels Warm'];}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]>=50){ echo $lang['Comfortable'];}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]>=41 ){ echo $lang['Cooler'];}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]>-100 ){ echo $lang['Feels Colder'];}
?>
</realfeel>
<div class="button-dial-label">
<?php
if($weather["temp_units"]=='C' && $weather["dewpoint"]<-10){ echo "<icon-minus10>".$weather["dewpoint"]."°</icon-minus10 >";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<-5){ echo "<icon-minus5>".$weather["dewpoint"]."°</icon-minus5>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<0){ echo "<icon-zero>".$weather["dewpoint"]."°</icon-zero>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<6){ echo "<icon-0-5>".$weather["dewpoint"]."°</icon-0-5>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<10){ echo "<icon-6-10>".$weather["dewpoint"]."°</icon-6-10>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<15){ echo "<icon-11-15>".$weather["dewpoint"]."°</icon-11-15>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<20){ echo "<icon-16-20>".$weather["dewpoint"]."°</icon-16-20>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<25){ echo "<icon-21-25>".$weather["dewpoint"]."°</icon-21-25>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<30){ echo "<icon-26-30>".$weather["dewpoint"]."°</icon-26-30>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<35){ echo "<icon-31-35>".$weather["dewpoint"]."°</icon-31-35>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<40){ echo "<icon-36-40>".$weather["dewpoint"]."°</icon-36-40>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<100){ echo "<icon-41-45>".$weather["dewpoint"]."°</icon-41-45>";}
//non metric
if($weather["temp_units"]=='F' && $weather["dewpoint"]<14){ echo "<icon-minus10>".$weather["dewpoint"]."°</icon-minus10 >";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<23){ echo "<icon-minus5>".$weather["dewpoint"]."°</icon-minus5>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<32){ echo "<icon-zero>".$weather["dewpoint"]."°</icon-zero>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<42){ echo "<icon-0-5>".$weather["dewpoint"]."°</icon-0-5>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<50){ echo "<icon-6-10>".$weather["dewpoint"]."°</icon-6-10>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<59){ echo "<icon-11-15>".$weather["dewpoint"]."°</icon-11-15>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<68){ echo "<icon-16-20>".$weather["dewpoint"]."°</icon-16-20>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<77){ echo "<icon-21-25>".$weather["dewpoint"]."°</icon-21-25>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<86){ echo "<icon-26-30>".$weather["dewpoint"]."°</icon-26-30>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<95){ echo "<icon-31-35>".$weather["dewpoint"]."°</icon-31-35>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<104){ echo "<icon-36-40>".$weather["dewpoint"]."°</icon-36-40>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<300){ echo "<icon-41-45>".$weather["dewpoint"]."°</icon-41-45>";}
?></div></div><div>
<?php //unit
echo "<unitindicator>°";echo $weather["temp_units"];echo "</unitindicator>";?>
<?php //feels like man
echo "<tempman>";
if($weather["temp_units"]=='C' && $weather["dewpoint"]<-10){ echo "<icon-minus10>".$tempman."</icon-minus10 >";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<-5){ echo "<icon-minus5>".$tempman."</icon-minus5>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<0){ echo "<icon-zero>".$tempman."</icon-zero>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<6){ echo "<icon-0-5>".$tempman."</icon-0-5>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<10){ echo "<icon-6-10>".$tempman."</icon-6-10>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<15){ echo "<icon-11-15>".$tempman."</icon-11-15>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<20){ echo "<icon-16-20>".$tempman."</icon-16-20>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<25){ echo "<icon-21-25>".$tempman."</icon-21-25>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<30){ echo "<icon-26-30>".$tempman."</icon-26-30>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<35){ echo "<icon-31-35>".$tempman."</icon-31-35>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<40){ echo "<icon-36-40>".$tempman."</icon-36-40>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<100){ echo "<icon-41-45>".$tempman."</icon-41-45>";}
//non metric
if($weather["temp_units"]=='F' && $weather["dewpoint"]<14){ echo "<icon-minus10>".$tempman."</icon-minus10 >";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<26){ echo "<icon-minus5>".$tempman."</icon-minus5>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<32){ echo "<icon-zero>".$tempman."</icon-zero>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<42){ echo "<icon-0-5>".$tempman."</icon-0-5>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<50){ echo "<icon-6-10>".$tempman."</icon-6-10>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<59){ echo "<icon-11-15>".$tempman."</icon-11-15>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<68){ echo "<icon-16-20>".$tempman."</icon-16-20>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<77){ echo "<icon-21-25>".$tempman."</icon-21-25>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<86){ echo "<icon-26-30>".$tempman."</icon-26-30>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<95){ echo "<icon-31-35>".$tempman."</icon-31-35>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<104){ echo "<icon-36-40>".$tempman."</icon-36-40>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<300){ echo "<icon-41-45>".$tempman."</icon-41-45>";}
echo "</tempman>";?>
</div></div></div>
</div></div>
<div class="heatcircle"><div class="heatcircle-content">
<?php //dewpoint max Year
echo "<valuetextheading1>".date('Y')." Max <deepblue>".$weather["dewymaxtime"]."</deepblue></valuetextheading1><br>";
echo "<div class=tempmodulehome0-5c>";
echo $weather["dewymax"]."°<smalltempunit2>".$weather["temp_units"];
?><smalltempunit2></div></div>
<div class="heatcircle2"><div class="heatcircle-content">
<?php //dewpoint min year
echo "<valuetextheading1>".date('Y')." Min <deepblue>".$weather["dewymintime"]."</deepblue></valuetextheading1><br>";
echo "<div class=tempmodulehome0-5c>";
echo $weather["dewymin"]."°<smalltempunit2>".$weather["temp_units"];
?></smalltempunit2></div></div>
<div class="heatcircleindoor"><div class="heatcircle-content"> <?php echo $lang['Month']?> <orange>Max</orange>-<deepblue>Min</deepblue></valuetextheading1>
<?php //month max min
echo "<div class=tempmodulehomemaxmin>". $weather["dewmmax"]."°<smalltempunit2>".$weather["temp_units"]."</smalltempunit2> | ";
echo $weather["dewmmin"]."°<smalltempunit2>".$weather["temp_units"]."</smalltempunit2>";?>
</div></div>
<div class=thetrendgap>
<?php
//falling
if($weather["dewpoint_trend"]<0){echo '<div class=thetrendboxblue>'.$lang['Falling']. '';echo ' '.$fallingsymbolx.' <blue> '.number_format($weather["temp_trend"],1).'</blue>°';}
//rising
else if($weather["dewpoint_trend"]>0){echo '<div class=thetrendboxorange> '.$lang['Rising']. '';echo ' '.$risingsymbolx.' <orange> + '.number_format($weather["temp_trend"],1).'</orange>°';}
//steady
else echo '<div class=thetrendboxblue>'.$lang['Steady']. ' '.$steadysymbol.'';?>
</div></div>
<div class="weather-tempicon-identity">
<?php //dewpoint id
if($weather["temp_units"]=='C' && $weather["dewpoint"]<-10){ echo "<icon-minus10>".$weather34_temp_icon."</icon-minus10 >";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<-5){ echo "<icon-minus5>".$weather34_temp_icon."</icon-minus5>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<0){ echo "<icon-zero>".$weather34_temp_icon."</icon-zero>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<6){ echo "<icon-0-5>".$weather34_temp_icon."</icon-0-5>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<10){ echo "<icon-6-10>".$weather34_temp_icon."</icon-6-10>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<15){ echo "<icon-11-15>".$weather34_temp_icon."</icon-11-15>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<20){ echo "<icon-16-20>".$weather34_temp_icon."</icon-16-20>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<25){ echo "<icon-21-25>".$weather34_temp_icon."</icon-21-25>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<30){ echo "<icon-26-30>".$weather34_temp_icon."</icon-26-30>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<35){ echo "<icon-31-35>".$weather34_temp_icon."</icon-31-35>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<40){ echo "<icon-36-40>".$weather34_temp_icon."</icon-36-40>";}
else if($weather["temp_units"]=='C' && $weather["dewpoint"]<100){ echo "<icon-41-45>".$weather34_temp_icon."</icon-41-45>";}
//non metric
if($weather["temp_units"]=='F' && $weather["dewpoint"]<14){ echo "<icon-minus10>".$weather34_temp_icon."</icon-minus10 >";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<26){ echo "<icon-minus5>".$weather34_temp_icon."</icon-minus5>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<32){ echo "<icon-zero>".$weather34_temp_icon."</icon-zero>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<42.8){ echo "<icon-0-5>".$weather34_temp_icon."</icon-0-5>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<50){ echo "<icon-6-10>".$weather34_temp_icon."</icon-6-10>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<59){ echo "<icon-11-15>".$weather34_temp_icon."</icon-11-15>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<68){ echo "<icon-16-20>".$weather34_temp_icon."</icon-16-20>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<77){ echo "<icon-21-25>".$weather34_temp_icon."</icon-21-25>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<86){ echo "<icon-26-30>".$weather34_temp_icon."</icon-26-30>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<95){ echo "<icon-31-35>".$weather34_temp_icon."</icon-31-35>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<104){ echo "<icon-36-40>".$weather34_temp_icon."</icon-36-40>";}
else if($weather["temp_units"]=='F' && $weather["dewpoint"]<300){ echo "<icon-41-45>".$weather34_temp_icon."</icon-41-45>";}
?></div></div></div>
<div class="maxwind">
<?php //Max-Min
echo "Max ";
if($weather["temp_units"]=='C' && $weather["dewmax"]<-10){ echo "<icon-minus10>".$weather["dewmax"]."</icon-minus10 >";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<-5){ echo "<icon-minus5>".$weather["dewmax"]."</icon-minus5>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<0){ echo "<icon-zero>".$weather["dewmax"]."</icon-zero>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<6){ echo "<icon-0-5>".$weather["dewmax"]."</icon-0-5>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<10){ echo "<icon-6-10>".$weather["dewmax"]."</icon-6-10>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<15){ echo "<icon-11-15>".$weather["dewmax"]."</icon-11-15>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<20){ echo "<icon-16-20>".$weather["dewmax"]."</icon-16-20>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<25){ echo "<icon-21-25>".$weather["dewmax"]."</icon-21-25>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<30){ echo "<icon-26-30>".$weather["dewmax"]."</icon-26-30>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<35){ echo "<icon-31-35>".$weather["dewmax"]."</icon-31-35>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<40){ echo "<icon-36-40>".$weather["dewmax"]."</icon-36-40>";}
else if($weather["temp_units"]=='C' && $weather["dewmax"]<100){ echo "<icon-41-45>".$weather["dewmax"]."</icon-41-45>";}
//non metric
if($weather["temp_units"]=='F' && $weather["dewmax"]<14){ echo "<icon-minus10>".$weather["dewmax"]."</icon-minus10 >";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<23){ echo "<icon-minus5>".$weather["dewmax"]."</icon-minus5>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<32){ echo "<icon-zero>".$weather["dewmax"]."</icon-zero>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<42.8){ echo "<icon-0-5>".$weather["dewmax"]."</icon-0-5>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<50){ echo "<icon-6-10>".$weather["dewmax"]."</icon-6-10>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<59){ echo "<icon-11-15>".$weather["dewmax"]."</icon-11-15>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<68){ echo "<icon-16-20>".$weather["dewmax"]."</icon-16-20>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<77){ echo "<icon-21-25>".$weather["dewmax"]."</icon-21-25>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<86){ echo "<icon-26-30>".$weather["dewmax"]."</icon-26-30>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<95){ echo "<icon-31-35>".$weather["dewmax"]."</icon-31-35>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<104){ echo "<icon-36-40>".$weather["dewmax"]."</icon-36-40>";}
else if($weather["temp_units"]=='F' && $weather["dewmax"]<300){ echo "<icon-41-45>".$weather["dewmax"]."</icon-41-45>";}
echo "° | ";
echo "Min ";
if($weather["temp_units"]=='C' && $weather["dewmin"]<-10){ echo "<icon-minus10>".$weather["dewmin"]."</icon-minus10 >";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<-5){ echo "<icon-minus5>".$weather["dewmin"]."</icon-minus5>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<0){ echo "<icon-zero>".$weather["dewmin"]."</icon-zero>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<6){ echo "<icon-0-5>".$weather["dewmin"]."</icon-0-5>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<10){ echo "<icon-6-10>".$weather["dewmin"]."</icon-6-10>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<15){ echo "<icon-11-15>".$weather["dewmin"]."</icon-11-15>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<20){ echo "<icon-16-20>".$weather["dewmin"]."</icon-16-20>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<25){ echo "<icon-21-25>".$weather["dewmin"]."</icon-21-25>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<30){ echo "<icon-26-30>".$weather["dewmin"]."</icon-26-30>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<35){ echo "<icon-31-35>".$weather["dewmin"]."</icon-31-35>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<40){ echo "<icon-36-40>".$weather["dewmin"]."</icon-36-40>";}
else if($weather["temp_units"]=='C' && $weather["dewmin"]<100){ echo "<icon-41-45>".$weather["dewmin"]."</icon-41-45>";}
//non metric
if($weather["temp_units"]=='F' && $weather["dewmin"]<14){ echo "<icon-minus10>".$weather["dewmin"]."</icon-minus10 >";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<23){ echo "<icon-minus5>".$weather["dewmin"]."</icon-minus5>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<32){ echo "<icon-zero>".$weather["dewmin"]."</icon-zero>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<42.8){ echo "<icon-0-5>".$weather["dewmin"]."</icon-0-5>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<50){ echo "<icon-6-10>".$weather["dewmin"]."</icon-6-10>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<59){ echo "<icon-11-15>".$weather["dewmin"]."</icon-11-15>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<68){ echo "<icon-16-20>".$weather["dewmin"]."</icon-16-20>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<77){ echo "<icon-21-25>".$weather["dewmin"]."</icon-21-25>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<86){ echo "<icon-26-30>".$weather["dewmin"]."</icon-26-30>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<95){ echo "<icon-31-35>".$weather["dewmin"]."</icon-31-35>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<104){ echo "<icon-36-40>".$weather["dewmin"]."</icon-36-40>";}
else if($weather["temp_units"]=='F' && $weather["dewmin"]<300){ echo "<icon-41-45>".$weather["dewmin"]."</icon-41-45>";}
echo "°";?></div>