]> git.openstreetmap.org Git - nominatim.git/blob - website/deletable.php
Merge pull request #508 from mtmail/addtype-in-installation.md
[nominatim.git] / website / deletable.php
1 <?php
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');
5         require_once(CONST_BasePath.'/lib/output.php');
6         ini_set('memory_limit', '200M');
7
8         $sOutputFormat = 'html';
9
10         $oDB =& getDB();
11
12         $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";
13         $aPolygons = chksql($oDB->getAll($sSQL),
14                             "Could not get list of deleted OSM elements.");
15
16         if (CONST_DEBUG)
17         {
18                 var_dump($aPolygons);
19                 exit;
20         }
21 ?>
22 <!DOCTYPE html>
23 <html>
24 <head>
25         <meta charset="utf-8"/>
26         <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
27         
28         <title>Nominatim Deleted Data</title>
29         
30         <meta name="description" content="List of OSM data that has been deleted" lang="en-US" />
31
32 </head>
33
34 <body>
35 <style type="text/css">
36 table {
37         border-width: 1px;
38         border-spacing: 0px;
39         border-style: solid;
40         border-color: gray;
41         border-collapse: collapse;
42         background-color: white;
43         margin: 10px;
44 }
45 table th {
46         border-width: 1px;
47         padding: 2px;
48         border-style: inset;
49         border-color: gray;
50         border-left-color: #ddd;
51         border-right-color: #ddd;
52         background-color: #eee;
53         -moz-border-radius: 0px 0px 0px 0px;
54 }
55 table td {
56         border-width: 1px;
57         padding: 2px;
58         border-style: inset;
59         border-color: gray;
60         border-left-color: #ddd;
61         border-right-color: #ddd;
62         background-color: white;
63         -moz-border-radius: 0px 0px 0px 0px;
64 }
65 </style>
66
67 <p>Objects in this table have been deleted in OSM but are still in the Nominatim database.</p>
68
69 <table>
70 <?php
71         if (!$aPolygons) exit;
72         echo "<tr>";
73 //var_dump($aPolygons[0]);
74         foreach($aPolygons[0] as $sCol => $sVal)
75         {
76                 echo "<th>".$sCol."</th>";
77         }
78         echo "</tr>";
79         foreach($aPolygons as $aRow)
80         {
81                 echo "<tr>";
82                 foreach($aRow as $sCol => $sVal)
83                 {
84                         switch($sCol)
85                         {
86                                 case 'osm_id':
87                                         echo '<td>'.osmLink($aRow).'</td>';
88                                         break;
89                                 case 'place_id':
90                                         echo '<td>'.detailsLink($aRow).'</td>';
91                                         break;
92                                 default:
93                                         echo "<td>".($sVal?$sVal:'&nbsp;')."</td>";
94                                         break;
95                         }
96                 }
97                 echo "</tr>";
98         }
99 ?>
100 </table>
101
102
103
104 </body>
105 </html>