[Mapbender-commits] r1029 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 24 08:10:40 EST 2007
Author: christoph
Date: 2007-01-24 08:10:40 -0500 (Wed, 24 Jan 2007)
New Revision: 1029
Modified:
trunk/mapbender/http/php/mod_wfs_conf.php
trunk/mapbender/http/php/mod_wfs_edit.php
Log:
added mandatory
renamed f_box to f_form_element_html
Modified: trunk/mapbender/http/php/mod_wfs_conf.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_conf.php 2007-01-24 13:09:02 UTC (rev 1028)
+++ trunk/mapbender/http/php/mod_wfs_conf.php 2007-01-24 13:10:40 UTC (rev 1029)
@@ -99,7 +99,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_box) 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) VALUES(";
$sql .= "'".$wfsID."',";
$sql .= "'".$_REQUEST["f_id".$i]."',";
if(!empty($_REQUEST["f_search".$i])){
@@ -119,7 +119,10 @@
if(!empty($_REQUEST["f_edit".$i])){
$sql .= "'1',";
}else{$sql .= "'0',";}
- $sql .= "'".$_REQUEST["f_box".$i]."'";
+ $sql .= "'".$_REQUEST["f_form_element_html".$i]."',";
+ if(!empty($_REQUEST["f_mandatory".$i])){
+ $sql .= "'1'";
+ }else{$sql .= "'0'";}
$sql .= "); ";
$res = db_query($sql);
@@ -177,7 +180,7 @@
echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
- echo "<tr><td>FeaturTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
+ echo "<tr><td>FeatureTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
echo "</table>";
}
@@ -241,8 +244,9 @@
echo "<td>label_id</td>";
echo "<td>show</td>";
echo "<td>position</td>";
+ echo "<td>mandatory</td>";
echo "<td>edit</td>";
- echo "<td>box</td>";
+ echo "<td>html</td>";
echo "</tr>";
for($i=0; $i<count($aWFS->elements->element_id); $i++){
@@ -260,8 +264,9 @@
echo "<td><input name='f_label_id".$i."' type='text' size='2' value='0'></td>";
echo "<td><input name='f_show".$i."' type='checkbox'></td>";
echo "<td><input name='f_respos".$i."' type='text' size='4' 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_box".$cnt."' cols='15' rows='1' ></textarea></td>";
+ echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' ></textarea></td>";
echo "</tr>";
}
echo "</table>";
Modified: trunk/mapbender/http/php/mod_wfs_edit.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_edit.php 2007-01-24 13:09:02 UTC (rev 1028)
+++ trunk/mapbender/http/php/mod_wfs_edit.php 2007-01-24 13:10:40 UTC (rev 1029)
@@ -123,8 +123,13 @@
$sql .= '1';
}else{$sql .= '0';}
$sql .= "',";
- $sql .= "f_box = '".addslashes($_REQUEST["f_box".$i])."' ";
- $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_id".$i].";";
+ $sql .= "f_form_element_html = '".addslashes($_REQUEST["f_form_element_html".$i]);
+ $sql .= "',";
+ $sql .= "f_mandatory = '";
+ if(!empty($_REQUEST["f_mandatory".$i])){
+ $sql .= '1';
+ }else{$sql .= '0';}
+ $sql .= "' WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_id".$i].";";
$res = db_query($sql);
}
}
@@ -196,8 +201,9 @@
echo "<td>label_id</td>";
echo "<td>show</td>";
echo "<td>position</td>";
+ echo "<td>mandatory</td>";
echo "<td>edit</td>";
- echo "<td>box</td>";
+ echo "<td>html</td>";
echo "</tr>";
$cnt = 0;
while($row = db_fetch_array($res)){
@@ -225,10 +231,13 @@
if($row["f_show"] == 1){ echo " checked"; }
echo "></td>";
echo "<td><input name='f_respos".$cnt."' type='text' size='4' value='".$row["f_respos"]."'></td>";
+ echo "<td><input name='f_mandatory".$cnt."' type='checkbox'";
+ if($row["f_mandatory"] == 1){ echo " checked"; }
+ echo "></td>";
echo "<td><input name='f_edit".$cnt."' type='checkbox'";
if($row["f_edit"] == 1){ echo " checked"; }
echo "></td>";
- echo "<td><textarea name='f_box".$cnt."' cols='15' rows='1' >".$row["f_box"]."</textarea></td>";
+ echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' >".$row["f_form_element_html"]."</textarea></td>";
echo "</tr>";
$cnt++;
}
More information about the Mapbender_commits
mailing list