svn commit: r216 - trunk/mapbender/http/javascripts/mod_setBackground_all.php

uli at osgeo.org uli at osgeo.org
Wed May 10 03:50:58 EDT 2006


Author: uli
Date: 2006-05-10 07:50:57+0000
New Revision: 216

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

Log:
db_prep_query included

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




More information about the Mapbender_commits mailing list