[Mapbender-commits] r2367 - in branches/darndt_dev/http: frames php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 8 12:11:57 EDT 2008


Author: darndt
Date: 2008-04-08 12:11:57 -0400 (Tue, 08 Apr 2008)
New Revision: 2367

Added:
   branches/darndt_dev/http/php/mod_addWmsFromGeonetwork.php
Modified:
   branches/darndt_dev/http/frames/login.php
Log:


Modified: branches/darndt_dev/http/frames/login.php
===================================================================
--- branches/darndt_dev/http/frames/login.php	2008-04-08 08:54:19 UTC (rev 2366)
+++ branches/darndt_dev/http/frames/login.php	2008-04-08 16:11:57 UTC (rev 2367)
@@ -160,6 +160,11 @@
 			$arrayGUIs = mb_getGUIs($row["mb_user_id"]);
 			$_SESSION["mb_user_guis"] = $arrayGUIs;
 			$_SESSION["mb_login"] = $login;
+			//Geonetwork-Capabilities in Session laden
+			$_SESSION["gn_capabilities"] = $_GET['wms_capabilities']."&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+			$_SESSION["gn_layer"] = $_GET['wms_layer'];
+			$_SESSION["gn_uuid"] = $_GET['wms_uuid'];
+			//Geonetwork-Capabilities in Session laden Ende
 			# a gui is explicitly ordered
 			if((isset($_REQUEST["mb_user_myGui"]) || isset($_SESSION["mb_user_myGui"])) && in_array($_REQUEST["mb_user_myGui"], $arrayGUIs)){
 				unset($arrayGUIs);

Added: branches/darndt_dev/http/php/mod_addWmsFromGeonetwork.php
===================================================================
--- branches/darndt_dev/http/php/mod_addWmsFromGeonetwork.php	                        (rev 0)
+++ branches/darndt_dev/http/php/mod_addWmsFromGeonetwork.php	2008-04-08 16:11:57 UTC (rev 2367)
@@ -0,0 +1,41 @@
+<?php
+# $Id: mod_addWmsFromFeatureInfo.php 2205 2008-03-06 16:33:33Z christoph $
+# http://www.mapbender.org/index.php/addWMSFromFeatureInfo.php
+# Copyright (C) 2002 CCGIS 
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+include(dirname(__FILE__).'/../include/dyn_js.php');
+
+echo "var mod_target = '".$e_target[0]."';";
+
+f ($_SESSION["gn_layer"] != 'undefined') {
+	echo 'mod_addLayer_load(\''.$_SESSION["gn_capabilities"].'\',\''.$_SESSION["gn_layer"].'\');';
+} else {
+	echo 'mod_addWMS_load(\''.$_SESSION["gn_capabilities"].'\');';
+}
+?>
+function geonetwork_addWMS(url,layer,uuid){
+	self.focus();
+	caps = url + "&REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+	layer = layer;
+	if(layer != 'undefined') {
+		mod_addLayer_load(caps,layer);
+	} else {
+		mod_addWMS_load(caps);
+	}
+}
\ No newline at end of file



More information about the Mapbender_commits mailing list