[Mapbender-commits] r2210 - branches/2.4.5/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Mar 7 11:00:18 EST 2008
Author: christoph
Date: 2008-03-07 11:00:18 -0500 (Fri, 07 Mar 2008)
New Revision: 2210
Modified:
branches/2.4.5/http/php/mod_wfs_conf.php
branches/2.4.5/http/php/mod_wfs_edit.php
Log:
missed f_auth_varname
Modified: branches/2.4.5/http/php/mod_wfs_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_conf.php 2008-03-07 15:36:23 UTC (rev 2209)
+++ branches/2.4.5/http/php/mod_wfs_conf.php 2008-03-07 16:00:18 UTC (rev 2210)
@@ -17,7 +17,7 @@
# 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_validatePermission.php");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
$con = db_connect(DBSERVER,OWNER,PW);
@@ -67,9 +67,9 @@
<br>
<b>WFS Configuration</b>
<br>
-<form method='POST' onsubmit='return validate()'>
+<form method='POST' action='<?php echo $self;?>'onsubmit='return validate()'>
<br>
-<a href="mod_wfs_edit.php">edit WFS Configuration</a><br><br>
+<a href="mod_wfs_edit.php?<?php echo $urlParameters;?>">edit WFS Configuration</a><br><br>
Select WFS:
<?php
$aWFS = new wfs_conf();
@@ -110,7 +110,7 @@
$wfsID = db_insert_id($con,'wfs_conf','wfs_conf_id');
for ($i = 0; $i < $_REQUEST["num"]; $i++){
- $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory) VALUES(";
+ $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory,f_auth_varname) VALUES(";
$sql .= "$1, $2, ";
if (!empty($_REQUEST["f_search".$i])) {
$sql .= "'1'";
@@ -130,7 +130,7 @@
$sql .= "'1'";
}
else {
- $sql .= "'0',";
+ $sql .= "'0'";
}
$sql .= ", $7, ";
if (!empty($_REQUEST["f_edit".$i])) {
@@ -146,10 +146,11 @@
else {
$sql .= "'0'";
}
+ $sql .= ",$9";
$sql .= "); ";
$v = array($wfsID, $_REQUEST["f_id".$i], $_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], $_REQUEST["f_form_element_html".$i], $_REQUEST["f_auth_varname".$i]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s");
+ $t = array("i", "s", "s", "s", "s", "s", "i", "s", "s");
$res = db_prep_query($sql, $v, $t);
}
if (isset($_REQUEST["f_geom"])) {
Modified: branches/2.4.5/http/php/mod_wfs_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_edit.php 2008-03-07 15:36:23 UTC (rev 2209)
+++ branches/2.4.5/http/php/mod_wfs_edit.php 2008-03-07 16:00:18 UTC (rev 2210)
@@ -17,7 +17,7 @@
# 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_validatePermission.php");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
?>
<html>
<head>
@@ -47,13 +47,11 @@
<br>
<b>WFS Configuration</b>
<br><br>
-<form name='form1' method='POST' onsubmit='return validate()'>
-<a href="mod_wfs_conf.php">new Configuration</a><br><br>
+<form name='form1' action='<?php echo $self;?>' method='POST' onsubmit='return validate()'>
+<a href="mod_wfs_conf.php?<?php echo $urlParameters;?>">new Configuration</a><br><br>
Select WFS Configuration:<br><br>
<?php
/* save wfs_conf properties */
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
if(isset($_REQUEST["save"])){
@@ -70,7 +68,7 @@
$sql .= " WHERE wfs_conf_id = $9;";
$v = array($_REQUEST["wfs_conf_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["gaz"]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s", "i");
+ $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
$res = db_prep_query($sql, $v, $t);
if (isset($_REQUEST["f_geom"])) {
@@ -78,20 +76,20 @@
$sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id = $2;";
$v = array($_REQUEST["gaz"], $_REQUEST["f_geom"]);
$t = array("i", "s");
- $res = db_prep_query($sql);
+ $res = db_prep_query($sql, $v, $t);
$sql = "UPDATE wfs_conf_element SET f_geom = 0 ";
$sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id <> $2;";
$v = array($_REQUEST["gaz"], $_REQUEST["f_geom"]);
$t = array("i", "s");
- $res = db_prep_query($sql);
+ $res = db_prep_query($sql, $v, $t);
}
else {
$sql = "UPDATE wfs_conf_element SET f_geom = 0 ";
$sql .= "WHERE fkey_wfs_conf_id = $1;";
$v = array($_REQUEST["gaz"]);
$t = array("i");
- $res = db_prep_query($sql);
+ $res = db_prep_query($sql, $v, $t);
}
for($i=0; $i<$_REQUEST["num"]; $i++){
@@ -135,7 +133,7 @@
else {
$sql .= "0";
}
- $sql .= "'";
+ $sql .= "', f_auth_varname = $7";
$sql .= " WHERE fkey_wfs_conf_id = $8 AND f_id = $9;";
$v = array($_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], addslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
More information about the Mapbender_commits
mailing list