source: trunk/info/info/alkis/alkisinlaybaurecht.php @ 287

Revision 287, 3.8 KB checked in by frank.jaeger, 11 years ago (diff)

ALKIS-Auskunft "Bodenrecht", Link dazu im Flurstücksnachweis.

RevLine 
[49]1<?php
2/*      alkisinlaybaurecht.php - Inlay fuer Template: Baurecht
3        ALKIS-Buchauskunft, Kommunales Rechenzentrum Minden-Ravensberg/Lippe (Lemgo).
4
[105]5        Version:
[287]6        2011-07-26  debug
7        2011-11-28  import_request_variables
8        2011-12-14  function imFenster
9        2013-04-08  deprecated "import_request_variables" ersetzt
10        2013-06-27      hiervon neue Variante alkisbaurecht (ohne "inlay"),
11                                        dafÃŒr hier die SchlÃŒssel ganz raus und FlurstÃŒcks-Verschneidung raus.
[49]12*/
[132]13session_start();
[275]14$cntget = extract($_GET);
[123]15require_once("alkis_conf_location.php");
[132]16if ($auth == "mapbender") {require_once($mapbender);}
[49]17?>
18<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
19<html>
20<head>
[275]21        <meta name="author" content="b600352" >
[49]22        <meta http-equiv="cache-control" content="no-cache">
23        <meta http-equiv="pragma" content="no-cache">
24        <meta http-equiv="expires" content="0">
25        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
26        <title>ALKIS Bau-, Raum- oder Bodenordnungsrecht</title>
[123]27        <link rel="stylesheet" type="text/css" href="alkisauszug.css">
28        <link rel="shortcut icon" type="image/x-icon" href="ico/Gericht.ico">
[275]29        <script type="text/javascript">
30        function imFenster(dieURL) {
31                var link = encodeURI(dieURL);
[287]32                window.open(link,'','left=30,top=30,width=680,height=800,resizable=yes,menubar=no,toolbar=no,location=no,status=no,scrollbars=yes');
[275]33        }
[287]34        </script>
[275]35        </script>
[49]36</head>
[123]37<body>
[49]38
39<?php
40$con = pg_connect("host=".$dbhost." port=" .$dbport." dbname=".$dbname." user=".$dbuser." password=".$dbpass);
[123]41if (!$con) echo "<p class='err'>Fehler beim Verbinden der DB</p>\n";
[61]42
[123]43// wie View "baurecht"
[287]44$sql ="SELECT r.ogc_fid, r.name, r.stelle, r.bezeichnung AS rechtbez, ";
45$sql.="a.bezeichner  AS adfbez, d.bezeichnung AS stellbez, ";
[123]46$sql.="round(st_area(r.wkb_geometry)::numeric,0) AS flae ";
47$sql.="FROM ax_bauraumoderbodenordnungsrecht r ";
48$sql.="LEFT JOIN ax_bauraumoderbodenordnungsrecht_artderfestlegung a ON r.artderfestlegung = a.wert ";
49$sql.="LEFT JOIN ax_dienststelle d ON r.land = d.land AND r.stelle = d.stelle ";
50$sql.="WHERE r.gml_id= $1 ;";
51
[61]52$v = array($gmlid);
53$res = pg_prepare("", $sql);
[123]54$res = pg_execute("", $v);
[61]55
[123]56if (!$res) {
57        echo "\n<p class='err'>Fehler bei Baurecht.</p>\n";
58        if ($debug > 2) {echo "<p class='err'>SQL=<br>".$sql."<br>$1 = ".$gmlid."</p>\n";}
[49]59}
[123]60echo "\n<h2><img src='ico/Gericht.ico' width='16' height='16' alt=''> Bau-, Raum- oder Bodenordnungsrecht</h2>\n";
[287]61
62// ToDo: ++++ Spalte anfÃŒgen, darin Link auf neue Variante alkisbaurecht.php
[123]63
[49]64if ($row = pg_fetch_array($res)) {
[123]65        echo "\n<table>";
66
[49]67                echo "\n<tr>";
[287]68                        echo "\n\t<td class='li'>Art der Festlegung:</td>\n\t<td>";
[49]69                        echo "<span class='wichtig'>".$row["adfbez"]."</span></td>";
[123]70                echo "\n</tr>";
71
72                $enam=$row["name"];
[49]73                if ($enam != "") {
[64]74                        echo "\n<tr>";
[49]75                                echo "\n\t<td class='li'>Eigenname des Gebietes:</td>\n\t<td>".$enam."</td>";
[123]76                        echo "\n</tr>";
[64]77                }
[49]78                echo "\n<tr>";
79                        echo "\n\t<td class='li'>Verfahrensnummer:</td>";
80                        echo "\n\t<td>".$row["rechtbez"]."</td>";
[123]81                echo "\n</tr>";
[49]82
[123]83                $stell=$row["stelle"];
84                if ($stell != "") {
85                        echo "\n<tr>";
[287]86                                echo "\n\t<td class='li'>Dienststelle:</td>\n\t<td>".$row["stellbez"];
[49]87                                echo "</td>";
[123]88                        echo "\n</tr>";
89                }
90
[49]91                echo "\n<tr>";
[123]92                        echo "\n\t<td class='li'>Fl&auml;che:</td>";
[49]93                        $flae=number_format($row["flae"],0,",",".")." m&#178;";
94                        echo "\n\t<td>".$flae."</td>";
[123]95                echo "\n</tr>";
96
97        echo "\n</table>";
98} else {
99        echo "\n<p class='err'>Fehler! Kein Treffer bei gml_id=".$gmlid."</p>";
100}
101
[287]102echo "\n<p class='nwlink'>";
103        echo "\n\t<a href='javascript:imFenster(\"alkisbaurecht.php?gkz=".$gkz."&amp;gmlid=".$gmlid."\")' ";
104        echo "' title='Bau-, Raum- oder Bodenordnungsrecht'>Weitere Auskunft <img src='ico/Gericht.ico' width='16' height='16' alt=''></a>";
105echo "\n</p>";
[123]106
[49]107?>
108
109</body>
110</html>
Note: See TracBrowser for help on using the repository browser.