svn commit: r269 - trunk/mapbender/http/javascripts/mod_sandclock.php

vera_schulze at osgeo.org vera_schulze at osgeo.org
Fri May 12 08:22:18 EDT 2006


Author: vera_schulze
Date: 2006-05-12 12:22:18+0000
New Revision: 269

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

Log:
Code cleaning ready

Modified: trunk/mapbender/http/javascripts/mod_sandclock.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_sandclock.php?view=diff&rev=269&p1=trunk/mapbender/http/javascripts/mod_sandclock.php&p2=trunk/mapbender/http/javascripts/mod_sandclock.php&r1=268&r2=269
==============================================================================
--- trunk/mapbender/http/javascripts/mod_sandclock.php	(original)
+++ trunk/mapbender/http/javascripts/mod_sandclock.php	2006-05-12 12:22:18+0000
@@ -1,6 +1,6 @@
 <?php
-#$Id: mod_sandclock.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_sandclock.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_sandclock.php
 # Copyright (C) 2002 CCGIS 
 #
 # This program is free software; you can redistribute it and/or modify
@@ -16,18 +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 = 'sandclock' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'sandclock' 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('sandclock: ID not unique!');";
 }
-if($cnt > 1){ echo "alert('sandclock: ID not unique!');";}
 echo "var mod_sandclock_target = '".$e_target."';";
 ?>
 




More information about the Mapbender_commits mailing list