error_reporting(E_ERROR);
function daj_plan($fpietro, $fnumer="", $fid="", $fopis="", $fskala=1, $fbranza="", $fbranzao="")
{
$opism=array("pietro"=>"piętro","parter"=>"parter","podziemie"=>"podziemie","antresola"=>"antresola");
$tx = "";
if( file_exists("sklepy/sklepy.txt") )
{
$arr=file("sklepy/sklepy.txt");
$l=0;
$kor_y=0;
$kor_x=0;
while(list($key,$val) = each($arr))
{
list($wersja,$pietro,$numer,$nazwa,$tel,$branza, $branzao,$opis, $www, $x, $y, $w, $h) = explode("#",$val);
if(trim($pietro)==trim($fpietro))
{ if(($x!="")&&($y!=""))
{
if((trim($pietro)=="parter")||(trim($pietro)=="pietro")||(trim($pietro)=="podziemie"))
$kor_y=70;
$x+=$kor_x;
$y+=$kor_y;
if ((trim($fnumer)==trim($numer))||(trim($fnumer===""))) $dodatek="plan_active"; else $dodatek="plan_not_active";
if (trim($fnumer===""))
{
if((trim($fbranza)==trim($branza))||(trim($fbranza===""))) $dodatek="plan_active"; else $dodatek="plan_not_active";
if((trim($fbranzao)!=trim($branzao))&&(trim($fbranzao!=""))) $dodatek="plan_not_active";
}
if(trim($numer)=="pic")
{
$tx .= "";
}
else
{
$dod_popup = "popover";
$dod_link = "";
$dod_end ="";
if ($nazwa==="---")
{
$dodatek .= " plan_elem_empty";
$dod_popup = "";
$dod_link = "";
$dod_end = "";
}
if(trim($branzao)=="")$branzao=$branza;
$dodatek_kol = "col".md5(trim($branza));
$tx .= "$dod_link