Warning: Undefined array key "id_language" in /pl/print.php on line 57
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 76
Warning: Undefined array key "id_language" in /_xcms/classes/class/baza.inc on line 352
Warning: Undefined array key "id_language" in /_xcms/classes/class/baza.inc on line 360
$tmpl->set_file('blocks2','news.html');
$tmpl->set_block('blocks2','main_station');
$tmpl->set_block('blocks2','main_station_no_photo');
$tmpl->set_block('blocks2','main_station_idd_man');
$tmpl->set_block('blocks2','main_station_idd_par_man');
$tmpl->set_block('blocks2','main_station_apar');
$tmpl->set_block('blocks2','photogallery');
$tmpl->set_block('blocks2','main_station_back');
$tmpl->set_block('blocks2','main_station_list');
$tmpl->set_block('blocks','modul');
$tmpl->set_block('blocks','table_photo');
$tmpl->set_block('blocks','more');
$tmpl->set_block('blocks','back');
$tmpl->set_block('blocks','scale');
$tmpl->set_block('blocks','table_th');
$tmpl->set_block('blocks','table_td');
$tmpl->set_block('blocks','table_tr');
$tmpl->set_block('blocks','table_table');
$tmpl->set_block('blocks','back');
$tmpl->set_file('blocks3','form.html');
$tmpl->set_block('blocks3','form_comment');
$iff = 0;
$photo_vert = 1;
$table = "photo";
$tmpl->set_var('main_station_apar_', "");
$tmpl->set_var('adds_', "");
$tmpl->set_var("date_label", "Wybierz zakres:");
$tmpl->set_var('photo_w', PHOTO_M_W);
$tmpl->set_var('photo_h', PHOTO_M_H);
$tmpl->set_var('GOOGLE_KEY', GOOGLE_KEY);
$tmpl->set_var('photo_margin','');
if(!isset($_GET["str"]))
$_GET["str"] = null;
if(!isset($_GET["idd"]))
$_GET["idd"] = null;
$tmpl->set_var('photo_margin', "");
$tmpl->set_var('modul_', "");
if($_GET["str"] == "photo")
{
///////////////////photo
$db2 = new DB__("select photo.id, photo.photo_m, photo.photo_b, photo_lang.text, stations_multi_lang.name, stations_multi.date_ from photo
left join photo_lang on photo_lang.id_photo=photo.id
left join stations_multi on stations_multi.id='".$_GET["idd"]."'
left join stations_multi_lang on stations_multi_lang.id_station=stations_multi.id and stations_multi_lang.id_lang='".$_SESSION["id_language"]."'
where photo.idd='".$_GET['idd']."' and photo.id_template=
(select id_template from template_menu where template_menu.id_menu='".$_GET["id"]."')
and photo.active='1' and stations_multi_lang.name != '' and stations_multi.active='1' and photo.photo_m != ''
group by photo.id
order by photo.ord");
if($db2->nf())
{
$site_name_idd = ", ".$db2->f('name');
while($db2->next_record())
{
$site_name_idd = ", ".$db2->f('name');
$tmpl->set_var('n_href', File::make_mode_rew($db2->f('name'), $_GET["id"], $_GET["idd"]));
$tmpl->set_var('n_date', File::date_from_to($db2->f('date_')));
$tmpl->set_var('n_name', $db2->f('name'));
if(!$db2->f('photo_b'))
{
$tmpl->set_var('n_photo', PATH_IMG.$db2->f('photo_m'));
$tmpl->set_var('n_onclick', "");
$tmpl->set_var('n_onmouseover', "");
}
else
{
$img_size = getImageSize(PATH_IMG.$db2->f('photo_b'));
$img_h = $img_size[1];
$tmpl->set_var('n_photo', PATH_IMG.$db2->f('photo_m'));
$tmpl->set_var('n_onclick', "javascript:show_photo('../pl/ajax_photo.php', 'path=".PATH_IMG."&photo=".$db2->f('photo_b')."&id=".$db2->f('id')."&table=photo', 'war_foto', event, '".$img_size[0]."', '".$img_h."','".PATH_IMG.$db2->f('photo_b')."');void(0);");
$tmpl->set_var('n_onmouseover',"this.style.cursor='pointer';");
}
$tmpl->parse('photo_', 'table_photo2', true);
}
$tmpl->parse('modul_', 'table_photogallery');
$tmpl->parse('modul_', 'back', true);
}
else
$tmpl->set_var('modul_', "");
$modul = $tmpl->subst('modul');
}
else if(isset($_GET["idd"]))
{
$db2 = new DB__("select stations_multi.*, stations_multi_lang.* from stations_multi
left join stations_multi_lang on stations_multi_lang.id_station=stations_multi.id and stations_multi_lang.id_lang='".$_SESSION["id_language"]."'
where stations_multi_lang.name != '' and stations_multi.active='1' and stations_multi.id='".$_GET["idd"]."'");
if($db2->next_record())
{
$site_name_idd = $db2->f('name')." - ";
$tmpl->set_var('n_href2', "index.php?id=".$_GET["id"]."&idd=".$db2->f('id')."&str=photo");
$tmpl->set_var('n_href', File::make_mode_rew("Stacje", $_GET["id"]));
$tmpl->set_var('n_date', File::date_from_to($db2->f('date_')));
$tmpl->set_var('n_name', $db2->f('name'));
$tmpl->set_var('n_subtext', $db2->f('subtext'));
$tmpl->set_var('n_text', $db2->f('text'));
//aparatura
$db3 = new DB__("select aparatura.*, aparatura_temp.id_station from aparatura, aparatura_temp
WHERE aparatura_temp.id_aparatura=aparatura.id and aparatura_temp.id_station='".$_GET["idd"]."'
order by aparatura.name");
if($db3->nf())
{
$next = 0;
while($db3->next_record())
{
$tmpl->set_var('ap_name', $db3->f('name'));
$tmpl->set_var('ap_year', $db3->f('year_'));
$tmpl->set_var('ap_text', $db3->f('text'));
$tmpl->parse('main_station_apar_', 'main_station_apar', true);
}
}
if($db2->f('code'))
$tmpl->set_var('s_code', $db2->f('code'));
else
$tmpl->set_var('s_code', "");
if($db2->f('code_m'))
$tmpl->set_var('s_code_m', $db2->f('code_m'));
else
$tmpl->set_var('s_code_m', "");
if($db2->f('commune'))
$tmpl->set_var('s_commune', $db2->f('commune'));
else
$tmpl->set_var('s_commune', "");
if($db2->f('city'))
$tmpl->set_var('s_city', $db2->f('city'));
else
$tmpl->set_var('s_city', "");
if($db2->f('address'))
$tmpl->set_var('s_address', $db2->f('address'));
else
$tmpl->set_var('s_address', "");
if($db2->f('zone'))
$tmpl->set_var('s_zone', $db2->f('zone'));
else
$tmpl->set_var('s_zone', "");
if($db2->f('code_s'))
$tmpl->set_var('s_code_s', $db2->f('code_s'));
else
$tmpl->set_var('s_code_s', "");
if($_GET["id"] == 211)
{
$tmpl->set_var('s_time_us', "1-godzinny");
$tmpl->set_var('s_type_pom', "automatyczny");
}
else
{
$tmpl->set_var('s_time_us', "24-godzinny");
$tmpl->set_var('s_type_pom', "manualny");
}
if($db2->f('x_s'))
$tmpl->set_var('s_x_s', $db2->f('x_s'));
else
$tmpl->set_var('s_x_s', "");
if($db2->f('y_s'))
$tmpl->set_var('s_y_s', $db2->f('y_s'));
else
$tmpl->set_var('s_y_s', "");
if($db2->f('npm'))
$tmpl->set_var('s_npm', $db2->f('npm'));
else
$tmpl->set_var('s_npm', "");
if($db2->f('npm'))
$tmpl->set_var('s_npm', $db2->f('npm'));
else
$tmpl->set_var('s_npm', "");
if($db2->f('date_u'))
$tmpl->set_var('s_date_u', $db2->f('date_u'));
else
$tmpl->set_var('s_date_u', "");
if($db2->f('kind_s'))
$tmpl->set_var('s_kind_s', $db2->f('kind_s'));
else
$tmpl->set_var('s_kind_s', "");
if($db2->f('type_s'))
$tmpl->set_var('s_type_s', $db2->f('type_s'));
else
$tmpl->set_var('s_type_s', "");
if($db2->f('type_o'))
$tmpl->set_var('s_type_o', $db2->f('type_o'));
else
$tmpl->set_var('s_type_o', "");
if($db2->f('type_u'))
$tmpl->set_var('s_type_u', $db2->f('type_u'));
else
$tmpl->set_var('s_type_u', "");
if($db2->f('sources'))
$tmpl->set_var('s_sources', $db2->f('sources'));
else
$tmpl->set_var('s_sources', "");
if($db2->f('jpoat'))
$tmpl->set_var('s_jpoat', $db2->f('jpoat'));
else
$tmpl->set_var('s_jpoat', "");
if($db2->f('area'))
$tmpl->set_var('s_area', $db2->f('area'));
else
$tmpl->set_var('s_area', "");
if($db2->f('amount_p'))
$tmpl->set_var('s_amount_p', $db2->f('amount_p'));
else
$tmpl->set_var('s_amount_p', "");
if($db2->f('env_n'))
$tmpl->set_var('s_env_n', $db2->f('env_n'));
else
$tmpl->set_var('s_env_n', "");
if($db2->f('env_e'))
$tmpl->set_var('s_env_e', $db2->f('env_e'));
else
$tmpl->set_var('s_env_e', "");
if($db2->f('env_s'))
$tmpl->set_var('s_env_s', $db2->f('env_s'));
else
$tmpl->set_var('s_env_s', "");
if($db2->f('env_w'))
$tmpl->set_var('s_env_w', $db2->f('env_w'));
else
$tmpl->set_var('s_env_w', "");
//////////fotki///////////////
$photo = "";
$db3 = new DB__("select photo.* from photo
where photo.idd='".$db2->f('id')."' and photo.id_template=(select id_template from template_menu where template_menu.id_menu='".$_GET["id"]."') and photo.active='1' and photo.photo_m != ''
order by photo.ord");
if($db3->nf())
{
$next = 0;
while($db3->next_record())
{
$next++;
$photo = $db3->f('photo_m');
if(!$db3->f('photo_b'))
{
$tmpl->set_var('n_photo', PATH_IMG.$db3->f('photo_m'));
$tmpl->set_var('n_onclick', "");
$tmpl->set_var('n_onmouseover', "");
}
else
{
$img_size = getImageSize(PATH_IMG.$db3->f('photo_b'));
$img_h = $img_size[1];
$tmpl->set_var('n_photo', PATH_IMG.$db3->f('photo_m'));
$tmpl->set_var('n_onclick', "javascript:show_photo('../pl/ajax_photo.php', 'path=".PATH_IMG."&photo=".$db3->f('photo_b')."&id=".$db3->f('id')."&table=photo', 'war_foto', event, '".$img_size[0]."', '".$img_h."','".PATH_IMG.$db3->f('photo_b')."');void(0);");
$tmpl->set_var('n_onmouseover',"this.style.cursor='pointer';");
}
$tmpl->parse('photo_', 'table_photo', true);
if($photo_vert < $next)
{
$tmpl->parse('photo_', 'table_clear', true);
$tmpl->parse('photo_', 'photogallery', true);
break;
}
}
}
//mapa
//google
$g = new Google_map;
$g->g_width = 688;
$g->g_height = 400;
$max_x = 0;
$min_x = 1000;
$max_y = 0;
$min_y = 1000;
$show = 0;//ukryj obiekty
$max_x = $db2->f('x');
$min_x = $db2->f('x');
$max_y = $db2->f('y');
$min_y = $db2->f('y');
//wersja z przeladowaniem
$link = "f('name'), $_GET["id"], $db2->f('id'))."';\">[więcej ››]";
$g->google_add_point($db2->f('x'), $db2->f('y'), $db2->f('id'), $db2->f('name'), $g->google_make_description($db2->f('address'), "", "", "", "", "", "", "", $link), $photo, "", 1, $show, "");
//google
$tmpl->set_var('min_lat', $min_y);
$tmpl->set_var('max_lat', $max_y);
$tmpl->set_var('min_long', $min_x);
$tmpl->set_var('max_long', $max_x);
$tmpl->set_var('s_map_', $g->create_google_map());
//parametry
$db3 = new DB__("select stations_multi_params.* from stations_multi_params, stations_multi_temp
where stations_multi_temp.id_param=stations_multi_params.id and stations_multi_temp.id_station='".$_GET["idd"]."'
order by stations_multi_temp.id_station desc, stations_multi_params.id");
if($db3->nf())
{
while($db3->next_record())
{
$tmpl->set_var('par_href_m', "index.php?id=246&id_station[]=".$db2->f('id')."&type=month_man&id_param=".$db3->f('id'));
$tmpl->set_var('par_href_year', "index.php?id=246&id_station[]=".$db2->f('id')."&type=all_man&id_param=".$db3->f('id'));
//$tmpl->set_var('par_href_m2', "/export_cs/manual/".strtolower($db2->f('export_cs'))."/".$db2->f('export_cs')."_s24.csv");
//$tmpl->set_var('par_href_y', "index.php?id=213&id_station[]=".$db2->f('id')."&type=all&id_param=".$db3->f('id'));
//$tmpl->set_var('par_href_y2', "/export_cs/".$db2->f('export_cs')."/".$db2->f('export_cs')."_doTeraz_1h.csv");
$tmpl->set_var('par_name', $db3->f('name'));
$tmpl->parse('main_station_idd_par_', 'main_station_idd_par_man', true);
}
}
//pobierz plik
$tmpl->set_var('par_href_m2', "/export_cs/manual/".$db2->f('export_cs')."/".strtolower($db2->f('export_cs'))."_s24.csv");
/*
//wykres tydzien/doba
function add_to_table($id_stations)
{
$sum_array = array();
$next_station = 0;
reset($id_stations);
while(list($i, $l) = each($id_stations))
{
$next_station++;
reset($this->station_csv_arr[$l]);
while(list($k, $v) = each($this->station_csv_arr[$l]))
{
if($next_station == 1)
$sum_array[$k][] = $v[0];
$sum_array[$k][] = $v[1];
}
}
//tu tworzymy tabele
reset($sum_array);
while(list($i, $l) = each($sum_array))
{
$this->tmpl->set_var('tr_', "");
$this->tmpl->set_var('id_tr', "");
$this->tmpl->set_var('id_td', "");
while(list($ii, $ll) = each($l))
{
//$this->js_lines .= "['".$v[0]."',".$v[1]."],";
$this->tmpl->set_var('td_', $ll);
$this->tmpl->parse('tr_', 'table_td', true);
}
$this->tmpl->parse('t_tr_', 'table_tr', true);
}
}*/
include("/_xcms/classes/class/plot.inc");
$pl = new Plot($tmpl, "month_man", $_GET["idd"]);
$pl->plot_path = "/export_cs/manual/";
$tmpl->set_var('main_station_idd_table_1h_', $pl->draw_table());
$tmpl->parse('modul_', 'main_station_idd_man', true);
//wybór wyniku dla stacji
$dbx = new DB__("select stations_multi.*, stations_multi_lang.* from stations_multi
left join stations_multi_lang on stations_multi_lang.id_station=stations_multi.id and stations_multi_lang.id_lang='".$_SESSION["id_language"]."'
where stations_multi.id_menu='".$_GET["id"]."' and stations_multi.id!='".$_GET["idd"]."' and stations_multi_lang.name != '' and stations_multi.active='1'
group by stations_multi.id
order by stations_multi.date_ desc, stations_multi.id desc");
if($dbx->nf())
{
while($dbx->next_record())
{
$tmpl->set_var("option_selected", "");
$tmpl->set_var("option_value", $dbx->f('id'));
$tmpl->set_var("option_", $dbx->f('name'));
$tmpl->parse("id_station_", 'table_option' ,true);
}
$tmpl->parse('modul_', 'main_station_list', true);
}
$tmpl->parse('modul_', 'main_station_back', true);
}
$modul = $tmpl->subst('modul');
}
else
{
$db2 = new DB__("select stations_multi.*, stations_multi_lang.* from stations_multi
left join stations_multi_lang on stations_multi_lang.id_station=stations_multi.id and stations_multi_lang.id_lang='".$_SESSION["id_language"]."'
where stations_multi.id_menu='".$_GET["id"]."' and stations_multi_lang.name != '' and stations_multi.active='1'
group by stations_multi.id
order by stations_multi.date_ desc, stations_multi.id desc");
if($db2->nf())
{
//google
$g = new Google_map;
$g->g_width = 688;
$g->g_height = 400;
$max_x = 0;
$min_x = 1000;
$max_y = 0;
$min_y = 1000;
$show = 0;//ukryj obiekty
while($db2->next_record())
{
//google
$show = 1;
if($db2->f('x') > $max_x) $max_x = $db2->f('x');
if($db2->f('x') < $min_x) $min_x = $db2->f('x');
if($db2->f('y') > $max_y) $max_y = $db2->f('y');
if($db2->f('y') < $min_y) $min_y = $db2->f('y');
$iff++;
$tmpl->set_var('main_news_div_', "");
$tmpl->set_var('photo_', "");
$tmpl->set_var('n_href', File::make_mode_rew($db2->f('name'), $_GET["id"], $db2->f('id')));
$tmpl->set_var('n_date', File::date_from_to($db2->f('date_u')));
$tmpl->set_var('n_title', $db2->f('name'));
$tmpl->set_var('n_address', $db2->f('address'));
$tmpl->set_var('n_wsp', "dł.: ".$db2->f('x_s').", szer.: ".$db2->f('y_s'));
$tmpl->set_var('n_id', $db2->f('id'));
//////////fotki///////////////
$photo = "";
$db3 = new DB__("select photo.* from photo
where photo.idd='".$db2->f('id')."' and photo.id_template=(select id_template from template_menu where template_menu.id_menu='".$_GET["id"]."') and photo.active='1' and photo.photo_m != '' and photo.ord=1");
if($db3->next_record())
{
$photo = $db3->f('photo_m');
if(!$db3->f('photo_b'))
{
$tmpl->set_var('n_photo', PATH_IMG.$db3->f('photo_m'));
$tmpl->set_var('n_onclick', "");
$tmpl->set_var('n_onmouseover', "");
}
else
{
$img_size = getImageSize(PATH_IMG.$db3->f('photo_b'));
$img_h = $img_size[1];
$tmpl->set_var('n_photo', PATH_IMG.$db3->f('photo_m'));
$tmpl->set_var('n_onclick', "javascript:show_photo('../pl/ajax_photo.php', 'path=".PATH_IMG."&photo=".$db3->f('photo_b')."&id=".$db3->f('id')."&table=photo', 'war_foto', event, '".$img_size[0]."', '".$img_h."','".PATH_IMG.$db3->f('photo_b')."');void(0);");
$tmpl->set_var('n_onmouseover',"this.style.cursor='pointer';");
}
$tmpl->parse('photo_', 'photo2', true);
$tmpl->parse('modul_temp', 'main_station', true);
}
else
$tmpl->parse('modul_temp', 'main_station_no_photo', true);
//wersja z przeladowaniem
$link = "f('name'), $_GET["id"], $db2->f('id'))."';\">[więcej ››]";
$g->google_add_point($db2->f('x'), $db2->f('y'), $db2->f('id'), $db2->f('name'), $g->google_make_description($db2->f('address'), "", "", "", "", "", "", "", $link), $photo, "", 1, $show, "");
//google
}
//mapa
$tmpl->set_var('min_lat', $min_y);
$tmpl->set_var('max_lat', $max_y);
$tmpl->set_var('min_long', $min_x);
$tmpl->set_var('max_long', $max_x);
$tmpl->set_var('modul_gm', $g->create_google_map());
$tmpl->parse('modul_', 'modul_gm', true);
$tmpl->parse('modul_', 'modul_temp', true);
}
}
$modul = $tmpl->subst('modul');
?>
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 153
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 154
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 7
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 252
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 253
Warning: Undefined array key "id_language" in /pl/inc/site.inc on line 254
WIOŚ w Łodzi