Changeset 422 for trunk/info/info/alkisn/alkisnamstruk.php
- Timestamp:
- 06/24/21 15:59:16 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/info/info/alkisn/alkisnamstruk.php
r412 r422 7 7 Version: 8 8 2016-02-24 Version fuer norGIS-ALKIS-Import 9 2016-11-29 HTML5, Gemeinsam genutzte Datenbanken ermöglichen 10 2017-06-02 Validierung Eingabeparameter, Feinkorrekturen 11 2017-10-09 Sauber filtern auf endet IS NULL 12 2017-10-17 Deutsches Datumsformat im Geburtsdatum 13 2017-12-20 Anlass und Datum zur Adresse ausgeben, wenn es mehrere gibt oder SchlÃŒssel angefordert werden 14 2018-04-23 &nodebug 15 2018-11-09 Umstellung Full-Schema 9 ... 10 2020-02-20 Authentifizierung ausgelagert in Function darf_ich() 11 2020-12-03 function selbstverlinkung() statt $_SERVER['PHP_SELF'] 12 2020-12-15 Input-Validation und Strict Comparisation (===) 16 13 */ 14 ini_set("session.cookie_httponly", 1); 17 15 session_start(); 18 16 $multiadress="n"; $showkey="n"; $nodebug=""; // Var. aus Parameter initalisieren … … 20 18 21 19 // strikte Validierung aller Parameter 22 if (!isset($gmlid) or !preg_match('#^[0-9A-Za-z]{16}$#', $gmlid)) {die("Eingabefehler gmlid");} 23 if (!isset($gkz) or !preg_match('#^[0-9]{3}$#', $gkz)) {die("Eingabefehler gkz");} 20 if (isset($gmlid)) { 21 if (!preg_match('#^[0-9A-Za-z]{16}$#', $gmlid)) {die("Eingabefehler gmlid");} 22 } else { 23 die("Fehlender Parameter"); 24 } 25 if (isset($gkz)) { 26 if (!preg_match('#^[0-9]{3}$#', $gkz)) {die("Eingabefehler gkz");} 27 } else { 28 die("Fehlender Parameter"); 29 } 24 30 if (!preg_match('#^[j|n]{0,1}$#', $showkey)) {die ("Eingabefehler showkey");} 25 if ($showkey == "j") {$showkey=true;} else {$showkey=false;}31 if ($showkey === "j") {$showkey=true;} else {$showkey=false;} 26 32 if (!preg_match('#^[j|n]{0,1}$#', $multiadress)) {die ("Eingabefehler multiadress");} 27 33 if (!preg_match('#^j{0,1}$#', $nodebug)) {die("Eingabefehler nodebug");} 28 34 29 35 require_once("alkis_conf_location.php"); 30 if ($auth == "mapbender") {require_once($mapbender);}31 36 include("alkisfkt.php"); 32 33 37 ?> 34 38 <!doctype html> … … 47 51 </head> 48 52 <body> 49 50 53 <?php 54 $erlaubnis = darf_ich(); if ($erlaubnis === 0) { die('<p class="stop1">Abbruch</p></body>'); } 55 51 56 // Mit URL-Parameter "&nodebug=j" kann man die Entwicklungsumgebung (in Conf definiert) ausschalten. 52 57 // Manuell an die URL anfÃŒgen, wirkt nur temporÀr und wird nicht in Links weiter gereicht. 53 if ($nodebug == "j") {$debug=0;}54 55 echo "<p class=' nakennz'>ALKIS Name id=".$gmlid." </p>\n" // Balken58 if ($nodebug === "j") {$debug=0;} 59 60 echo "<p class='balken nakennz'>ALKIS Name id=".$gmlid." </p>\n" // Balken 56 61 ."\n<h2><img src='ico/Eigentuemer.png' width='16' height='16' alt=''> Person</h2>"; 57 62 $con = pg_connect($dbconn." options='--application_name=ALKIS-Auskunft_alkisnamstruk.php'"); … … 68 73 if (!$res) { 69 74 echo "\n<p class='err'>Fehler bei Zugriff auf Namensnummer</p>"; 70 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities( $sql, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";}75 if ($debug > 2) {echo "\n<p class='dbg'>SQL=<br>".htmlentities(str_replace("$1", "'".$gmlid."'", $sql), ENT_QUOTES, "UTF-8")."</p>";} 71 76 } 72 77 if ($row = pg_fetch_assoc($res)) { … … 92 97 93 98 // A d r e s s e 94 if ($multiadress == "j") {$plural="n";} else {$plural="";}99 if ($multiadress === "j") {$plural="n";} else {$plural="";} 95 100 echo "\n\n<h3><img src='ico/Strasse_mit_Haus.png' width='16' height='16' alt=''> Adresse".$plural."</h3>"; 96 101 // Es können redundante Adressen vorhanden sein, z.B. aus Migration, temporÀr aus LBESAS. … … 106 111 if (!$resa) { 107 112 echo "\n<p class='err'>Fehler bei Adressen</p>"; 108 if ($debug > 2) {echo "\n<p class='err'>SQL=<br>". $sqla."<br>$1=gml(Person)= '".$gmlid."'</p>";}113 if ($debug > 2) {echo "\n<p class='err'>SQL=<br>". str_replace("$1", "'".$gmlid."'", $sqla)."</p>";} 109 114 } 110 115 … … 113 118 while($rowa = pg_fetch_assoc($resa)) { 114 119 $j++; 115 if ($multiadress == "j" OR $j== 1) {120 if ($multiadress === "j" OR $j === 1) { 116 121 $gmla=$rowa["gml_id"]; 117 122 $plz=$rowa["plz"]; … … 124 129 $datum=$rowa["datum"]; 125 130 echo "<table>\n"; 126 if ($multiadress == "j" OR $showkey) {131 if ($multiadress === "j" OR $showkey) { 127 132 if ($debug > 0) { // nur Entw.: Sortierung gml_id vs. beginnt? 128 133 echo "\t<tr><td class='dbg'>gml_id:</td><td class='dbg'>".$rowa["gml_id"]."</td></tr>\n"; … … 148 153 } 149 154 pg_free_result($resa); 150 if ($j == 0) {155 if ($j === 0) { 151 156 echo "\n<p class='err'>Keine Adressen.</p>"; 152 157 } elseif ($j > 1) { 153 158 echo "\n\t\t<p class='nwlink noprint'>" 154 ."\n\t\t\t<a href='". $_SERVER['PHP_SELF']. "?gkz=".$gkz."&gmlid=".$gmlid;159 ."\n\t\t\t<a href='".selbstverlinkung(). "?gkz=".$gkz."&gmlid=".$gmlid; 155 160 if ($showkey) {echo "&showkey=j";} 156 if ($multiadress == "j") {161 if ($multiadress === "j") { 157 162 echo "&multiadress=n' title='mehrfache Adressen unterdrücken'>erste Adresse "; 158 163 } else { … … 183 188 echo "\n<p class='err'>Fehler bei Grundbuch</p>"; 184 189 if ($debug > 2) { 185 echo "\n<p class='err'>SQL=<br>".htmlentities( $sqlg, ENT_QUOTES, "UTF-8")."<br>$1 = gml_id = '".$gmlid."'</p>";190 echo "\n<p class='err'>SQL=<br>".htmlentities(str_replace("$1", "'".$gmlid."'", $sqlg ), ENT_QUOTES, "UTF-8")."</p>"; 186 191 } 187 192 } … … 231 236 232 237 echo "\n\t<td>"; // Anteil 233 if ($zae == "") {238 if ($zae == '') { 234 239 echo " "; 235 240 } else { … … 252 257 pg_free_result($resg); 253 258 echo "</table>"; 254 if ($i == 0) {echo "\n<p class='err'>Kein Grundbuch.</p>";}259 if ($i === 0) {echo "\n<p class='err'>Kein Grundbuch.</p>";} 255 260 } else { 256 261 echo "\n\t<p class='err'>Fehler! Kein Treffer für\n\t<a target='_blank' href='alkisrelationen.php?gkz=".$gkz."&gmlid=".$gmlid."'>".$gmlid."</a>\n</p>\n\n"; … … 265 270 </div> 266 271 267 <?php footer($gmlid, $_SERVER['PHP_SELF']."?", ""); ?>272 <?php footer($gmlid, selbstverlinkung()."?", ""); ?> 268 273 269 274 </body>
Note: See TracChangeset
for help on using the changeset viewer.