-
Notifications
You must be signed in to change notification settings - Fork 0
/
table_forecast.php
55 lines (52 loc) · 1.53 KB
/
table_forecast.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
<div class="right_div">
<table class="right_table table">
<tr class="tr_header">
<td/>
<?php for($i = 2; $i >= 0; $i--): ?>
<td>
<?php
$date = strtotime($dateF_arr[$i]);
echo getDayUkr($date);
echo date(", d.m", $date);?>
</td>
<?php endfor; ?>
</tr>
<tr>
<td rowspan="2"><img src="img/thermometer.png" align="ABSMIDDLE" width="20px"></td>
<?php for($i = 2; $i >= 0; $i--): ?>
<td><?php echo number_format(($tempMaxDay_arr[$i] + $tempMinDay_arr[$i]) / 2, 0)."°"; ?></td>
<?php endfor; ?>
</tr>
<tr>
<?php for($i = 2; $i >= 0; $i--): ?>
<td><?php echo number_format(($tempMaxNight_arr[$i] + $tempMinNight_arr[$i]) / 2, 0)."°"; ?></td>
<?php endfor; ?>
</tr>
<tr>
<td><img src="img/east_arrow.png" width="20px"></td>
<?php for($i = 2; $i >= 0; $i--): ?>
<td>
<?php echo number_format(($windMax_arr[$i] + $windMin_arr[$i]) / 2, 0); ?>
<img src="<?php getWindSrcUlr($windDir_arr[$i])?>" width="10px">
</td>
<?php endfor;?>
</tr>
<tr>
<td></td>
<?php for($i = 2; $i >= 0; $i--): ?>
<td>
<img src="<?php getSrcUlrMini($typeOfCloud_arr[$i], $precipitation_arr[$i])?>">
</td>
<?php endfor;?>
</tr>
</table>
</div>
<?php
function getDayUkr($date){
$days = array(
'Нд' , 'Пн' , 'Вт' , 'Ср' ,
'Чт' , 'Пт' , 'Сб');
$num_day = (date('w', $date));
$name_day = $days[$num_day];
return $name_day;
}?>