Completed
Push — master ( c23b73...bac89c )
by Nikita
04:11
created

htmlcp1251.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<link rel="stylesheet" href="<?= $path ?>/_index.css">
2
<link rel="stylesheet" href="<?= $path ?>/forsuite.css">
3
4
<div class="content">
5
    <div class="content__top clearfix">
6
        <div class="current-weather">
7
            <div class="current-weather__today">����� <span
8
                    class="current-weather__local-time"><?= date("H:i") ?></span></div>
9
            <span class="current-weather__col current-weather__col_type_now t_c_<?= $city->fact->temperature ?>"><i
10
                    class="icon icon_size_48 icon_thumb_<?= $city->fact->getIcon() ?>" data-width="48"></i><span
11
                    class="current-weather__comment"><?= \YaWeather\ParseXml::encoding($city->fact->weather_type) ?></span><div
12
                    class="current-weather__thermometer current-weather__thermometer_type_now"><?= $city->fact->getTemperatureStr() ?>
13
                    �C
14
                </div></span>
15
            <?php
16
                foreach ($city->getCurrentDay()->AdditionalState() as $key => $value) {
17
                    echo '<span class="current-weather__col current-weather__col_type_after t_c_'.$value->temperature_avg.'"><span
18
                        class="current-weather__thermometer-name">'.(\YaWeather\ParseXml::encoding($key)).'</span><i
19
                        class="icon icon_thumb_'.$value->getIcon().' icon_size_30"
20
                        data-width="30"></i><div
21
                        class="current-weather__thermometer current-weather__thermometer_type_after">'.$value->getTemperatureAvgStr().'</div></span>';
22
                    }
23
            ?>
24
            <span class="current-weather__col current-weather__info"><div
25
                    class="current-weather__info-row">
26
                    <span class="current-weather__info-label">�����: </span><?= $city->getCurrentDay()->sunrise ?><span
27
                        class="current-weather__info-label current-weather__info-label_type_sunset">�����: </span><?= $city->getCurrentDay()->sunset ?>
28
                </div><div class="current-weather__info-row current-weather__info-row_type_wind"><span
29
                        class="current-weather__info-label">�����: </span> <span
30
                        class="wind-speed"><?= $city->fact->wind_speed ?> �/�</span> <abbr
31
                        class=" icon-abbr" title="�����: ������-�������"><?= \YaWeather\ParseXml::encoding($city->fact->getWindDirection()) ?></abbr><i
32
                        class="icon icon_size_12 icon_wind_<?= $city->fact->wind_direction ?> icon_wind"
33
                        data-width="12"></i></div><div
34
                    class="current-weather__info-row"><span
35
                        class="current-weather__info-label">��������: </span><?= $city->fact->humidity ?>%
36
                </div><div class="current-weather__info-row"><span
37
                        class="current-weather__info-label">��������: </span><?= $city->fact->pressure ?> ��
38
                    ��. ��.
39
                </div><div class="current-weather__info-row current-weather__info-row_type_time">�����
40
                    �� <?= $city->fact->getObservationTime() ?></div></span>
41
42
            <div class="current-weather__yesterday">���� � ��� ����: <?= $city->yesterday->getTemperatureStr() ?></div>
43
        </div>
44
    </div>
45
    <div class="forecasts">
46
        <div class="tabs-panes i-bem" data-bem="{&quot;tabs-panes&quot;:{&quot;id&quot;:&quot;forecasts&quot;}}">
47
            <div class="tabs-panes__pane tabs-panes__pane_active_yes" role="tabpanel" aria-labelledby="forecasts-tab-0"
48
                 aria-expanded="true">
49
                <ul class="forecast-brief forecast-item">
50
                    <?php
51
52
53
                    $i = 0;
54
                    foreach ($city->getListDays() as $key => $day) {
55
56
57
58
                        echo '<li class="forecast-brief__item">
59
                        <div class="forecast-brief__item-date ' . ($day->checkWeekend($key, true) ? "forecast-brief__item-date_weekend_yes" : "") . '"><span
60
                                class="forecast-brief__item-dayname">' . \YaWeather\ParseXml::encoding($day->getDayName($key)) . '</span><span
61
                                class="forecast-brief__item-day">' . \YaWeather\ParseXml::encoding($day->getDayNumber($key) . ' ' . ($i > 0 ? "" : $day->getMonthName($key))) . '</span></div>
62
                        <div class="forecast-brief__item-description t_c_' . $day->day->temperature_avg . '"><i
63
                                class="icon icon_thumb_' . $day->day->getIcon() . ' icon_size_30" data-width="30"></i>
64
65
                            <div class="forecast-brief__item-comment">' . \YaWeather\ParseXml::encoding($day->day->weather_type) . '</div>
66
                            <div class="forecast-brief__item-temp-day" title="���������� ����������� ���">
67
                             ' . $day->day->getTemperatureAvgStr() . '
68
                             ' . ($i > 0 ? "" : "���") . '
69
                            </div>
70
                        </div>
71
                        <div class="forecast-brief__item-temp-night t_c_' . $day->day->temperature_avg . '" title="��������� ����������� ���">
72
                            ' . $day->night->getTemperatureAvgStr() . '
73
                            ' . ($i > 0 ? "" : "���") . '
74
                        </div>
75
                    </li>';
76
77
                        $i++;
78
79
                        if($i == 6) break;
80
81
                        /*if ($day->checkWeekend($key) && $i <= 5)
0 ignored issues
show
Unused Code Comprehensibility introduced by
59% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
82
                            echo '<li class="forecast-brief__item forecast-brief__item_gap">&nbsp;</li>';*/
83
84
85
86
87
88
89
90
91
                    }
92
93
                    ?>
94
95
                </ul>
96
            </div>
97
98
            <h1 class="title title_level_1">������� �� 10 ����</h1>
99
100
            <div class="tabs-panes__pane tabs-panes__pane_active_yes" role="tabpanel" aria-labelledby="forecasts-tab-1" aria-expanded="false">
101
                <dl class="forecast-detailed forecast-item">
102
103
                    <?php
104
                    $i = 0;
105
                    foreach($city->getListDays() as $key => $day){
106
107
                        echo '<dt class="forecast-detailed__day ' . ($day->checkWeekend($key, true) ? "forecast-detailed__day_weekend" : "") . '">
108
                                <small class="forecast-detailed__weekday">' . \YaWeather\ParseXml::encoding($day->getDayName($key)) . '</small>
109
                                <strong class="forecast-detailed__day-number">' . $day->getDayNumber($key) . '<span class="forecast-detailed__day-month">'.\YaWeather\ParseXml::encoding($day->getMonthName($key)).'</span></strong>
110
                            </dt>';
111
112
                        echo '<dd class="forecast-detailed__day-info '.($i<1 ? "forecast-detailed__day-info_first": "").'">
113
                                <table class="weather-table">
114
                                    <thead class="weather-table__head">
115
                                    <tr>
116
                                        <th class="weather-table__head-cell" colspan="3"></th>
117
                                        <th class="weather-table__head-cell">
118
                                            <div class="weather-table__value">��������, <br>�� ��. ��.</div>
119
                                        </th>
120
                                        <th class="weather-table__head-cell">
121
                                            <div class="weather-table__value">��������</div>
122
                                        </th>
123
                                        <th class="weather-table__head-cell weather-table__head-cell_type_wind" colspan="2">
124
                                            <div class="weather-table__value">�����, �/�</div>
125
                                        </th>
126
                                    </tr>
127
                                </thead>';
128
                        //var_dump($day->getListDetail());
0 ignored issues
show
Unused Code Comprehensibility introduced by
78% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
129
                        echo '<tbody class="weather-table__body">';
130
131
                        foreach ($day->getListDetail() as $key => $detail) {
132
133
                            echo '<tr class="weather-table__row t t_c_' . $detail->temperature_avg . '">
134
                                <td class="weather-table__body-cell weather-table__body-cell_type_daypart">
135
                                    <div class="weather-table__daypart">'.\YaWeather\ParseXml::encoding($key).'</div>
136
                                    <div class="weather-table__temp">'.$detail->getTemperatureFromTo().'</div>
137
                                </td>
138
                                <td class="weather-table__body-cell weather-table__body-cell_type_icon">
139
                                    <div class="weather-table__value"><i class="icon icon_size_30 icon_thumb_'.$detail->getIcon().'"
140
                                                                         data-width="30"></i></div>
141
                                </td>
142
                                <td class="weather-table__body-cell weather-table__body-cell_type_condition">
143
                                    <div class="weather-table__value">' . \YaWeather\ParseXml::encoding($detail->weather_type) . '</div>
144
                                </td>
145
                                <td class="weather-table__body-cell weather-table__body-cell_type_air-pressure">
146
                                    <div class="weather-table__value">'.$detail->pressure.'</div>
147
                                </td>
148
                                <td class="weather-table__body-cell weather-table__body-cell_type_humidity">
149
                                    <div class="weather-table__value">'.$detail->humidity.'%</div>
150
                                </td>
151
                                <td class="weather-table__body-cell weather-table__body-cell_type_wind">
152
                                    <div class="weather-table__value"><abbr class=" icon-abbr"
153
                                                                            title="�����: �������">'.\YaWeather\ParseXml::encoding($detail->getWindDirection()).'</abbr><i
154
                                            class="icon icon_size_12 icon_wind_'.$detail->wind_direction.' icon_wind" data-width="12"></i><span
155
                                            class="weather-table__wind"><span class="wind-speed">'.$detail->wind_speed.'</span></span></div>
156
                                </td>
157
                                <td class="weather-table__body-cell weather-table__body-cell_type_wind-strength">
158
                                    <div class="weather-table__value"></div>
159
                                </td>
160
                            </tr>
161
162
                            ';
163
164
                        }
165
166
                        echo '</tbody>';
167
168
                        echo '</table>
169
                                <!--<div class="forecast-detailed__geomagnetic-field">
170
                                    <small class="forecast-detailed__key">��������� ����:</small>
171
                                    <div class="forecast-detailed__value">����� ����������</div>
172
                                </div>-->
173
                                <div class="forecast-detailed__moon"><i class="icon icon_size_26 icon_moon_'.$day->moon_phase.'" title=""
174
                                                                        data-width="26"></i></div>
175
                                <div class="forecast-detailed__sunset">
176
                                    <small class="forecast-detailed__key">�����</small>
177
                                    <div class="forecast-detailed__value">'.$day->sunset.'</div>
178
                                </div>
179
                                <div class="forecast-detailed__sunrise">
180
                                    <small class="forecast-detailed__key">�����</small>
181
                                    <div class="forecast-detailed__value">'.$day->sunrise.'</div>
182
                                </div>
183
                            </dd>';
184
185
186
187
                        $i++;
188
                    }
189
190
                    ?>
191
192
193
194
195
                </dl>
196
            </div>
197
198
199
        </div>
200
    </div>
201
</div>