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