[Mapbender-commits] r2281 - branches/2.5/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Mar 20 09:06:31 EDT 2008


Author: christoph
Date: 2008-03-20 09:06:31 -0400 (Thu, 20 Mar 2008)
New Revision: 2281

Removed:
   branches/2.5/http/php/mod_wfs_save.php
Log:
deprecated, obsolete

Deleted: branches/2.5/http/php/mod_wfs_save.php
===================================================================
--- branches/2.5/http/php/mod_wfs_save.php	2008-03-20 13:00:14 UTC (rev 2280)
+++ branches/2.5/http/php/mod_wfs_save.php	2008-03-20 13:06:31 UTC (rev 2281)
@@ -1,155 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-<title>WFS Save</title>
-<script language='JavaScript' type='text/javascript'>
-var my = window.opener.parent.frames.wfs_conf.wfs_conf;
-var dig = window.opener.parent.frames.digitize;
-var w;
-function sepNameSpace(n){
-	var c = n.indexOf(":"); 
-	if(c>0){
-		var temp = n.split(":");
-		return temp[1];
-	}
-	else{
-		return n;
-	}
-}
-function init(){	
-	for(var i=0; i<my.length; i++){
-		N = new Option(my[i]['wfs_conf_abstract'],i,false,false);		
-		document.forms[0].thema.options[document.forms[0].thema.length] = N;
-	}	
-}
-function validate(obj){
-	var ind = obj.selectedIndex;
-	if(ind == 0){return;}
-	w = obj[ind].value;
-	
-	var str = "<table>";
-	for(var i=0; i< my[w]['element'].length; i++){
-		if(my[w]['element'][i]['f_geom'] != '1'){
-			str += "<tr>";
-			str += "<td>" + my[w]['element'][i]['element_name'] + "</td>";
-			str += "<td><input name='"+my[w]['element'][i]['element_name']+"' type='text'></td>";
-			str += "<tr>";
-		}
-	}
-	str += "</table>";
-	str += "<input type='submit' value='save'>"
-	document.getElementById("a").innerHTML = str;
-}
-function set(){
-	document.forms[1].url.value = my[w]['wfs_transaction'];
-	var str = '<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">';
-	str += '<wfs:Insert>';
-	str += '<'+ sepNameSpace(my[w]['featuretype_name'])+'>';
-	for(var i=0; i<document.forms[0].elements.length; i++){
-		if(document.forms[0].elements[i].type == 'text' && document.forms[0].elements[i].value != ''){
-			var tmp = sepNameSpace(document.forms[0].elements[i].name);
-			str += '<' + tmp  + '>';
-			str += document.forms[0].elements[i].value;
-			str += '</' + tmp  + '>';
-		}
-	}
-		
-	for(var j=0; j<my[w]['element'].length; j++){
-		if(my[w]['element'][j]['f_geom'] == 1){
-			var el_geom = my[w]['element'][j]['element_name'];	
-		}
-	}
-	str += '<' + el_geom + '>';	
-	
-	if(dig.D[0].type == 'text'){
-		str += '<gml:Point srsName="epsg:4326">';
-		str += '<gml:coordinates>';
-		str += dig.D[0].x[0] + "," + dig.D[0].y[0]; 
-		str += '</gml:coordinates>';
-		str += '</gml:Point>';		
-	}
-	if(dig.D[0].type == 'line'){
-		str += '<gml:MultiLineString srsName="epsg:4326">';
-		str += '<gml:lineStringMember>';
-		str += '<gml:LineString>';		
-            
-		str += '<gml:coordinates>';
-		for(var k=0; k<dig.D[0].x.length; k++){
-			if(k>0){
-				str += " ";	
-			}
-			str += dig.D[0].x[k] + "," + dig.D[0].y[k];
-		} 
-		str += '</gml:coordinates>';
-		str += '</gml:LineString>';
-		str += '</gml:lineStringMember>';
-		str += '</gml:MultiLineString>';
-	}
-	if(dig.D[0].type == 'polygon'){
-		str += '<gml:MultiPolygon srsName="epsg:4326">';
-		str += '<gml:polygonMember>';
-		str += '<gml:Polygon>';
-		str += '<gml:outerBoundaryIs>';
-		str += '<gml:LinearRing>';
-            
-		str += '<gml:coordinates>';
-		for(var k=0; k<dig.D[0].x.length; k++){
-			if(k>0){
-				str += " ";	
-			}
-			str += dig.D[0].x[k] + "," + dig.D[0].y[k];
-		} 
-		str += '</gml:coordinates>';
-		str += '</gml:LinearRing>';
-		str += '</gml:outerBoundaryIs>';
-		str += '</gml:Polygon>';
-		str += '</gml:polygonMember>';
-		str += '</gml:MultiPolygon>';
-	}
-	str += '</' + el_geom + '>';
-	str += '</'+ sepNameSpace(my[w]['featuretype_name'])+'>';
-	str += '</wfs:Insert>';
-	str += '</wfs:Transaction>';
-	document.forms[1].filter.value = str;
-	document.forms[1].submit();
-	return false;	
-}
-</script>
-</head>
-<body onload='init()'>
-<form onsubmit='return set()'>
-<select name='thema' onchange='validate(this)'>
-<option value=''>WFS...</option>
-</select><br>
-<div id='a' name='a'></div>
-</form>
-
-<form action='../extensions/geom2wfst.php' method='POST'>
-<input type='text' name='url'>
-<input type='text' name='filter'>
-</form>
-</body>
-</html>
\ No newline at end of file



More information about the Mapbender_commits mailing list