[Mapbender-commits] r8738 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Nov 11 12:28:20 PST 2013


Author: armin11
Date: 2013-11-11 12:28:20 -0800 (Mon, 11 Nov 2013)
New Revision: 8738

Added:
   trunk/mapbender/http/classes/class_owsConstraints.php
Log:
New class for owsConstraints

Added: trunk/mapbender/http/classes/class_owsConstraints.php
===================================================================
--- trunk/mapbender/http/classes/class_owsConstraints.php	                        (rev 0)
+++ trunk/mapbender/http/classes/class_owsConstraints.php	2013-11-11 20:28:20 UTC (rev 8738)
@@ -0,0 +1,409 @@
+<?php
+require_once(dirname(__FILE__)."/../../core/globalSettings.php");
+
+class OwsConstraints {	
+	//initialize
+	var $type;
+	var $id;
+	var $languageCode;
+	var $withHeader;
+	var $asTable;
+	var $outputFormat;
+	var $returnDirect;
+
+	function __construct() {
+		$this->type = "wms";
+		$this->id = 1;
+		$this->languageCode = "de";
+		$this->withHeader = false;
+		$this->asTable = false;
+		$this->outputFormat = "html";
+		$this->returnDirect = true;
+	}
+	
+	function getRequestParameters() {
+		if (isset($_REQUEST["id"]) & $_REQUEST["id"] != "") {
+			//validate to integer 
+			$testMatch = $_REQUEST["id"];
+			$pattern = '/^[\d]*$/';		
+ 			if (!preg_match($pattern,$testMatch)){ 
+				$returnObject['success'] = false;
+				$returnObject['message'] = "Parameter id was no integer!";	
+				return $returnObject;	
+ 			}
+			$this->id = (integer)$testMatch;
+			$testMatch = NULL;	
+		}
+		if (isset($_REQUEST["type"]) & $_REQUEST["type"] != "") {
+			//validate to wms, wfs
+			$testMatch = $_REQUEST["type"];	
+ 			if (!($testMatch == 'wms' or $testMatch == 'wfs')){
+				$returnObject['success'] = false;
+				$returnObject['message'] = "Parameter type was not wms or wfs!";
+				return $returnObject;	
+ 			}
+			$this->type = $testMatch;
+			$testMatch = NULL;
+		}
+		if (isset($_REQUEST["languageCode"]) & $_REQUEST["languageCode"] != "") {
+			//validate to wms, wfs
+			$testMatch = $_REQUEST["languageCode"];	
+ 			if (!($testMatch == 'de' or $testMatch == 'en' or  $testMatch == 'fr')){ 
+				$returnObject['success'] = false;
+				$returnObject['message'] = "Parameter languageCode was not de, en or fr!";
+				return $returnObject;	
+ 			}
+			$this->languageCode = $testMatch;
+			$testMatch = NULL;
+		}
+		if (isset($_REQUEST["withHeader"]) & $_REQUEST["withHeader"] != "") {
+			//validate to wms, wfs
+			$testMatch = $_REQUEST["withHeader"];	
+ 			if (!($testMatch == 'true' or $testMatch == 'false')){ 
+				$returnObject['success'] = false;
+				$returnObject['message'] = "Parameter withHeader was not true or false!";
+				return $returnObject;
+ 			}
+			if ($testMatch == 'true'){ 
+				$this->withHeader = true;		
+ 			} else {
+				$this->withHeader = false;
+			}
+			$testMatch = NULL;
+		}
+		if (isset($_REQUEST["asTable"]) & $_REQUEST["asTable"] != "") {
+			//validate to wms, wfs
+			$testMatch = $_REQUEST["asTable"];	
+ 			if (!($testMatch == 'true' or $testMatch == 'false')){ 
+				$returnObject['success'] = false;
+				$returnObject['message'] = "Parameter asTable was not true or false!"; 
+				return $returnObject;	
+ 			}
+			if ($testMatch == 'true'){ 
+				$this->asTable = true;		
+ 			} else {
+				$this->asTable = false;
+			}
+			$testMatch = NULL;
+		}
+		if (isset($_REQUEST["outputFormat"]) & $_REQUEST["outputFormat"] != "") {
+			//validate to iso19139 or html
+			$testMatch = $_REQUEST["outputFormat"];	
+ 			if (!($testMatch === 'iso19139') && !($testMatch === 'html')){ 
+				$returnObject['success'] = false;
+				$returnObject['message'] = "Parameter outputFormat was not iso19139 or html!";	
+				return $returnObject;
+ 			}
+			if ($testMatch == 'iso19139'){ 
+				$this->asTable = false;
+				$this->outputFormat = "iso19139";		
+ 			}
+			$testMatch = NULL;
+		}
+		$returnObject['success'] = true;
+		$returnObject['message'] = "HTTP REQUEST Parameters parsed successful!";
+		return $returnObject;
+	}
+	
+	//function to parse urls as links
+	function display_text($string) {
+    		$string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
+    		$string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
+    		$string = eregi_replace("\n", "<br>", $string);
+    		return $string;
+	}  
+	
+	function getDisclaimer() {
+		$htmlHeader = array();
+		//define header texts
+		$htmlHeader['discHeader'] = _mb('Terms of use');
+		$htmlHeader['discPrivacyHeader'] = _mb('Note on protection of privacy');
+		$htmlHeader['accessConstraintsHeader'] = _mb('Constraints on public access');
+		$htmlHeader['feesHeader'] = _mb('Information about costs/fees/licences');
+		$htmlHeader['licences'] = '<b>'._mb('Licence').':</b><br>';
+		$htmlHeader['networkAccess'] = _mb('This Service is <b>not available via www</b> but only in special networks. Possibly you get further information about the network availability in the following paragraph.<br>');
+		$htmlHeader['logInformation'] = _mb('The access on this service is logged <b>user-related</b> by the provider. The logging is done to support automated settlement based on a contract ');
+		$htmlHeader['logInformation'] .= _mb('or to fulfill legal standards.<br><b>If you do not agree on this - please don\'t use this service!</b><br>');
+		$htmlHeader['logInformation'] .= _mb('If you have further questions, please contact the provider under ');
+		$htmlHeader['priceInformation'][0] = _mb('The provider have defined a charge of <b>');
+		$htmlHeader['priceInformation'][1] = _mb(' (euro)cent per megapixel</b> ');
+		$htmlHeader['priceInformation'][2] = _mb(' for retrieved picture data. The retrieving of a typical map with a standardized resolution of 600x400 px will cost <b>');
+		$htmlHeader['priceInformation'][3] = _mb(' euro</b>. For information about possible discounts please contact ');
+		$htmlHeader['noInformation'] = _mb('No informations about terms of use are available!');
+		Mapbender::session()->set("mb_lang",$this->languageCode);
+	
+		if ($this->type == "wms") {
+			$sql = "SELECT wms_id, wms.accessconstraints, wms.fees, wms.wms_network_access , wms.wms_pricevolume, wms.wms_proxylog, termsofuse.name,";
+			$sql .= " termsofuse.termsofuse_id, termsofuse.symbollink, termsofuse.description,termsofuse.descriptionlink, termsofuse.isopen from wms LEFT OUTER JOIN";
+			$sql .= "  wms_termsofuse ON  (wms.wms_id = wms_termsofuse.fkey_wms_id) LEFT OUTER JOIN termsofuse ON";
+			$sql .= " (wms_termsofuse.fkey_termsofuse_id=termsofuse.termsofuse_id) where wms.wms_id = $1";
+		}
+		if ($this->type == "wfs") {
+			$sql = "SELECT wfs_id, accessconstraints, fees, wfs_network_access , termsofuse.name,";
+			$sql .= " termsofuse.termsofuse_id ,termsofuse.symbollink, termsofuse.description,termsofuse.descriptionlink, termsofuse.isopen from wfs LEFT OUTER JOIN";
+			$sql .= "  wfs_termsofuse ON  (wfs.wfs_id = wfs_termsofuse.fkey_wfs_id) LEFT OUTER JOIN termsofuse ON";
+			$sql .= " (wfs_termsofuse.fkey_termsofuse_id=termsofuse.termsofuse_id) where wfs.wfs_id = $1";	
+		}
+		$v = array();
+		$t = array();
+		array_push($t, "i");
+		array_push($v, $this->id);
+		$res = db_prep_query($sql,$v,$t);
+		$row = db_fetch_array($res);
+		if (!isset($row['wms_id'])) {
+			$resultObject['success'] = false;
+			$resultObject['message'] = $this->type."-service with this id is not known!";
+			return $resultObject;
+		}
+		//get email adress of responsible person for service:
+		if ($this->type == "wms") {
+			$sql = "SELECT mb_user_email FROM wms LEFT OUTER JOIN mb_user ON  (wms_owner = mb_user.mb_user_id) WHERE wms_id=$1";
+		}
+		if ($this->type == "wfs") {
+			$sql = "SELECT mb_user_email FROM wfs LEFT OUTER JOIN mb_user ON  (wfs_owner = mb_user.mb_user_id) WHERE wfs_id=$1";
+		}
+		$v = array();
+		$t = array();
+		array_push($t, "i");
+		array_push($v, $this->id);
+		$res = db_prep_query($sql,$v,$t);
+		$rowOwner = db_fetch_array($res);
+		//define conditions for generating disclaimer based on service information
+		//if logged,
+		//if accessconstraints exists,
+		//if fees exists,
+		//if licences are defined,
+		//if network access is restricted
+		if ((isset($row[$this->type.'_proxylog']) & $row[$this->type.'_proxylog'] != 0) or strtoupper($row['accessconstraints']) != "NONE" or strtoupper($row['fees']) != "NONE" or isset($row['termsofuse_id']) or (isset($row[$this->type.'_network_access']) & $row[$this->type.'_network_access'] != 0)) {
+			$html = "";
+			//generate text for json object if restrictions exists
+			if ($this->withHeader && $this->outputFormat != "iso19139") {
+				$html .= "<h1>".$htmlHeader['discHeader']."</h1>";
+			}
+			if ($this->asTable) {
+				$tableBegin =  "<table>\n";
+				$t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
+				$t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
+				$t_c = "\n\t\t</td>\n\t</tr>\n";
+				$tableEnd = "</table>\n";
+				$html .= $tableBegin;
+				if (isset($row[$this->type.'_proxylog']) & $row[$this->type.'_proxylog'] != 0 )  {
+					$discPrivacy = $htmlHeader['logInformation'];
+					$discPrivacy .= "<a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a>";
+					$html .= $t_a.$htmlHeader['discPrivacyHeader'].$t_b.$discPrivacy.$t_c;
+				}
+				if ((strtoupper($row['accessconstraints']) != "NONE" & (str_replace(" ", "", $row['accessconstraints']) != "")) or (isset($row[$this->type.'_network_access']) & $row[$this->type.'_network_access'] != 0) ) {
+					$accessConstraintsHeader = $htmlHeader['accessConstraintsHeader'];
+					if (isset($row[$this->type.'_network_access']) & $row[$this->type.'_network_access'] != 0) {
+						$accessConstraints = $htmlHeader['networkAccess'];
+					}
+					else {
+						$accessConstraints = "";
+					}
+					$accessConstraints .= $this->display_text($row['accessconstraints']);
+					$html .= $t_a.$htmlHeader['accessConstraintsHeader'].$t_b.$accessConstraints.$t_c;
+				}
+				if (isset($row['termsofuse_id']) or (strtoupper($row['fees']) != "NONE" & (str_replace(" ", "", $row['fees']) != "")) or ($this->type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) ) {
+					$feesPart = $t_a.$htmlHeader['feesHeader'].$t_b;
+					if (isset($row['termsofuse_id'])) {
+						$fees = $htmlHeader['licences'];
+						#$fees .= $row['name']."<br>";
+						$fees .= "<a href='".$row['descriptionlink']."' target=_blank><img style='border: none;' src='".$row['symbollink']."' ".$row['name']."></a><br>";
+						if (isset($row['isopen']) && $row['isopen'] == "1") {
+							//show opendata symbol
+							$fees .= "<br><img src='../img/od_80x15_blue.png' /><br>";
+						}
+						$fees .= $row['description']."<br>";
+						$feesPart .= $fees;
+					} else {
+						if (isset($row['fees']) & ((strtoupper($row['fees']) != 'NONE') or ($row['fees'] != ''))) {
+							$fees = $this->display_text($row['fees']);
+							$feesPart .= $fees;
+						}
+					}
+					if ($this->type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) {
+						$priceExample = (integer)$row['wms_pricevolume']*400*600/100000000;
+						$priceInformation = $htmlHeader['priceInformation'][0].(integer)$row['wms_pricevolume'];
+						$priceInformation .= $htmlHeader['priceInformation'][1].$htmlHeader['priceInformation'][2].$priceExample.$htmlHeader['priceInformation'][3]." <a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a><br>";	
+						$feesPart .= "<br>".$priceInformation.$t_c;
+					} else {
+						$feesPart .= $t_c;
+					}
+				}
+				$html .= $feesPart.$tableEnd;
+				echo $html;
+				die();
+			} else {
+				$discPrivacy = "";		
+				$fees = "";
+				$accessConstraints = "";	
+				//information is given in the standard way - not as a html table
+				if (isset($row[$this->type.'_proxylog']) & $row[$this->type.'_proxylog'] != 0 )  {
+					$discPrivacy = "<h2>".$htmlHeader['discPrivacyHeader']."</h2>".$htmlHeader['logInformation'];
+					$discPrivacy .= "<a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a>";
+					$html .= $discPrivacy."<br>";
+				}
+				if ((strtoupper($row['accessconstraints']) != "NONE" & (str_replace(" ", "", $row['accessconstraints']) != "")) or (isset($row[$this->type.'_network_access']) & $row[$this->type.'_network_access'] != 0) ) {
+					$accessConstraintsHeader = $htmlHeader['accessConstraintsHeader'];
+					if (isset($row[$this->type.'_network_access']) & $row[$this->type.'_network_access'] != 0) {
+						$accessConstraints .= $htmlHeader['networkAccess'];
+					}
+					else {
+						$accessConstraints .= "";
+					}
+					$accessConstraints .= "<h2>".$htmlHeader['accessConstraintsHeader']."</h2>".$this->display_text($row['accessconstraints']);
+					$html .= $accessConstraints."<br>";
+				}
+				if (isset($row['termsofuse_id']) or (strtoupper($row['fees']) != "NONE" & (str_replace(" ", "", $row['fees']) != "")) or ($this->type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) ) {
+					$fees .= "<h2>".$htmlHeader['feesHeader']."</h2>";
+					if (isset($row['termsofuse_id'])) {
+						$fees .= $htmlHeader['licences'];
+						$fees .= "<a href='".$row['descriptionlink']."' target=_blank><img src='".$row['symbollink']."' ".$row['name']."></a><br>";
+						if (isset($row['isopen']) && $row['isopen'] == "1") {
+							//show opendata symbol
+							$fees .= "<br><img src='http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png' alt='opendata symbol'/><br>";
+						}
+						$fees .= $row['description']."<br>";
+					} else {
+						if (isset($row['fees']) & ((strtoupper($row['fees']) != 'NONE') or ($row['fees'] != ''))) {
+							$fees .= $this->display_text($row['fees']);
+						}
+					}
+					if ($this->type == "wms" & isset($row['wms_pricevolume']) & $row['wms_pricevolume'] != 0) {
+						$priceExample = (integer)$row['wms_pricevolume']*400*600/100000000;
+						$priceInformation = $htmlHeader['priceInformation'][0].(integer)$row['wms_pricevolume'];
+						$priceInformation .= $htmlHeader['priceInformation'][1].$htmlHeader['priceInformation'][2].$priceExample.$htmlHeader['priceInformation'][3]." <a href=\"mailto:".$rowOwner['mb_user_email']."\">".$rowOwner['mb_user_email']."</a><br>";
+						$fees .= $priceInformation."<br>";
+					}
+					$html .= $fees."<br>";
+				}
+				if ($this->outputFormat != "iso19139") {
+					echo $html;
+					die();
+				} else {
+					$constraints = $discPrivacy.$accessConstraints;
+					$this->generateXmlOutput($fees,$constraints);
+				}
+			}
+		} else {
+			if ($this->outputFormat == "iso19139") {
+				$this->generateXmlOutput(false,false);
+			} else {
+				echo "free";//since it is not neccessary to give information about nothing ;-)
+			}
+		}
+	}
+
+	function generateXmlOutput($fees,$serviceconstraints) {
+		//example from INSPIRE Metadata TG 29.10.2013 if no accessconstraints exists:
+		/*
+		<gmd:resourceConstraints>
+			<gmd:MD_LegalConstraints>
+				<gmd:accessConstraints>
+					<gmd:MD_RestrictionCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode" codeListValue="otherRestrictions">otherRestrictions
+					</gmd:MD_RestrictionCode>
+				</gmd:accessConstraints>
+				<gmd:otherConstraints>
+					<gco:CharacterString>no limitations</gco:CharacterString>
+				</gmd:otherConstraints>
+			</gmd:MD_LegalConstraints>
+		</gmd:resourceConstraints>
+		<gmd:resourceConstraints>
+			<gmd:MD_SecurityConstraints>
+				<gmd:classification>
+					<gmd:MD_ClassificationCode codeList="./resources/codeList.xml#MD_ClassificationCode" codeListValue="unclassified">unclassified</gmd:MD_ClassificationCode>
+				</gmd:classification>
+			</gmd:MD_SecurityConstraints>
+		</gmd:resourceConstraints>
+		*/
+		//part for use limitations
+		/* - for none: no conditions apply
+		<gmd:resourceConstraints>
+			<gmd:MD_Constraints>
+				<gmd:useLimitation>
+					<gco:CharacterString>Reproduction for non-commercial purposes is authorised, provided the source is acknowledged. Commercial use is not permitted without prior written consent of the JRC. Reports, articles, papers, scientific and non-scientific works of any form, including tables, maps, or any other kind of output, in printed or electronic form, based in whole or in part on the data
+supplied, must contain an acknowledgement of the form: Data re-used from the European Drought Observatory (EDO) http://edo.jrc.ec.europa.eu The SPI data were created as part of JRC's research activities. Although every care has been taken in preparing and testing the data, JRC cannot guarantee that the data are correct; neither does JRC accept any liability whatsoever for any error, missing data or omission in the data, or for any loss or damage arising from its use. The JRC will not be responsible for any direct or indirect use which might be made of the data. The JRC does not provide any assistance or support in using the data</gco:CharacterString>
+				</gmd:useLimitation>
+			</gmd:MD_Constraints>
+		</gmd:resourceConstraints>
+		*/
+		//generate iso constraints part for integration into metadata xml
+		//via dom!
+		$iso19139Doc = new DOMDocument('1.0');
+		$iso19139Doc->encoding = 'UTF-8';
+		$iso19139Doc->preserveWhiteSpace = false;
+		$iso19139Doc->formatOutput = true;
+		//generate own constraints object for collecting resourceConstraints
+		$constraints = $iso19139Doc->createElementNS('http://www.mapbender.org/metadata/constraints','mb:constraints');
+		$constraints->setAttribute("xmlns:gmd", "http://www.isotc211.org/2005/gmd");
+		$constraints->setAttribute("xmlns:gco", "http://www.isotc211.org/2005/gco");
+		$resourceConstraints = $iso19139Doc->createElement('gmd:resourceConstraints');
+		//build up all things which are needed
+		$MD_LegalConstraints = $iso19139Doc->createElement("gmd:MD_LegalConstraints");
+		$accessConstraints = $iso19139Doc->createElement("gmd:accessConstraints");
+		$MD_RestrictionCode = $iso19139Doc->createElement("gmd:MD_RestrictionCode");
+		$MD_RestrictionCode->setAttribute("codeList", "http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/gmxCodelists.xml#MD_RestrictionCode");
+		$MD_RestrictionCode->setAttribute("codeListValue", "otherRestriction");
+		$MD_RestrictionCodeText = $iso19139Doc->createTextNode("otherRestrictions");
+		$otherConstraints = $iso19139Doc->createElement("gmd:otherConstraints");
+		$CharacterString = $iso19139Doc->createElement("gco:CharacterString");
+		if (isset($accessConstraints) && $accessConstraints !== "") {
+			$CharacterStringText = $iso19139Doc->createCDATASection($serviceconstraints);
+		} else {
+			$CharacterStringText = $iso19139Doc->createTextNode("no limitations");
+		}
+		$CharacterString->appendChild($CharacterStringText);
+		$otherConstraints->appendChild($CharacterString);
+		//build structure
+		$MD_RestrictionCode->appendChild($MD_RestrictionCodeText);
+		$accessConstraints->appendChild($MD_RestrictionCode);
+		$MD_LegalConstraints->appendChild($accessConstraints);
+		$MD_LegalConstraints->appendChild($otherConstraints);
+		$resourceConstraints->appendChild($MD_LegalConstraints);
+		//resourceConstraints for security - classification
+		$resourceConstraintsSec = $iso19139Doc->createElement('gmd:resourceConstraints');
+		$MD_SecurityConstraints = $iso19139Doc->createElement('gmd:MD_SecurityConstraints');
+		$classification = $iso19139Doc->createElement('gmd:classification');
+		$MD_ClassificationCode = $iso19139Doc->createElement('gmd:MD_ClassificationCode');
+		$MD_ClassificationCode->setAttribute("codeList", "./resources/codeList.xml#
+MD_ClassificationCode");
+		$MD_ClassificationCode->setAttribute("codeListValue", "unclassified");
+		$MD_ClassificationCodeText = $iso19139Doc->createTextNode("unclassified");
+		$MD_ClassificationCode->appendChild($MD_ClassificationCodeText);
+		$classification->appendChild($MD_ClassificationCode);
+		$MD_SecurityConstraints->appendChild($classification);
+		$resourceConstraintsSec->appendChild($MD_SecurityConstraints);
+		//part for uselimitation
+		//resourceConstraints for useLimitations
+		$resourceConstraintsUseL = $iso19139Doc->createElement('gmd:resourceConstraints');
+		$MD_Constraints = $iso19139Doc->createElement('gmd:MD_Constraints');
+		$useLimitation = $iso19139Doc->createElement('gmd:useLimitation');
+		$CharacterString = $iso19139Doc->createElement("gco:CharacterString");
+		if ($fees && $fees != "") {
+			$CharacterStringText = $iso19139Doc->createCDATASection($fees);
+		} else {
+			$CharacterStringText = $iso19139Doc->createTextNode("no conditions apply");
+		}
+		$CharacterString->appendChild($CharacterStringText);
+		$useLimitation->appendChild($CharacterString);
+		$MD_Constraints->appendChild($useLimitation);
+		$resourceConstraintsUseL->appendChild($MD_Constraints);
+		$constraints->appendChild($iso19139Doc->createComment("use limitations"));
+		$resourceConstraintsUseL = $constraints->appendChild($resourceConstraintsUseL);
+		$constraints->appendChild($iso19139Doc->createComment("general access constraints"));
+		$resourceConstraints = $constraints->appendChild($resourceConstraints);
+		$constraints->appendChild($iso19139Doc->createComment("security constraints - not needed - maybe there for declaring a simple classification system"));
+		//TODO: not now!
+		//$resourceConstraintsSec = $constraints->appendChild($resourceConstraintsSec);
+ 		$iso19193 = $iso19139Doc->appendChild($constraints);
+		$XML = $iso19139Doc->saveXML();
+		if (!$this->returnDirect) {
+			return $XML;
+		} else {
+			header("Content-type: application/xhtml+xml; charset=UTF-8");
+			echo $XML;
+			die();
+		}
+	}
+}
+?>



More information about the Mapbender_commits mailing list