[Mapbender-commits] r1633 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Aug 8 08:39:44 EDT 2007
Author: christoph
Date: 2007-08-08 08:39:44 -0400 (Wed, 08 Aug 2007)
New Revision: 1633
Modified:
trunk/mapbender/http/php/mod_wfs_conf.php
trunk/mapbender/http/php/mod_wfs_edit.php
Log:
added new variable f_auth_varname
Modified: trunk/mapbender/http/php/mod_wfs_conf.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_conf.php 2007-08-08 12:05:05 UTC (rev 1632)
+++ trunk/mapbender/http/php/mod_wfs_conf.php 2007-08-08 12:39:44 UTC (rev 1633)
@@ -108,7 +108,7 @@
$res = db_query($sql);
$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 .= "'".$wfsID."',";
$sql .= "'".$_REQUEST["f_id".$i]."',";
if(!empty($_REQUEST["f_search".$i])){
@@ -133,9 +133,9 @@
if(!empty($_REQUEST["f_mandatory".$i])){
$sql .= "'1'";
}else{$sql .= "'0'";}
-// $sql .= ", ";
-// $sql .= "'".addslashes($_REQUEST["f_auth_varname".$i]);
-// $sql .= "'";
+ $sql .= ", ";
+ $sql .= "'".$_REQUEST["f_auth_varname".$i];
+ $sql .= "'";
$sql .= "); ";
$res = db_query($sql);
@@ -146,7 +146,6 @@
$sql .= " WHERE fkey_wfs_conf_id = ".$wfsID." AND f_id = ".$_REQUEST["f_geom"].";";
$res = db_query($sql);
}
-
echo "<script language='javascript'>";
echo "document.location.href = 'mod_wfs_edit.php?gaz=".$wfsID."';";
echo "</script>";
@@ -253,7 +252,7 @@
echo "<td>" . toImage('mandatory') . "</td>";
echo "<td>" . toImage('edit') . "</td>";
echo "<td>" . toImage('html') . "</td>";
-// echo "<td>" . toImage('auth') . "</td>";
+ echo "<td>" . toImage('auth') . "</td>";
echo "</tr>";
for($i=0; $i<count($aWFS->elements->element_id); $i++){
@@ -271,8 +270,8 @@
echo "<td><input name='f_respos".$i."' type='text' size='1' value='0'></td>";
echo "<td><input name='f_mandatory".$i."' type='checkbox'></td>";
echo "<td><input name='f_edit".$i."' type='checkbox'></td>";
- echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' ></textarea></td>";
-// echo "<td><input name='f_auth_varname".$cnt."' type='text' size='8' value='".$row["f_auth_varname"]."'></td>";
+ echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></td>";
+ echo "<td><input name='f_auth_varname".$i."' type='text' size='8' value=''></td>";
echo "</tr>";
}
echo "</table>";
Modified: trunk/mapbender/http/php/mod_wfs_edit.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_edit.php 2007-08-08 12:05:05 UTC (rev 1632)
+++ trunk/mapbender/http/php/mod_wfs_edit.php 2007-08-08 12:39:44 UTC (rev 1633)
@@ -128,7 +128,10 @@
$sql .= "1";
}else{$sql .= "0";}
$sql .= "'";
- $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_id".$i].";";
+ $sql .= ", ";
+ $sql .= "f_auth_varname = '".$_REQUEST["f_auth_varname".$i];
+ $sql .= "'";
+ $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_id".$i].";";
$res = db_query($sql);
}
}
@@ -207,6 +210,7 @@
echo "<td>" . toImage('mandatory') . "</td>";
echo "<td>" . toImage('edit') . "</td>";
echo "<td>" . toImage('html') . "</td>";
+ echo "<td>" . toImage('auth') . "</td>";
echo "</tr>";
$cnt = 0;
while($row = db_fetch_array($res)){
@@ -241,6 +245,7 @@
if($row["f_edit"] == 1){ echo " checked"; }
echo "></td>";
echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' >".stripslashes($row["f_form_element_html"])."</textarea></td>";
+ echo "<td><input name='f_auth_varname".$cnt."' type='text' size='8' value='".$row["f_auth_varname"]."'></td>";
echo "</tr>";
$cnt++;
}
More information about the Mapbender_commits
mailing list