[Mapbender-commits] r2678 - branches/2.5/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jul 21 04:44:52 EDT 2008


Author: verenadiewald
Date: 2008-07-21 04:44:51 -0400 (Mon, 21 Jul 2008)
New Revision: 2678

Modified:
   branches/2.5/http/php/mod_wfs_conf.php
   branches/2.5/http/php/mod_wfs_edit.php
Log:
integrated f_auth_varname and f_show_detail again

Modified: branches/2.5/http/php/mod_wfs_conf.php
===================================================================
--- branches/2.5/http/php/mod_wfs_conf.php	2008-07-21 08:15:19 UTC (rev 2677)
+++ branches/2.5/http/php/mod_wfs_conf.php	2008-07-21 08:44:51 UTC (rev 2678)
@@ -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,f_auth_varname) 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,f_show_detail) VALUES(";
                 $sql .= "$1, $2, ";
                 if (!empty($_REQUEST["f_search".$i])) {
                 	$sql .= "'1'";
@@ -146,10 +146,16 @@
                 else {
                 	$sql .= "'0'";
                 }
-                $sql .= ",$9";
+                $sql .= ",$9,";
+                if (!empty($_REQUEST["f_show_detail".$i])) {
+                	$sql .= "'1'";
+                }
+                else {
+                	$sql .= "'0'";
+                }
  				$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], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i]);
+				$v = array($wfsID, $_REQUEST["f_id".$i], $_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], stripslashes($_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i]));
 				$t = array("i", "s", "s", "s", "s", "s", "i", "s", "s");
                 $res = db_prep_query($sql, $v, $t);
         }
@@ -264,10 +270,11 @@
                 echo "<td>" . toImage('label_id') . "</td>";
                 echo "<td>" . toImage('show') . "</td>";
                 echo "<td>" . toImage('position') . "</td>";
+                echo "<td>" . toImage('show_detail') . "</td>";
                 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++){
@@ -283,9 +290,11 @@
                 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='1' value='0'></td>";
+                echo "<td><input name='f_show_detail".$i."' type='checkbox'></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".$i."' cols='15' rows='1' ></textarea></td>";
+                echo "<td><input name='f_auth_varname".$i."' type='text' size='8'></td>";
                 echo "</tr>";
         }
         echo "</table>";

Modified: branches/2.5/http/php/mod_wfs_edit.php
===================================================================
--- branches/2.5/http/php/mod_wfs_edit.php	2008-07-21 08:15:19 UTC (rev 2677)
+++ branches/2.5/http/php/mod_wfs_edit.php	2008-07-21 08:44:51 UTC (rev 2678)
@@ -133,7 +133,15 @@
                 else {
                 	$sql .= "0";
                 }
-				$sql .= "', f_auth_varname = $7";
+				$sql .= "', f_auth_varname = $7,";
+				$sql .= "f_show_detail = '";
+                if (!empty($_REQUEST["f_show_detail".$i])) {
+                	$sql .= "1";
+                }
+                else {
+                	$sql .= "0";
+                }
+                $sql .= "'";
 				$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], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
@@ -216,9 +224,11 @@
                 echo "<td>" . toImage('label_id') . "</td>";
                 echo "<td>" . toImage('show') . "</td>";
                 echo "<td>" . toImage('position') . "</td>";
+                echo "<td>" . toImage('show_detail') . "</td>";
                 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)){
@@ -246,6 +256,9 @@
                 if($row["f_show"] == 1){ echo " checked"; }
                 echo "></td>";
                 echo "<td><input name='f_respos".$cnt."' type='text' size='1' value='".$row["f_respos"]."'></td>";
+                echo "<td><input name='f_show_detail".$cnt."' type='checkbox'";
+                if($row["f_show_detail"] == 1){ echo " checked"; }
+                echo "></td>";
                 echo "<td><input name='f_mandatory".$cnt."' type='checkbox'";
                 if($row["f_mandatory"] == 1){ echo " checked"; }
                 echo "></td>";
@@ -253,6 +266,7 @@
                 if($row["f_edit"] == 1){ echo " checked"; }
                 echo "></td>";
                 echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' >".$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