[330] | 1 | <?php |
---|
| 2 | /* alkisinlaybaurecht.php - Inlay fuer Template: Baurecht |
---|
| 3 | ALKIS-Buchauskunft, Kommunales Rechenzentrum Minden-Ravensberg/Lippe (Lemgo). |
---|
| 4 | |
---|
| 5 | Version: |
---|
[287] | 6 | 2011-07-26 debug |
---|
| 7 | 2011-11-28 import_request_variables |
---|
| 8 | 2011-12-14 function imFenster |
---|
| 9 | 2013-04-08 deprecated "import_request_variables" ersetzt |
---|
| 10 | 2013-06-27 hiervon neue Variante alkisbaurecht (ohne "inlay"), |
---|
[330] | 11 | dafÃŒr hier die SchlÃŒssel ganz raus und FlurstÃŒcks-Verschneidung raus. |
---|
| 12 | 2014-09-03 PostNAS 0.8: ohne Tab. "alkis_beziehungen", mehr "endet IS NULL", Spalten varchar statt integer |
---|
| 13 | 2014-09-10 Bei Relationen den Timestamp abschneiden |
---|
[339] | 14 | 2014-09-30 Umbenennung SchlÃŒsseltabellen (Prefix) |
---|
[330] | 15 | */ |
---|
[132] | 16 | session_start(); |
---|
[330] | 17 | $cntget = extract($_GET); |
---|
| 18 | require_once("alkis_conf_location.php"); |
---|
| 19 | if ($auth == "mapbender") {require_once($mapbender);} |
---|
| 20 | ?> |
---|
| 21 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 22 | <html> |
---|
| 23 | <head> |
---|
| 24 | <meta name="author" content="b600352" > |
---|
| 25 | <meta http-equiv="cache-control" content="no-cache"> |
---|
| 26 | <meta http-equiv="pragma" content="no-cache"> |
---|
| 27 | <meta http-equiv="expires" content="0"> |
---|
| 28 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
| 29 | <title>ALKIS Bau-, Raum- oder Bodenordnungsrecht</title> |
---|
| 30 | <link rel="stylesheet" type="text/css" href="alkisauszug.css"> |
---|
| 31 | <link rel="shortcut icon" type="image/x-icon" href="ico/Gericht.ico"> |
---|
[275] | 32 | <script type="text/javascript"> |
---|
| 33 | function imFenster(dieURL) { |
---|
| 34 | var link = encodeURI(dieURL); |
---|
[287] | 35 | window.open(link,'','left=30,top=30,width=680,height=800,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes'); |
---|
[275] | 36 | } |
---|
[287] | 37 | </script> |
---|
[330] | 38 | </script> |
---|
| 39 | </head> |
---|
| 40 | <body> |
---|
[287] | 41 | |
---|
[330] | 42 | <?php |
---|
| 43 | $con = pg_connect("host=".$dbhost." port=" .$dbport." dbname=".$dbname." user=".$dbuser." password=".$dbpass); |
---|
| 44 | if (!$con) echo "<p class='err'>Fehler beim Verbinden der DB</p>\n"; |
---|
| 45 | |
---|
| 46 | // wie View "baurecht" |
---|
| 47 | $sql ="SELECT r.ogc_fid, r.name, r.stelle, r.bezeichnung AS rechtbez, a.bezeichner AS adfbez, d.bezeichnung AS stellbez, round(st_area(r.wkb_geometry)::numeric,0) AS flae |
---|
| 48 | FROM ax_bauraumoderbodenordnungsrecht r |
---|
[339] | 49 | LEFT JOIN v_baurecht_adf a ON r.artderfestlegung=a.wert |
---|
[330] | 50 | LEFT JOIN ax_dienststelle d ON r.land=d.land AND r.stelle=d.stelle WHERE r.gml_id= $1 ;"; |
---|
| 51 | |
---|
| 52 | $v = array($gmlid); |
---|
| 53 | $res = pg_prepare("", $sql); |
---|
| 54 | $res = pg_execute("", $v); |
---|
| 55 | |
---|
| 56 | if (!$res) { |
---|
| 57 | echo "\n<p class='err'>Fehler bei Baurecht.</p>\n"; |
---|
| 58 | if ($debug > 2) {echo "<p class='err'>SQL=<br>".$sql."<br>$1 = ".$gmlid."</p>\n";} |
---|
| 59 | } |
---|
| 60 | echo "\n<h2><img src='ico/Gericht.ico' width='16' height='16' alt=''> Bau-, Raum- oder Bodenordnungsrecht</h2>\n"; |
---|
| 61 | |
---|
[287] | 62 | // ToDo: ++++ Spalte anfÃŒgen, darin Link auf neue Variante alkisbaurecht.php |
---|
[330] | 63 | |
---|
| 64 | if ($row = pg_fetch_array($res)) { |
---|
| 65 | echo "\n<table>"; |
---|
| 66 | |
---|
| 67 | echo "\n<tr>"; |
---|
| 68 | echo "\n\t<td class='li'>Art der Festlegung:</td>\n\t<td>"; |
---|
| 69 | echo "<span class='wichtig'>".$row["adfbez"]."</span></td>"; |
---|
| 70 | echo "\n</tr>"; |
---|
| 71 | |
---|
| 72 | $enam=$row["name"]; |
---|
| 73 | if ($enam != "") { |
---|
| 74 | echo "\n<tr>"; |
---|
| 75 | echo "\n\t<td class='li'>Eigenname des Gebietes:</td>\n\t<td>".$enam."</td>"; |
---|
| 76 | echo "\n</tr>"; |
---|
| 77 | } |
---|
| 78 | echo "\n<tr>"; |
---|
| 79 | echo "\n\t<td class='li'>Verfahrensnummer:</td>"; |
---|
| 80 | echo "\n\t<td>".$row["rechtbez"]."</td>"; |
---|
| 81 | echo "\n</tr>"; |
---|
| 82 | |
---|
| 83 | $stell=$row["stelle"]; |
---|
| 84 | if ($stell != "") { |
---|
| 85 | echo "\n<tr>"; |
---|
| 86 | echo "\n\t<td class='li'>Dienststelle:</td>\n\t<td>".$row["stellbez"]; |
---|
| 87 | echo "</td>"; |
---|
| 88 | echo "\n</tr>"; |
---|
| 89 | } |
---|
| 90 | |
---|
| 91 | echo "\n<tr>"; |
---|
| 92 | echo "\n\t<td class='li'>Fläche:</td>"; |
---|
| 93 | $flae=number_format($row["flae"],0,",",".")." m²"; |
---|
| 94 | echo "\n\t<td>".$flae."</td>"; |
---|
| 95 | echo "\n</tr>"; |
---|
| 96 | |
---|
| 97 | echo "\n</table>"; |
---|
| 98 | } else { |
---|
| 99 | echo "\n<p class='err'>Fehler! Kein Treffer bei gml_id=".$gmlid."</p>"; |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | echo "\n<p class='nwlink'>"; |
---|
| 103 | echo "\n\t<a href='javascript:imFenster(\"alkisbaurecht.php?gkz=".$gkz."&gmlid=".$gmlid."\")' "; |
---|
| 104 | echo "' title='Bau-, Raum- oder Bodenordnungsrecht'>Weitere Auskunft <img src='ico/Gericht.ico' width='16' height='16' alt=''></a>"; |
---|
| 105 | echo "\n</p>"; |
---|
| 106 | |
---|
| 107 | ?> |
---|
| 108 | |
---|
| 109 | </body> |
---|
| 110 | </html> |
---|