svn commit: r209 - trunk/mapbender/http/javascripts/mod_loadwmc.php

vera_schulze at osgeo.org vera_schulze at osgeo.org
Tue May 9 09:31:21 EDT 2006


Author: vera_schulze
Date: 2006-05-09 13:31:20+0000
New Revision: 209

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

Log:
Code cleaning ready, 1 db_prep_query

Modified: trunk/mapbender/http/javascripts/mod_loadwmc.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_loadwmc.php?view=diff&rev=209&p1=trunk/mapbender/http/javascripts/mod_loadwmc.php&p2=trunk/mapbender/http/javascripts/mod_loadwmc.php&r1=208&r2=209
==============================================================================
--- trunk/mapbender/http/javascripts/mod_loadwmc.php	(original)
+++ trunk/mapbender/http/javascripts/mod_loadwmc.php	2006-05-09 13:31:20+0000
@@ -1,6 +1,6 @@
 <?php
-#$Id: mod_loadwmc.php,v 1.11 2005/10/24 12:34:32 c_baudson Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_loadwmc.php,v 1.11 2005/10/24 12:34:32 c_baudson Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_loadwmc.php
 # Copyright (C) 2002 CCGIS 
 #
 # This program is free software; you can redistribute it and/or modify
@@ -23,41 +23,33 @@
 
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_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('loadwmc: ID not unique!');";
 }
-if($cnt > 1){ echo "alert('loadwmc: ID not unique!');";}
-
 
 echo "mod_loadwmc_target = '".$e_target."';";
-
 ?>
 
 var mod_loadwmc_img = new Image(); mod_loadwmc_img.src = "<?php  echo $e_src;  ?>";
 //var mod_loadwmc_img_over = new Image(); mod_loadwmc_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
-function mod_importWmc(id) {
-alert(id);
+function mod_importWmc(id){
+	alert(id);
 }
-
 function mod_loadwmc(obj){
-
 	windowWmc = window.open("../php/mb_listWMCs.php?<?php echo SID;?>","displayWmc","width=500, dependent=yes");
 	windowWmc.focus();
-	 
 }
-function mod_loadwmc_init(obj) {
+function mod_loadwmc_init(obj){
 	//document.getElementById("loadwmc").src = mod_zoom1_img_over.src;
-	
-}
-
-
-
-
-
-
+}
\ No newline at end of file




More information about the Mapbender_commits mailing list