Changeset 43 for trunk/var/www/info/alkis/alkisfsnw.php
- Timestamp:
- 09/09/10 14:09:03 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/var/www/info/alkis/alkisfsnw.php
r41 r43 4 4 31.08.2010 $style=ALKIS entfernt, alles Kompakt 5 5 02.09.2010 Mit Icons 6 07.09.2010 Kennzeichen-Rahmen f. fiktives Blatt, Schluessel anschaltbar 7 08.09.2010 .. 6 8 7 9 ALKIS-Buchauskunft, Kommunales Rechenzentrum Minden-Ravensberg/Lippe (Lemgo). … … 38 40 $gmlid=urldecode($_REQUEST["gmlid"]); 39 41 $eig=urldecode($_REQUEST["eig"]); 42 43 // getswitch($idanzeige, $showkey); 40 44 $id = isset($_GET["id"]) ? $_GET["id"] : "n"; 41 $idanzeige=false; 42 if ($id == "j") {$idanzeige=true;} 45 if ($id == "j") { 46 $idanzeige=true; 47 } else { 48 $idanzeige=false; 49 } 50 $keys = isset($_GET["showkey"]) ? $_GET["showkey"] : "n"; 51 if ($keys == "j") { 52 $showkey=true; 53 } else { 54 $showkey=false; 55 } 56 43 57 $dbname = 'alkis05' . $gkz; 44 58 $con = pg_connect("host=".$dbhost." port=" .$dbport." dbname=".$dbname." user=".$dbuser." password=".$dbpass); … … 70 84 echo "\n<h2><img src='ico/Flurstueck.ico' width='16' height='16' alt=''> Flurstück</h2>\n"; 71 85 } 72 echo "\n<table class='outer'>\n<tr>\n\t<td>"; 73 74 // Tabelle Kennzeichen75 echo "\n\t<table class='kennz ' title='Flurstückskennzeichen'>\n\t<tr>";86 echo "\n<table class='outer'>\n<tr>\n\t<td>"; // linke Seite 87 88 // darin Tabelle Kennzeichen 89 echo "\n\t<table class='kennzfs' title='Flurstückskennzeichen'>\n\t<tr>"; 76 90 echo "\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>"; 77 echo "\n\t<tr>\n\t\t<td title='Gemarkung'><span class='key'>".$gmkgnr."</span><br>".$gemkname."</td>"; 91 echo "\n\t<tr>\n\t\t<td title='Gemarkung'>"; 92 if ($showkey) { 93 echo "<span class='key'>".$gmkgnr."</span><br>"; 94 } 95 echo $gemkname."</td>"; 78 96 echo "\n\t\t<td title='Flurnummer'>".$flurnummer."</td>"; 79 97 echo "\n\t\t<td title='Flurstücksnummer (Zähler / Nenner)'><span class='wichtig'>".$flstnummer."</span></td>\n\t</tr>"; 80 98 echo "\n\t</table>"; 81 99 82 echo "\n\t</td>\n\t<td>"; 83 84 // Kopf Rechts:FS-Daten 2 Spalten100 echo "\n\t</td>\n\t<td>"; // rechte Seite 101 102 // FS-Daten 2 Spalten 85 103 echo "\n\t<table class='fsd'>"; 86 104 echo "\n\t<tr>\n\t\t<td>Entstehung</td>"; … … 89 107 echo "\n\t\t<td title='Jahrgang / Fortführungsnummer - Fortführungsart'>".$row["name"]."</td>\n\t</tr>"; 90 108 echo "\n\t</table>"; 91 if ($idanzeige) { 109 if ($idanzeige) {linkgml($gkz, $gmlid, "Flurstück"); } 92 110 echo "\n\t</td>\n</tr>\n</table>"; 93 111 … … 99 117 echo "\n<table class='fs'>"; 100 118 101 // Gebietszugehörigkeit 102 fs_gebietszug($con, $row["gemeinde"], $row["kreis"], $row["regierungsbezirk"]); // Gebietszugehoerigkeit 103 104 // Lagezeilen des Flurstuecks 105 fs_lage($con, $gmlid, $gkz); // Adresse, Lagebezeichnung 106 107 // Nutzungsarten 108 fs_nutz($con, $gmlid); // Tatsaechliche Nutzung 119 fs_gebietszug($con, $row["gemeinde"], $row["kreis"], $row["regierungsbezirk"], $showkey); // Gebietszugehoerigkeit 120 121 fs_lage($con, $gmlid, $gkz, $showkey); // Adresse, Lagebezeichnung 122 123 fs_nutz($con, $gmlid, $showkey); // Tatsaechliche Nutzung 109 124 110 125 // Flaeche und Link auf GebÀude-Auswertung … … 113 128 echo "\n\t<td class='lr'>".$flae."</td>"; // Sp. 2 114 129 echo "\n\t<td>"; // Sp. 3 115 // Gebaeude-NW 116 echo "\n\t\t<p class='nwlink noprint'>"; 130 echo "\n\t\t<p class='nwlink noprint'>"; // Gebaeude-Verschneidung 117 131 echo "\n\t\t\t<a href='alkisgebaeudenw.php?gkz=".$gkz."&gmlid=".$gmlid; 118 if ($idanzeige) echo "&id=j"; 132 if ($idanzeige) {echo "&id=j";} 133 if ($showkey) {echo "&id=j";} 119 134 echo "' title='Gebäudenachweis'>Gebäude <img src='ico/Haus.ico' width='16' height='16' alt=''></a>"; 120 135 echo "\n\t\t</p>"; 121 136 echo "\n\t</td>"; 122 137 echo "\n</tr>"; 138 123 139 echo "\n</table>"; 124 140 … … 135 151 echo "\n\t\t\t<a href='".$self."gkz=".$gkz."&gmlid=".$gmlid; 136 152 if ($idanzeige) { echo "&id=j";} 137 // Umschalter. FS-Nachw ruft sich selbst mit geaend. Param. auf. Posit. auf Marke #gb 153 if ($showkey) {echo "&showkey=j";} 154 // Umschalter: FS-Nachw ruft sich selbst mit geaend. Param. auf. Posit. auf Marke #gb 138 155 if ($eig=="j") { 139 156 echo "&eig=n#gb' title='Flurstücksnachweis'>ohne Eigentümer</a>"; 140 157 } else { 141 echo "&eig=j#gb' title='Flurstücks- und Eigentümernachweis'>mit Eigentümer</a>"; 158 echo "&eig=j#gb' title='Flurstücks- und Eigentümernachweis'>mit Eigentümer"; 159 echo "<img src='ico/EigentuemerGBzeile.ico' width='16' height='16' alt=''></a>"; 142 160 } 143 161 echo "\n\t\t</p>"; … … 156 174 $sql.="ORDER BY s.laufendenummer;"; 157 175 $ress=pg_query($con,$sql); 158 if (!$ress) echo "\n<p class='err'>Keine Buchungsstelle.<br>\nSQL= ".$sql."</p>\n"; 176 if (!$ress) { 177 echo "\n<p class='err'>Keine Buchungsstelle.<br>\nSQL= ".$sql."</p>\n"; 178 } 159 179 $bs=0; // Z.Buchungsstelle 160 180 while($rows = pg_fetch_array($ress)) { … … 174 194 while($rowg = pg_fetch_array($resg)) { 175 195 $beznam=$rowg["bezeichnung"]; 196 $blattkeyg=$rowg["blattart"]; 197 $blattartg=blattart($blattkeyg); 176 198 echo "\n<hr>\n<table class='outer'>"; 177 199 echo "\n<tr>"; // 1 row only … … 179 201 180 202 // Rahmen mit GB-Kennz 181 echo "\n\t<table class='kennz' title='Bestandskennzeichen'>"; 203 if ($blattkeyg == 1000) { 204 echo "\n\t<table class='kennzgb' title='Bestandskennzeichen'>"; 205 }else { 206 echo "\n\t<table class='kennzgbf' title='Bestandskennzeichen'>"; // dotted 207 } 182 208 echo "\n\t<tr>\n\t\t<td class='head'>Bezirk</td>"; 183 echo "\n\t\t<td class='head'>". blattart($rowg["blattart"])."</td>";209 echo "\n\t\t<td class='head'>".$blattartg."</td>"; 184 210 echo "\n\t\t<td class='head'>Lfd-Nr,</td>"; 185 211 echo "\n\t\t<td class='head'>Buchungsart</td>"; 186 212 echo "\n\t</tr>"; 187 213 echo "\n\t<tr>"; 188 echo "\n\t\t<td title='Grundbuchbezirk'><span class='key'>".$rowg["bezirk"]."</span><br>".$beznam."</td>"; 214 echo "\n\t\t<td title='Grundbuchbezirk'>"; 215 if ($showkey) { 216 echo "<span class='key'>".$rowg["bezirk"]."</span><br>"; 217 } 218 echo $beznam."</td>"; 189 219 echo "\n\t\t<td title='Grundbuch-Blatt'><span class='wichtig'>".$rowg["blatt"]."</span></td>"; 190 220 echo "\n\t\t<td title='Bestandsverzeichnis-Nummer (BVNR, Grundstück)'>".$rows["lfd"]."</td>"; 191 echo "\n\t\t<td title='Buchungsart'><span class='key'>".$rows["buchungsart"]."</span><br>".buchungsart($rows["buchungsart"])."</td>"; 221 echo "\n\t\t<td title='Buchungsart'>"; 222 if ($showkey) { 223 echo "<span class='key'>".$rows["buchungsart"]."</span><br>"; 224 } 225 echo buchungsart($rows["buchungsart"])."</td>"; 192 226 echo "\n\t</tr>"; 193 227 echo "\n\t</table>"; … … 204 238 linkgml($gkz, $rowg["gml_id"], "Buchungsblatt"); 205 239 } 206 echo "\n<br>\n"; 207 echo "\n\t<p class='nwlink'>weitere Auskunft:<br>\n\t\t<a href='alkisbestnw.php?gkz=".$gkz."&gmlid=".$rowg[0]; 208 if ($idanzeige) echo "&id=j"; 209 echo "' title='Grundbuchnachweis mit kompletter Eigentümerangabe'>Grundbuch-Blatt <img src='ico/GBBlatt_link.ico' width='16' height='16' alt=''></a>\n\t</p>"; 240 echo "\n\t<p class='nwlink'>weitere Auskunft:<br>"; 241 echo "\n\t\t<a href='alkisbestnw.php?gkz=".$gkz."&gmlid=".$rowg[0]; 242 if ($idanzeige) {echo "&id=j";} 243 if ($showkey) {echo "&showkey=j";} 244 if ($blattkeyg == 1000) { 245 echo "' title='Grundbuchnachweis mit kompletter Eigentümerangabe'>"; 246 } else { 247 echo "' title='Grundbuchnachweis'>"; 248 } 249 echo $blattartg." <img src='ico/GBBlatt_link.ico' width='16' height='16' alt=''></a>"; 250 echo "\n\t</p>"; 210 251 echo "\n</td>"; 211 252 echo "\n</tr>"; 212 253 echo "\n</table>"; 213 254 214 /* im Head der Tabelle bereits entschluesselt 215 if ($rowg["blattart"] <> "1000") { 216 echo "\n<p>Blattart: ".blattart($rowg["blattart"])." (".$rowg["blattart"].").<br>\n"; 217 } 218 */ 219 // ++++++Weitere Felder ausgeben ?????? oder in SQL weglassen 220 if ($rows["sond"] != "") {echo "<p>Sondereigentum: ".$rows["sond"]."</p>";} 221 if ($rows["nrpl"] != "") {echo "<p>Nr im A-Plan: ".$rows["nrpl"]."</p>";} 255 // +++ Weitere Felder ausgeben ?? beschreibungdesumfangsderbuchung 256 if ($rows["sond"] != "") { 257 echo "<p class='sond' title='Sondereigentum'>Verbunden mit dem Sondereigentum<br>".$rows["sond"]."</p>"; 258 } 259 if ($rows["nrpl"] != "") { 260 echo "<p class='nrap' title='Nummer im Aufteilungsplan'>Nummer <span class='wichtig'>".$rows["nrpl"]."</span> im Aufteilungsplan.</p>"; 261 } 222 262 223 263 // E I G E N T U E M E R, zum GB 224 264 // Person <-benennt< AX_Namensnummer >istBestandteilVon-> AX_Buchungsblatt 225 265 if ($eig=="j") { // Wahlweise mit/ohne EigentÃŒmer 226 // echo "\n\n<h4>Eigentümer:</h4>\n";227 266 $gmlblatt = $rowg["gml_id"]; // id blatt 228 $n = eigentuemer($con, $gkz, $idanzeige, $gmlblatt, false); // hier ohne Adresse267 $n = eigentuemer($con, $gkz, $idanzeige, $gmlblatt, false); // hier aber ohne Adresse 229 268 if ($n == 0) { 230 if ($ rowg["blattart"]== 1000) {269 if ($blattkeyg == 1000) { 231 270 echo "\n<p class='err'>Keine Namensnummer gefunden.</p>"; 232 271 linkgml($gkz, $rowg["gml_id"], "Buchungsblatt"); 233 272 } else { 234 273 echo "\n<p>ohne Eigentümer.</p>"; 235 // if ($idanzeige) {linkgml($gkz, $rowg["gml_id"], "Buchungsblatt");} // ist schon sichtbar236 274 } 237 275 } … … 243 281 linkgml($gkz, $rows["gml_id"], "Buchungstelle"); 244 282 } 245 // Test BEGINN246 //echo "\n<p>Buchungsstelle ".$rows["gml_id"]."</p>";247 //if ($idanzeige) {linkgml($gkz, $rows["gml_id"], "Buchungsstelle");}248 // Test ENDE249 283 250 284 // Buchungstelle >an> Buchungstelle >istBestandteilVon> BLATT -> Bezirk … … 254 288 $sql.="b.gml_id AS g_gml, b.bezirk, b.buchungsblattnummermitbuchstabenerweiterung as blatt, b.blattart, "; 255 289 $sql.="z.bezeichnung "; // stelle -> amtsgericht 256 $sql.="FROM alkis_beziehungen 257 $sql.="JOIN ax_buchungsstelle 258 $sql.="JOIN alkis_beziehungen 259 $sql.="JOIN ax_buchungsblatt 290 $sql.="FROM alkis_beziehungen an "; // Bez. Stelle - Stelle 291 $sql.="JOIN ax_buchungsstelle s ON an.beziehung_von=s.gml_id "; 292 $sql.="JOIN alkis_beziehungen v ON s.gml_id=v.beziehung_von "; // Bez. Stelle - Blatt 293 $sql.="JOIN ax_buchungsblatt b ON v.beziehung_zu=b.gml_id "; 260 294 $sql.="JOIN ax_buchungsblattbezirk z ON z.land=b.land AND z.bezirk=b.bezirk "; 261 295 $sql.="WHERE an.beziehung_zu='".$rows["gml_id"]."' "; // id herrschende Buchungsstelle … … 264 298 $sql.="ORDER BY b.bezirk, b.buchungsblattnummermitbuchstabenerweiterung ;"; 265 299 $resan=pg_query($con,$sql); 266 if (!$resan) echo "\n<p class='err'>Keine weiteren Buchungsstellen.<br>\nSQL=<br>".$sql."</p>\n"; 300 if (!$resan) { 301 echo "\n<p class='err'>Keine weiteren Buchungsstellen.<br>\nSQL=<br>".$sql."</p>\n"; 302 } 267 303 $an=0; // Stelle an Stelle 268 304 while($rowan = pg_fetch_array($resan)) { 269 305 $beznam=$rowan["bezeichnung"]; 306 $blattkeyan=$rowan["blattart"]; // Schluessel von Blattart 307 $blattartan=blattart($blattkeyan); 270 308 echo "\n<hr>\n<table class='outer'>"; 271 309 echo "\n<tr>"; // 1 row only … … 273 311 274 312 // Rahmen mit Kennzeichen GB 275 echo "\n\t<table class='kennz' title='Bestandskennzeichen'>"; 313 if ($blattkeyan == 1000) { 314 echo "\n\t<table class='kennzgb' title='Bestandskennzeichen'>"; 315 } else { 316 echo "\n\t<table class='kennzgbf' title='Bestandskennzeichen'>"; // dotted 317 } 276 318 echo "\n\t<tr>"; 277 319 echo "\n\t\t<td class='head'>Bezirk</td>"; 278 echo "\n\t\t<td class='head'>". blattart($rowan["blattart"])."</td>";320 echo "\n\t\t<td class='head'>".$blattartan."</td>"; 279 321 echo "\n\t\t<td class='head'>Lfd-Nr,</td>"; 280 322 echo "\n\t\t<td class='head'>Buchungsart</td>"; 281 323 echo "\n\t</tr>"; 282 324 echo "\n\t<tr>"; 283 echo "\n\t\t<td title='Grundbuchbezirk'><span class='key'>".$rowan["bezirk"]."</span><br>".$beznam."</td>"; 325 echo "\n\t\t<td title='Grundbuchbezirk'>"; 326 if ($showkey) { 327 echo "<span class='key'>".$rowan["bezirk"]."</span><br>"; 328 } 329 echo $beznam."</td>"; 284 330 echo "\n\t\t<td title='Grundbuch-Blatt'><span class='wichtig'>".$rowan["blatt"]."</span></td>"; 285 331 echo "\n\t\t<td title='Bestandsverzeichnis-Nummer (BVNR, Grundstück)'>".$rowan["lfd"]."</td>"; 286 echo "\n\t\t<td title='Buchungsart'><span class='key'>".$rowan["buchungsart"]."</span><br>".buchungsart($rowan["buchungsart"])."</td>"; 332 echo "\n\t\t<td title='Buchungsart'>"; 333 if ($showkey) { 334 echo "<span class='key'>".$rowan["buchungsart"]."</span><br>"; 335 } 336 echo buchungsart($rowan["buchungsart"])."</td>"; 287 337 echo "\n\t</tr>"; 288 338 echo "\n\t</table>"; … … 298 348 } 299 349 echo "\n<br>"; 300 echo "\n\t<p class='nwlink'>weitere Auskunft:<br>\n\t\t<a href='alkisbestnw.php?gkz=".$gkz."&gmlid=".$rowan["g_gml"]; 301 if ($idanzeige) echo "&id=j"; 302 echo "' title='Grundbuchnachweis mit kompletter Eigentümerangabe'>GB-Nachweis</a>\n\t</p>"; 350 echo "\n\t<p class='nwlink'>"; 351 echo "\n\t\t<a href='alkisbestnw.php?gkz=".$gkz."&gmlid=".$rowan["g_gml"]; 352 if ($idanzeige) {echo "&id=j";} 353 if ($showkey) {echo "&showkey=j";} 354 echo "' title='Grundbuchnachweis mit kompletter Eigentümerangabe'>"; 355 echo $blattartan; 356 echo " <img src='ico/GBBlatt_link.ico' width='16' height='16' alt=''>"; 357 echo "</a>"; 358 echo "\n\t</p>"; 303 359 echo "\n\t</td>"; 304 360 echo "\n</tr>"; 305 361 echo "\n</table>"; 306 362 307 if ($rowan["blattart"] <> "1000") { 308 echo "\n<p>Blattart: ".blattart($rowan["blattart"])." (".$rowan["blattart"].").<br>\n"; 309 } 310 311 // +++ Weitere Felder ausgeben oder in SQL weglassen?? 312 if ($rowan["sond"] != '') {echo "<p>Sondereigentum: ".$rowan["sond"]."</p>";} 313 if ($rowan["nrpl"] != '') {echo "<p>Nr im A-Plan: ".$rowan["nrpl"]."</p>";} 363 if ($blattkeyan != 1000) { 364 echo "\n<p>Blattart: ".$blattartan." (".$blattkeyan.").<br>\n"; 365 } 366 367 // +++ Weitere Felder ausgeben ?? beschreibungdesumfangsderbuchung 368 if ($rowan["sond"] != "") { 369 echo "<p class='sond' title='Sondereigentum'>Verbunden mit dem Sondereigentum<br>".$rowan["sond"]."</p>"; 370 } 371 if ($rowan["nrpl"] != "") { 372 echo "<p class='nrap' title='Nummer im Aufteilungsplan'>Nummer <span class='wichtig'>".$rowan["nrpl"]."</span> im Aufteilungsplan.</p>"; 373 } 314 374 315 375 if ($eig=="j") { 316 //echo "\n<p>Eigentümer vorlÀufig dem GB-Nachweis entnehmen.</p>";317 376 $gmlblatt = $rowan["g_gml"]; // id blatt 318 $n = eigentuemer($con, $gkz, $idanzeige, $gmlblatt, false ); // ohne Adresse377 $n = eigentuemer($con, $gkz, $idanzeige, $gmlblatt, false, $showkey); // ohne Adresse 319 378 // Anzahl $n kontrollieren? Warnen? 320 379 } … … 339 398 </form> 340 399 341 <?php footer($gkz, $gmlid, $idanzeige, $self, $hilfeurl, "&eig=".$eig ); ?>400 <?php footer($gkz, $gmlid, $idanzeige, $self, $hilfeurl, "&eig=".$eig, $showkey); ?> 342 401 343 402 </body>
Note: See TracChangeset
for help on using the changeset viewer.