Location: PHPKode > projects > OpenBizMap > obm2007.1/mydata/config/script/script_give_lat_and_long_for_voivod.php
<?php
  include("./odb_config.php");
  include("./mydata/script/inc_functions.txt");
  include("./mydata/script/inc_data.txt");
  
  $bagaccess_array[""]=2;
  $bagaccess_array["all"]=2;
  $pf_result_array=search("[Województwo (którego jest siedzibą]");
  if (count($pf_result_array))
  { 
    while(list($key,$line)=each($pf_result_array))
    {
      $voivod_array[read($line,'Województwo (którego jest siedzibą)')]['Latitude']=read($line,'Latitude');
      $voivod_array[read($line,'Województwo (którego jest siedzibą)')]['Longitude']=read($line,'Longitude');
    }
  }
  
  $pf_result_array=search("-plwiki województwo -terc");
  if (count($pf_result_array))
  {
    while(list($key,$line)=each($pf_result_array))
    {
      $variable_array=line2array($line);
      $variable_array['Latitude']=$voivod_array[$variable_array['Województwo']]['Latitude'];
      $variable_array['Longitude']=$voivod_array[$variable_array['Województwo']]['Longitude'];
      //print_r($variable_array);
      //exit;
      save($variable_array);
    }
  }
?>
Return current item: OpenBizMap