$value){ if($value[0]=="Tutti") $Group.=$index.","; } } else if($GrpFilter==4) { $Group="4304.2_ES_ES"; } else { foreach($aGroup as $index => $value){ $Group.=$index.","; } } //date le coordinate dei due estremi (vertici della mappa da visualizzare) calcolo scala e centro mappa // $x1,$y1,$x2,$y2,$mapWidth,$mapHeigth; //calcolo centro mappa $x1=&$reg_vect[''.$codReg][0]; $x2=&$reg_vect[''.$codReg][2]; $y1=&$reg_vect[''.$codReg][1]; $y2=&$reg_vect[''.$codReg][3]; if($x1>$x2) $centerX=round(abs(($x1-$x2)/2))+$x2; else $centerX=round(abs(($x2-$x1)/2))+$x1; if($y1>$y2) $centerY=round(abs(($y1-$y2)/2)+$y2); else $centerY=round(abs(($y2-$y1)/2)+$y1); $lenx=1000 * abs($x2 - $x1); $leny=1000 * abs($y1 - $y2); $w=0.2832; $h=0.2825; $lenx = (int)($lenx / ($w * $MapWidth)); $leny = (int)($leny / ($h * $MapHeight)); if($lenx < $leny) $scale=$leny; else $scale=$lenx; // echo "index.htm?Group=$Group&StartScale=$scale&StartX=$centerX&StartY=$centerY"; //print("http://asd/Product/Customers/Enel2/index.htm?Group=$Group&StartScale=$scale&StartX=$centerX&StartY=$centerY&GrpFilter=$GrpFilter&IdCust=4304.2.A63twE&lang=ITA"); //return; //infine chiamo la mia pagina index... header("Location: index.htm?Group=$Group&StartScale=$scale&StartX=$centerX&StartY=$centerY&GrpFilter=$GrpFilter&IdCust=$idCust&lang=$lang"); ?>