svn commit: r283 - trunk/mapbender/http/javascripts/mod_setBBOX1.php
vera_schulze at osgeo.org
vera_schulze at osgeo.org
Mon May 15 07:31:12 EDT 2006
Author: vera_schulze
Date: 2006-05-15 11:31:12+0000
New Revision: 283
Modified:
trunk/mapbender/http/javascripts/mod_setBBOX1.php
Log:
Code cleaning ready
Modified: trunk/mapbender/http/javascripts/mod_setBBOX1.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_setBBOX1.php?view=diff&rev=283&p1=trunk/mapbender/http/javascripts/mod_setBBOX1.php&p2=trunk/mapbender/http/javascripts/mod_setBBOX1.php&r1=282&r2=283
==============================================================================
--- trunk/mapbender/http/javascripts/mod_setBBOX1.php (original)
+++ trunk/mapbender/http/javascripts/mod_setBBOX1.php 2006-05-15 11:31:12+0000
@@ -1,6 +1,6 @@
<?php
-#$Id$
-# http://www.mapbender.org/index.php/Mb_myBBOX
+# $Id$
+# http://www.mapbender.org/index.php/mod_setBBOX1.php
# Copyright (C) 2002 CCGIS
#
# This program is free software; you can redistribute it and/or modify
@@ -21,14 +21,18 @@
include("../../conf/mapbender.conf");
$con = db_connect($DBSERVER,$OWNER,$PW);
db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setBBOX' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setBBOX' 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"];
- $cnt++;
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('setBBOX: ID not unique!');";
}
-if($cnt > 1){ echo "alert('setBBOX: ID not unique!');";}
echo "var mod_setBBOX_target = '".$e_target."';";
?>
mb_registerInitFunctions("mod_setBBOX_init()");
More information about the Mapbender_commits
mailing list