svn commit: r266 - trunk/mapbender/http/javascripts/mod_repaint.php
vera_schulze at osgeo.org
vera_schulze at osgeo.org
Fri May 12 07:29:31 EDT 2006
Author: vera_schulze
Date: 2006-05-12 11:29:31+0000
New Revision: 266
Modified:
trunk/mapbender/http/javascripts/mod_repaint.php (contents, props changed)
Log:
Code cleaning ready
Modified: trunk/mapbender/http/javascripts/mod_repaint.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_repaint.php?view=diff&rev=266&p1=trunk/mapbender/http/javascripts/mod_repaint.php&p2=trunk/mapbender/http/javascripts/mod_repaint.php&r1=265&r2=266
==============================================================================
--- trunk/mapbender/http/javascripts/mod_repaint.php (original)
+++ trunk/mapbender/http/javascripts/mod_repaint.php 2006-05-12 11:29:31+0000
@@ -1,6 +1,6 @@
<?php
-#$Id: mod_repaint.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_repaint.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_repaint.php
# Copyright (C) 2002 CCGIS
#
# This program is free software; you can redistribute it and/or modify
@@ -16,19 +16,24 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
$gui_id = $_REQUEST["gui_id"];
require_once("../../conf/mapbender.conf");
$con = db_connect($DBSERVER,$OWNER,$PW);
db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'repaint' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'repaint' 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++;
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('repaint: ID not unique!');";
}
-if($cnt > 1){ echo "alert('repaint: ID not unique!');";}
?>
var mod_repaint_img = new Image(); mod_repaint_img.src = "<?php echo $e_src; ?>";
var mod_repaint_img_over = new Image(); mod_repaint_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
More information about the Mapbender_commits
mailing list