svn commit: r166 - trunk/mapbender/http/javascripts/mod_addWMS.php

vera_schulze at osgeo.org vera_schulze at osgeo.org
Wed May 3 09:19:17 EDT 2006


Author: vera_schulze
Date: 2006-05-03 13:19:16+0000
New Revision: 166

Modified:
   trunk/mapbender/http/javascripts/mod_addWMS.php

Log:
db_prep_query inluded

Modified: trunk/mapbender/http/javascripts/mod_addWMS.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_addWMS.php?view=diff&rev=166&p1=trunk/mapbender/http/javascripts/mod_addWMS.php&p2=trunk/mapbender/http/javascripts/mod_addWMS.php&r1=165&r2=166
==============================================================================
--- trunk/mapbender/http/javascripts/mod_addWMS.php	(original)
+++ trunk/mapbender/http/javascripts/mod_addWMS.php	2006-05-03 13:19:16+0000
@@ -22,13 +22,15 @@
 require_once("../../conf/mapbender.conf");
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);
-$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
-$cnt = 0;
+$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0; 
 while($row = db_fetch_array($res)){ 
-   $e_target = $row["e_target"];
-   $e_require = $row["e_requires"];
-   $cnt++;
+	$e_target = $row["e_target"];
+	$e_require = $row["e_requires"];
+	$cnt++;
 }
 if($cnt > 1){ echo "alert('addWMS: ID not unique!');";}
 echo "var mod_addWMS_data = '".$e_require."';";
@@ -47,7 +49,7 @@
    window.frames[mod_addWMS_data].document.location.href = "../php/mod_createJSObjFromXML.php?caps=" + escape(caps);
 }
 function mod_addWMS_refresh(){
-   var t = mb_mapObjaddWMS(mod_addWMS_target2);
+   mb_mapObjaddWMS(mod_addWMS_target2);
    window.frames[mod_addWMS_target1].document.location.reload();
    zoom(mod_addWMS_target2, true, 1.0); // div-tags have to be created
 }
\ No newline at end of file




More information about the Mapbender_commits mailing list