[Mapbender-commits] r7502 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 31 05:48:09 EST 2011
Author: apour
Date: 2011-01-31 02:48:09 -0800 (Mon, 31 Jan 2011)
New Revision: 7502
Modified:
trunk/mapbender/http/php/mod_deleteWFS.php
Log:
Bugfix, removed form action.
Modified: trunk/mapbender/http/php/mod_deleteWFS.php
===================================================================
--- trunk/mapbender/http/php/mod_deleteWFS.php 2011-01-31 07:09:06 UTC (rev 7501)
+++ trunk/mapbender/http/php/mod_deleteWFS.php 2011-01-31 10:48:09 UTC (rev 7502)
@@ -133,22 +133,28 @@
$logged_user_id=Mapbender::session()->get("mb_user_id");
###delete
-if($_REQUEST['del']!='-1'){
- $sql = "DELETE FROM wfs WHERE wfs_id = '".$_REQUEST['del']."'";
+
+if($del!='-1'){
+ $sql = "DELETE FROM wfs WHERE wfs_id = '".$del."'";
$res = db_query($sql);
}
+
+
+
//adopted for owned wfs and not all!!!!!!
+
$sql_wfs = "SELECT * FROM wfs ";
$sql_wfs .= " where wfs_owner=".$_SESSION["mb_user_id"]." ORDER BY wfs_name";
$res_wfs = db_query($sql_wfs);
$cnt_wfs = 0;
-echo "<form name='form1' action='" . $_SERVER["SCRIPT_NAME"] . "?".SID."' method='post'>";
+echo "<form name='form1' action='' method='post'>"; //" . $_SERVER["SCRIPT_NAME"] . "?".SID."
echo "<br><b>WFS List: <b><br><br>";
echo "<select class='wfsList' size='20' name='wfsList' onchange='sel();'>";
//var wfsInfo = this.value.split(\"###\");document.form1.wfsList.value=wfsInfo[0];
//morgen zu kontrollieren
+
while($row1 = db_fetch_array($res_wfs)){
$wfs_conf_gui=array();
@@ -195,7 +201,11 @@
echo "<option value='".$row1["wfs_id"]."###".$str_wfs_conf."###".$str_wfs_gui."'>".$row1["wfs_id"]." ".$row1["wfs_name"]." - ".$row1["wfs_title"]."</option>";
$cnt_wfs++;
}
+
echo "</select><br><br>";
+
+
+
?>
<!--Line for showing wfs metadata-->
View wfs metadata: <a id='metadatalink' href='' onclick="window.open(this.href,'Metadata','width=500,height=600,left=100,top=200,scrollbars=yes ,dependent=yes'); return false" target="_blank"><span id="metadatatext">no WFS selected</span></a><br><br>
@@ -204,6 +214,7 @@
List of GUIs where dependend wfs_conf are used:<span id="guilist"> no WFS selected</span><br><br>
+<input type='hidden' name='del' value='-1'>
<?php
//kann ja nur beim neu laden passieren. Man sollte hier dynamisch was hineinsetzen lassen(javascript) dafuer muss es aber schon vorher ausgewaehlt worden sein, d.h. die options um titel_list, abstarct_list, wfs_conf_id_list, sowie GUI_list erweitern lassen. is aufwand!
@@ -218,7 +229,7 @@
echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
?>
-<input type='hidden' name='del' value='-1'>
+
</form>
More information about the Mapbender_commits
mailing list