svn commit: r106 - trunk/mapbender/http/javascripts/mod_coords.php

arnulf at osgeo.org arnulf at osgeo.org
Wed Apr 19 10:45:58 EDT 2006


Author: arnulf
Date: 2006-04-19 14:45:58+0000
New Revision: 106

Modified:
   trunk/mapbender/http/javascripts/mod_coords.php   (contents, props changed)

Log:
code cleaned, added prepared statements

Modified: trunk/mapbender/http/javascripts/mod_coords.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_coords.php?view=diff&rev=106&p1=trunk/mapbender/http/javascripts/mod_coords.php&p2=trunk/mapbender/http/javascripts/mod_coords.php&r1=105&r2=106
==============================================================================
--- trunk/mapbender/http/javascripts/mod_coords.php	(original)
+++ trunk/mapbender/http/javascripts/mod_coords.php	2006-04-19 14:45:58+0000
@@ -1,6 +1,6 @@
 <?php
-#$Id: mod_coords.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_coords.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/ShowCoords_div
 # Copyright (C) 2002 CCGIS 
 #
 # This program is free software; you can redistribute it and/or modify
@@ -20,13 +20,13 @@
 require_once("../../conf/mapbender.conf");
 
 $gui_id = $_REQUEST["gui_id"];
-
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
-$cnt = 0;
-while($row = db_fetch_array($res)){ 
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords' 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_src = $row["e_src"];
 	$e_target = $row["e_target"];
 	$cnt++;
@@ -53,7 +53,7 @@
 	mb_button[ind].go = new Function ("mod_showCoords_run()");
 	mb_button[ind].stop = new Function ("mod_showCoords_disable()");   
 }
-function mod_showCoords_run(){   
+function mod_showCoords_run(){
 	window.frames[mod_showCoords_target].document.onmousemove = mod_showCoords_display;
 	window.frames[mod_showCoords_target].document.onclick = mod_showCoords_click;
 }




More information about the Mapbender_commits mailing list