[Mapbender-commits] r2264 - in branches/nimix_dev: http/php
resources/db/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 18 04:50:05 EDT 2008
Author: nimix
Date: 2008-03-18 04:50:05 -0400 (Tue, 18 Mar 2008)
New Revision: 2264
Removed:
branches/nimix_dev/http/php/mod_wfsrequest.php
Modified:
branches/nimix_dev/http/php/mod_loadWFSCapabilities.php
branches/nimix_dev/http/php/mod_loadwfs.php
branches/nimix_dev/resources/db/update/update_postgresql_db.sql
Log:
merge chenges from 2.5 branch
Modified: branches/nimix_dev/http/php/mod_loadWFSCapabilities.php
===================================================================
--- branches/nimix_dev/http/php/mod_loadWFSCapabilities.php 2008-03-18 08:45:54 UTC (rev 2263)
+++ branches/nimix_dev/http/php/mod_loadWFSCapabilities.php 2008-03-18 08:50:05 UTC (rev 2264)
@@ -74,7 +74,7 @@
}
else{
var gui_id=document.form1.guiList.options[listIndex].value;
- document.form1.action='../php/mod_loadwfs.php';
+ document.form1.action='../php/mod_loadwfs.php?<?php echo $urlParameters;?>';
document.form1.submit();
}
}
@@ -87,7 +87,7 @@
$admin = new administration();
$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
echo count($ownguis)."<br>";
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
+echo "<form name='form1' action='" . $self ."' method='post'>";
echo "<table cellpadding='0' cellspacing='0' border='0'>";
echo "<tr>";
echo "<td>";
Modified: branches/nimix_dev/http/php/mod_loadwfs.php
===================================================================
--- branches/nimix_dev/http/php/mod_loadwfs.php 2008-03-18 08:45:54 UTC (rev 2263)
+++ branches/nimix_dev/http/php/mod_loadwfs.php 2008-03-18 08:50:05 UTC (rev 2264)
@@ -24,10 +24,10 @@
echo "file: ".$_REQUEST["xml_file"];
echo "<br>-------------------------------<br>";
-$gui_id = mb_validateInput($_REQUEST["guiList"]);
+$guiList = mb_validateInput($_REQUEST["guiList"]);
$xml = mb_validateInput($_REQUEST["xml_file"]);
$mywms = new wfs();
$mywms->createObjFromXML($xml);
-$mywms->wfs2db($gui_id);
+$mywms->wfs2db($guiList);
$mywms->displayWFS();
?>
\ No newline at end of file
Deleted: branches/nimix_dev/http/php/mod_wfsrequest.php
===================================================================
--- branches/nimix_dev/http/php/mod_wfsrequest.php 2008-03-18 08:45:54 UTC (rev 2263)
+++ branches/nimix_dev/http/php/mod_wfsrequest.php 2008-03-18 08:50:05 UTC (rev 2264)
@@ -1,132 +0,0 @@
-<?php
-# $Id$
-# $Header: /cvsroot/mapbender/mapbender/http/php/mod_wfsrequest.php,v 1.3 2005/11/04 11:08:57 uli_rothstein 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-
-function checkInput($s){
- if(!preg_match('/[^\s\d\w\-\.öüäßÄÖÜ]|--/',$s)){
- return addslashes($s);
- }
- else{
- die('Unzulässige Eingabe');
- }
-}
-
-if(isset($_REQUEST["backlink"]) && $_REQUEST["backlink"] == 'parent'){
- $p = 'parent';
-}else{
- $p = "parent.frames[\"".$_REQUEST["frame"]."\"]";
-}
-
-/* wfs_conf */
-$sql = "SELECT * FROM wfs_conf ";
-$sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
-$sql .= "WHERE wfs_conf.wfs_conf_id = $1";
-$v = array($_REQUEST['wfs_conf_id']);
-$t = array("i");
-$res = db_prep_query($sql, $v, $t);
-if($row = db_fetch_array($res)){
- $g_res_style = $row["g_res_style"];
-
-}else{die("wfs_conf data not available");}
-
-/* wfs_conf_element */
-$sql = "SELECT * FROM wfs_conf_element ";
-$sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
-$sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
-$sql .= "AND wfs_conf_element.f_show = 1 ORDER BY wfs_conf_element.f_respos;";
-$v = array($_REQUEST['wfs_conf_id']);
-$t = array("i");
-$res = db_prep_query($sql, $v, $t);
-$col = array();
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $col[$cnt] = $row["element_name"];
- $cnt++;
-}
-if($cnt == 0){die("wfs_conf_element data not available");}
-
-
-$f = '<ogc:Filter xmlns:ogc="http://ogc.org" xmlns:gml="http://www.opengis.net/gml">';
-if($_REQUEST["objekttyp_id"] != '0'){
- $f .= "<And>";
-}
-$f .= "<ogc:PropertyIsLike wildCard='*' singleChar='.' escape='!'>";
-$f .= '<ogc:PropertyName>ud_id</ogc:PropertyName>';
-$f .= '<ogc:Literal>*'.$_REQUEST['AstUdNr'].'</ogc:Literal>';
-$f .= "</ogc:PropertyIsLike>";
-if($_REQUEST["objekttyp_id"] != '0'){
- $f .= "<ogc:PropertyIsEqualTo>";
- $f .= '<ogc:PropertyName>objekttyp_id</ogc:PropertyName>';
- $f .= '<ogc:Literal>'.checkInput($_REQUEST["objekttyp_id"]).'</ogc:Literal>';
- $f .= "</ogc:PropertyIsEqualTo>";
- $f .= "</And>";
-}
-
-$f .= '</ogc:Filter>';
-
-$req = urldecode($_REQUEST["url"]).urlencode($f);
-$gml = 'off';
-if(isset($_REQUEST['gml'])){
- $gml = $_REQUEST['gml'];
-}
-if($gml == 'on'){
-// header("Location: ".$req);
-readfile($req);
-}
-
-else if($_REQUEST["export"] == 'shape'){
- include(dirname(__FILE__)."/../classes/class_gml2.php");
- include(dirname(__FILE__)."/../classes/class_gml2shape.php");
- $my = new gml2();
- $mygml = $my->getGml($req);
- $s = new gml2shape($mygml);
-}
-else{
- echo "<html><head><style type='text/css'>".$g_res_style."</style></head><body>";
- include(dirname(__FILE__) . "/../classes/class_gml2.php");
- $mygml = new gml2();
- $mygml->parsegml($req);
- $c = $mygml->getMemberCount();
- for($i=0; $i<$c; $i++){
- echo "<div style='cursor:pointer;' ";
- if(fmod($i,2) == 0){
- echo "class='even'";
- }
- else{
- echo "class='uneven'";
- }
- $mygeom = implode(":",$mygml->getGeometriesFromMember($i));
- $geomtype = $mygml->getGeometryTypeFromMember($i);
- echo " onmouseover='".$p.".setResult(\"".$geomtype."\",\"over\",\"".$mygeom."\")' ";
- echo " onmouseout='".$p.".setResult(\"".$geomtype."\",\"out\",\"false\")' ";
- echo " onclick='".$p.".setResult(\"".$geomtype."\",\"click\",\"".$mygeom."\")'>";
-// for($j=0; $j<count($col); $j++){
- echo $mygml->getValueBySeparatedKey($i,$col[0]);
- if($_REQUEST["objekttyp_id"] == '0'){
- echo " (".$mygml->getValueBySeparatedKey($i,"objekttyp_name").")";
- }
-// }
- echo "</div>";
-
- }
-if($i == 0){ echo "Kein Ergebnis...";}
- echo "</body></html>";
-}
-?>
\ No newline at end of file
Modified: branches/nimix_dev/resources/db/update/update_postgresql_db.sql
===================================================================
--- branches/nimix_dev/resources/db/update/update_postgresql_db.sql 2008-03-18 08:45:54 UTC (rev 2263)
+++ branches/nimix_dev/resources/db/update/update_postgresql_db.sql 2008-03-18 08:50:05 UTC (rev 2264)
@@ -118,10 +118,6 @@
ALTER TABLE wfs_conf_element ADD COLUMN f_auth_varname VARCHAR(50);
ALTER TABLE wfs_conf_element ADD COLUMN f_show_detail int4;
ALTER TABLE wfs_conf_element ADD COLUMN f_operator VARCHAR(50);
---
--- table gui_element: new column for translation
---
-ALTER TABLE gui_element ADD COLUMN e_title VARCHAR(255);
--
-- table gui_element: new element for table admin1 to edit wfs settings
@@ -145,6 +141,8 @@
+ CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
+ HANDLER plpgsql_call_handler;
--
-- new function gettext for easy translations
--
More information about the Mapbender_commits
mailing list