Ignore:
Timestamp:
01/04/11 18:26:16 (13 years ago)
Author:
frank.jaeger
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/var/www/info/alkis/alkisfsnw.php

    r63 r64  
    1010        10.11.2010  Felder nutzung.zustand und nutzung.name 
    1111        14.12.2010  Pfad zur Conf 
     12        17.12.2010  Astrid Emde: Prepared Statements (pg_query -> pg_prepare + pg_execute) 
     13        04.01.2011  Frank JÀger: verkuerzte Nutzungsart-Zeilen mit Icon 
    1214 
    1315        ToDo:  
    1416        NamNum >bestehtAusRechtsverhaeltnissenZu> NamNum 
     17        KÃŒrzere Bezeichnung der Nutzungsart 
    1518*/ 
    1619ini_set('error_reporting', 'E_ALL & ~ E_NOTICE'); 
     
    4447$eig=urldecode($_REQUEST["eig"]); 
    4548 
    46 // getswitch($idanzeige, $showkey); 
    4749$id = isset($_GET["id"]) ? $_GET["id"] : "n"; 
    4850if ($id == "j") { 
     
    98100                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>"; 
    99101                echo "\n\t<tr>\n\t\t<td title='Gemarkung'>"; 
    100                 if ($showkey) {          
     102                if ($showkey) { 
    101103                        echo "<span class='key'>".$gmkgnr."</span><br>"; 
    102                 }                
     104                } 
    103105                echo $gemkname."</td>"; 
    104106                echo "\n\t\t<td title='Flurnummer'>".$flurnummer."</td>"; 
     
    124126echo "\n<p class='nwlink noprint'>weitere Auskunft:</p>"; // oben rechts von der Tabelle 
    125127echo "\n<table class='fs'>"; 
    126          
     128 
    127129// ** G e b i e t s z u g e h o e r i g k e i t ** 
    128130// eine Tabellenzeile mit der Gebietszugehoerigkeit eines Flurstuecks wird ausgegeben 
    129131// Schluessel "land" wird nicht verwendet, gibt es Bestaende wo das nicht einheitlich ist? 
    130 echo "\n<tr>\n\t<td class='ll'><img src='ico/Gemeinde.ico' width='16' height='16' alt=''> Im Gebiet von:</td>"; 
     132echo "\n<tr>\n\t<td class='ll'><img title='Im Gebiet von' src='ico/Gemeinde.ico' width='16' height='16' alt=''> Gebiet:</td>"; 
    131133 
    132134// G e m e i n d e 
     
    139141$row = pg_fetch_array($res); 
    140142$gnam = htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 
    141 echo "\n\t<td class='lr'>Gemeinde "; 
     143echo "\n\t<td class='lr'>Gemeinde</td><td class='lr'>"; 
    142144if ($showkey) { 
    143145        echo "<span class='key'>(".$gemeinde.")</span> "; 
    144146} 
    145 echo $gnam."<br>"; 
     147echo $gnam."</td><td></td></tr>"; 
    146148 
    147149// K r e i s 
     
    154156$row = pg_fetch_array($res); 
    155157$knam = htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 
    156 echo "Kreis "; 
     158echo "<tr><td></td><td>Kreis</td><td>"; 
    157159if ($showkey) { 
    158160        echo "<span class='key'>(".$kreis.")</span> "; 
    159 }        
    160 echo $knam."<br>"; 
     161} 
     162echo $knam."</td><td></td></tr>"; 
    161163 
    162164// R e g - B e z 
     
    166168$row = pg_fetch_array($res); 
    167169$bnam = htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); 
    168 echo "Regierungsbezirk "; 
     170echo "<tr><td></td><td>Regierungsbezirk</td><td>"; 
    169171if ($showkey) { 
    170172        echo "<span class='key'>(".$bezirk.")</span> "; 
    171173} 
    172 echo $bnam."</td>"; 
    173 echo "\n\t<td>&nbsp;</td>\n</tr>"; // 3. Spalte fÃŒr NW-Link (in weiteren Tab-Zeilen) 
     174echo $bnam."</td><td></td></tr>"; 
    174175// ENDE G e b i e t s z u g e h o e r i g k e i t 
    175  
    176176 
    177177// ** L a g e b e z e i c h n u n g ** 
     
    208208while($row = pg_fetch_array($res)) { 
    209209        $sname = htmlentities($row["bezeichnung"], ENT_QUOTES, "UTF-8"); // Str.-Name 
    210         //echo "<!-- Adresse -->";               
    211210        echo "\n<tr>\n\t"; 
    212                 if ($j == 0) {           
     211                if ($j == 0) { 
    213212                        echo "<td class='ll'><img src='ico/Lage_mit_Haus.ico' width='16' height='16' alt=''> Adresse:</td>"; 
    214213                } else { 
    215214                        echo "<td>&nbsp;</td>"; 
    216215                } 
     216                echo "\n\t<td></td>"; 
    217217                echo "\n\t<td class='lr'>"; 
    218218                if ($showkey) { 
     
    221221                echo $sname."&nbsp;".$row["hausnummer"]."</td>"; 
    222222                echo "\n\t<td>\n\t\t<p class='nwlink noprint'>"; 
    223                         echo "\n\t\t\t<a href='alkislage.php?gkz=".$gkz."&amp;ltyp=m&amp;gmlid=".$row["gml_id"]."'>Lage "; 
     223                        echo "\n\t\t\t<a title='Lagebezeichnung mit Hausnummer' href='alkislage.php?gkz=".$gkz."&amp;ltyp=m&amp;gmlid=".$row["gml_id"]."'>Lage "; 
    224224                        echo "<img src='ico/Lage_mit_Haus.ico' width='16' height='16' alt=''></a>"; 
    225225                echo "\n\t\t</p>\n\t</td>"; 
     
    249249if (!$res) echo "<p class='err'>Fehler bei Lagebezeichnung ohne Hausnummer<br>\n".$sql."</p>"; 
    250250$j=0; 
    251 // Es wird auch eine Zeile ausgegeben, wenn kein Eintrag gefunden!       
     251// Es wird auch eine Zeile ausgegeben, wenn kein Eintrag gefunden! 
    252252while($row = pg_fetch_array($res)) { 
    253253        $gewann = htmlentities($row["unverschluesselt"], ENT_QUOTES, "UTF-8"); 
     
    255255        $lgml=$row["gml_id"]; // key der Lage 
    256256        if (!$gewann == "") { 
    257                 echo "\n<tr>";           
     257                echo "\n<tr>"; 
    258258                        echo "\n\t<td class='ll'><img src='ico/Lage_Gewanne.ico' width='16' height='16' alt=''> Gewanne:</td>"; 
     259                        echo "\n\t<td></td>"; 
    259260                        echo "\n\t<td class='lr'>".$gewann."</td>"; 
    260261                        echo "\n\t<td>\n\t\t<p class='nwlink noprint'>"; 
     
    262263                                echo "\n\t\t\tLage <img src='ico/Lage_Gewanne.ico' width='16' height='16' alt=''></a>"; 
    263264                        echo "\n\t\t</p>\n\t</td>"; 
    264                 echo "\n</tr>";          
     265                echo "\n</tr>"; 
    265266        } 
    266         // Gleicher DB-Eintrag in zwei HTML-Zeilen, besser nur ein Link  
     267        // Gleicher DB-Eintrag in zwei HTML-Zeilen, besser nur ein Link 
    267268        if ($skey > 0) { 
    268                 echo "\n<tr>";   
    269                         echo "\n\t<td class='ll'><img src='ico/Lage_an_Strasse.ico' width='16' height='16' alt=''> Stra&szlig;e:</td>";                          
     269                echo "\n<tr>"; 
     270                        echo "\n\t<td class='ll'><img src='ico/Lage_an_Strasse.ico' width='16' height='16' alt=''> Stra&szlig;e:</td>"; 
     271                        echo "\n\t<td></td>"; 
    270272                        echo "\n\t<td class='lr'>"; 
    271273                        if ($showkey) { 
     
    278280                        echo "\n\t\t</p>\n\t</td>"; 
    279281                echo "\n</tr>"; 
    280         }                
     282        } 
    281283        $j++; 
    282284} 
     
    285287// ** N U T Z U N G ** 
    286288// Tabellenzeilen (3 Spalten) mit tats. Nutzung zu einem FS ausgeben 
    287 $sql ="SELECT m.title, m.fldclass, m.fldinfo, n.gml_id, c.class, n.info, n.zustand, n.name, n.bezeichnung, "; 
    288 // ", m.gruppe,  "; 
     289$sql ="SELECT m.title, m.fldclass, m.fldinfo, n.gml_id, c.class, n.info, n.zustand, n.name, n.bezeichnung, m.gruppe, "; 
    289290// Gemeinsame FlÀche von NUA und FS 
    290291$sql.="round(st_area(st_intersection(n.wkb_geometry,f.wkb_geometry))::numeric,1) AS schnittflae, "; 
     
    305306$j=0; 
    306307while($row = pg_fetch_array($res)) { 
    307 //      $grupp = $row["gruppe"];  // Individuelles Icon? 
     308        $grupp = $row["gruppe"];  // Individuelles Icon? 
    308309        $title = htmlentities($row["title"], ENT_QUOTES, "UTF-8"); // NUA-Titel 
    309310        $fldclass=$row["fldclass"]; // Feldname erstes  Zusatzfeld 
     
    313314        $info=$row["info"]; // zweites Zusatzfeld verschlÃŒsselt (noch keine Info zum entschl.) 
    314315        $schnittflae=$row["schnittflae"]; 
    315         $label=$row["label"]; // Nutzungsart 
     316        $label=$row["label"]; // Nutzungsart entschlÃŒsselt 
    316317        $zus=$row["zustand"]; // im Bau 
    317318        $nam=$row["name"]; // Eigenname 
    318319        $bez=$row["bezeichnung"]; // weiterer Name (unverschl.) 
    319         $blabla=htmlentities($row["blabla"], ENT_QUOTES, "UTF-8");  // Achtung, enthÀlt auch "" 
     320        $blabla=htmlentities($row["blabla"], ENT_QUOTES, "UTF-8"); // Beschr. aus GeoInfoDok als PopUp-Label, enthÀlt auch "" 
    320321//      $nflae=$row["nflae"]; 
    321322 
    322 // Icon nach Gruppe?:  
    323 // Siedlung - Abschnitt.ico, Verkehr - Strassen_Klassifikation.ico, GewÀsser - Wasser.ico 
    324 // Vegetation - Wald.ico, Title=Landwirtschaft Landwirt.ico 
     323        // Beispiele: 
     324        // group     Verkehr            
     325        // title     Weg                
     326        // fldclass  Funktion           
     327        // class     5250               
     328        // label     Rad- und Fußweg    
     329 
    325330        echo "\n<tr>\n\t"; 
    326                 if ($j == 0) {           
     331                if ($j == 0) { 
    327332                        echo "<td class='ll'><img src='ico/Abschnitt.ico' width='16' height='16' alt=''> Nutzung:</td>"; 
    328333                } else { 
    329334                        echo "<td>&nbsp;</td>"; 
    330335                } 
    331                 echo "\n\t<td class='lr'>".$schnittflae." m&#178;</td>"; 
    332                  
     336                echo "\n\t<td class='fla'>".$schnittflae." m&#178;</td>"; 
    333337                echo "\n\t<td class='lr'>"; 
    334                         // Eigene Nachweis-Seite fÃŒr Nutzungsart-FlÀche sinnvoll? dann hier verlinken  
    335                         //echo "\n\t\t<p class='nwlink noprint'>"; 
    336                                 //echo "\n\t\t\t<a href='alkisnua.php?gkz=".$gkz."amp;gmlid=".$gml."'>Nutzung "; 
    337                                 //echo "<img src='ico/Abschnitt.ico' width='16' height='16' alt=''></a>"; 
    338                                 //if ($idanzeige) {linkgml($gkz, $gml, "Nutzung");} // Nein, ist mit nix verknuepft 
    339                         //echo "\n\t\t</p>"; 
    340                         echo $title; 
    341                         If ($class != "") {  // SchlÃŒssel 
    342                                 echo ", ".$fldclass.": "; // Feldname 
    343                                 if ($label != "") { // Bedeutung dazu wurde erfasst 
    344                                         if ($showkey) {echo "<span class='key'>(".$class.")</span> ";} 
    345                                         echo "<span title='".$blabla."'>".$label."</span> "; 
    346                                 } else { // muss noch erfasst werden 
    347                                         echo $class." "; // SchlÃŒssel als Ersatz fÃŒr Bedeutung 
     338                        If ($fldclass = "Funktion" and $label != "") { // Kurze Anzeige 
     339                                if ($showkey) {echo "<span class='key'>(".$class.")</span> ";} 
     340                                if ($blabla = "") { 
     341                                        echo $label; 
     342                                } else { 
     343                                        echo "<span title='".$blabla."'>".$label."</span>"; 
     344                                } 
     345                        } else { // ausfuehrlichere Anzeige 
     346                                echo $title; // NUA-Tabelle 
     347                                If ($class != "") { // NUA-SchlÃŒssel 
     348                                        echo ", ".$fldclass.": "; // Feldname 
     349                                        if ($label != "") { // Bedeutung dazu wurde erfasst 
     350                                                if ($showkey) {echo "<span class='key'>(".$class.")</span> ";} 
     351                                                if ($blabla = "") { 
     352                                                        echo $label; 
     353                                                } else { 
     354                                                        echo "<span title='".$blabla."'>".$label."</span>"; 
     355                                                } 
     356                                        } else { // muss noch erfasst werden 
     357                                                echo $class." "; // SchlÃŒssel als Ersatz fÃŒr Bedeutung 
     358                                        } 
    348359                                } 
    349360                        } 
     361 
    350362                        If ($info != "") { // manchmal ein zweites Zusatzfeld (wie entschlÃŒsseln?) 
    351363                                echo ", ".$fldinfo."=".$info; 
     
    374386                        If ($bez != "") { 
    375387                                echo "<br>Bezeichnung: ".$bez; 
     388                        //      echo "\"".$bez."\""; // +++ in "" dahinter? 
    376389                        } 
     390                echo "</td>"; 
     391                echo "\n\t<td>"; 
     392                        // Eigene Nachweis-Seite fÃŒr Nutzungsart-FlÀche sinnvoll? dann hier verlinken  
     393                        //echo "\n\t\t\t<a href='alkisnua.php?gkz=".$gkz."amp;gmlid=".$gml."'>Nutzung "; 
     394                        //if ($idanzeige) {linkgml($gkz, $gml, "Nutzung");} // Nein, ist mit nix verknuepft 
     395                        switch ($grupp) { // Icon nach 4 Objektartengruppen 
     396                                case "Siedlung": 
     397                                        $ico = "Abschnitt.ico"; break; 
     398                                case "Verkehr": 
     399                                        $ico = "Strassen_Klassifikation.ico";   break; 
     400                                case "Vegetation": 
     401                                        $ico = "Wald.ico";      break; 
     402                                case "GewÀsser": 
     403                                        $ico = "Wasser.ico";    break; 
     404                                default: 
     405                                        $ico = "Abschnitt.ico"; break; 
     406                        } 
     407                        echo "<p class='nwlink'><img title='".$title."' src='ico/".$ico."' width='16' height='16' alt='NUA'></p>"; 
    377408                echo "</td>"; 
    378409        echo "\n</tr>"; 
     
    383414// Flaeche und Link auf GebÀude-Auswertung 
    384415echo "\n<tr>"; 
    385         echo "\n\t<td class='ll'>Fl&auml;che:</td>"; // Sp. 1 
    386         echo "\n\t<td class='lr'><span class='flae'>".$flae."</span></td>"; // Sp. 2 
    387         echo "\n\t<td>"; // Sp. 3 
     416        echo "\n\t<td class='ll'>Fl&auml;che:</td>"; 
     417        echo "\n\t<td class='fla'><span class='flae'>".$flae."</span></td>"; 
     418        echo "\n\t<td>&nbsp;</td>\n\t<td>"; 
    388419                echo "\n\t\t<p class='nwlink noprint'>"; // Gebaeude-Verschneidung 
    389420                        echo "\n\t\t\t<a href='alkisgebaeudenw.php?gkz=".$gkz."&amp;gmlid=".$gmlid; 
     
    413444                                if ($eig=="j") { 
    414445                                        echo "&amp;eig=n#gb' title='Flurst&uuml;cksnachweis'>ohne Eigent&uuml;mer</a>"; 
    415                                 } else {         
     446                                } else { 
    416447                                        echo "&amp;eig=j#gb' title='Flurst&uuml;cks- und Eigent&uuml;mernachweis'>mit Eigent&uuml;mer "; 
    417448                                        echo "<img src='ico/EigentuemerGBzeile.ico' width='16' height='16' alt=''></a>"; 
     
    479510                                }else { 
    480511                                        echo "\n\t<table class='kennzgbf' title='Bestandskennzeichen'>"; // dotted 
    481                                 }                                
     512                                } 
    482513                                        echo "\n\t<tr>\n\t\t<td class='head'>Bezirk</td>"; 
    483514                                                echo "\n\t\t<td class='head'>".$blattartg."</td>"; 
     
    487518                                        echo "\n\t<tr>"; 
    488519                                                echo "\n\t\t<td title='Grundbuchbezirk'>"; 
    489                                                         if ($showkey) {                                          
    490                                                                 echo "<span class='key'>".$rowg["bezirk"]."</span><br>";                                                 
    491                                                         }                                                
     520                                                        if ($showkey) { 
     521                                                                echo "<span class='key'>".$rowg["bezirk"]."</span><br>"; 
     522                                                        } 
    492523                                                        echo $beznam; 
    493524                                                echo "</td>"; 
     
    503534                                                        echo $rows["bart"]; 
    504535                                                echo "</td>"; 
    505                                                  
     536 
    506537                                        echo "\n\t</tr>"; 
    507538                                echo "\n\t</table>"; 
     
    523554                                                if ($idanzeige) {echo "&amp;id=j";} 
    524555                                                if ($showkey)   {echo "&amp;showkey=j";} 
    525                                                 if ($blattkeyg == 1000) {                                                
     556                                                if ($blattkeyg == 1000) { 
    526557                                                        echo "' title='Grundbuchnachweis mit kompletter Eigent&uuml;merangabe'>"; 
    527558                                                } else { 
    528559                                                        echo "' title='Grundbuchnachweis'>"; 
    529                                                 }                                                
     560                                                } 
    530561                                                echo $blattartg." <img src='ico/GBBlatt_link.ico' width='16' height='16' alt=''>"; 
    531562                                        echo "</a>"; 
     
    540571                } 
    541572                if ($rows["nrpl"] != "") { 
    542                         echo "<p class='nrap' title='Nummer im Aufteilungsplan'>Nummer <span class='wichtig'>".$rows["nrpl"]."</span> im Aufteilungsplan.</p>";          
     573                        echo "<p class='nrap' title='Nummer im Aufteilungsplan'>Nummer <span class='wichtig'>".$rows["nrpl"]."</span> im Aufteilungsplan.</p>"; 
    543574                } 
    544575 
     
    604635                                } else { 
    605636                                        echo "\n\t<table class='kennzgbf' title='Bestandskennzeichen'>"; // dotted 
    606                                 }                                
     637                                } 
    607638                                        echo "\n\t<tr>"; 
    608639                                                echo "\n\t\t<td class='head'>Bezirk</td>"; 
     
    614645                                        echo "\n\t<tr>"; 
    615646                                                echo "\n\t\t<td title='Grundbuchbezirk'>"; 
    616                                                 if ($showkey) {                                          
     647                                                if ($showkey) { 
    617648                                                        echo "<span class='key'>".$rowan["bezirk"]."</span><br>"; 
    618                                                 }                                                
     649                                                } 
    619650                                                echo $beznam."</td>"; 
    620651 
     
    624655 
    625656                                                echo "\n\t\t<td title='Buchungsart'>"; 
    626                                                         if ($showkey) {                                          
     657                                                        if ($showkey) { 
    627658                                                                echo "<span class='key'>".$rowan["buchungsart"]."</span><br>"; 
    628659                                                        } 
     
    649680                                                echo "' title='Grundbuchnachweis mit kompletter Eigent&uuml;merangabe'>"; 
    650681                                                echo $blattartan; 
    651                                                 echo " <img src='ico/GBBlatt_link.ico' width='16' height='16' alt=''>";                          
     682                                                echo " <img src='ico/GBBlatt_link.ico' width='16' height='16' alt=''>"; 
    652683                                        echo "</a>"; 
    653684                                echo "\n\t</p>"; 
Note: See TracChangeset for help on using the changeset viewer.