svn commit: r92 - trunk/mapbender/http/javascripts/mod_addWMS.php

christoph at osgeo.org christoph at osgeo.org
Wed Apr 19 09:20:45 EDT 2006


Author: christoph
Date: 2006-04-19 13:20:45+0000
New Revision: 92

Modified:
   trunk/mapbender/http/javascripts/mod_addWMS.php

Log:


Modified: trunk/mapbender/http/javascripts/mod_addWMS.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_addWMS.php?view=diff&rev=92&p1=trunk/mapbender/http/javascripts/mod_addWMS.php&p2=trunk/mapbender/http/javascripts/mod_addWMS.php&r1=91&r2=92
==============================================================================
--- trunk/mapbender/http/javascripts/mod_addWMS.php	(original)
+++ trunk/mapbender/http/javascripts/mod_addWMS.php	2006-04-19 13:20:45+0000
@@ -1,54 +1,53 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/AddWMS
-# 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.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once("../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
-	$e_target = $row["e_target"];
-	$e_require = $row["e_requires"];
-	$cnt++;
-}
-if($cnt > 1){ echo "alert('addWMS: ID not unique!');";}
-echo "var mod_addWMS_data = '".$e_require."';";
-$target = explode(",", $e_target);
-echo "var mod_addWMS_target1 = '".trim($target[0])."';";
-echo "var mod_addWMS_target2 = '".trim($target[1])."';";
-?>
-
-function mod_addWMS(){
-	var load = prompt("Capabilities - URL:","");
-	if(load){
-		mod_addWMS_load(load);    
-	}
-}
-function mod_addWMS_load(caps){
-	window.frames[mod_addWMS_data].document.location.href = "../php/mod_createJSObjFromXML.php?caps=" + escape(caps);
-}
-function mod_addWMS_refresh(){
-	mb_mapObjaddWMS(mod_addWMS_target2);
-	window.frames[mod_addWMS_target1].document.location.reload();
-	zoom(mod_addWMS_target2, true, 1.0);
+<?php
+#$Id$
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_addWMS.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
+# 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.
+
+
+$gui_id = $_REQUEST["gui_id"];
+require_once("../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = '".$gui_id."'";
+$res = db_query($sql);
+$cnt = 0;
+while($row = db_fetch_array($res)){ 
+   $e_target = $row["e_target"];
+   $e_require = $row["e_requires"];
+   $cnt++;
+}
+if($cnt > 1){ echo "alert('addWMS: ID not unique!');";}
+echo "var mod_addWMS_data = '".$e_require."';";
+$target = explode(",", $e_target);
+echo "var mod_addWMS_target1 = '".trim($target[0])."';";
+echo "var mod_addWMS_target2 = '".trim($target[1])."';";
+?>
+
+function mod_addWMS(){
+   var load = prompt("Capabilities - URL:","");
+   if(load){
+      mod_addWMS_load(load);    
+   }
+}
+function mod_addWMS_load(caps){
+   window.frames[mod_addWMS_data].document.location.href = "../php/mod_createJSObjFromXML.php?caps=" + escape(caps);
+}
+function mod_addWMS_refresh(){
+   var t = mb_mapObjaddWMS(mod_addWMS_target2);
+   window.frames[mod_addWMS_target1].document.location.reload();
+   zoom(mod_addWMS_target2, true, 1.0); // div-tags have to be created
 }
\ No newline at end of file




More information about the Mapbender_commits mailing list