[Mapbender-commits] r2630 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 9 05:12:58 EDT 2008


Author: verenadiewald
Date: 2008-07-09 05:12:58 -0400 (Wed, 09 Jul 2008)
New Revision: 2630

Modified:
   trunk/mapbender/http/php/mod_wfs_edit.php
Log:
changed window name

Modified: trunk/mapbender/http/php/mod_wfs_edit.php
===================================================================
--- trunk/mapbender/http/php/mod_wfs_edit.php	2008-07-09 09:08:57 UTC (rev 2629)
+++ trunk/mapbender/http/php/mod_wfs_edit.php	2008-07-09 09:12:58 UTC (rev 2630)
@@ -40,6 +40,44 @@
 function validate(){	
 	return true;
 }
+function openwindow(Adresse) {
+	Fenster1 = window.open(Adresse, "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);
+	}
+}
+
+function controlOperators(checkVal,operator,valType,opValue){
+	var opSelect = document.getElementById(operator);
+	removeChildNodes(opSelect);
+	if(checkVal==true){
+		opSelect.disabled = '';
+		option1 = new Option("-----","0");
+		opSelect.options[opSelect.length] = option1;
+		option2 = new Option("%...%","bothside");
+		opSelect.options[opSelect.length] = option2;
+		option3 = new Option("...%","rightside");
+		opSelect.options[opSelect.length] = option3;
+		option4 = new Option("equal","equal");
+		opSelect.options[opSelect.length] = option4;
+		option5 = new Option(">","greater_than");
+		opSelect.options[opSelect.length] = option5;
+		option6 = new Option("<","less_than");
+		opSelect.options[opSelect.length] = option6;
+		option7 = new Option(">=","greater_equal_than");
+		opSelect.options[opSelect.length] = option7;
+		option8 = new Option("<=","less_equal_than");
+		opSelect.options[opSelect.length] = option8;
+	}
+	else{
+		opSelect.disabled = 'disabled';
+	}
+}
 </script>
 
 </head>
@@ -68,7 +106,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");
+        $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s");
         $res = db_prep_query($sql, $v, $t);
 		        
 		if (isset($_REQUEST["f_geom"])) {
@@ -101,7 +139,7 @@
                 else {
                 	$sql .= "0";
                 }
-                $sql .= "', f_pos = $1, f_style_id = $2,";
+                $sql .= "', f_pos = $1, f_min_input = $2, f_style_id = $3,";
                 $sql .= "f_toupper = '" ;
                 if (!empty($_REQUEST["f_toupper".$i])) {
                 	$sql .= "1";
@@ -109,7 +147,7 @@
                 else { 
                 	$sql .= "0";
                 }
-                $sql .= "',f_label = $3, f_label_id = $4,";
+                $sql .= "',f_label = $4, f_label_id = $5,";
                 $sql .= "f_show = '";
                 if (!empty($_REQUEST["f_show".$i])) {
                 	$sql .= "1";
@@ -117,7 +155,7 @@
                 else {
                 	$sql .= "0";
                 }
-				$sql .= "',f_respos = $5,";
+				$sql .= "',f_respos = $6,";
                 $sql .= "f_edit = '";
                 if (!empty($_REQUEST["f_edit".$i])) {
                 	$sql .= "1";
@@ -125,7 +163,7 @@
                 else {
                 	$sql .= "0";
                 }
-				$sql .= "', f_form_element_html = $6,";
+				$sql .= "', f_form_element_html = $7,";
                 $sql .= "f_mandatory = '";
                 if (!empty($_REQUEST["f_mandatory".$i])) {
                 	$sql .= "1";
@@ -133,11 +171,20 @@
                 else {
                 	$sql .= "0";
                 }
-				$sql .= "', f_auth_varname = $7";
-				$sql .= " WHERE fkey_wfs_conf_id = $8 AND f_id = $9;";
+				$sql .= "', f_auth_varname = $8";
+			   	$sql .= ", f_show_detail = '";
+                if(!empty($_REQUEST["f_show_detail".$i])){
+                	$sql .= "1";
+                }
+                else {
+                	$sql .= "0";
+                }
+                $sql .= "', f_detailpos = $9";
+                $sql .= ", f_operator = $10";
+				$sql .= " WHERE fkey_wfs_conf_id = $11 AND f_id = $12;";
 
-				$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");
+				$v = array($_REQUEST["f_pos".$i], $_REQUEST["f_min_input".$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["f_detailpos".$i], $_REQUEST["f_operator".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
+				$t = array("s", "i", "s", "s", "s", "s", "s", "s", "i", "s", "i", "s");
                 $res = db_prep_query($sql, $v, $t);
         }
 }
@@ -189,9 +236,9 @@
                 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>";
         }
 
@@ -210,15 +257,20 @@
                 echo "<td>" . toImage('geom') . "</td>";
                 echo "<td>" . toImage('search') . "</td>";
                 echo "<td>" . toImage('pos') . "</td>";
+                echo "<td>" . toImage('minimum_input') . "</td>";
                 echo "<td>" . toImage('style_id') . "</td>";
                 echo "<td>" . toImage('upper') . "</td>";
                 echo "<td>" . toImage('label') . "</td>";
                 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('detail_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('operator') . "</td>";
         echo "</tr>";
         $cnt = 0;
         while($row = db_fetch_array($res)){
@@ -234,8 +286,23 @@
 				echo "></td>";
                 echo "<td><input name='f_search".$cnt."' type='checkbox'";
                 if($row["f_search"] == 1){ echo " checked"; }
-                echo "></td>";
+                echo " onclick='controlOperators(document.forms[0].f_search".$cnt.".checked,\"f_operator".$cnt."\",\"".$row["element_type"]."\",\"".$row["f_operator"]."\");'></td>";
                 echo "<td><input name='f_pos".$cnt."' type='text' size='1' value='".$row["f_pos"]."'></td>";
+                echo "<td><select name='f_min_input".$cnt."' id='f_min_input".$cnt."' ";
+                echo ">";
+                echo "<option value='0' ";
+                if($row["f_min_input"] == 0){ echo " selected"; } echo ">-----</option>";
+                echo "<option value='1' ";
+                if($row["f_min_input"] == 1){ echo " selected"; } echo ">1</option>";
+                echo "<option value='2' ";
+                if($row["f_min_input"] == 2){ echo " selected"; } echo ">2</option>";
+                echo "<option value='3' ";
+                if($row["f_min_input"] == 3){ echo " selected"; } echo ">3</option>";
+                echo "<option value='4' ";
+                if($row["f_min_input"] == 4){ echo " selected"; } echo ">4</option>";
+                echo "<option value='5' ";
+                if($row["f_min_input"] == 5){ echo " selected"; } echo ">5</option>";
+                echo "</select></td>";				
                 echo "<td><input name='f_style_id".$cnt."' type='text' size='2' value='".$row["f_style_id"]."'></td>";
                 echo "<td><input name='f_toupper".$cnt."' type='checkbox'";
                 if($row["f_toupper"] == 1){ echo " checked"; }
@@ -246,6 +313,10 @@
                 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_detailpos".$cnt."' type='text' size='1' value='".$row["f_detailpos"]."'></td>";
                 echo "<td><input name='f_mandatory".$cnt."' type='checkbox'";
                 if($row["f_mandatory"] == 1){ echo " checked"; }
                 echo "></td>";
@@ -253,6 +324,38 @@
                 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 "<td><select name='f_operator".$cnt."' id='f_operator".$cnt."' ";
+                if($row["f_search"] != 1){
+                	echo "disabled";
+                }
+                echo ">";
+                echo "<option value='0' ";
+                if($row["f_operator"] == 0){ echo " selected"; }
+				echo ">-----</option>";
+				echo "<option value='bothside' ";
+                if($row["f_operator"] == 'bothside'){ echo " selected"; }
+				echo ">%...%</option>";
+				echo "<option value='rightside' ";
+                if($row["f_operator"] == 'rightside'){ echo " selected"; }
+				echo ">...%</option>";
+				echo "<option value='equal' ";
+                if($row["f_operator"] == 'equal'){ echo " selected"; }
+				echo ">equal</option>";
+				echo "<option value='greater_than' ";
+                if($row["f_operator"] == 'greater_than'){ echo " selected"; }
+				echo ">></option>";
+				echo "<option value='less_than' ";
+                if($row["f_operator"] == 'less_than'){ echo " selected"; }
+				echo "><</option>";
+				echo "<option value='less_equal_than' ";
+                if($row["f_operator"] == 'less_equal_than'){ echo " selected"; }
+				echo "><=</option>";
+				echo "<option value='greater_equal_than' ";
+                if($row["f_operator"] == 'greater_equal_than'){ echo " selected"; }
+				echo ">>=</option>";
+				
+     			echo "</select></td>";
                 echo "</tr>";
                 $cnt++;
         }



More information about the Mapbender_commits mailing list