svn commit: r281 - trunk/mapbender/http/javascripts/mod_selectMapsize.php

vera_schulze at osgeo.org vera_schulze at osgeo.org
Mon May 15 06:36:37 EDT 2006


Author: vera_schulze
Date: 2006-05-15 10:36:36+0000
New Revision: 281

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

Log:
Code cleaning ready

Modified: trunk/mapbender/http/javascripts/mod_selectMapsize.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_selectMapsize.php?view=diff&rev=281&p1=trunk/mapbender/http/javascripts/mod_selectMapsize.php&p2=trunk/mapbender/http/javascripts/mod_selectMapsize.php&r1=280&r2=281
==============================================================================
--- trunk/mapbender/http/javascripts/mod_selectMapsize.php	(original)
+++ trunk/mapbender/http/javascripts/mod_selectMapsize.php	2006-05-15 10:36:36+0000
@@ -1,6 +1,6 @@
 <?php
-#$Id: mod_selectMapsize.php,v 1.6 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_selectMapsize.php,v 1.6 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_selectMapsize.php
 # Copyright (C) 2002 CCGIS 
 #
 # This program is free software; you can redistribute it and/or modify
@@ -21,14 +21,18 @@
 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 = 'selectMapsize' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selectMapsize' 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++;
 }
-if($cnt > 1){ echo "alert('selectMapsize: ID not unique!');";}
+if($cnt > 1){
+	echo "alert('selectMapsize: ID not unique!');";
+}
 echo "var mod_selectMapsize_target = '".$e_target."';";
 ?>
 
@@ -41,7 +45,7 @@
 	var coords = mb_mapObj[ind].extent.split(",");
 	mb_mapObj[ind].extent = coords[0] + "," + pos[1] + "," + pos[0] + "," + coords[3]; 
 	mb_mapObj[ind].width = w;
- 	mb_mapObj[ind].height = h;
+	mb_mapObj[ind].height = h;
 	document.getElementById(mod_selectMapsize_target).style.width = mb_mapObj[ind].width;
 	document.getElementById(mod_selectMapsize_target).style.height = mb_mapObj[ind].height;
 	window.frames[mod_selectMapsize_target].document.getElementById("maps").style.width = mb_mapObj[ind].width;




More information about the Mapbender_commits mailing list