<?php
require'fun.php';
require'f_conectare.php';
conectare('prognoza meteo','prognoza-meteo');
$titlu='Prognoza meteo';
$back[1]='<a href="/extra-meniu">'.img('extra.png',1).'Extra meniu</a>';
if($go!='')
$back[2]='<a href="/prognoza-meteo">Prognoza meteo</a>';
require'f_sus.php';
echo$div[4].'Prognoza meteo'.$div[5];
if($go=='')
{
$form[0]='/prognoza-meteo" method="get';
$form[1]=1;
require'f_scris3.php';
$form[2]=$div[1].'Oras:<br />'.scris3('go','Adjud::LRAR,,Arad::LRBC,,Bacau::LRBM,,Baia Mare::Birlad,,Barlad::Bistrita::Blaj::Botosani::BRAILA,,Braila::BRASOV,,Brasov::LRBS,,Bucuresti / Inmh::LROP,,Bucuresti Otopeni::BUSTENI,,Busteni::Buzau::Calafat::Cimpina,,Campina::LRCS,,Caransebes::LRCL,,Cluj-Napoca::LRCK,,Constanta::LRCV,,Craiova::Deva::Dragasani::Fagaras::Galati::Giurgiu::Husi::LRIA,,Iasi::Lugoj::Mangalia::LROD,,Oradea::Petrosani::Pitesti::Ploiesti::PREDEAL,,Predeal::Resita::LRSM,,Satu Mare::Sebes::LRSB,,Sibiu::SINAIA,,Sinaia::LRSV,,Suceava / Salcea::Tecuci::LRTR,,Timisoara::Tirgoviste::LRTM,,Tirgu Mures::LRTC,,Tulcea::Vaslui::Zalau').$div[0];
$form[3]='go';
$form[4]='Arată';
require'f_form.php';
}
else
{
require'f_filtrul.php';
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'http://www.vremea.com/cgi-bin/metar.cgi?icao='.$go.'&template=M.htm');
curl_setopt($ch,CURLOPT_TIMEOUT,5);
curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_BINARYTRANSFER,true);
curl_setopt($ch,CURLOPT_VERBOSE,false);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($ch,CURLOPT_SSLVERSION,3);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($ch,CURLOPT_FRESH_CONNECT,1);
curl_setopt($ch,CURLOPT_FORBID_REUSE,1);
$text=str_replace('<!-- END_5DAY -->','                        <!-- END_5DAY -->',curl_exec($ch));
curl_close($ch);
echo filtrul(str_replace(['#f0efda','#d38f37','#834e09','#4782ba'],['#d8edfe','#87cbfc','#87cbfc','#87cbfc'],$text),'<!-- START_CURRENT -->','<!-- END_5DAY -->');
}
require'f_jos.php';