Changeset 402 for trunk/info/info/alkisn/alkisinlayausk.php
- Timestamp:
- 04/23/18 15:33:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/info/info/alkisn/alkisinlayausk.php
r398 r402 16 16 2017-10-09 Sauber filtern auf endet IS NULL 17 17 2017-12-20 Fehlerkorrektur: Link StraÃe ohne gml_id, Bessere Title fÃŒr Links, Icon an Lage. 18 2018-04-23 FÃŒr GB-Teil Function benutzen. 18 19 */ 19 20 session_start(); 20 21 21 $cntget = extract($_GET); // Parameter in Variable umwandeln 22 22 … … 38 38 <link rel="shortcut icon" type="image/x-icon" href="ico/Flurstueck.ico"> 39 39 <title>ALKIS-Auskunft</title> 40 <script type="text/javascript">41 function imFenster(dieURL) {42 var link = encodeURI(dieURL);43 window.open(link,'','left=10,top=10,width=680,height=800,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes');44 }40 <script> 41 function imFenster(dieURL) { 42 var link = encodeURI(dieURL); 43 window.open(link,'','left=10,top=10,width=750,height=840,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes'); 44 } 45 45 </script> 46 46 </head> … … 51 51 52 52 // *** F L U R S T U E C K *** 53 $sql ="SELECT f.flurnummer, f.zaehler, f.nenner, f.amtlicheflaeche, g.gemarkungsnummer, g.bezeichnung, f.regierungsbezirk, f.kreis, f.gemeinde 53 $sql ="SELECT f.flurnummer, f.zaehler, f.nenner, f.amtlicheflaeche, g.gemarkungsnummer, g.bezeichnung, f.regierungsbezirk, f.kreis, f.gemeinde, f.istgebucht 54 54 FROM ax_flurstueck f LEFT JOIN ax_gemarkung g ON f.land=g.land AND f.gemarkungsnummer=g.gemarkungsnummer 55 WHERE f.gml_id= $1 AND f.endet IS NULL AND g.endet IS NULL ;"; 56 // Weiter joinen: g.stelle -> ax_dienststelle "Katasteramt" 55 WHERE f.gml_id= $1 AND f.endet IS NULL AND g.endet IS NULL;"; 57 56 $v = array($gmlid); 58 57 $res = pg_prepare("", $sql); … … 63 62 } 64 63 65 if ($row = pg_fetch_a rray($res)) {64 if ($row = pg_fetch_assoc($res)) { 66 65 $gemkname=htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 67 66 $gmkgnr=$row["gemarkungsnummer"]; … … 75 74 $fskrs=$row["kreis"]; 76 75 $fsgem=$row["gemeinde"]; 76 $gml_buchungsstelle=$row["istgebucht"]; 77 77 } else { 78 78 echo "\n<p class='err'>Kein Treffer fuer gml_id=".$gmlid."</p>"; … … 93 93 } 94 94 95 echo "\n<h2><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Flurstück - Übersicht</h2>"; 96 97 echo "\n<table class='outer'>\n<tr>\n<td>" 98 ."\n\t<table class='kennzfs' title='Flurstückskennzeichen'>\n\t<tr>" 99 ."\n\t\t<td class='head'>Gmkg</td>\n\t\t<td class='head'>Flur</td>\n\t\t<td class='head'>Flurst-Nr.</td>\n\t</tr>" 100 ."\n\t<tr>\n\t\t<td title='Gemarkung'>".$gemkname."</td>" 101 ."\n\t\t<td title='Flurnummer'>".$flurnummer."</td>" 102 ."\n\t\t<td title='Flurstücksnummer (Zähler / Nenner)'><span class='wichtig'>".$flstnummer."</span></td>\n\t</tr>" 103 ."\n\t</table>" 104 ."\n</td>\n<td>" 105 ."\n\t<p class='nwlink'>weitere Auskunft:<br>"; 106 95 //echo "\n<h2><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Flurstück - Übersicht</h2>"; 96 echo "\n<table class='outer'>" 97 ."\n\t<tr>" 98 ."\n\t\t<td class='ll'><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Kennzeichen:</td>" 99 ."\n\t\t<td>" 100 ."\n\t\t\t<table class='kennzfs' title='Flurstückskennzeichen'>\n\t\t\t\t<tr>" 101 ."\n\t\t\t\t\t<td class='head'>Gmkg</td>\n\t\t\t\t\t<td class='head'>Flur</td>\n\t\t\t\t\t<td class='head'>Flurst-Nr.</td>\n\t\t\t\t</tr>" 102 ."\n\t\t\t\t<tr>\n\t\t\t\t\t<td title='Gemarkung'>".$gemkname."</td>" 103 ."\n\t\t\t\t\t<td title='Flurnummer'>".$flurnummer."</td>" 104 ."\n\t\t\t\t\t<td title='Flurstücksnummer (Zähler / Nenner)'><span class='wichtig'>".$flstnummer."</span></td>\n\t\t\t\t</tr>" 105 ."\n\t\t\t</table>" 106 ."\n\t\t</td>\n\t\t<td>" 107 ."\n\t\t\t<p class='nwlink'>weitere Auskunft:<br>"; 107 108 // FlurstÃŒcksnachweis (mit EigentÃŒmer) 108 echo "\n\t\t <a href='javascript:imFenster(\"alkisfsnw.php?gkz=".$gkz."&gmlid=".$gmlid."&eig=j\")' "109 echo "\n\t\t\t\t<a href='javascript:imFenster(\"alkisfsnw.php?gkz=".$gkz."&gmlid=".$gmlid."&eig=j\")' " 109 110 ."title='Flurstücksnachweis'>Flurstück " 110 111 ."<img src='ico/Flurstueck_Link.png' width='16' height='16' alt=''>" 111 112 ."</a><br>"; 112 113 113 // FS-Historie 114 echo "\n\t\t <a href='javascript:imFenster(\"alkisfshist.php?gkz=".$gkz."&gmlid=".$gmlid."\")' "114 echo "\n\t\t\t\t<a href='javascript:imFenster(\"alkisfshist.php?gkz=".$gkz."&gmlid=".$gmlid."\")' " 115 115 ."title='Vorgänger des Flurstücks'>Historie " 116 116 ."<img src='ico/Flurstueck_Historisch.png' width='16' height='16' alt=''>" 117 117 ."</a><br>"; 118 119 118 // Gebaeude-NW zum FS 120 echo "\n\t\t <a href='javascript:imFenster(\"alkisgebaeudenw.php?gkz=".$gkz."&gmlid=".$gmlid."\")' "119 echo "\n\t\t\t\t<a href='javascript:imFenster(\"alkisgebaeudenw.php?gkz=".$gkz."&gmlid=".$gmlid."\")' " 121 120 ."title='Gebäudenachweis'>Gebäude " 122 121 ."<img src='ico/Haus.png' width='16' height='16' alt=''>" 123 122 ."</a>"; 124 125 echo "\n\t</p>\n</td>"; 123 echo "\n\t\t\t</p>\n\t\t</td>\n\t</tr>"; 126 124 pg_free_result($res); 127 125 … … 132 130 WHERE f.gml_id= $1 AND f.endet IS NULL AND l.endet IS NULL AND s.endet IS NULL 133 131 ORDER BY s.bezeichnung, l.hausnummer;"; 134 135 132 $v=array($gmlid); // id FS 136 133 $res=pg_prepare("", $sql); … … 142 139 $j=0; 143 140 $kgmlalt=''; 144 while($row = pg_fetch_a rray($res)) {141 while($row = pg_fetch_assoc($res)) { 145 142 $sname=htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); // Str.-Name 146 143 if (substr($sname, strlen($sname) -3, 3) == 'weg') { // Versuch fuer korrekten Satzbau … … 150 147 } 151 148 $hsnr=$row["hausnummer"]; 152 153 // linke Spalte 154 echo "\n<tr>\n\t\n\t<td class='lr'><img src='ico/Lage_mit_Haus.png' width='16' height='16' alt='MIT'> ".$sname." ".$hsnr."</td>"; 155 156 // rechte Spalte 157 echo "\n\t<td>\n\t\t<p class='nwlink noprint'>"; 149 echo "\n\t<tr>" 150 ."\n\t\t<td class='ll'><img src='ico/Lage_mit_Haus.png' width='16' height='16' alt='MIT'> Lage:</td>" 151 ."\n\t\t<td class='lr'>".$sname." ".$hsnr."</td>" 152 ."\n\t\t<td>\n\t\t\t<p class='nwlink noprint'>"; 158 153 $kgml=$row["kgml"]; // Wiederholung vermeiden 159 160 154 if ($kgml != $kgmlalt) { // NEUE Strasse vor Lage 161 155 $kgmlalt=$kgml; // Katalog GML-ID 162 echo "\n\t\t\t <a title='Flurstücke mit oder ohne Hausnummer".$slink."' "156 echo "\n\t\t\t\t<a title='Flurstücke mit oder ohne Hausnummer".$slink."' " 163 157 ."href='javascript:imFenster(\"alkisstrasse.php?gkz=".$gkz."&gmlid=".$kgml."\")'>Straße " 164 158 ."<img src='ico/Strassen.png' width='16' height='16' alt='STRA'></a>"; 165 159 } 166 echo "\n\t\t\t <a title='Flurstücke und Gebäude mit Hausnummer ".$hsnr."' "160 echo "\n\t\t\t\t<a title='Flurstücke und Gebäude mit Hausnummer ".$hsnr."' " 167 161 ."href='javascript:imFenster(\"alkislage.php?gkz=".$gkz."&ltyp=m&gmlid=".$row["gml_id"]."\")'>Lage " 168 162 ."<img src='ico/Lage_mit_Haus.png' width='16' height='16' alt='HAUS'></a> " 169 ."\n\t\t </p>\n\t</td>\n</tr>";163 ."\n\t\t\t</p>\n\t\t</td>\n\t</tr>"; 170 164 $j++; 171 165 } … … 177 171 ."LEFT JOIN ax_lagebezeichnungkatalogeintrag s ON l.kreis=s.kreis AND l.gemeinde=s.gemeinde AND l.lage=s.lage " 178 172 ."WHERE f.gml_id= $1 AND f.endet IS NULL AND l.endet IS NULL AND s.endet IS NULL ORDER BY s.bezeichnung;"; 179 180 173 $v=array($gmlid); 181 174 $res=pg_prepare("", $sql); … … 186 179 } 187 180 $kgmlalt=''; 188 while($row = pg_fetch_a rray($res)) {181 while($row = pg_fetch_assoc($res)) { 189 182 $sname=htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); // Str.-Name 190 183 … … 195 188 } 196 189 197 198 190 $gewann=htmlentities($row["unverschluesselt"], ENT_QUOTES, "UTF-8"); 199 echo "\n<tr>"; 200 201 // linke Spalte 191 echo "\n\t<tr>"; 202 192 if ($sname != "") { // Typ=Strasse 203 193 $ico="Lage_an_Strasse.png"; 204 echo "\n\t<td class='lr' title='An Straße aber ohne Hausnummer'><img src='ico/".$ico."' width='16' height='16' alt='OHNE'> ".$sname." </td>"; 194 echo "\n\t\t<td class='ll'><img src='ico/".$ico."' width='16' height='16' alt='OHNE'> Straße:</td>"; 195 echo "\n\t\t<td class='lr' title='An Straße aber ohne Hausnummer'>".$sname." </td>"; 205 196 } else { 206 197 $ico="Lage_Gewanne.png"; 207 echo "\n\t<td class='lr' title='Gewanne'><img src='ico/".$ico."' width='16' height='16' alt='Gewanne'> ".$gewann." </td>"; 208 } 209 210 // rechte Spalte 211 echo "\n\t<td>\n\t\t<p class='nwlink noprint'>"; 198 echo "\n\t\t<td class='ll'><img src='ico/".$ico."' width='16' height='16' alt='Gewanne'> Gewanne:</td>"; 199 echo "\n\t\t<td class='lr' title='Gewanne'>".$gewann." </td>"; 200 } 201 echo "\n\t\t<td>\n\t\t\t<p class='nwlink noprint'>"; 212 202 if ($sname != "") { // Typ=Strasse 213 203 $kgml=$row["kgml"]; // Wiederholung vermeiden … … 226 216 ."href='javascript:imFenster(\"alkislage.php?gkz=".$gkz."&ltyp=o&gmlid=".$row["gml_id"]."\")'>Gewanne " 227 217 ."<img src='ico/".$ico."' width='16' height='16' alt='Gewanne'></a> " 228 ."\n\t\t</p>\n\t </td>\n</tr>";218 ."\n\t\t</p>\n\t\t</td>\n\t</tr>"; 229 219 } 230 220 } 231 221 pg_free_result($res); 232 233 echo "\n</table>"; 234 235 // Flurstuecksflaeche 222 echo "\n</table>\n"; 236 223 echo "\n<p class='fsd'>Flurstücksfläche: <b>".$flae."</b></p>"; 237 224 238 // *** G R U N D B U C H *** 239 echo "\n<h2><img src='ico/Grundbuch_zu.png' width='16' height='16' alt='GB'> Grundbuch</h2>"; 240 241 // FS >istgebucht> GS >istbestandteilvon> GB. 242 $sql ="SELECT b.gml_id, b.bezirk, b.buchungsblattnummermitbuchstabenerweiterung as blatt, b.blattart, 243 s.gml_id AS s_gml, s.buchungsart, s.laufendenummer, s.zaehler, s.nenner, z.bezeichnung, wa.v AS blattartv, wb.v AS bart 244 FROM ax_flurstueck f 245 JOIN ax_buchungsstelle s ON f.istgebucht=s.gml_id 246 JOIN ax_buchungsblatt b ON s.istbestandteilvon=b.gml_id 247 LEFT JOIN ax_buchungsblattbezirk z ON z.land=b.land AND z.bezirk=b.bezirk 248 LEFT JOIN alkis_wertearten wa ON cast(b.blattart AS character varying)=wa.k AND wa.element='ax_buchungsblatt' AND wa.bezeichnung='blattart' 249 LEFT JOIN alkis_wertearten wb ON cast(s.buchungsart AS character varying)=wb.k AND wb.element='ax_buchungsstelle' AND wb.bezeichnung='buchungsart' 250 WHERE f.gml_id= $1 AND f.endet IS NULL AND s.endet IS NULL AND b.endet IS NULL AND z.endet IS NULL 251 ORDER BY b.bezirk, b.buchungsblattnummermitbuchstabenerweiterung, s.laufendenummer;"; 252 253 $v=array($gmlid); 254 $resg=pg_prepare("", $sql); 255 $resg=pg_execute("", $v); 256 if (!$resg) { 257 echo "\n<p class='err'>Keine Buchungen.</p>"; 258 if ($debug > 2) {echo "\n<p class='err'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 259 } 260 while($rowg = pg_fetch_array($resg)) { 261 $beznam=$rowg["bezeichnung"]; 262 echo "\n<table class='outer'>\n<tr>\n<td>"; 263 $blattkey=$rowg["blattart"]; // Key 264 $blattart=$rowg["blattartv"]; // Value 265 266 if ($blattkey == 1000) { 267 echo "\n\t<table class='kennzgb' title='Bestandskennzeichen'>"; 225 // B U C H U N G S S T E L L E N zum FS 226 $bartgrp=""; // Buchungsart 227 $barttypgrp=""; // Buchungsart Typ 228 if ($gml_buchungsstelle == '') {echo "\n<p class='err'>Keine Buchungstelle zum Flurstück gefunden.</p>";} 229 echo "\n\n<table class='outer'>"; 230 $gezeigt = buchung_anzg($gml_buchungsstelle, 'j', true, ""); // direkte Buchung anzeigen wenn nicht fiktiv, Eigent. ja, mit JS "imFenster" 231 $anzber = ber_bs_zaehl($gml_buchungsstelle); // Berechtigte Buchungen, nur Anzahl 232 if ($anzber > 0 ) { 233 if ($gezeigt) { 234 echo "\n\t<tr>\n\t\t<td colspan='4'><span class='wichtig'>Berechtigte Buchungen siehe Flurstücksnachweis.</span></td>\n\t</tr>"; 268 235 } else { 269 echo "\n\t<table class='kennzgbf' title='Bestandskennzeichen'>"; // dotted 270 } 271 echo "\n\t<tr>" 272 ."\n\t\t<td class='head'>Bezirk</td>" 273 ."\n\t\t<td class='head'>".$blattart."</td>" 274 ."\n\t\t<td class='head'>Lfd-Nr,</td>" 275 ."\n\t\t<td class='head'>Buchungsart</td>" 276 ."\n\t</tr>\n\t<tr>" 277 ."\n\t\t<td title='Grundbuchbezirk'>".$beznam."</td>" 278 ."\n\t\t<td title='Grundbuch-Blatt'><span class='wichtig'>".$rowg["blatt"]."</span></td>" 279 ."\n\t\t<td title='Bestandsverzeichnis-Nummer (BVNR, Grundstück)'>".$rowg["laufendenummer"]."</td>" 280 ."\n\t\t<td title='Buchungsart'>".$rowg["bart"]."</td>" 281 ."\n\t</tr>" 282 ."\n\t</table>"; 283 284 if ($rowg["zaehler"] <> "") { 285 echo "\n<p class='ant'>".$rowg["zaehler"]."/".$rowg["nenner"]." Anteil am Flurstück</p>"; 286 } 287 echo "\n</td>\n<td>" 288 ."\n\t<p class='nwlink'>weitere Auskunft:<br>" 289 ."\n\t\t<a href='javascript:imFenster(\"alkisbestnw.php?gkz=".$gkz."&gmlid=".$rowg[0]."\")' " 290 ."title='Grundbuchnachweis'>".$blattart." <img src='ico/GBBlatt_link.png' width='16' height='16' alt=''>" 291 ."</a>" 292 ."\n\t</p>" 293 ."\n</td>\n</tr>\n</table>"; 294 295 // E I G E N T U E M E R 296 if ($blattkey == 5000) { // kein Eigent. bei fiktiv. Blatt 297 echo "\n<p>Keine Angaben zum Eigentum bei fiktivem Blatt</p>\n" 298 ."\n<p>Siehe weitere Grundbuchblätter mit Rechten an dem fiktiven Blatt.</p>"; 299 } else { // Ausgabe Name in Function 300 $n = eigentuemer($rowg["gml_id"], false, "imFenster"); // ohne Adressen 301 if ($n == 0) { // keine NamensNr, kein Eigentuemer 302 echo "\n<p class='err'>Keine Eigentümer gefunden.</p>" 303 ."\n<p class='err'>Bezirk ".$rowg["bezirk"]." Blatt ".$rowg["blatt"]." Blattart ".$blattkey." (".$blattart.")</p>"; 304 } 305 } 306 } 307 pg_free_result($resg); 236 $nochmehr = ber_bs_anzg($gml_buchungsstelle, "j", ""); // wenigstens eine Buchg. zeigen 237 if ($nochmehr != "") { // keine Verfolgung 238 echo "\n\t<tr>\n\t\t<td colspan='4'><span class='wichtig'>Weitere berechtigte Buchungen siehe Flurstücksnachweis.</span></td>\n\t</tr>"; 239 } 240 } 241 } 242 echo "\n</table>\n"; 308 243 309 244 ?>
Note: See TracChangeset
for help on using the changeset viewer.