title = 'Барнаул погода'; $url = '/weather'; $this->params['breadcrumbs'] = [ [ "text"=>$this->title, "url"=>$url ] ]; $addtpage = ' amic.ru'; Yii::$app->og->title = $this->title.$addtpage; Yii::$app->og->description ='Погода в Алтайском крае - '.Yii::$app->og->description.$addtpage; Yii::$app->og->og_title = str_replace( '"',""", $this->title ); Yii::$app->og->og_description = str_replace( '"',""",Yii::$app->og->description); Yii::$app->og->canonical = $url; Yii::$app->og->og_type = "website"; jsonLD::addAmicORG(); $i = 1; foreach($this->params['breadcrumbs'] as $el){ jsonLD::addBreadcrumb($i, $el['url'], $el['text']); $i++; } $cat = '/home/admin/import/'; $data = [ '160.xml', '150.xml', '157.xml', '7591.xml', '7586.xml', '7306.xml' ]; $precipitationi = [ 1 => '', 2 => '', 3 => '', // снег дождь 4 => 'Cloud-Rain.svg', 5 => 'Cloud-Hail.svg', 6 => 'Cloud-Hail.svg', //снег 7 => 'Cloud-Hail-Alt.svg', //снег 8 => 'Cloud-Lightning.svg', 9 => '', 10 => '' ]; $cloudsi = [ -1 => '', // - туман 0 => 'Sun.svg', 1 => 'Cloud-Sun.svg', // 'Малооблачно', 2 => 'Cloud.svg', // 'Облачно', 3 => 'Cloud.svg', // 'Пасмурно' ]; ?>

Погода в Алтайском крае

Сейчас в Барнауле ".file_get_contents( '/home/admin/temp/temperature' )."oC   

"; } $cd =''; if( file_exists( $cat.'solar3.json' ) ){ $strn = @file_get_contents( $cat.'solar3.json' ); // $date = filemtime( $cat.'solar3.json' ); $solarnow = json_decode( $strn ); foreach($solarnow as $c) { if( $c < 4 ){ $cd .= '"#00ff00",'; }elseif( $c > 5 ){ $cd .= '"#ff0000",'; }else{ $cd .= '"#ffd810",'; } } } $ss = '"6:00","10:00","14:00","18:00","22:00","00:00"'; if( file_exists( $cat.'solar.json' ) ){ $str = @file_get_contents( $cat.'solar.json' ); $date = filemtime( $cat.'solar.json' ); $solar = json_decode( $str ); $s = ''; for( $i = 1; $i < 27; $i++ ){ $s .= date('"d M"',$date+$i*86400).','; } ?>
registerJs( // "myChart = new Chart(document.getElementById('js-chart-1').getContext( '2d' ),config); console.log(config)", // View::POS_END //); } foreach( $data as $file ) { $str = @file_get_contents( $cat.$file ); if( $str ){ $xml = simplexml_load_string( $str ); if( $xml ){ $town = rawurldecode( $xml->REPORT->TOWN['sname'] ); $town = ( $town == 'SLAVGOROD' )?'Славгород':$town; $town = ( $town == "KAMEN'-NA-OBI" )?'Камень-на-Оби':$town; $town = ( $town == "Заринск,+Алтайский+край,+Россия" )?'Заринск':$town; echo "

$town

"; foreach( $xml->REPORT->TOWN->FORECAST as $w ){ $t_max = $w->TEMPERATURE['max']; $t_min = $w->TEMPERATURE['min']; $p_min = $w->PRESSURE['min']; $p_max = $w->PRESSURE['max']; $w_min = $w->WIND['min']; $w_max = $w->WIND['max']; $day = $w['day']; $month = $w['month']; $hour = $w['hour']; $year = $w['year']; $cloudiness = $w->PHENOMENA['cloudiness']; $precipitation = $w->PHENOMENA['precipitation']; ?>
На час ..

oC до oC

Давление , мм рт.ст.
Ветер , м/с
" > " >
"; } } } ?>

«Предоставлено Meteoservice.ru»

render("/layouts/lenta/temalenta", ['topic'=>89, 'items'=>20])?>