svn commit: r278 - trunk/mapbender/http/javascripts/mod_selArea.php

vera_schulze at osgeo.org vera_schulze at osgeo.org
Mon May 15 06:27:56 EDT 2006


Author: vera_schulze
Date: 2006-05-15 10:27:55+0000
New Revision: 278

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

Log:
Code cleaning ready

Modified: trunk/mapbender/http/javascripts/mod_selArea.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_selArea.php?view=diff&rev=278&p1=trunk/mapbender/http/javascripts/mod_selArea.php&p2=trunk/mapbender/http/javascripts/mod_selArea.php&r1=277&r2=278
==============================================================================
--- trunk/mapbender/http/javascripts/mod_selArea.php	(original)
+++ trunk/mapbender/http/javascripts/mod_selArea.php	2006-05-15 10:27:55+0000
@@ -1,20 +1,39 @@
 <?php
-#$Id: mod_selArea.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_selArea.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_selArea.php
+# Copyright (C) 2002 CCGIS 
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# 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 = 'selArea1' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
 $cnt = 0;
 while($row = db_fetch_array($res)){ 
    $e_src = $row["e_src"];
    $e_target = $row["e_target"];
    $cnt++;
 }
-if($cnt > 1){ echo "alert('selArea1: ID not unique!');";}
+if($cnt > 1){
+	echo "alert('selArea1: ID not unique!');";
+}
 ?>
 var mod_selArea_elName = "selArea1";
 var mod_selArea_frameName = "";
@@ -25,30 +44,30 @@
 var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 function init_selArea1(ind){
-   mb_button[ind] = document.getElementById(mod_selArea_elName);
-   mb_button[ind].img_over = mod_selArea_img_over.src;
-   mb_button[ind].img_on = mod_selArea_img_on.src;
-   mb_button[ind].img_off = mod_selArea_img_off.src;
-   mb_button[ind].status = 0;
-   mb_button[ind].elName = mod_selArea_elName;
-   mb_button[ind].fName = mod_selArea_frameName;
-   mb_button[ind].go = new Function ("mod_selArea_click()");
-   mb_button[ind].stop = new Function ("mod_selArea_disable()");
+	mb_button[ind] = document.getElementById(mod_selArea_elName);
+	mb_button[ind].img_over = mod_selArea_img_over.src;
+	mb_button[ind].img_on = mod_selArea_img_on.src;
+	mb_button[ind].img_off = mod_selArea_img_off.src;
+	mb_button[ind].status = 0;
+	mb_button[ind].elName = mod_selArea_elName;
+	mb_button[ind].fName = mod_selArea_frameName;
+	mb_button[ind].go = new Function ("mod_selArea_click()");
+	mb_button[ind].stop = new Function ("mod_selArea_disable()");
 }
 function mod_selArea_click(){
-   var el = window.frames[mod_selArea_target].document;
-   el.onmouseover = mod_selArea_init;
-   el.onmousedown = mod_box_start;
-   el.onmouseup = mod_box_stop;
-   el.onmousemove = mod_box_run;
+	var el = window.frames[mod_selArea_target].document;
+	el.onmouseover = mod_selArea_init;
+	el.onmousedown = mod_box_start;
+	el.onmouseup = mod_box_stop;
+	el.onmousemove = mod_box_run;
 }
 function mod_selArea_disable(){
-   var el = window.frames[mod_selArea_target].document; 
-   el.onmousedown = null;
-   el.onmouseup = null;
-   el.onmousemove = null;
+	var el = window.frames[mod_selArea_target].document; 
+	el.onmousedown = null;
+	el.onmouseup = null;
+	el.onmousemove = null;
 }
 function mod_selArea_init(e){
-   mb_isBF = mod_selArea_target;
-   mb_zF = mod_selArea_target;
+	mb_isBF = mod_selArea_target;
+	mb_zF = mod_selArea_target;
 }




More information about the Mapbender_commits mailing list