[Mapbender-commits] r2366 - branches/2.5/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Apr 8 04:54:19 EDT 2008
Author: verenadiewald
Date: 2008-04-08 04:54:19 -0400 (Tue, 08 Apr 2008)
New Revision: 2366
Modified:
branches/2.5/http/php/mod_wfs_conf.php
branches/2.5/http/php/mod_wfs_edit.php
Log:
added function stripslashes for f_form_element_html in prepared statements
Modified: branches/2.5/http/php/mod_wfs_conf.php
===================================================================
--- branches/2.5/http/php/mod_wfs_conf.php 2008-04-08 07:42:33 UTC (rev 2365)
+++ branches/2.5/http/php/mod_wfs_conf.php 2008-04-08 08:54:19 UTC (rev 2366)
@@ -19,6 +19,9 @@
require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
?>
<html>
<head>
@@ -57,14 +60,6 @@
function validate(){
return true;
}
-
-function removeChildNodes(node) {
- while (node.childNodes.length > 0) {
- var childNode = node.firstChild;
- node.removeChild(childNode);
- }
-}
-
</script>
</head>
@@ -72,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();
@@ -95,68 +90,77 @@
db_select_db($DB,$con);
- $sql = "INSERT INTO wfs_conf (wfs_conf_abstract,wfs_conf_description,fkey_wfs_id,fkey_featuretype_id,g_label,g_label_id,g_button,g_button_id,g_style,g_buffer,g_res_style,g_use_wzgraphics) VALUES(";
- $sql .= "'".$_REQUEST["wfs_conf_abstract"]."',";
- $sql .= "'".$_REQUEST["wfs_conf_description"]."',";
- $sql .= "'".$_REQUEST["wfs"]."',";
- $sql .= "'".$_REQUEST["featuretype"]."',";
- $sql .= "'".$_REQUEST["g_label"]."',";
- $sql .= "'".$_REQUEST["g_label_id"]."',";
- $sql .= "'".$_REQUEST["g_button"]."',";
- $sql .= "'".$_REQUEST["g_button_id"]."',";
- $sql .= "'".$_REQUEST["g_style"]."',";
- $sql .= "'".$_REQUEST["g_buffer"]."',";
- $sql .= "'".$_REQUEST["g_res_style"]."',";
- if(!empty($_REQUEST["g_use_wzgraphics"])){
+ $sql = "INSERT INTO wfs_conf (";
+ $sql .= "wfs_conf_abstract, fkey_wfs_id, ";
+ $sql .= "fkey_featuretype_id, g_label, g_label_id, g_button, ";
+ $sql .= "g_button_id, g_style, g_buffer, g_res_style, g_use_wzgraphics";
+ $sql .= ") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, ";
+ if (!empty($_REQUEST["g_use_wzgraphics"])) {
$sql .= "'1'";
- }else{$sql .= "'0'";}
+ }
+ else {
+ $sql .= "'0'";
+ }
$sql .= "); ";
-
- $res = db_query($sql);
+
+ $v = array($_REQUEST["wfs_conf_abstract"], $_REQUEST["wfs"], $_REQUEST["featuretype"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
+
$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,f_show_detail) VALUES(";
- $sql .= "'".$wfsID."',";
- $sql .= "'".$_REQUEST["f_id".$i]."',";
- if(!empty($_REQUEST["f_search".$i])){
- $sql .= "'1',";
- }else{$sql .= "'0',";}
- $sql .= "'".$_REQUEST["f_pos".$i]."',";
- $sql .= "'".$_REQUEST["f_style_id".$i]."',";
- if(!empty($_REQUEST["f_toupper".$i])){
- $sql .= "'1',";
- }else{$sql .= "'0',";}
- $sql .= "'".$_REQUEST["f_label".$i]."',";
- $sql .= "'".$_REQUEST["f_label_id".$i]."',";
- if(!empty($_REQUEST["f_show".$i])){
- $sql .= "'1',";
- }else{$sql .= "'0',";}
- $sql .= "'".$_REQUEST["f_respos".$i]."'";
- $sql .= ",";
- if(!empty($_REQUEST["f_edit".$i])){
- $sql .= "'1',";
- }else{$sql .= "'0',";}
- $sql .= "'".$_REQUEST["f_form_element_html".$i]."',";
- if(!empty($_REQUEST["f_mandatory".$i])){
+
+ 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 .= "$1, $2, ";
+ if (!empty($_REQUEST["f_search".$i])) {
$sql .= "'1'";
- }else{$sql .= "'0'";}
- $sql .= ", ";
- $sql .= "'".$_REQUEST["f_auth_varname".$i];
- $sql .= "'";
- $sql .= ", ";
- if(!empty($_REQUEST["f_show_detail".$i])){
- $sql .= "'1'";
- }else{$sql .= "'0'";}
- $sql .= "); ";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ", $3, $4, ";
+ if (!empty($_REQUEST["f_toupper".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ",$5, $6, ";
+ if (!empty($_REQUEST["f_show".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ", $7, ";
+ if (!empty($_REQUEST["f_edit".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ",$8, ";
+ if (!empty($_REQUEST["f_mandatory".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ",$9";
+ $sql .= "); ";
- $res = db_query($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]);
+ $t = array("i", "s", "s", "s", "s", "s", "i", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
}
if (isset($_REQUEST["f_geom"])) {
- $sql = "UPDATE wfs_conf_element SET ";
- $sql .= "f_geom = 1";
- $sql .= " WHERE fkey_wfs_conf_id = ".$wfsID." AND f_id = ".$_REQUEST["f_geom"].";";
- $res = db_query($sql);
+ $sql = "UPDATE wfs_conf_element SET f_geom = 1 ";
+ $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id = $2;";
+ $v = array($wfsID, $_REQUEST["f_geom"]);
+ $t = array("i", "i");
+ $res = db_prep_query($sql, $v, $t);
}
+
echo "<script language='javascript'>";
echo "document.location.href = 'mod_wfs_edit.php?gaz=".$wfsID."';";
echo "</script>";
@@ -233,8 +237,7 @@
/* set featuretype options */
echo "<table>";
- echo "<tr><td>Title:</td><td><input type='text' name='wfs_conf_abstract'></td></tr>" ;
- echo "<tr><td>Description:</td><td><input type='text' name='wfs_conf_description'></td></tr>" ;
+ echo "<tr><td>Abstract:</td><td><input type='text' name='wfs_conf_abstract'></td></tr>" ;
echo "<tr><td>Label:</td><td><input type='text' name='g_label'></td></tr>" ;
echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id'></td></tr>" ;
echo "<tr><td>Button:</td><td><input type='text' name='g_button'></td></tr>" ;
@@ -242,7 +245,7 @@
echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'></textarea></td></tr>" ;
echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='1'></td></tr>" ;
echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'></textarea></td></tr>" ;
-// echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'></td></tr>";
+ echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'></td></tr>";
echo "</table>";
@@ -260,13 +263,11 @@
echo "<td>" . toImage('label') . "</td>";
echo "<td>" . toImage('label_id') . "</td>";
echo "<td>" . toImage('show') . "</td>";
- echo "<td>" . toImage('show_detail') . "</td>";
echo "<td>" . toImage('position') . "</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++){
@@ -281,12 +282,10 @@
echo "<td><input name='f_label".$i."' type='text' size='4'></td>";
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_show_detail".$i."' type='checkbox'></td>";
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".$i."' cols='15' rows='1'></textarea></td>";
- echo "<td><input name='f_auth_varname".$i."' type='text' size='8' value=''></td>";
+ echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></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-04-08 07:42:33 UTC (rev 2365)
+++ branches/2.5/http/php/mod_wfs_edit.php 2008-04-08 08:54:19 UTC (rev 2366)
@@ -40,18 +40,6 @@
function validate(){
return true;
}
-function openwindow(Adresse) {
- Fenster1 = window.open(Adresse, "GeoPortal Rheinland-Pfalz - Metadaten", "width=500,height=500,left=100,top=100,scrollbars=yes,resizable=no");
- Fenster1.focus();
-}
-
-function removeChildNodes(node) {
- while (node.childNodes.length > 0) {
- var childNode = node.firstChild;
- node.removeChild(childNode);
- }
-}
-
</script>
</head>
@@ -59,100 +47,98 @@
<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"])){
$sql = "UPDATE wfs_conf SET ";
- $sql .= "wfs_conf_abstract = '".$_REQUEST["wfs_conf_abstract"]."',";
- $sql .= "wfs_conf_description = '".$_REQUEST["wfs_conf_description"]."',";
- $sql .= "g_label = '".$_REQUEST["g_label"]."',";
- $sql .= "g_label_id = '".$_REQUEST["g_label_id"]."',";
- $sql .= "g_button = '".$_REQUEST["g_button"]."',";
- $sql .= "g_button_id = '".$_REQUEST["g_button_id"]."',";
- $sql .= "g_style = '".$_REQUEST["g_style"]."',";
- $sql .= "g_buffer = '".$_REQUEST["g_buffer"]."',";
- $sql .= "g_res_style = '".$_REQUEST["g_res_style"]."',";
- $sql .= "g_use_wzgraphics = ";
- if(!empty($_REQUEST["g_use_wzgraphics"])){
- $sql .= '1';
- }else{$sql .= '0';}
- $sql .= " WHERE wfs_conf_id = ".$_REQUEST["gaz"].";";
+ $sql .= "wfs_conf_abstract = $1, g_label = $2, ";
+ $sql .= "g_label_id = $3, g_button = $4, g_button_id = $5, g_style = $6, ";
+ $sql .= "g_buffer = $7, g_res_style = $8, g_use_wzgraphics = ";
+ if (!empty($_REQUEST["g_use_wzgraphics"])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= " WHERE wfs_conf_id = $9;";
- $res = db_query($sql);
+ $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");
+ $res = db_prep_query($sql, $v, $t);
if (isset($_REQUEST["f_geom"])) {
- $sql = "UPDATE wfs_conf_element SET ";
- $sql .= "f_geom = 1";
- $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_geom"].";";
- $res = db_query($sql);
+ $sql = "UPDATE wfs_conf_element SET f_geom = 1 ";
+ $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, $v, $t);
- $sql = "UPDATE wfs_conf_element SET ";
- $sql .= "f_geom = 0";
- $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id <> ".$_REQUEST["f_geom"].";";
- $res = db_query($sql);
+ $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, $v, $t);
}
else {
- $sql = "UPDATE wfs_conf_element SET ";
- $sql .= "f_geom = 0";
- $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"].";";
- $res = db_query($sql);
+ $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, $v, $t);
}
for($i=0; $i<$_REQUEST["num"]; $i++){
- $sql = "UPDATE wfs_conf_element SET ";
- $sql .= "f_search = '";
- if(!empty($_REQUEST["f_search".$i])){
- $sql .= '1';
- }else{$sql .= '0';}
- $sql .= "',";
- $sql .= "f_pos = '".$_REQUEST["f_pos".$i]."',";
- $sql .= "f_style_id = '".$_REQUEST["f_style_id".$i]."',";
+ $sql = "UPDATE wfs_conf_element SET f_search = '";
+ if (!empty($_REQUEST["f_search".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "', f_pos = $1, f_style_id = $2,";
$sql .= "f_toupper = '" ;
- if(!empty($_REQUEST["f_toupper".$i])){
- $sql .= '1';
- }else{$sql .= '0';}
- $sql .= "',";
- $sql .= "f_label = '".$_REQUEST["f_label".$i]."',";
- $sql .= "f_label_id = '".$_REQUEST["f_label_id".$i]."',";
+ if (!empty($_REQUEST["f_toupper".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "',f_label = $3, f_label_id = $4,";
$sql .= "f_show = '";
- if(!empty($_REQUEST["f_show".$i])){
- $sql .= '1';
- }else{$sql .= '0';}
- $sql .= "',";
- $sql .= "f_respos = '".$_REQUEST["f_respos".$i]."' ";
- $sql .= ",";
+ if (!empty($_REQUEST["f_show".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "',f_respos = $5,";
$sql .= "f_edit = '";
- if(!empty($_REQUEST["f_edit".$i])){
- $sql .= '1';
- }else{$sql .= '0';}
- $sql .= "',";
- $sql .= "f_form_element_html = '".$_REQUEST["f_form_element_html".$i];
- $sql .= "',";
+ if (!empty($_REQUEST["f_edit".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "', f_form_element_html = $6,";
$sql .= "f_mandatory = '";
- if(!empty($_REQUEST["f_mandatory".$i])){
+ if (!empty($_REQUEST["f_mandatory".$i])) {
$sql .= "1";
- }else{$sql .= "0";}
- $sql .= "'";
- $sql .= ", ";
- $sql .= "f_auth_varname = '".$_REQUEST["f_auth_varname".$i];
- $sql .= "'";
- $sql .= ", ";
- $sql .= "f_show_detail = '";
- if(!empty($_REQUEST["f_show_detail".$i])){
- $sql .= '1';
- }else{$sql .= '0';}
- $sql .= "'";
- $sql .= " WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." AND f_id = ".$_REQUEST["f_id".$i].";";
-
- $res = db_query($sql);
+ }
+ else {
+ $sql .= "0";
+ }
+ $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], stripslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
+ $res = db_prep_query($sql, $v, $t);
}
}
@@ -160,10 +146,8 @@
/* select wfs */
-$sql = "SELECT * FROM wfs_conf, wfs WHERE wfs.wfs_owner = $1 AND wfs_conf.fkey_wfs_id = wfs.wfs_id";
-$v = array($_SESSION['mb_user_id']);
-$t = array('i');
-$res = db_prep_query($sql,$v,$t);
+$sql = "SELECT * FROM wfs_conf";
+$res = db_query($sql);
echo "<select size='10' name='gaz' onchange='submit()'>";
$cnt = 0;
while($row = db_fetch_array($res)){
@@ -189,15 +173,15 @@
}
/* configure elements */
-if(isset($_REQUEST["gaz"])){
- $sql = "SELECT * FROM wfs_conf WHERE wfs_conf_id = ".$_REQUEST["gaz"];
- $res = db_query($sql);
+if (isset($_REQUEST["gaz"])) {
+ $sql = "SELECT * FROM wfs_conf WHERE wfs_conf_id = $1";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
if($row = db_fetch_array($res)){
echo "<table>";
- #echo "<tr><td><a onclick='openwindow(this.href); return false' target='_blank' href='../x_geoportal/mod_featuretypeMetadata.php?wfs_conf_id=".$row["wfs_conf_id"]."'>Link zum WFS</a></td></tr>";
echo "<tr><td>GazetterID:</td><td>".$row["wfs_conf_id"]."</td></tr>" ;
- echo "<tr><td>Title:</td><td><input type='text' name='wfs_conf_abstract' value='".$row["wfs_conf_abstract"]."'></td></tr>" ;
- echo "<tr><td>Description:</td><td><input type='text' name='wfs_conf_description' value='".$row["wfs_conf_description"]."'></td></tr>" ;
+ echo "<tr><td>Abstract:</td><td><input type='text' name='wfs_conf_abstract' value='".$row["wfs_conf_abstract"]."'></td></tr>" ;
echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
@@ -205,18 +189,19 @@
echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'>".$row["g_res_style"]."</textarea></td></tr>" ;
-// echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'";
-// if($row["g_use_wzgraphics"] == 1){ echo " checked"; }
-// echo "></td></tr>";
+ echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'";
+ if($row["g_use_wzgraphics"] == 1){ echo " checked"; }
+ echo "></td></tr>";
echo "</table>";
}
/* set element options */
$sql = "SELECT * FROM wfs_conf_element ";
$sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE fkey_wfs_conf_id = ".$_REQUEST["gaz"]." ORDER BY f_id";
-
- $res = db_query($sql);
+ $sql .= "WHERE fkey_wfs_conf_id = $1 ORDER BY f_id";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
echo "<table border='1'>";
echo "<tr valign = bottom>";
@@ -230,13 +215,10 @@
echo "<td>" . toImage('label') . "</td>";
echo "<td>" . toImage('label_id') . "</td>";
echo "<td>" . toImage('show') . "</td>";
- echo "<td>" . toImage('show_detail') . "</td>";
echo "<td>" . toImage('position') . "</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)){
@@ -263,9 +245,6 @@
echo "<td><input name='f_show".$cnt."' type='checkbox'";
if($row["f_show"] == 1){ echo " checked"; }
echo "></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_respos".$cnt."' type='text' size='1' value='".$row["f_respos"]."'></td>";
echo "<td><input name='f_mandatory".$cnt."' type='checkbox'";
if($row["f_mandatory"] == 1){ echo " checked"; }
@@ -274,7 +253,6 @@
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