svn commit: r105 - trunk/mapbender/http/javascripts/mod_coords_div.php
arnulf at osgeo.org
arnulf at osgeo.org
Wed Apr 19 10:35:05 EDT 2006
Author: arnulf
Date: 2006-04-19 14:35:05+0000
New Revision: 105
Modified:
trunk/mapbender/http/javascripts/mod_coords_div.php (contents, props changed)
Log:
code cleaned, added prepared statements
Modified: trunk/mapbender/http/javascripts/mod_coords_div.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_coords_div.php?view=diff&rev=105&p1=trunk/mapbender/http/javascripts/mod_coords_div.php&p2=trunk/mapbender/http/javascripts/mod_coords_div.php&r1=104&r2=105
==============================================================================
--- trunk/mapbender/http/javascripts/mod_coords_div.php (original)
+++ trunk/mapbender/http/javascripts/mod_coords_div.php 2006-04-19 14:35:05+0000
@@ -1,6 +1,6 @@
<?php
-#$Id: mod_coords_div.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_coords_div.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
@@ -19,11 +19,12 @@
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_div' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords_div' 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"];
@@ -53,7 +54,7 @@
mb_button[ind].go = new Function ("mod_showCoords_div_run()");
mb_button[ind].stop = new Function ("mod_showCoords_div_disable()");
}
-function mod_showCoords_div_run(){
+function mod_showCoords_div_run(){
window.frames[mod_showCoords_div_target].document.onmousemove = mod_showCoords_div_display;
window.frames[mod_showCoords_div_target].document.onclick = mod_showCoords_div_click;
}
@@ -92,10 +93,10 @@
mod_showCoord_write(pos[0],pos[1]);
}
function mod_showCoord_write(x,y){
- if(document.getElementById("dependentDiv")){
+ if(document.getElementById("dependentDiv")){
var str = x + " / " + y;
if(mod_showCoords_div_fix != ""){
- str += "<div>" + mod_showCoords_div_fix + "</div>";
+ str += "<div>" + mod_showCoords_div_fix + "</div>";
}
writeTag("","dependentDiv", str);
}
More information about the Mapbender_commits
mailing list