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