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

Revision 330, 3.8 KB checked in by frank.jaeger, 10 years ago (diff)

Umstellung von PostNAS 0.7 auf PostNAS 0.8, ohne Tabelle "alkis_beziehungen".

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