This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrainfallf-year-month1.php
110 lines (74 loc) · 2.23 KB
/
rainfallf-year-month1.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
<?php include('livedata.php');include('common.php');header('Content-type: text/html; charset=utf-8');?>
<div class="hometemperatureindoor">
<?php
//rain year
if ($weather["temp_units"]=='C' && $weather["rain_year"]>=1000){echo "<div class=\"circlerainyear\"><rainc>", round($weather["rain_year"],0) ;
echo " </rainc>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".date('Y')."
</spanwindtitle>
</div> " ;}
else if ($weather["temp_units"]=='C' && $weather["rain_year"]>=0){echo "<div class=\"circlerainyear\"><rainc>", number_format($weather["rain_year"],1) ;
echo " </rainc>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".date('Y')."
</spanwindtitle>
</div> " ;}
//fahrenheit
else if ( $weather["rain_year"]>=1000){echo "<div class=\"circlerainyear\"><rainf>", round($weather["rain_year"],0) ;
echo " </rainf>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".date('Y')."
</spanwindtitle>
</div> " ;}
else if ( $weather["rain_year"]>=0){echo "<div class=\"circlerainyear\"><rainf>", number_format($weather["rain_year"],1) ;
echo " </rainf>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".date('Y')."
</spanwindtitle>
</div> " ;}
?>
<?php
//rain month
if ($weather["temp_units"]=='C' && $weather["rain_month"]>=100){echo "<div class=\"circlerainmonth\"><rainc>", number_format((float)$weather["rain_month"],1) ;
echo " </rainc>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".strftime(" %b")."
</spanwindtitle>
</div> " ;}
else if ($weather["temp_units"]=='C' && $weather["rain_month"]>=0){echo "<div class=\"circlerainmonth\"><rainc>", number_format($weather["rain_month"],1) ;
echo " </rainc>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".strftime(" %b")."
</spanwindtitle>
</div> " ;}
//fahrenheit
else if ($weather["temp_units"]=='F' && $weather["rain_month"]>=0){echo "<div class=\"circlerainmonth\"><rainf>", number_format($weather["rain_month"],1) ;
echo "</rainf>
<spanmaxwind>
". $weather["rain_units"]."
</spanmaxwind>
<spanwindtitle>
".strftime(" %b")."
</spanwindtitle>
</div> " ;}
?>
</div>