[362] | 1 | <?php |
---|
| 2 | /* alkisinlaybaurecht.php - Inlay fuer Template: Baurecht |
---|
| 3 | ALKIS-Buchauskunft, Kommunales Rechenzentrum Minden-Ravensberg/Lippe (Lemgo). |
---|
| 4 | Ähnlich alkisbaurecht, aber nur Basisdaten, kein Footer und keine Flurstücks-Verschneidung. |
---|
| 5 | |
---|
| 6 | Version: |
---|
| 7 | 2016-02-24 Version fuer norGIS-ALKIS-Import |
---|
[377] | 8 | 2016-11-29 HTML5, Gemeinsam genutzte Datenbanken ermöglichen |
---|
[387] | 9 | 2017-06-08 Validierung Eingabeparameter, Feinkorrekturen |
---|
[389] | 10 | 2017-10-09 Sauber filtern auf endet IS NULL |
---|
[412] | 11 | 2018-11-09 Umstellung Full-Schema |
---|
[416] | 12 | 2018-11-15 Nachkorrektur |
---|
[362] | 13 | */ |
---|
| 14 | session_start(); |
---|
[387] | 15 | $cntget = extract($_GET); // Parameter in Variable umwandeln |
---|
| 16 | // strikte Validierung aller Parameter |
---|
| 17 | if (!isset($gmlid) or !preg_match('#^[0-9A-Za-z]{16}$#', $gmlid)) {die("Eingabefehler gmlid");} |
---|
| 18 | if (!isset($gkz) or !preg_match('#^[0-9]{3}$#', $gkz)) {die("Eingabefehler gkz");} |
---|
| 19 | |
---|
[362] | 20 | require_once("alkis_conf_location.php"); |
---|
| 21 | if ($auth == "mapbender") {require_once($mapbender);} |
---|
[402] | 22 | echo <<<END |
---|
[377] | 23 | <!doctype html> |
---|
| 24 | <html lang="de"> |
---|
[362] | 25 | <head> |
---|
[377] | 26 | <meta charset="utf-8"> |
---|
[387] | 27 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
---|
[362] | 28 | <title>ALKIS Bau-, Raum- oder Bodenordnungsrecht</title> |
---|
| 29 | <link rel="stylesheet" type="text/css" href="alkisauszug.css"> |
---|
| 30 | <link rel="shortcut icon" type="image/x-icon" href="ico/Gericht.ico"> |
---|
| 31 | <script type="text/javascript"> |
---|
| 32 | function imFenster(dieURL) { |
---|
| 33 | var link = encodeURI(dieURL); |
---|
| 34 | window.open(link,'','left=30,top=30,width=680,height=800,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes'); |
---|
| 35 | } |
---|
| 36 | </script> |
---|
| 37 | </head> |
---|
| 38 | <body> |
---|
[402] | 39 | END; |
---|
[377] | 40 | $con = pg_connect($dbconn." options='--application_name=ALKIS-Auskunft_alkisinlaybaurecht.php'"); |
---|
[387] | 41 | if (!$con) echo "\n<p class='err'>Fehler beim Verbinden der DB</p>"; |
---|
[362] | 42 | |
---|
[377] | 43 | // Keine Spalten, die eine Berechtigungsprüfung nach Gemeinde ermöglichen: |
---|
[416] | 44 | $sql ="SELECT r.ogc_fid, r.name, r.stelle, r.bezeichnung AS rechtbez, a.beschreibung AS adfbez, d.bezeichnung AS stellbez, round(st_area(r.wkb_geometry)::numeric,0) AS flae |
---|
[362] | 45 | FROM ax_bauraumoderbodenordnungsrecht r |
---|
[412] | 46 | LEFT JOIN ax_artderfestlegung_bauraumoderbodenordnungsrecht a ON r.artderfestlegung = a.wert |
---|
[389] | 47 | LEFT JOIN ax_dienststelle d ON r.land=d.land AND r.stelle=d.stelle |
---|
| 48 | WHERE r.gml_id= $1 AND r.endet IS NULL AND d.endet IS NULL;"; |
---|
[362] | 49 | |
---|
| 50 | $v = array($gmlid); |
---|
| 51 | $res = pg_prepare("", $sql); |
---|
| 52 | $res = pg_execute("", $v); |
---|
| 53 | |
---|
| 54 | if (!$res) { |
---|
[387] | 55 | echo "\n<p class='err'>Fehler bei Baurecht.</p>"; |
---|
| 56 | if ($debug > 2) {echo "\n<p class='err'>SQL=<br>".$sql."<br>$1 = ".$gmlid."</p>";} |
---|
[362] | 57 | } |
---|
[387] | 58 | echo "\n<h2><img src='ico/Gericht.png' width='16' height='16' alt=''> Bau-, Raum- oder Bodenordnungsrecht</h2>"; |
---|
[362] | 59 | |
---|
[402] | 60 | if ($row = pg_fetch_assoc($res)) { |
---|
[362] | 61 | echo "\n<table>" |
---|
| 62 | ."\n<tr>" |
---|
| 63 | ."\n\t<td class='li'>Art der Festlegung:</td>\n\t<td>" |
---|
| 64 | ."<span class='wichtig'>".$row["adfbez"]."</span></td>" |
---|
| 65 | ."\n</tr>"; |
---|
| 66 | $enam=$row["name"]; |
---|
| 67 | if ($enam != "") { |
---|
| 68 | echo "\n<tr>" |
---|
| 69 | ."\n\t<td class='li'>Eigenname des Gebietes:</td>\n\t<td>".$enam."</td>" |
---|
| 70 | ."\n</tr>"; |
---|
| 71 | } |
---|
| 72 | echo "\n<tr>" |
---|
| 73 | ."\n\t<td class='li'>Verfahrensnummer:</td>\n\t<td>".$row["rechtbez"]."</td>" |
---|
| 74 | ."\n</tr>"; |
---|
| 75 | $stell=$row["stelle"]; |
---|
| 76 | if ($stell != "") { |
---|
| 77 | echo "\n<tr>" |
---|
| 78 | ."\n\t<td class='li'>Dienststelle:</td>\n\t<td>".$row["stellbez"]."</td>" |
---|
| 79 | ."\n</tr>"; |
---|
| 80 | } |
---|
| 81 | echo "\n<tr>" |
---|
| 82 | ."\n\t<td class='li'>Fläche:</td>"; |
---|
| 83 | $flae=number_format($row["flae"],0,",",".")." m²"; |
---|
| 84 | echo "\n\t<td>".$flae."</td>" |
---|
| 85 | ."\n</tr>" |
---|
| 86 | ."\n</table>"; |
---|
| 87 | } else { |
---|
| 88 | echo "\n<p class='err'>Fehler! Kein Treffer bei gml_id=".$gmlid."</p>"; |
---|
| 89 | } |
---|
| 90 | |
---|
| 91 | echo "\n<p class='nwlink'>" |
---|
| 92 | ."\n\t<a href='javascript:imFenster(\"alkisbaurecht.php?gkz=".$gkz."&gmlid=".$gmlid."\")' " |
---|
| 93 | ."' title='Bau-, Raum- oder Bodenordnungsrecht'>Weitere Auskunft <img src='ico/Gericht.png' width='16' height='16' alt=''></a>" |
---|
| 94 | ."\n</p>"; |
---|
| 95 | |
---|
| 96 | ?> |
---|
| 97 | |
---|
| 98 | </body> |
---|
| 99 | </html> |
---|