svn commit: r280 - trunk/mapbender/http/javascripts/mod_selArea1.php

vera_schulze at osgeo.org vera_schulze at osgeo.org
Mon May 15 06:33:22 EDT 2006


Author: vera_schulze
Date: 2006-05-15 10:33:22+0000
New Revision: 280

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

Log:
Code cleaning ready

Modified: trunk/mapbender/http/javascripts/mod_selArea1.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_selArea1.php?view=diff&rev=280&p1=trunk/mapbender/http/javascripts/mod_selArea1.php&p2=trunk/mapbender/http/javascripts/mod_selArea1.php&r1=279&r2=280
==============================================================================
--- trunk/mapbender/http/javascripts/mod_selArea1.php	(original)
+++ trunk/mapbender/http/javascripts/mod_selArea1.php	2006-05-15 10:33:22+0000
@@ -1,6 +1,6 @@
 <?php
-#$Id: mod_selArea1.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_selArea1.php,v 1.9 2005/09/13 18:16:42 bjoern_heuser Exp $
+# $Id$
+# http://www.mapbender.org/index.php/mod_selArea1.php
 # Copyright (C) 2002 CCGIS 
 #
 # This program is free software; you can redistribute it and/or modify
@@ -22,15 +22,19 @@
 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);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selArea1' 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_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('selArea1: ID not unique!');";
 }
-if($cnt > 1){ echo "alert('selArea1: ID not unique!');";}
 ?>
 var mod_selArea_elName = "selArea1";
 var mod_selArea_frameName = "";
@@ -41,32 +45,32 @@
 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_selArea_get;
-   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_selArea_get;
+	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;
 }
 function mod_selArea_get(e){
 	mod_selArea_setValidClipping(mod_box_stop(e));




More information about the Mapbender_commits mailing list