Changeset 387 for trunk/info/info/alkisn/alkisfsnw.php
- Timestamp:
- 06/08/17 16:15:04 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/info/info/alkisn/alkisfsnw.php
r377 r387 10 10 2016-12-01 HTML5, Gemeinsam genutzte Datenbanken ermöglichen 11 11 2016-12-05 Nutzungsart-Kategorie ist nun in Text enthalten, nicht mehr aus der Definition ausschneiden 12 2017-06-08 optional "berechtigte Buchungen" anzeigen, Function "eigentuemer" ohne Parameter $con, 13 Validierung Eingabeparameter, Feinkorrekturen 12 14 13 15 ToDo: 14 - BodenschÀtzung anzeigen 16 - BodenschÀtzung anzeigen (siehe Mail Frau Weyand ITEBO vom 15.05.17) 15 17 - Bessere Differenzierung bei den Nutzungsarten (Tabelle dafÃŒr aufbauen) 16 18 */ 17 19 session_start(); 18 $id="n"; 20 21 // Var. aus Parameter initalisieren 19 22 $eig="n"; 23 $berbu="n"; 24 $showkey="n"; 25 26 // alle Parameter in Variable umwandeln 20 27 $cntget = extract($_GET); 28 29 // strikte Validierung aller Parameter 30 if (isset($gmlid)) { 31 if (!preg_match('#^[0-9A-Za-z]{16}$#', $gmlid)) {die("Eingabefehler gmlid");} 32 $fskennz=''; 33 } else { // Alternativ 34 $gmlid=''; 35 if (isset($fskennz)) { // llgggg-fff-11111/222 oder z.B.'052647002001910013__' oder '05264700200012______' 36 if (!preg_match('#^[0-9\-_/]{8,20}$#', $fskennz)) {die ("Eingabefehler fskennz");} 37 } else { 38 $fskennz=''; 39 } 40 } 41 if (!isset($gkz) or !preg_match('#^[0-9]{3}$#', $gkz)) {die("Eingabefehler gkz");} 42 if (!preg_match('#^[j|n]{0,1}$#', $eig)) {die("Eingabefehler eig");} 43 if (!preg_match('#^[j|n]{0,1}$#', $berbu)) {die ("Eingabefehler berbu");} 44 if (!preg_match('#^[j|n]{0,1}$#', $showkey)) {die ("Eingabefehler showkey");} 45 if ($showkey == "j") {$showkey=true;} else {$showkey=false;} // "j"/"n" als boolean umwandeln, ist praktischer abzufragen, wird oft gebraucht 46 21 47 require_once("alkis_conf_location.php"); 22 48 if ($auth == "mapbender") {require_once($mapbender);} 23 49 include("alkisfkt.php"); 24 $keys = isset($_GET["showkey"]) ? $_GET["showkey"] : "n";25 if ($keys == "j") {$showkey=true;} else {$showkey=false;}26 50 ?> 27 51 <!doctype html> … … 29 53 <head> 30 54 <meta charset="utf-8"> 55 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 31 56 <title>ALKIS Flurstücksnachweis</title> 32 57 <link rel="stylesheet" type="text/css" href="alkisauszug.css"> … … 37 62 } 38 63 </script> 39 <style type='text/css' media='print'>40 .noprint {visibility: hidden;}41 </style>42 64 </head> 43 65 <body> … … 45 67 // S t a r t 46 68 $con = pg_connect($dbconn." options='--application_name=ALKIS-Auskunft_alkisfsnw.php'"); 47 if (!$con) echo " <p class='err'>Fehler beim Verbinden der DB</p>\n";69 if (!$con) echo "\n<p class='err'>Fehler beim Verbinden der DB</p>"; 48 70 49 71 // Ein (ALB- ?) FlurstÃŒcks-Kennzeichen wurde alternativ zur gml_id ÃŒbermittelt 50 if ($ gmlid == '' and $fskennz != '') {72 if ($fskennz != '') { 51 73 // Ãbergabe Format z.B. "llgggg-fff-nnnn/zz.nn" oder "gggg-ff-nnn/zz" 52 74 $arr=explode("-", $fskennz, 4); 53 75 $zgemkg=trim($arr[0]); 54 if (strlen($zgemkg) == 20 and $arr[1] == "") { // Oh, ist wohl schon das Datenbank-Feldformat76 if (strlen($zgemkg) == 20 and !isset($arr[1])) { // Oh, ist wohl schon das Datenbank-Feldformat 55 77 $fskzdb=$zgemkg; 56 78 } else { // Nö, ist wohl eher ALB-Format … … 65 87 $zfsnr=trim($arr[2]); // FlurstÃŒcke-Nr 66 88 $zn=explode("/", $zfsnr, 2); // Bruch? 67 $zzaehler=str_pad(trim($zn[0]), 5 , "0", STR_PAD_LEFT); 68 $znenner=trim($zn[1]); 89 $zzaehler=str_pad(trim($zn[0]), 5 , "0", STR_PAD_LEFT); 90 if (isset($zn[1])) { 91 $znenner=trim($zn[1]); 92 } else { 93 $znenner=""; 94 } 69 95 if (trim($znenner, " 0.") == "") { // kein Bruch oder nur Nullen 70 96 $znenner="____"; // in DB-Spalte mit Tiefstrich aufgefÃŒllt … … 86 112 $gmlid=$row["gml_id"]; 87 113 } else { 88 echo "<p class='err'>Fehler! Kein Treffer für Flurstückskennzeichen='".$fskennz."' (".$fskzdb.")</p>"; 114 echo "\n<p class='err'>Fehler! Kein Treffer für Flurstückskennzeichen='".$fskennz."' (".$fskzdb.")</p>"; 115 echo "<p>Kennzeichen veraltet? <a href='./alkisfshist.php?gkz=".$gkz."&fskennz=".$fskennz."'>Suche in der Flurstücks-Historie</a></p>"; 116 echo "\n</body>\n</html>"; 117 return; 89 118 } 90 119 pg_free_result($res); … … 101 130 102 131 if (!$res) { 103 echo "\n<p class='err'>Fehler bei Flurstuecksdaten</p> \n";104 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmlid."'</p>";}132 echo "\n<p class='err'>Fehler bei Flurstuecksdaten</p>"; 133 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 105 134 } 106 135 if ($row = pg_fetch_array($res)) { … … 123 152 $arrn = explode(",", trim($name, "{}") ); // PHP-Array 124 153 } else { 125 echo " <p class='err'>Fehler! Kein Treffer für Flurstück mit gml_id=".$gmlid."</p>";126 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmlid."'</p>";}127 echo " </body></html>";154 echo "\n<p class='err'>Fehler! Kein Treffer für Flurstück mit gml_id=".$gmlid."</p>"; 155 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 156 echo "\n</body>\n</html>"; 128 157 return; 129 158 } … … 132 161 // Balken 133 162 if ($eig=="j") { 134 echo "<p class='fsei'>ALKIS Flurstück ".$gmkgnr."-".$flurnummer."-".$flstnummer." </p> \n"135 ."\n<h2><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Flurstück mit Eigentümer</h2> \n";163 echo "<p class='fsei'>ALKIS Flurstück ".$gmkgnr."-".$flurnummer."-".$flstnummer." </p>" 164 ."\n<h2><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Flurstück mit Eigentümer</h2>"; 136 165 } else { 137 echo "<p class='fskennz'>ALKIS Flurstück ".$gmkgnr."-".$flurnummer."-".$flstnummer." </p> \n"138 ."\n<h2><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Flurstück</h2> \n";166 echo "<p class='fskennz'>ALKIS Flurstück ".$gmkgnr."-".$flurnummer."-".$flstnummer." </p>" 167 ."\n<h2><img src='ico/Flurstueck.png' width='16' height='16' alt=''> Flurstück</h2>"; 139 168 } 140 169 … … 145 174 if ($debug > 2) { 146 175 //++ Schönes Bild? Stop-Zeichen? 147 echo " <p class='err'>Filter Kreis='".$filtkreis."', Gemeinde='".$filtgem."'</p>"148 ." <p class='err'>Flstk. Kreis='".$fskrs."', Gemeinde='".$fsgem."'</p>";176 echo "\n<p class='err'>Filter Kreis='".$filtkreis."', Gemeinde='".$filtgem."'</p>" 177 ."\n<p class='err'>Flstk. Kreis='".$fskrs."', Gemeinde='".$fsgem."'</p>"; 149 178 } 150 179 echo "\n<br><p class='stop1'>Zugriff nicht erlaubt</p>" … … 154 183 155 184 echo "\n<table class='outer'>\n<tr>\n\t<td>" // linke Seite 156 ."\n\t <table class='kennzfs' title='Flurstückskennzeichen'>\n\t<tr>" // darin Tabelle Kennzeichen157 ."\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>"158 ."\n\t <tr>\n\t\t<td title='Gemarkung'>";185 ."\n\t\t<table class='kennzfs' title='Flurstückskennzeichen'>\n\t\t<tr>" // darin Tabelle Kennzeichen 186 ."\n\t\t\t<td class='head'>Gmkg</td>\n\t\t\t<td class='head'>Flur</td>\n\t\t\t<td class='head'>Flurst-Nr.</td>\n\t\t</tr>" 187 ."\n\t\t<tr>\n\t\t\t<td title='Gemarkung'>"; 159 188 if ($showkey) { 160 189 echo "<span class='key'>".$gmkgnr."</span><br>"; 161 190 } 162 191 echo $gemkname." </td>" 163 ."\n\t\t <td title='Flurnummer'>".$flurnummer."</td>"164 ."\n\t\t <td title='Flurstücksnummer (Zähler / Nenner)'><span class='wichtig'>".$flstnummer."</span></td>\n\t</tr>"165 ."\n\t </table>"192 ."\n\t\t\t<td title='Flurnummer'>".$flurnummer."</td>" 193 ."\n\t\t\t<td title='Flurstücksnummer (Zähler / Nenner)'><span class='wichtig'>".$flstnummer."</span></td>\n\t\t</tr>" 194 ."\n\t\t</table>" 166 195 ."\n\t</td>\n\t<td>" // rechte Seite 167 ."\n\t <table class='fsd'>" // FS-Daten 2 Spalten168 ."\n\t <tr>\n\t\t<td>Entstehung</td>"169 ."\n\t\t <td>".$entsteh."</td>\n\t</tr>"170 ."\n\t <tr>"171 ."\n\t\t <td>letz. Fortf</td>"172 ."\n\t\t <td title='Jahrgang / Fortführungsnummer - Fortführungsart'>";196 ."\n\t\t<table class='fsd'>" // FS-Daten 2 Spalten 197 ."\n\t\t<tr>\n\t\t\t<td>Entstehung</td>" 198 ."\n\t\t\t<td>".$entsteh."</td>\n\t\t</tr>" 199 ."\n\t\t<tr>" 200 ."\n\t\t\t<td>letz. Fortf</td>" 201 ."\n\t\t\t<td title='Jahrgang / Fortführungsnummer - Fortführungsart'>"; 173 202 foreach($arrn AS $val) { // Zeile f. jedes Element des Array 174 203 echo trim($val, '"')."<br>"; 175 204 } 176 205 echo "</td>" 177 ."\n\t </tr>"178 ."\n\t </table>"206 ."\n\t\t</tr>" 207 ."\n\t\t</table>" 179 208 ."\n\t</td>\n</tr>\n</table>"; 180 209 // echo "\n<tr>\n\t<td>Finanzamt</td>\n\t<td>".$finanzamt." ".$finame . "</td>\n</tr>"; … … 197 226 $res = pg_execute("", $v); 198 227 if (!$res) { 199 echo "\n<p class='err'>Fehler bei Gemeinde</p> \n";200 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."</p>";}228 echo "\n<p class='err'>Fehler bei Gemeinde</p>"; 229 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."</p>";} 201 230 } 202 231 $row = pg_fetch_array($res); 203 232 $gnam = htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 204 echo "\n\t<td class='lr'>Gemeinde</td><td class='lr'>"; 205 if ($showkey) { 206 echo "<span class='key'>(".$gemeinde.")</span> "; 207 } 233 echo "\n\t<td class='lr'>Gemeinde</td>\n\t<td class='lr'>"; 234 if ($showkey) {echo "<span class='key'>(".$gemeinde.")</span> ";} 208 235 // Link zur FS-Historie (passt nicht ganz in die Zeile "Gemeinde", aber gut unter "weitere Auskunft") 209 echo $gnam."</td> <td class='nwlink'>"210 ."\n <p class='nwlink noprint'>"211 ."\n\t <a href='alkisfshist.php?gkz=".$gkz."&gmlid=".$gmlid;212 if ($showkey) 236 echo $gnam."</td>\n\t<td class='nwlink'>" 237 ."\n\t\t<p class='nwlink noprint'>" 238 ."\n\t\t\t<a href='alkisfshist.php?gkz=".$gkz."&gmlid=".$gmlid; 239 if ($showkey) {echo "&showkey=j";} 213 240 echo "' title='Vorgänger-Flurstücke'>Historie " 214 241 ."<img src='ico/Flurstueck_Historisch.png' width='16' height='16' alt=''>" 215 242 ."</a>" 216 ."\n </p>"217 . " </td></tr>";243 ."\n\t\t</p>" 244 . "\n\t</td>\n</tr>"; 218 245 pg_free_result($res); 219 246 … … 224 251 $res = pg_execute("", $v); 225 252 if (!$res) { 226 echo "\n<p class='err'>Fehler bei Kreis</p> \n";227 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."</p>";}253 echo "\n<p class='err'>Fehler bei Kreis</p>"; 254 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."</p>";} 228 255 } 229 256 $row = pg_fetch_array($res); 230 257 $knam = htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 231 echo "<tr><td> </td><td>Kreis</td><td>"; 232 if ($showkey) { 233 echo "<span class='key'>(".$kreis.")</span> "; 234 } 235 echo $knam."</td><td> </td></tr>"; 258 echo "\n<tr>\n\t<td> </td>\n\t<td>Kreis</td>\n\t<td>"; 259 if ($showkey) {echo "<span class='key'>(".$kreis.")</span> ";} 260 echo $knam."</td>\n\t<td> </td>\n</tr>"; 236 261 pg_free_result($res); 237 262 … … 242 267 $res = pg_execute("", $v); 243 268 if (!$res) { 244 echo " <p class='err'>Fehler bei Regierungsbezirk</p>";245 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."</p>";}269 echo "\n<p class='err'>Fehler bei Regierungsbezirk</p>"; 270 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."</p>";} 246 271 } 247 272 $row=pg_fetch_array($res); 248 273 $bnam=htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 249 echo "<tr><td> </td><td>Regierungsbezirk</td><td>"; 250 if ($showkey) { 251 echo "<span class='key'>(".$bezirk.")</span> "; 252 } 253 echo $bnam."</td><td> </td></tr>"; 274 echo "\n<tr>\n\t<td> </td>\n\t<td>Regierungsbezirk</td>\n\t<td>"; 275 if ($showkey) {echo "<span class='key'>(".$bezirk.")</span> ";} 276 echo $bnam."</td>\n\t<td> </td>\n</tr>"; 254 277 pg_free_result($res); 255 278 // ENDE G e b i e t s z u g e h o e r i g k e i t … … 270 293 271 294 if (!$res) { 272 echo " <p class='err'>Fehler bei Lagebezeichnung mit Hausnummer</p>";295 echo "\n<p class='err'>Fehler bei Lagebezeichnung mit Hausnummer</p>"; 273 296 if ($debug > 1) { 274 //echo "<p class='dbg'>Fehler:".pg_result_error($res)."</p>"; 275 echo "<p class='dbg'>Fehler:".pg_last_error()."</p>"; 276 } 277 if ($debug > 2) {echo "<p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmlid."'</p>";} 297 echo "\n<p class='dbg'>Fehler:".pg_last_error()."</p>"; 298 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 299 } 278 300 } else { 279 301 $j=0; … … 282 304 echo "\n<tr>\n\t"; 283 305 if ($j == 0) { 284 echo " <td class='ll'><img src='ico/Lage_mit_Haus.png' width='16' height='16' alt=''> Adresse:</td>";306 echo "\n\t<td class='ll'><img src='ico/Lage_mit_Haus.png' width='16' height='16' alt=''> Adresse:</td>"; 285 307 } else { 286 echo " <td> </td>";308 echo "\n\t<td> </td>"; 287 309 } 288 310 echo "\n\t<td> </td>" … … 316 338 $res = pg_execute("", $v); 317 339 if (!$res) { 318 echo " <p class='err'>Fehler bei Lagebezeichnung ohne Hausnummer</p>";340 echo "\n<p class='err'>Fehler bei Lagebezeichnung ohne Hausnummer</p>"; 319 341 //if ($debug > 1) {echo "<p class='dbg'>Fehler:".pg_result_error($res)."</p>";} 320 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmlid."'</p>";}342 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 321 343 } 322 344 $j=0; … … 376 398 $res = pg_execute("", $v); 377 399 if (!$res) { 378 echo " <p class='err'>Fehler bei Suche tats. Nutzung</p>\n";379 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmlid."'</p>";}400 echo "\n<p class='err'>Fehler bei Suche tats. Nutzung</p>"; 401 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 380 402 } 381 403 $the_Xfactor=$fsbuchflae / $fsgeomflae; // geom. ermittelte FlÀche auf amtl. BuchflÀche angleichen … … 481 503 482 504 Die EntschlÃŒsselung der Nutzungsart in den verschiedenen ALKIS-Varianten ist darin unterentwickelt. 483 Diese ist eigentlich fÃŒr jede der getrennten Tabellen der Gruppe Nutzungs rt individuell.505 Diese ist eigentlich fÃŒr jede der getrennten Tabellen der Gruppe Nutzungsart individuell. 484 506 Die Classic-Lösung mit 2 Zusatzfeldern war schon sehr pauschalisiert, aber 485 507 durch die RÃŒck-Konvertierung in ALB-Strukturen in der norGIS-Version ist das zu stark vereinfacht. … … 499 521 500 522 $fskennzalb=$defland.$gmkgnr."-".str_pad($flurnummer,3,"0",STR_PAD_LEFT)."-".str_pad($zaehler,5,"0",STR_PAD_LEFT)."/".str_pad($nenner,3,"0",STR_PAD_LEFT); 501 // echo " <p class='err'>Kennz ALB='".$fskennzalb."'</p>";523 // echo "\n<p class='err'>Kennz ALB='".$fskennzalb."'</p>"; 502 524 503 525 $v = array($fskennzalb); … … 505 527 $res = pg_execute("", $v); 506 528 if (!$res) { 507 echo " <p class='err'>Fehler bei Suche tats. Nutzung</p>\n";508 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = FS-Kennz = '".$fskennzalb."'</p>";}529 echo "\n<p class='err'>Fehler bei Suche tats. Nutzung</p>"; 530 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = FS-Kennz = '".$fskennzalb."'</p>";} 509 531 } 510 532 … … 584 606 $res_bodeneuordnung = pg_execute($con, "bodeneuordnung", array($gmlid)); 585 607 if (!$res_bodeneuordnung) { 586 echo " <p class='err'>Fehler bei Bau-, Raum- oder Bodenordnungsrecht</p>\n";587 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql_boden."<br>$1 = gml_id = '".$gmlid."'</p>";}608 echo "\n<p class='err'>Fehler bei Bau-, Raum- oder Bodenordnungsrecht</p>"; 609 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".$sql_boden."<br>$1 = gml_id = '".$gmlid."'</p>";} 588 610 } 589 611 … … 594 616 $res_strittigeGrenze = pg_execute($con, "strittigeGrenze", array($gmlid)); 595 617 if (!$res_strittigeGrenze) { 596 echo " <p class='err'>Fehler bei strittige Grenze</p>\n";597 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql_str."<br>$1 = gml_id = '".$gmlid."'</p>";}618 echo "\n<p class='err'>Fehler bei strittige Grenze</p>"; 619 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".$sql_str."<br>$1 = gml_id = '".$gmlid."'</p>";} 598 620 } 599 621 … … 667 689 668 690 // G R U N D B U C H 669 echo "\n <table class='outer'>"691 echo "\n\n<table class='outer'>" 670 692 ."\n<tr>" 671 693 ."\n\t<td>" 672 ."\n\t\t< a id='gb'></a>\n\t\t<h3><img src='ico/Grundbuch_zu.png' width='16' height='16' alt=''> Grundbücher</h3>"694 ."\n\t\t<h3 id='gb'><img src='ico/Grundbuch_zu.png' width='16' height='16' alt=''> Grundbücher</h3>" 673 695 ."\n\t</td>" 674 696 ."\n\t<td>" 675 697 ."\n\t\t<p class='nwlink noprint'>" 676 ."\n\t\t\t<a href='".$_SERVER['PHP_SELF']. "?gkz=".$gkz."&gmlid=".$gmlid ;698 ."\n\t\t\t<a href='".$_SERVER['PHP_SELF']. "?gkz=".$gkz."&gmlid=".$gmlid."&berbu=".$berbu; 677 699 if ($showkey) {echo "&showkey=j";} 678 700 679 // Umschalter: FS-Nachw ruft sich selbst mit geaend. Param. auf. Posit. auf Marke #gb701 // Umschalter: FS-Nachweis ruft sich selbst mit geaendertem Parameter auf. Positionierung auf Marke "#gb" 680 702 if ($eig=="j") { 681 703 echo "&eig=n#gb' title='Flurstücksnachweis'>ohne Eigentümer</a>"; 682 } else { // ++ könnte man sich sparen, wenn unten nur ein "fiktives Blatt" kommt704 } else { 683 705 echo "&eig=j#gb' title='Flurstücks- und Eigentümernachweis'>mit Eigentümer " 684 706 ."<img src='ico/EigentuemerGBzeile.png' width='16' height='16' alt=''></a>"; … … 687 709 ."\n\t</td>" 688 710 ."\n</tr>" 689 ."\n</table> \n";711 ."\n</table>"; 690 712 691 713 // B U C H U N G S S T E L L E N zum FS (istGebucht) … … 699 721 $ress = pg_execute("", $v); 700 722 if (!$ress) { 701 echo "\n<p class='err'>Keine Buchungsstelle.</p> \n";723 echo "\n<p class='err'>Keine Buchungsstelle.</p>"; 702 724 if ($debug > 1) { 703 725 echo "<p class='dbg'>Fehler:".pg_result_error($ress)."</p>"; 704 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmlid."'</p>";}726 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 705 727 } 706 728 } 707 729 $bs=0; // Z.BuchungsStelle 708 while($rows = pg_fetch_array($ress)) { 730 while($rows = pg_fetch_array($ress)) { // Schleife Buchungs-Stelle 709 731 $gmls=$rows["gml_id"]; // gml b-Stelle 710 732 $lfd=$rows["lfd"]; // BVNR … … 723 745 $resg=pg_execute("", $v); 724 746 if (!$resg) { 725 echo "\n<p class='err'>Kein Buchungsblatt.</p> \n";726 if ($debug > 2) {echo " <p class='dbg'>SQL=<br>".$sql."<br>$1 = gml_id = '".$gmls."'</p>";}747 echo "\n<p class='err'>Kein Buchungsblatt.</p>"; 748 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmls."'</p>";} 727 749 } 728 750 $bl=0; // Z.Blatt … … 732 754 $blattkeyg=$rowg["blattart"]; // Key 733 755 $blattartg=$rowg["blattartv"]; // Value 756 $blatt=$rowg["blatt"]; 734 757 echo "\n<hr>" 735 758 ."\n<table class='outer'>" … … 739 762 // Rahmen mit GB-Kennz 740 763 if ($blattkeyg == 1000) { 741 echo "\n\t <table class='kennzgb' title='Bestandskennzeichen'>";764 echo "\n\t\t<table class='kennzgb' title='Bestandskennzeichen'>"; 742 765 }else { 743 echo "\n\t <table class='kennzgbf' title='Bestandskennzeichen'>"; //dotted766 echo "\n\t\t<table class='kennzgbf' title='Bestandskennzeichen'>"; // GB fiktiv = Rahmen dotted 744 767 } 745 echo "\n\t <tr>\n\t\t<td class='head'>Bezirk</td>"746 ."\n\t\t <td class='head' title='".$rowg["blattartd"]."'>";768 echo "\n\t\t<tr>\n\t\t\t<td class='head'>Bezirk</td>" 769 ."\n\t\t\t<td class='head' title='".$rowg["blattartd"]."'>"; 747 770 if ($showkey) {echo "<span class='key'>".$blattkeyg."</span> ";} 748 771 echo $blattartg."</td>" 749 ."\n\t\t <td class='head'>Lfd-Nr.</td>"750 ."\n\t\t <td class='head'>Buchungsart</td>"751 ."\n\t </tr>"752 ."\n\t <tr>"753 ."\n\t\t <td title='Grundbuchbezirk'>";754 772 ."\n\t\t\t<td class='head'>Lfd-Nr.</td>" 773 ."\n\t\t\t<td class='head'>Buchungsart</td>" 774 ."\n\t\t</tr>" 775 ."\n\t\t<tr>" 776 ."\n\t\t\t<td title='Grundbuchbezirk'>"; 777 if ($showkey) {echo "<span class='key'>".$rowg["bezirk"]."</span><br>";} 755 778 echo $beznam." </td>" 756 ."\n\t\t <td title='Grundbuch-Blatt'><span class='wichtig'>".$rowg["blatt"]."</span></td>"757 ."\n\t\t <td title='Bestandsverzeichnis-Nummer (BVNR, Grundstück)'>".$rows["lfd"]."</td>"758 ."\n\t\t <td title='".$barttitle."'>";779 ."\n\t\t\t<td title='Grundbuch-Blatt'><span class='wichtig'>".$blatt."</span></td>" 780 ."\n\t\t\t<td title='Bestandsverzeichnis-Nummer (BVNR, Grundstück)'>".$lfd."</td>" 781 ."\n\t\t\t<td title='".$barttitle."'>"; 759 782 if ($showkey) {echo "<span class='key'>".$rows["buchungsart"]."</span><br>";} 760 783 echo $rows["bart"]."</td>" 761 ."\n\t </tr>"762 ."\n\t </table>";784 ."\n\t\t</tr>" 785 ."\n\t\t</table>"; 763 786 764 787 // Miteigentumsanteil … … 766 789 echo "\n<p class='ant'>".$rows["zaehler"]."/".$rows["nenner"]." Anteil am Flurstück</p>"; 767 790 } 768 echo "\n</td>\n<td>"; // Outer rechte Spalte: NW-Links 769 echo "\n\t<p class='nwlink noprint'>weitere Auskunft:<br>" 770 ."\n\t\t<a href='alkisbestnw.php?gkz=".$gkz."&gmlid=".$gmlg."#bvnr".$lfd; 771 if ($showkey) {echo "&showkey=j";} 791 echo "\n\t</td>\n\t<td>"; // Outer rechte Spalte: NW-Links 792 793 echo "\n\t\t<p class='nwlink noprint'>weitere Auskunft:<br>"; 794 if ($showkey) {echo "<span class='key'>".$blattkeyg."</span> ";} 795 echo "\n\t\t\t<a href='alkisbestnw.php?gkz=".$gkz."&gmlid=".$gmlg; 796 if ($showkey) {echo "&showkey=j";} 797 echo "#bvnr".$lfd; // Die # hinter die &-Paramter 772 798 if ($blattkeyg == 1000) { 773 799 echo "' title='Grundbuchnachweis mit kompletter Eigentümerangabe'>"; … … 777 803 echo $blattartg." <img src='ico/GBBlatt_link.png' width='16' height='16' alt=''>" 778 804 ."</a>" 779 ."\n\t</p>"; 780 781 ber_bs_hinw($gmls); // berechtigte Buchungstellen Hinweis 782 783 echo "\n</td>" 805 ."\n\t\t</p>"; 806 807 // berechtigte Buchungstellen (im rechten Teil der ÀuÃeren Tab. 808 $cnt_ber = ber_bs_hinw($gmls, $gmlid); // Hinweis ausgeben, zÀhlen 809 810 echo "\n\t</td>" // ende aussen rechts 784 811 ."\n</tr>" 785 812 ."\n</table>"; … … 787 814 // +++ Weitere Felder ausgeben? BeschreibungDesUmfangsDerBuchung 788 815 if ($rows["sond"] != "") { 789 echo " <p class='sond' title='Sondereigentum'>Verbunden mit dem Sondereigentum<br>".$rows["sond"]."</p>";816 echo "\n<p class='sond' title='Sondereigentum'>Verbunden mit dem Sondereigentum<br>".$rows["sond"]."</p>"; 790 817 } 791 818 if ($rows["nrpl"] != "") { 792 echo " <p class='nrap' title='Nummer im Aufteilungsplan'>Nummer <span class='wichtig'>".$rows["nrpl"]."</span> im Aufteilungsplan.</p>";819 echo "\n<p class='nrap' title='Nummer im Aufteilungsplan'>Nummer <span class='wichtig'>".$rows["nrpl"]."</span> im Aufteilungsplan.</p>"; 793 820 } 794 821 … … 796 823 // Person <-benennt< AX_Namensnummer >istBestandteilVon-> AX_Buchungsblatt 797 824 if ($eig=="j") { // Wahlweise mit/ohne EigentÃŒmer 798 echo "\n\n<h3><img src='ico/Eigentuemer_2.png' width='16' height='16' alt=''> Angaben zum Eigentum</h3>\n"; 799 $n = eigentuemer($con, $gmlg, false, ""); // ohne Adresse 825 $n = eigentuemer($gmlg, false, ""); // ohne Adresse 800 826 if ($n == 0) { 801 827 if ($blattkeyg == 1000) { … … 806 832 } 807 833 } 808 $bl++; 809 } 810 if ($bl == 0) {echo "\n<p class='err'>Kein Buchungsblatt gefunden.</p>";} 811 $bs++; 812 } 834 835 // B e r e c h t i g t e B u c h u n g e n ... zu dieser Buchungs-Stelle. Optional. 836 if ($berbu=="j") { // Wahlweise anzeigen 837 echo "\n<hr>\n<h3 id='berbu'><img src='ico/Grundbuch.png' width='16' height='16' alt=''> Berechtigte Buchungen</h3>" 838 ."\n<p>".$cnt_ber." Buchungen mit Rechten an der Buchung ".$lfd." auf ".$blattartg." ".$blatt." von ".$beznam.":</p>"; 839 ber_bs_anz($gmls, $eig); // berechtigte Buchungstellen und GB-BlÀtter Anzeigen, und ggf. auch mit EigentÃŒmer 840 } 841 $bl++; // ZÀhl Blatt 842 } 843 if ($bl == 0) {echo "\n<p class='err'>Kein Buchungsblatt zur Buchungstelle gefunden.</p>";} 844 $bs++; // ZÀhl Buchungs-Stelle 845 } 846 813 847 pg_free_result($resg); 814 if ($bs == 0) {echo "\n<p class='err'>Keine Buchungstelle gefunden.</p>";}848 if ($bs == 0) {echo "\n<p class='err'>Keine Buchungstelle zum Flurstück gefunden.</p>";} 815 849 pg_close($con); 816 850 echo <<<END … … 823 857 </div> 824 858 END; 825 footer($gmlid, $_SERVER['PHP_SELF']."?", "&eig=".$eig );859 footer($gmlid, $_SERVER['PHP_SELF']."?", "&eig=".$eig."&berbu=".$berbu); 826 860 ?> 827 861 </body>
Note: See TracChangeset
for help on using the changeset viewer.