2         require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
 
   3         require_once(CONST_BasePath.'/lib/init-website.php');
 
   4         require_once(CONST_BasePath.'/lib/log.php');
 
   6         $sOutputFormat = 'html';
 
   7         ini_set('memory_limit', '200M');
 
  11         $sSQL = "select placex.place_id, calculated_country_code as country_code, name->'name' as name, i.* from placex, import_polygon_delete i where placex.osm_id = i.osm_id and placex.osm_type = i.osm_type and placex.class = i.class and placex.type = i.type";
 
  12         $aPolygons = $oDB->getAll($sSQL);
 
  13         if (PEAR::isError($aPolygons))
 
  15                 failInternalError("Could not get list of deleted OSM elements.", $sSQL, $aPolygons);
 
  18 //var_dump($aPolygons);
 
  23         <meta charset="utf-8"/>
 
  24         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
 
  26         <title>Nominatim Deleted Data</title>
 
  28         <meta name="description" content="List of OSM data that has been deleted" lang="en-US" />
 
  33 <style type="text/css">
 
  39         border-collapse: collapse;
 
  40         background-color: white;
 
  48         border-left-color: #ddd;
 
  49         border-right-color: #ddd;
 
  50         background-color: #eee;
 
  51         -moz-border-radius: 0px 0px 0px 0px;
 
  58         border-left-color: #ddd;
 
  59         border-right-color: #ddd;
 
  60         background-color: white;
 
  61         -moz-border-radius: 0px 0px 0px 0px;
 
  65 <p>Objects in this table have been deleted in OSM but are still in the Nominatim database.</p>
 
  70 //var_dump($aPolygons[0]);
 
  71         foreach($aPolygons[0] as $sCol => $sVal)
 
  73                 echo "<th>".$sCol."</th>";
 
  76         foreach($aPolygons as $aRow)
 
  79                 foreach($aRow as $sCol => $sVal)
 
  84                                         $sOSMType = ($aRow['osm_type'] == 'N'?'node':($aRow['osm_type'] == 'W'?'way':($aRow['osm_type'] == 'R'?'relation':'')));
 
  85                                         echo '<td><a href="http://www.openstreetmap.org/browse/'.$sOSMType.'/'.$sVal.'" target="_new">'.$sVal.'</a></td>';
 
  88                                         echo '<td><a href="'.CONST_Website_BaseURL.'details?place_id='.$sVal.'">'.$sVal.'</a></td>';
 
  91                                         echo "<td>".($sVal?$sVal:' ')."</td>";