[Mapbender-commits] r7001 - branches/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Oct 1 14:55:34 EDT 2010


Author: christoph
Date: 2010-10-01 18:55:33 +0000 (Fri, 01 Oct 2010)
New Revision: 7001

Modified:
   branches/mapbender/http/php/mod_editElementVars.php
Log:
replaced db_result

Modified: branches/mapbender/http/php/mod_editElementVars.php
===================================================================
--- branches/mapbender/http/php/mod_editElementVars.php	2010-10-01 18:42:14 UTC (rev 7000)
+++ branches/mapbender/http/php/mod_editElementVars.php	2010-10-01 18:55:33 UTC (rev 7001)
@@ -196,13 +196,13 @@
 	
    echo "<div class='myElements'>\n<table>\n";
 	
-   while(db_fetch_row($res)){
+   while($row = db_fetch_row($res)){
       echo "<tr onmouseover='this.className=\"show-secondary\"' onmouseout='this.className=\"\"'>\n";
       echo "<td class='myTable'>";
-      echo "<input type='radio' name='myElement' value='".db_result($res, $cnt, "var_name")."' onclick='submit()'>";
+      echo "<input type='radio' name='myElement' value='".$row["var_name"]."' onclick='submit()'>";
       echo "</td>\n";
-      echo "<td class='myTable'>".db_result($res, $cnt, "var_name")."</td>\n";
-      echo "<td class='secondary'>".db_result($res, $cnt, "var_type")."</td>\n";
+      echo "<td class='myTable'>".$row["var_name"]."</td>\n";
+      echo "<td class='secondary'>".$row["var_type"]."</td>\n";
       echo "</tr>\n";
       $cnt++;
    }
@@ -215,11 +215,11 @@
       $v = array($fkey_gui_id,$fkey_e_id,$myElement);
       $t = array('s','s','s');
       $res = db_prep_query($sql,$v,$t);
-      if(db_fetch_row($res)){
-         echo "<tr><td>Name:</td><td><input type='text' class='textfield' name='var_name' value='".db_result($res,0,"var_name")."'></td></tr>\n";
-         echo "<tr><td>Value:</td><td><textarea cols='32' rows='5'  name='var_value' >".stripslashes(db_result($res,0,"var_value"))."</textarea></td></tr>\n";
-         echo "<tr><td>Context:</td><td><input type='text' class='textfield' name='context' value='".db_result($res,0,"context")."'></td></tr>\n";
-         echo "<tr><td>Type:</td><td><input type='text' class='textfield' name='var_type' value='".db_result($res,0,"var_type")."'></td></tr>\n";
+      if($row = db_fetch_row($res)){
+         echo "<tr><td>Name:</td><td><input type='text' class='textfield' name='var_name' value='".$row["var_name"]."'></td></tr>\n";
+         echo "<tr><td>Value:</td><td><textarea cols='32' rows='5'  name='var_value' >".stripslashes($row["var_value"])."</textarea></td></tr>\n";
+         echo "<tr><td>Context:</td><td><input type='text' class='textfield' name='context' value='".$row["context"]."'></td></tr>\n";
+         echo "<tr><td>Type:</td><td><input type='text' class='textfield' name='var_type' value='".$row["var_type"]."'></td></tr>\n";
          $formOk = 1;
       }
    }
@@ -245,4 +245,4 @@
 <input type="hidden" name="mySave">
 </form>
 </body>
-</html>
\ No newline at end of file
+</html>



More information about the Mapbender_commits mailing list