Changeset 402 for trunk/info/info/alkisn/alkisbestnw.php
- Timestamp:
- 04/23/18 15:33:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/info/info/alkisn/alkisbestnw.php
r398 r402 11 11 2017-06-08 Validierung Eingabeparameter, Farbwechsel der Tabelle je GrundstÃŒck, Feinschliff und HTML-Profilierung 12 12 2017-10-09 SchlÃŒssel der Blattart bei berechtigten BlÀttern, sauber filtern auf endet IS NULL 13 2018-04-23 Blatt und EigentÃŒmer in eine Tabelle. 13 14 */ 14 15 session_start(); 15 16 $showkey="n"; // Var. initalisieren 16 $showkey="n"; $nodebug=""; // Var. initalisieren 17 17 $cntget = extract($_GET); // Parameter in Variable umwandeln 18 18 … … 22 22 if (!preg_match('#^[j|n]{0,1}$#', $showkey)) {die ("Eingabefehler showkey");} 23 23 if ($showkey == "j") {$showkey=true;} else {$showkey=false;} 24 if (!preg_match('#^j{0,1}$#', $nodebug)) {die("Eingabefehler nodebug");} 24 25 25 26 require_once("alkis_conf_location.php"); … … 43 44 <body> 44 45 <?php 46 // Mit URL-Parameter "&nodebug=j" kann man die Entwicklungsumgebung (in Conf definiert) ausschalten. 47 // Manuell an die URL anfÃŒgen, wirkt nur temporÀr und wird nicht in Links weiter gereicht. 48 if ($nodebug == "j") {$debug=0;} 49 45 50 $con = pg_connect($dbconn." options='--application_name=ALKIS-Auskunft_alkisbestnw.php'"); 46 51 if (!$con) echo "\n<p class='err'>Fehler beim Verbinden der DB</p>"; 47 52 48 53 // G R U N D B U C H 49 $sql="SELECT g.gml_id, g.bezirk, g.buchungsblattnummermitbuchstabenerweiterung AS nr, g.blattart, wb.v AS blattartv, wb.d AS blattartd, 50 b.gml_id, b.bezirk, b.bezeichnung AS beznam, d.gml_id, d.land, d.bezeichnung, d.stelle, d.stellenart, wd.v AS stellev 51 FROM ax_buchungsblatt g 54 $sql="SELECT g.gml_id, g.bezirk, g.buchungsblattnummermitbuchstabenerweiterung AS blatt, g.blattart, wb.v AS blattartv, wb.d AS blattartd, 55 b.gml_id, b.bezirk, b.bezeichnung AS beznam, d.gml_id, d.land, d.bezeichnung, d.stelle, d.stellenart, wd.v AS stellev FROM ax_buchungsblatt g 52 56 LEFT JOIN ax_buchungsblattbezirk b ON g.land=b.land AND g.bezirk=b.bezirk 53 57 LEFT JOIN ax_dienststelle d ON b.land=d.land AND b.stelle=d.stelle … … 64 68 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities($sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";} 65 69 } 66 if ($row = pg_fetch_a rray($res)) {70 if ($row = pg_fetch_assoc($res)) { 67 71 $blattkey=$row["blattart"]; 68 72 $blattart=$row["blattartv"]; 69 70 echo "<p class='gbkennz'>ALKIS Bestand ".$row["bezirk"]." - ".$row["nr"]." </p>"; // Balken 71 echo "\n<h2><img src='ico/Grundbuch.png' width='16' height='16' alt=''> Grundbuch</h2>" 72 ."\n<table class='outer'>\n<tr>\n\t<td>"; // Kennz. im Rahmen 73 $blatt=ltrim($row["blatt"], "0"); 74 75 echo "<p class='gbkennz'>ALKIS Bestand ".$row["bezirk"]." - ".$blatt." </p>"; // Balken 76 echo "\n<h2>Grundbuch</h2>"; 77 echo "\n<table class='outer'>" // Blatt UND Eigent. 78 ."\n<tr>\n\t<td class='ll'><img src='ico/Grundbuch.png' width='16' height='16' alt=''> Blatt:</td>" // outer Links 79 ."\n\t<td colspan='2'>"; // Outer Mitte, Kennz. im Rahmen 73 80 if ($blattkey == 1000) { 74 81 echo "\n\t\t<table class='kennzgb' title='Bestandskennzeichen'>"; … … 91 98 if ($showkey) {echo "<span class='key'>".$row["bezirk"]."</span><br>";} 92 99 echo htmlentities($row["beznam"], ENT_QUOTES, "UTF-8")."</td>" 93 ."\n\t\t\t<td title='Grundbuch-Blatt'><span class='wichtig'>".$ row["nr"]."</span></td>"100 ."\n\t\t\t<td title='Grundbuch-Blatt'><span class='wichtig'>".$blatt."</span></td>" 94 101 ."\n\t\t</tr>" 95 102 ."\n\t\t</table>" 96 103 ."\n\t</td>\n\t<td> " 97 ."\n\t</td>\n</tr> \n</table>";104 ."\n\t</td>\n</tr>"; 98 105 } 99 106 … … 105 112 if ($n == 0) { // keine NamensNr, kein Eigentuemer 106 113 echo "\n<p class='err'>Keine Namensnummer gefunden.</p>" 107 ."\n<p>Bezirk: ".$row["bezirk"].", Blatt: ".$row["nr"].", Blattart ".$blattkey." (".$blattart.")</p>"; 108 } 109 } 114 ."\n<p>Bezirk: ".$row["bezirk"].", Blatt: ".$blatt.", Blattart ".$blattkey." (".$blattart.")</p>"; 115 } 116 } 117 echo "\n</table>"; 110 118 111 119 // Vorab pruefen, ob der Fall "Rechte an .." vorliegt. … … 115 123 // - Rechte und FlurstÃŒcke 116 124 // - FlurstÃŒcke 117 // +++ Herrschend/Dienend per "title" auf den Ãberschriften ("Rechte" / "Berechtigte GrundbÃŒcher") erlÀutern118 125 119 126 // GB-Blatt <istBestandteilVon< sh=herrschend >an/zu> sd=dienend … … 126 133 $res=pg_execute("", $v); 127 134 if (!$res) echo "\n<p class='err'>Fehler bei Suche nach Buchungen.</p>"; 128 $row=pg_fetch_a rray($res);135 $row=pg_fetch_assoc($res); 129 136 $anz=$row["anzahl"]; 130 137 … … 132 139 if ($anz > 0) { // auch "Rechte an" 133 140 echo " Rechte und Flurstücke</h3>\n<table class='fs'>"; 134 135 141 // zusaetzliche Kopfzeile "Rechte" 136 142 echo "\n<tr>" … … 144 150 ."\n\t<td> </td>" 145 151 ."\n</tr>"; 146 } else { // keine Rechte an .., nur FlurstÃŒcke gebucht152 } else { // keine Rechte an, nur FlurstÃŒcke gebucht 147 153 echo " Flurstücke</h3>\n<table class='fs'>"; 148 154 } … … 177 183 $fscnt=0; 178 184 $zpaar=false; 179 while($row = pg_fetch_a rray($res)) { // Loop Buchungsstelle (GrundstÃŒck)185 while($row = pg_fetch_assoc($res)) { // Loop Buchungsstelle (GrundstÃŒck) 180 186 $lfdnr=$row["lfd"]; 181 187 $bvnr=str_pad($lfdnr, 4, "0", STR_PAD_LEFT); … … 230 236 $a=0; // count 231 237 $altbvnr=""; // Gruppenwechsel 232 while($rowan= pg_fetch_a rray($resan)) {238 while($rowan= pg_fetch_assoc($resan)) { 233 239 $lfdnran=$rowan["lfd"]; // BVNR an 234 240 $gml_bsan=$rowan["gml_id"]; // id der buchungsstelle an 235 $baan=$rowan["bart"]; 241 $baan=$rowan["bart"]; // Buchungsart an, entschluesselt 236 242 $anzu=$rowan["anzu"]; // Welche Relation? Recht an oder Recht zu ? 237 243 … … 251 257 } 252 258 $b=0; 253 while($fbrow = pg_fetch_a rray($fbres)) { // genau 1259 while($fbrow = pg_fetch_assoc($fbres)) { // genau 1 254 260 $fbgml=$fbrow["gml_id"]; 255 261 $fbland=$fbrow["land"]; 256 262 $fbbez=$fbrow["bezirk"]; 257 263 $beznam=$fbrow["beznam"]; 258 $fbblatt= $fbrow["blatt"];264 $fbblatt=ltrim($fbrow["blatt"], "0"); 259 265 $fbbartkey=$fbrow["blattart"]; // Key 260 266 $fbbart=$fbrow["blattartv"]; // Value … … 307 313 $aj = bnw_fsdaten($con, $lfdnran, $gml_bsan, "", $anteil, false, "", ""); // return=Anz.FS 308 314 $fscnt=$fscnt + $aj; 309 // +++ Gibt es Sondereigentum beim fiktiven Blatt?310 315 if ($rowan["nrap"] != "") { 311 316 echo "\n<tr>" … … 375 380 $b=0; // count: Buchungen / BlÀtter 376 381 $zpaar=false; 377 while($rowb = pg_fetch_a rray($resb)) {382 while($rowb = pg_fetch_assoc($resb)) { 378 383 if ($b == 0) { // Ueberschrift und Tabelle nur ausgeben, wenn etwas gefunden wurde 379 384 echo "\n\n<h3><img src='ico/Grundbuch_zu.png' width='16' height='16' alt=''> Berechtigte Grundbücher</h3>" … … 399 404 $bart=$rowb["bart"]; // BA entschl. 400 405 $lfdnr=$rowb["lfdnr"]; // BVNR ber. 406 $blatt=ltrim($rowb["blatt"], "0"); 401 407 $bvnr=str_pad($lfdnr, 4, "0", STR_PAD_LEFT); 402 408 … … 415 421 echo htmlentities($rowb["beznam"], ENT_QUOTES, "UTF-8") 416 422 ."</td>" 417 ."\n\t<td><span class='wichtig'>".$ rowb["blatt"]."</span></td>"423 ."\n\t<td><span class='wichtig'>".$blatt."</span></td>" 418 424 ."\n\t<td>".$bvnr."</td>" 419 425 ."\n\t<td title='".htmlentities($rowb["bartd"], ENT_QUOTES, "UTF-8")."'>";
Note: See TracChangeset
for help on using the changeset viewer.