[Mapbender-commits] r9412 - trunk/mapbender/http/geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 24 04:44:21 PST 2016


Author: armin11
Date: 2016-02-24 04:44:21 -0800 (Wed, 24 Feb 2016)
New Revision: 9412

Modified:
   trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php
Log:
Delete some needles code

Modified: trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php
===================================================================
--- trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php	2016-02-24 10:20:03 UTC (rev 9411)
+++ trunk/mapbender/http/geoportal/mod_readCSWResultsDetail.php	2016-02-24 12:44:21 UTC (rev 9412)
@@ -74,7 +74,15 @@
  	}
 	$testMatch = NULL;
 }
-
+//outputFormat
+if (isset($_REQUEST["outputFormat"]) & $_REQUEST["outputFormat"] != "") {
+	$testMatch = $_REQUEST["outputFormat"];	
+ 	if (!($testMatch == 'rdf')){ 
+		echo 'Parameter <b>outputFormat</b> is not valid (rdf).<br/>'; 
+		die(); 		
+ 	}
+	$testMatch = NULL;
+}
 if(!isset($_REQUEST["cat_id"])) {
 	echo "no opensearch id set";
 	die();
@@ -278,7 +286,10 @@
 }
 
 //generate output for different parameters mdtype
-
+//overwrite if outputFormat = rdf
+if ($_REQUEST["outputFormat"] == "rdf") {
+	$_REQUEST["mdtype"] = "rdf";
+}
 switch ($_REQUEST["mdtype"]) {
 	case "html":
 		$mbMetadata = new Iso19139();
@@ -318,117 +329,4 @@
 		die();
 	break;
 }
-
-if ($_REQUEST['mdtype']=='debug'){
-		echo "DEBUG Metadatenanzeige<br>";
-		#define table
-		echo "<html><table border=\"1\"><br>";
-		echo "<tr>";
-		#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
-		foreach ($detail_keys as $detailkey) {
-			if (in_array($detailkey, $ibus_names)==false){
-				echo  "<td >".$detailkey."</td>";
-				}
-				else {
-				echo "<td bgcolor=\"green\">".$md_ident[array_search($detailkey, $ibus_names)]['html']."(".$detailkey.")</td>";
-				}
-			#echo "</td>";
-			echo "<td>";
-			echo $detail_array[$detailkey];
-			echo "</tr>";
-		}
-		echo "</table></html>";
-}
-
-if ($_REQUEST['mdtype']=='html'){
 ?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
-	<head>
-		<title>GeoPortal Rheinland-Pfalz - Metadaten</title>
-		<meta name="description" content="Metadaten" xml:lang="de" />
-		<meta name="keywords" content="Metadaten" xml:lang="de" />		
-		<meta http-equiv="cache-control" content="no-cache">
-		<meta http-equiv="pragma" content="no-cache">
-		<meta http-equiv="expires" content="0">
-		<meta http-equiv="content-language" content="de" />
-		<meta http-equiv="content-style-type" content="text/css" />		
-<?php
-	echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/screen.css" media="screen" />
-		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/print.css" media="print" />
-	</head>
-	<body id="top" class="popup">
-
-	
-	<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ß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>
-	
-	<div class="content">
-<?php
-	echo "<h1>Detailinformationen:</h1>";
-	#define table
-	echo "<html><table class='contenttable-0-wide'>";
-	echo "<tr>";
-	#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
-	foreach ($detail_keys as $detailkey) {	
-		if (in_array($detailkey, $ibus_names)==true){
-			echo "<td>".$md_ident[array_search($detailkey, $ibus_names)]['html']."</td>";
-			echo "<td>";
-			echo display_text($detail_array[$detailkey]);
-			echo "</td></tr>";
-		}
-	}
-	echo "</table></html>";
-}
-
-if ($_REQUEST['mdtype']=='inspire') {
-?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
-	<head>
-		<title>GeoPortal Rheinland-Pfalz - Metadaten</title>
-		<meta name="description" content="Metadaten" xml:lang="de" />
-		<meta name="keywords" content="Metadaten" xml:lang="de" />		
-		<meta http-equiv="cache-control" content="no-cache">
-		<meta http-equiv="pragma" content="no-cache">
-		<meta http-equiv="expires" content="0">
-		<meta http-equiv="content-language" content="de" />
-		<meta http-equiv="content-style-type" content="text/css" />		
-<?php
-	echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/screen.css" media="screen" />
-		<link rel="stylesheet" type="text/css" href="../../../portal/fileadmin/design/css/print.css" media="print" />
-	</head>
-	<body id="top" class="popup">
-	<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ß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>
-	<div class="content">
-<?php
-	echo "<img border=\"0\" src=\"img/inspire_tr_100.png\" alt=\"INSPIRE Logo\"><h1>INSPIRE Metadaten:</h1>";
-	#define table
-	echo "<html><table class='contenttable-0-wide'>";
-	echo "<tr>";
-	#loop for each detail - tag - sometimes there are other tags in there - if one detail has more than one entry! - maybe this must be interpreted but later!
-	foreach ($detail_keys as $detailkey) {
-		if (in_array($detailkey, $ibus_names)==true){
-			if ($md_ident[array_search($detailkey, $ibus_names)]['inspiremandatory']=='true') {
-				echo "<td>".$md_ident[array_search($detailkey, $ibus_names)]['inspire']."</td>";
-				echo "<td>";
-				echo display_text($detail_array[$detailkey]);
-				echo "</td></tr>";
-			}
-		}
-	}
-	echo "</table></html>";
-	echo '<br><b>INSPIRE output not completly implemented!<b><br>';
-}
-?>



More information about the Mapbender_commits mailing list