svn commit: r946 - trunk/mapbender/http/php/mod_layerMetadata.php

christoph at osgeo.org christoph at osgeo.org
Thu Nov 23 08:26:32 EST 2006


Author: christoph
Date: 2006-11-23 13:26:32+0000
New Revision: 946

Modified:
   trunk/mapbender/http/php/mod_layerMetadata.php

Log:
* removed layer id
* added more metadata

Modified: trunk/mapbender/http/php/mod_layerMetadata.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_layerMetadata.php?view=diff&rev=946&p1=trunk/mapbender/http/php/mod_layerMetadata.php&p2=trunk/mapbender/http/php/mod_layerMetadata.php&r1=945&r2=946
==============================================================================
--- trunk/mapbender/http/php/mod_layerMetadata.php	(original)
+++ trunk/mapbender/http/php/mod_layerMetadata.php	2006-11-23 13:26:32+0000
@@ -27,6 +27,18 @@
     $string = eregi_replace("\n", "<br>", $string);
     return $string;
 }  
+
+function getEpsgByLayerId ($layer_id) { // from merge_layer.php
+	$epsg_list = "";
+	$sql = "SELECT DISTINCT epsg FROM layer_epsg WHERE fkey_layer_id = $1";
+	$v = array($layer_id);
+	$t = array('i');
+	$res = db_prep_query($sql, $v, $t);
+	while($row = db_fetch_array($res)){
+		$epsg_list .= $row['epsg'] . " ";
+	}
+	return trim($epsg_list);
+}
 ?>
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
 	<head>
@@ -46,8 +58,11 @@
 	</head>
 	<body id="top" class="popup">
 
-	<div id="header_graybottom"></div>
-	<div id="header_gray"><a href="javascript:window.close()"><?php echo utf8_encode('Fenster schließen');?></a></div>
+	
+	<div id="header_gray">
+	<a href="javascript:window.print()">Drucken <img src="../../../portal/fileadmin/design/images/icon_print.gif" width="14" height="14" alt="" /></a>
+	<a href="javascript:window.close()">Fenster schlie&szlig;en <img src="../../../portal/fileadmin/design/images/icon_close.gif" width="14" height="14" alt="" /></a>
+	</div>
 	<div id="header_redbottom"></div>
 	<div id="header_red"></div>
 	
@@ -61,7 +76,7 @@
 		$sql = "SELECT ";
 		$sql .= "layer.layer_id, layer.layer_title, layer.layer_abstract, layer.layer_pos, layer.layer_parent, layer.layer_minscale, layer.layer_maxscale, ";
 		$sql .= "wms.wms_title, wms.wms_abstract, wms.wms_id, wms.fees, wms.accessconstraints, wms.contactperson, ";
-		$sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, ";
+		$sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, wms_timestamp, wms_owner, ";
 		$sql .= "wms.stateorprovince, wms.postcode, wms.contactvoicetelephone, wms.contactfacsimiletelephone, ";
 		$sql .= "wms.contactelectronicmailaddress, wms.country ";
 		$sql .= "FROM layer, wms WHERE layer.layer_id = $1 AND layer.fkey_wms_id = wms.wms_id LIMIT 1";
@@ -72,7 +87,7 @@
 		$sql = "SELECT ";
 		$sql .= "layer.layer_id, layer.layer_title, layer.layer_abstract, layer.layer_pos, layer.layer_parent, layer.layer_minscale, layer.layer_maxscale, ";
 		$sql .= "wms.wms_title, wms.wms_abstract, wms.wms_id, wms.fees, wms.accessconstraints, wms.contactperson, ";
-		$sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, ";
+		$sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, wms_timestamp, wms_owner, ";
 		$sql .= "wms.stateorprovince, wms.postcode, wms.contactvoicetelephone, wms.contactfacsimiletelephone, ";
 		$sql .= "wms.contactelectronicmailaddress, wms.country ";
 		$sql .= "FROM layer, wms WHERE layer.layer_pos <> 0 AND layer.layer_name = $1 AND layer.fkey_wms_id = wms.wms_id AND wms.wms_getmap LIKE $2 LIMIT 1";
@@ -95,14 +110,30 @@
 		$layer['Voransicht'] = "<img src = 'mod_displayImage.php?id=".$layer_id."&col=layer_map_preview'>";
 		if ($row_p['layer_legend_preview'] != "") $layer['Voransicht'] .= "<img src = 'mod_displayImage.php?id=".$layer_id."&col=layer_legend_preview'>";
 	}
+	
+	$sql_dep = "SELECT mb_user_department FROM mb_user WHERE mb_user_id = $1 LIMIT 1";
+	$v_dep = array($row['wms_owner']);
+	$t_dep = array('i');
+	$res_dep = db_prep_query($sql_dep, $v_dep, $t_dep);
+	$row_dep = db_fetch_array($res_dep);
+	
 
-	$layer['ID'] = $row['layer_id'];
+	//$layer['ID'] = $row['layer_id'];
 	$layer['Titel'] = $row['layer_title'];
 	$layer['Zusammenfassung'] = $row['layer_abstract'];
 	if ($row['layer_pos'] || $row['layer_parent']) {
 		$layer['Minscale'] = $row['layer_minscale'];
 		$layer['Maxscale'] = $row['layer_maxscale'];
 	}
+	$layer['Projektionssysteme'] = str_replace(" ", ", ", getEpsgByLayerId($row['layer_id']));
+	$layer['Capabilities-Dokument'] = "<a href = '../x_geoportal/getCapabilities_document.php?wms_request=".$row['wms_id']."&layer_request=".$row['layer_pos']."' target=_blank>Capabilities-Dokument</a>";
+	if ($row['wms_timestamp']) {
+		$layer['Datum der Registrierung'] = date("d.m.Y",$row['wms_timestamp']); 
+	}
+	else {
+		$layer['Datum der Registrierung'] = "Keine Angabe"; 
+	}
+	$layer['Registrierende Stelle'] = $row_dep['mb_user_department'];
 	$layer['WMS Titel'] = $row['wms_title'];
 	$layer['WMS Zusammenfassung'] = $row['wms_abstract'];
 	$layer['Gebühren'] = $row['fees'];




More information about the Mapbender_commits mailing list