[Mapbender-commits] r2143 - branches/2.5/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Feb 25 18:21:36 EST 2008


Author: christoph
Date: 2008-02-25 18:21:35 -0500 (Mon, 25 Feb 2008)
New Revision: 2143

Modified:
   branches/2.5/http/javascripts/map.php
   branches/2.5/http/javascripts/mod_addWMS.php
   branches/2.5/http/javascripts/mod_addWMSfromList.php
   branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php
   branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php
   branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php
   branches/2.5/http/javascripts/mod_add_vendorspecific.php
   branches/2.5/http/javascripts/mod_back.php
   branches/2.5/http/javascripts/mod_center1.php
   branches/2.5/http/javascripts/mod_coords.php
   branches/2.5/http/javascripts/mod_coords_div.php
   branches/2.5/http/javascripts/mod_copyright.php
   branches/2.5/http/javascripts/mod_dependentDiv.php
   branches/2.5/http/javascripts/mod_dependentIframe.php
   branches/2.5/http/javascripts/mod_digitize_tab.php
   branches/2.5/http/javascripts/mod_displayWmc.php
   branches/2.5/http/javascripts/mod_dragMapSize.php
   branches/2.5/http/javascripts/mod_dynamicOverview.php
   branches/2.5/http/javascripts/mod_embedded_legend.php
   branches/2.5/http/javascripts/mod_export_image.php
   branches/2.5/http/javascripts/mod_featureInfo.php
   branches/2.5/http/javascripts/mod_featureInfoTunnel.php
   branches/2.5/http/javascripts/mod_forward.php
   branches/2.5/http/javascripts/mod_gazetteerSQL_client.php
   branches/2.5/http/javascripts/mod_getArea.php
   branches/2.5/http/javascripts/mod_help.php
   branches/2.5/http/javascripts/mod_highlightPOI.php
   branches/2.5/http/javascripts/mod_home.php
   branches/2.5/http/javascripts/mod_initWmc.php
   branches/2.5/http/javascripts/mod_insertKmlIntoDb.php
   branches/2.5/http/javascripts/mod_insertLayerPreviewIntoDb.php
   branches/2.5/http/javascripts/mod_key.php
   branches/2.5/http/javascripts/mod_legend.php
   branches/2.5/http/javascripts/mod_loadKML.php
   branches/2.5/http/javascripts/mod_loadwmc.php
   branches/2.5/http/javascripts/mod_log.php
   branches/2.5/http/javascripts/mod_measure.php
   branches/2.5/http/javascripts/mod_navFrame.php
   branches/2.5/http/javascripts/mod_owsproxy.php
   branches/2.5/http/javascripts/mod_pan.php
   branches/2.5/http/javascripts/mod_perimeter.php
   branches/2.5/http/javascripts/mod_poi.php
   branches/2.5/http/javascripts/mod_print1.php
   branches/2.5/http/javascripts/mod_reload.php
   branches/2.5/http/javascripts/mod_renderGML.php
   branches/2.5/http/javascripts/mod_repaint.php
   branches/2.5/http/javascripts/mod_resize_mapsize.php
   branches/2.5/http/javascripts/mod_sandclock.php
   branches/2.5/http/javascripts/mod_sandclock2.php
   branches/2.5/http/javascripts/mod_saveLayerPreview.php
   branches/2.5/http/javascripts/mod_saveWmcKml.php
   branches/2.5/http/javascripts/mod_savewmc.php
   branches/2.5/http/javascripts/mod_scaleHint.php
   branches/2.5/http/javascripts/mod_scaleSel.php
   branches/2.5/http/javascripts/mod_scaleText.php
   branches/2.5/http/javascripts/mod_scalebar.php
   branches/2.5/http/javascripts/mod_selArea.php
   branches/2.5/http/javascripts/mod_selArea1.php
   branches/2.5/http/javascripts/mod_selectMapsize.php
   branches/2.5/http/javascripts/mod_setBBOX1.php
   branches/2.5/http/javascripts/mod_setBackground.php
   branches/2.5/http/javascripts/mod_setBackground_all.php
   branches/2.5/http/javascripts/mod_setPOI2Scale.php
   branches/2.5/http/javascripts/mod_setTimeout.php
   branches/2.5/http/javascripts/mod_state.php
   branches/2.5/http/javascripts/mod_tab.php
   branches/2.5/http/javascripts/mod_tab_translation.php
   branches/2.5/http/javascripts/mod_toggleModule.php
   branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php
   branches/2.5/http/javascripts/mod_wfs_gazetteer_client.php
   branches/2.5/http/javascripts/mod_zoomCoords.php
   branches/2.5/http/javascripts/mod_zoomFull.php
   branches/2.5/http/javascripts/mod_zoomIn1.php
   branches/2.5/http/javascripts/mod_zoomOut1.php
Log:
refactoring

Modified: branches/2.5/http/javascripts/map.php
===================================================================
--- branches/2.5/http/javascripts/map.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/map.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,20 +18,13 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 session_start();
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 require_once(dirname(__FILE__)."/../classes/class_wms.php");
 
-
 // see http://trac.osgeo.org/mapbender/ticket/79
 ini_set('session.bug_compat_42',0); 
 ini_set('session.bug_compat_warn',0);
 
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
 /*
 // may be added at a later stage
 $gui_changed=0;
@@ -52,7 +45,7 @@
 	$_SESSION['layer_preview'] = 0;
 }
 */
-$_SESSION["mb_user_gui"] = $_REQUEST["gui_id"];
+$_SESSION["mb_user_gui"] = $gui_id;
 
 session_write_close();
 ob_start();
@@ -87,13 +80,13 @@
 // Load WMS
 // 
 $sql = "SELECT fkey_wms_id FROM gui_wms WHERE fkey_gui_id = $1 ORDER BY gui_wms_position";
-$v = array($_SESSION["mb_user_gui"]);
+$v = array($gui_id);
 $t = array('s');
-$res = db_prep_query($sql,$v,$t);
+$res = db_prep_query($sql, $v, $t);
 
-while($row = db_fetch_array($res)){
+while($row = db_fetch_array($res)) {
 	$mywms = new wms();
-	$mywms->createObjFromDB($_SESSION["mb_user_gui"],$row["fkey_wms_id"]);
+	$mywms->createObjFromDB($gui_id, $row["fkey_wms_id"]);
 	$mywms->createJsObjFromWMS();
 }
 
@@ -101,35 +94,46 @@
 // Load JavaScript modules of GUI elements
 //
 $sql = "SELECT DISTINCT e_mb_mod FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1";
-$v = array($_REQUEST["gui_id"]);
+$v = array($gui_id);
 $t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
+$res = db_prep_query($sql, $v, $t);
 while($row = db_fetch_array($res)){
 	if($row["e_mb_mod"] != ""){
 		$moduleArray = explode(",", $row["e_mb_mod"]);
 		for ($i = 0; $i < count($moduleArray); $i++) {
-			require_once(dirname(__FILE__) . "/../javascripts/" . trim($moduleArray[$i]));
+			$currentFile = dirname(__FILE__) . "/../javascripts/" . trim($moduleArray[$i]);
+			if (file_exists($currentFile)) {
+				require_once($currentFile);
+			}
+			else {
+				$e = new mb_exception("Javascript module not found: " . $currentFile);
+			}
 		}
 	}
-	$cnt++;
 }
 
 //
 // Load JavaScript files of GUI elements
 //
-$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ORDER BY e_pos";
-$mb_v = array($_REQUEST["gui_id"]);
+$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos, " .
+		"e_requires FROM gui_element WHERE e_public = 1 AND " .
+		"fkey_gui_id = $1 ORDER BY e_pos";
+$mb_v = array($gui_id);
 $mb_t = array("s");
 $mb_res = db_prep_query($mb_sql, $mb_v, $mb_t);
-//$mb_cnt = 0;
 while($row_js = db_fetch_array($mb_res)){
 	if($row_js["e_js_file"] != ""){
 		$e_id = $row_js["e_id"];
-		$e_id_css = $row_js["e_id"];
 		$e_src = $row_js["e_src"];
-		$e_target = $row_js["e_target"];
-		require_once($row_js["e_js_file"]);
+		$e_require = $row_js["e_requires"];
+		$e_target = explode(",",$row_js["e_target"]);
+		$currentFile = $row_js["e_js_file"];
+		if (file_exists($currentFile)) {
+			require_once($currentFile);
+		}
+		else {
+			$e = new mb_exception("Javascript not found: " . $currentFile);
+		}
 	}
 }
 ?>
\ No newline at end of file

Modified: branches/2.5/http/javascripts/mod_addWMS.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMS.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_addWMS.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,31 +17,11 @@
 # 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(dirname(__FILE__)."/../php/mb_validateSession.php");
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' 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"];
-	$e_require = $row["e_requires"];
-	$cnt++;
-}
-if($cnt > 1){
-	echo "alert('addWMS: ID not unique!');";
-}
 echo "var mod_addWMS_data = '".$e_require."';";
-$target = explode(",", $e_target);
-echo "var mod_addWMS_target1 = '".trim($target[0])."';";
-echo "var mod_addWMS_target2 = '".trim($target[1])."';";
+echo "var mod_addWMS_target1 = '".trim($e_target[0])."';";
+echo "var mod_addWMS_target2 = '".trim($e_target[1])."';";
 ?>
 
 function mod_addWMS(){

Modified: branches/2.5/http/javascripts/mod_addWMSfromList.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromList.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_addWMSfromList.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,10 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
-
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -63,9 +60,6 @@
 <body onload='window.focus()'>
 <?php
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
 require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
 
 $fieldHeight = 20;

Modified: branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_addWMSfromfilteredList.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,9 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -180,9 +178,6 @@
 <body onLoad="window.focus();setButtons('<?php echo $wms_show;?>','<?php echo $show_gui_configured_wms;?>','<?php echo $show_group_wms;?>','<?php echo $show_gui_wms;?>')">
 
 <?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
 require_once(dirname(__FILE__)."/../classes/class_wms.php"); 
 require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
 

Modified: branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_addWMSfromfilteredListDB.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,7 +17,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@@ -63,9 +62,6 @@
 // -->
 </script>
 <?php
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
 include '../include/dyn_css.php';
 ?>
 </head>

Modified: branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,8 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Modified: branches/2.5/http/javascripts/mod_add_vendorspecific.php
===================================================================
--- branches/2.5/http/javascripts/mod_add_vendorspecific.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_add_vendorspecific.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,6 +18,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 mb_registerVendorSpecific("mod_vs_init()");
 function mod_vs_init(){   

Modified: branches/2.5/http/javascripts/mod_back.php
===================================================================
--- branches/2.5/http/javascripts/mod_back.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_back.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,21 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'back' 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 = mb_split(",",$row["e_target"]);
-	$cnt++;
-}
-if($cnt > 1){ echo "alert('back: ID not unique!');";}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
 echo "var mod_back_map = '".$e_target[0]."';";
 echo "var mod_back_overview = '".$e_target[1]."';";
 

Modified: branches/2.5/http/javascripts/mod_center1.php
===================================================================
--- branches/2.5/http/javascripts/mod_center1.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_center1.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'center1' 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++;
-}
-if($cnt > 1){ echo "alert('center1: ID not unique!');";}
-echo "var mod_center_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_center_target = '".$e_target[0]."';";
 ?>
 
 var mod_center_elName = "center1";

Modified: branches/2.5/http/javascripts/mod_coords.php
===================================================================
--- branches/2.5/http/javascripts/mod_coords.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_coords.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,22 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords' 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++;
-}
-if($cnt > 1){ echo "alert('showCoords ID not unique!');";}
-echo "var mod_showCoords_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_showCoords_target = '".$e_target[0]."';";
 ?>
 
 var mod_showCoords_win = null;

Modified: branches/2.5/http/javascripts/mod_coords_div.php
===================================================================
--- branches/2.5/http/javascripts/mod_coords_div.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_coords_div.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,23 +16,9 @@
 # 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.
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords_div' 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++;
-}
-if($cnt > 1){ echo "alert('showCoords_div ID not unique!');";}
-echo "var mod_showCoords_div_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_showCoords_div_target = '".$e_target[0]."';";
 ?>
 
 var mod_showCoords_div_win = null;

Modified: branches/2.5/http/javascripts/mod_copyright.php
===================================================================
--- branches/2.5/http/javascripts/mod_copyright.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_copyright.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'copyright';
-$gui_id = $_REQUEST["gui_id"];
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include '../include/dyn_js.php';
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'copyright' 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('copyright: ID not unique!');";}
-echo "var mod_copyright_target = '".$e_target."';";
+echo "var mod_copyright_target = '".$e_target[0]."';";
 ?>
 try{
 	if (mod_copyright_text){}

Modified: branches/2.5/http/javascripts/mod_dependentDiv.php
===================================================================
--- branches/2.5/http/javascripts/mod_dependentDiv.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_dependentDiv.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'dependentDiv';
-$gui_id = $_REQUEST["gui_id"];
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include '../include/dyn_js.php';
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dependentDiv' 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('dependentDiv: ID not unique!');";}
-echo "var mod_dependentDiv_target = '".$e_target."';";
+echo "var mod_dependentDiv_target = '".$e_target[0]."';";
 ?>
 
 try{

Modified: branches/2.5/http/javascripts/mod_dependentIframe.php
===================================================================
--- branches/2.5/http/javascripts/mod_dependentIframe.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_dependentIframe.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,21 +17,8 @@
 # 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(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dependentIframe' 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('dependentIframe: ID not unique!');";}
-echo "var mod_dependentIframe_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_dependentIframe_target = '".$e_target[0]."';";
 ?>
 mod_dependentIframe_offsetLeft = 10;
 mod_dependentIframe_offsetTop = 10;

Modified: branches/2.5/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.5/http/javascripts/mod_digitize_tab.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_digitize_tab.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,17 +17,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
-import_request_variables("PG");
 require_once(dirname(__FILE__) . "/../php/mb_validateSession.php");
-require_once(dirname(__FILE__) . "/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-?>
 
+?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-	
 <html>
 <head>
 <meta http-equiv="cache-control" content="no-cache">
@@ -41,20 +34,6 @@
 $digitize_conf_filename = "digitize_default.conf";
 include '../include/dyn_css.php';
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'digitize' 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 = explode(",",$row["e_target"]);
-	$cnt++;
-}
-if($cnt > 1) echo "alert('digitize_button: ID not unique!');";
-
 echo "<script language='JavaScript'>";
 echo "var mod_digitize_target = '".$e_target[0]."';";
 echo "var mod_digitize_frame = '".$e_target[1]."';";

Modified: branches/2.5/http/javascripts/mod_displayWmc.php
===================================================================
--- branches/2.5/http/javascripts/mod_displayWmc.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_displayWmc.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,34 +16,33 @@
 # 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.
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-include_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 
-	
-	$wmc_id = $_GET["wmc_id"];
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
-	if ($wmc_id){
-		require_once(dirname(__FILE__)."/../classes/class_administration.php");
-		$admin = new administration();
-		$wmc_gml = $admin->getWmcById($wmc_id);
+$wmc_id = $_GET["wmc_id"];
 
-		if ($wmc_gml){
-			//Display WMC
+if ($wmc_id){
+	require_once(dirname(__FILE__)."/../classes/class_administration.php");
+	$admin = new administration();
+	$wmc_gml = $admin->getWmcById($wmc_id);
+
+	if ($wmc_gml){
+		//Display WMC
  
  			// if "short open tags" is activated, the xml output is interpreted
- 			// as php, because the XML begins with "<?xml "
- 			if (ini_get("short_open_tag") == 1) {
-				echo htmlentities($wmc_gml);
-				$e = new mb_warning("'Allow short open tags' is 'On' in php.ini...you might want to turn it off to allow proper WMC display.'");
- 			}
- 			else {
-				header("Content-type: application/xhtml+xml; charset=".CHARSET);
-				echo $wmc_gml;
- 			}
+		// as php, because the XML begins with "<?xml "
+		if (ini_get("short_open_tag") == 1) {
+			echo htmlentities($wmc_gml);
+			$e = new mb_warning("'Allow short open tags' is 'On' in php.ini...you might want to turn it off to allow proper WMC display.'");
 		}
-		else{
-			echo "Invalid document!";
+		else {
+			header("Content-type: application/xhtml+xml; charset=".CHARSET);
+			echo $wmc_gml;
 		}
 	}
+	else{
+		echo "Invalid document!";
+	}
+}
 ?>
 

Modified: branches/2.5/http/javascripts/mod_dragMapSize.php
===================================================================
--- branches/2.5/http/javascripts/mod_dragMapSize.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_dragMapSize.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,8 @@
 # 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(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dragMapSize' 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++;
-}
-echo "var mod_dragMapSize_target = '".$e_target."';";
-if($cnt > 1){
-	echo "alert('dragMapSize: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_dragMapSize_target = '".$e_target[0]."';";
 ?>
 var mod_dagMapSize_offset  = 15;
 var mod_dagMapSize_active  = false;

Modified: branches/2.5/http/javascripts/mod_dynamicOverview.php
===================================================================
--- branches/2.5/http/javascripts/mod_dynamicOverview.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_dynamicOverview.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,23 +18,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'dynamicOverview';
-$gui_id = $_REQUEST["gui_id"];
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include '../include/dyn_js.php';
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'dynamicOverview' 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('dynamicOverview: ID not unique!');";}
-echo "var mod_dynamicOverview_target = '".$e_target."';";
+echo "var mod_dynamicOverview_target = '".$e_target[0]."';";
 
 ?>
 /*

Modified: branches/2.5/http/javascripts/mod_embedded_legend.php
===================================================================
--- branches/2.5/http/javascripts/mod_embedded_legend.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_embedded_legend.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,8 +16,8 @@
 # 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.
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -31,10 +31,6 @@
 <title>Legend</title>
 <?php
 
-$gui_id = $_SESSION["mb_user_gui"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
 include_once '../include/dyn_css.php';
 
 $sql = "SELECT DISTINCT e_target, e_width, e_height FROM gui_element WHERE e_id = 'legend_embedded' AND fkey_gui_id = $1";

Modified: branches/2.5/http/javascripts/mod_export_image.php
===================================================================
--- branches/2.5/http/javascripts/mod_export_image.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_export_image.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,9 +16,9 @@
 # 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.
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
 
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -52,8 +52,6 @@
 /**********************************/
 include(dirname(__FILE__)."/../../conf/print.conf");
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
 $sql = "SELECT * from gui_element WHERE fkey_gui_id = '".$_SESSION["mb_user_gui"]."' AND e_id = $1";
 $v = array($mb_module_id);
 $t = array('s');
@@ -192,7 +190,7 @@
 	//disablePrinting();
 	//}
 	//else{
-	//   alert("Das Format ist noch nicht ausgewählt.");
+	//   alert("Das Format ist noch nicht ausgew�hlt.");
 	//}   
 	// window.opener.mod_back_set();
 }
@@ -210,7 +208,7 @@
 	<table border='0'>
 	<tr>   
 	<td  class="text">
-		Vergrößerungsfaktor
+		Vergr��erungsfaktor
 	</td>
 	</tr>
 	<tr>

Modified: branches/2.5/http/javascripts/mod_featureInfo.php
===================================================================
--- branches/2.5/http/javascripts/mod_featureInfo.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_featureInfo.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,27 +17,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'featureInfo1' 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++;
-}
-if($cnt > 1){ echo "alert('featureInfo1: ID not unique!');";}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 var mod_featureInfo_elName = "featureInfo1";
 var mod_featureInfo_frameName = "";
-var mod_featureInfo_target = "<?php echo $e_target; ?>";
+var mod_featureInfo_target = "<?php echo $e_target[0]; ?>";
 
 var mod_featureInfo_img_on = new Image(); mod_featureInfo_img_on.src =  "<?php  echo preg_replace("/_off/","_on",$e_src);  ?>";
 var mod_featureInfo_img_off = new Image(); mod_featureInfo_img_off.src ="<?php  echo $e_src;  ?>";

Modified: branches/2.5/http/javascripts/mod_featureInfoTunnel.php
===================================================================
--- branches/2.5/http/javascripts/mod_featureInfoTunnel.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_featureInfoTunnel.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,26 +17,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'featureInfoTunnel' 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++;
-}
-if($cnt > 1){ echo "alert('featureInfoTunnel: ID not unique!');";}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 var mod_featureInfoTunnel_elName = "featureInfoTunnel";
 var mod_featureInfoTunnel_frameName = "";
-var mod_featureInfoTunnel_target = "<?php echo $e_target; ?>";
+var mod_featureInfoTunnel_target = "<?php echo $e_target[0]; ?>";
 
 var mod_featureInfoTunnel_img_on = new Image(); mod_featureInfoTunnel_img_on.src =  "<?php  echo preg_replace("/_off/","_on",$e_src);  ?>";
 var mod_featureInfoTunnel_img_off = new Image(); mod_featureInfoTunnel_img_off.src ="<?php  echo $e_src;  ?>";

Modified: branches/2.5/http/javascripts/mod_forward.php
===================================================================
--- branches/2.5/http/javascripts/mod_forward.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_forward.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,33 +17,18 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'forward' 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 = mb_split(",",$row["e_target"]);
-	$cnt++;
-}
-if($cnt > 1){
-	echo "alert('forward: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 echo "var mod_forward_map = '".$e_target[0]."';";
 echo "var mod_forward_overview = '".$e_target[1]."';";
 
 ?>
 var mb_MapFutureObj = new Array();
-var mod_forward_img_off = new Image(); mod_forward_img_off.src = "<?php  echo preg_replace("/_off_disabled/","_off",$e_src);  ?>";
-var mod_forward_img_off_disabled = new Image(); mod_forward_img_off_disabled.src = "<?php  echo $e_src;  ?>";
-var mod_forward_img_over = new Image(); mod_forward_img_over.src = "<?php  echo preg_replace("/_off_disabled/","_over",$e_src);  ?>";
+var mod_forward_img_off = new Image(); 
+mod_forward_img_off.src = "<?php  echo preg_replace("/_off_disabled/","_off",$e_src);?>";
+var mod_forward_img_off_disabled = new Image(); 
+mod_forward_img_off_disabled.src = "<?php  echo $e_src;  ?>";
+var mod_forward_img_over = new Image(); 
+mod_forward_img_over.src = "<?php  echo preg_replace("/_off_disabled/","_over",$e_src);?>";
 var mod_forward_img_previous = mod_forward_img_off_disabled.src;
 var mod_forward_cnt = 0;
 var mod_forward_hist_cnt = 0;

Modified: branches/2.5/http/javascripts/mod_gazetteerSQL_client.php
===================================================================
--- branches/2.5/http/javascripts/mod_gazetteerSQL_client.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_gazetteerSQL_client.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -1,10 +1,5 @@
 <?php
-session_start();
 require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$e_id = $_REQUEST["elementID"];
-$e_target = explode(",", $_REQUEST["e_target"]);
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>

Modified: branches/2.5/http/javascripts/mod_getArea.php
===================================================================
--- branches/2.5/http/javascripts/mod_getArea.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_getArea.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'getArea' 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('copyright: ID not unique!');";}
-echo "var mod_getArea_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_getArea_target = '".$e_target[0]."';";
 ?>
 var mod_getArea_img = new Image();
 mod_getArea_img.src = "../img/button_gray/getArea_off.gif";

Modified: branches/2.5/http/javascripts/mod_help.php
===================================================================
--- branches/2.5/http/javascripts/mod_help.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_help.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-$gui_id = $_REQUEST["gui_id"];
-
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'help' 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"];
-   $cnt++;
-}
-$e_id_css = 'help';
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__)."/../include/dyn_js.php");
-if($cnt > 1){ echo "alert('help: ID not unique!');";}
 ?>
 try{if(mod_help_color){}}catch(e){mod_help_color = '#cc33cc';}
 try{if(mod_help_thickness){}}catch(e){mod_help_color = 3;}

Modified: branches/2.5/http/javascripts/mod_highlightPOI.php
===================================================================
--- branches/2.5/http/javascripts/mod_highlightPOI.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_highlightPOI.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,33 +17,10 @@
 # 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"];
-include(dirname(__FILE__) . "/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'highlightPOI' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
+echo "var mod_highlightPOI_target = '".$e_target[0]."';";
 
-/* Mapbender version lower 2.4
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'highlightPOI' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
-$cnt = 0;
-*/
-
-while($row = db_fetch_array($res)){ 
-	$e_target = $row["e_target"];
-	$cnt++;
-}
-if($cnt > 1){
-	echo "alert('highlightPOI: ID not unique!');";
-}
-echo "var mod_highlightPOI_target = '".$e_target."';";
-
-$e_id_css = 'highlightPOI';
 include('../include/dyn_js.php');
 
 ?>
@@ -158,7 +135,4 @@
     tagSource += "</div>";
   }
   writeTag(mod_highlightPOI_target, "permanent", tagSource);
-}
-
-
-
+}
\ No newline at end of file

Modified: branches/2.5/http/javascripts/mod_home.php
===================================================================
--- branches/2.5/http/javascripts/mod_home.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_home.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,7 +18,7 @@
 ?>
 function mod_home_init(){
 <?php
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 echo "var url = '".LOGIN."';";
 echo "var name = '".urlencode($_SESSION["mb_user_name"])."';";
 echo "var pw = '".$_SESSION["mb_user_password"]."';";

Modified: branches/2.5/http/javascripts/mod_initWmc.php
===================================================================
--- branches/2.5/http/javascripts/mod_initWmc.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_initWmc.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -1,33 +1,19 @@
 <?php
-session_start();
-if ($_SESSION['mb_myWmc'] && $_SESSION['mb_myWmc_action'] && in_array($_SESSION['mb_myWmc_action'], array("load", "merge", "append"))) {
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__) . "/../classes/class_wmc.php");
+require_once(dirname(__FILE__) . "/../classes/class_kml.php");
+require_once(dirname(__FILE__) . "/../classes/class_administration.php");
+
+if ($_SESSION['mb_myWmc'] && $_SESSION['mb_myWmc_action'] && 
+	in_array($_SESSION['mb_myWmc_action'], 
+	array("load", "merge", "append"))) {
+	
 	$action = $_SESSION['mb_myWmc_action'];
 	$wmc_id = $_SESSION['mb_myWmc'];
 }
 $user = $_SESSION['mb_user_id'];
 $meetingPointId = $_SESSION['mb_myKml'];
 
-require_once(dirname(__FILE__) . "/../classes/class_wmc.php");
-require_once(dirname(__FILE__) . "/../classes/class_kml.php");
-require_once(dirname(__FILE__) . "/../classes/class_administration.php");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'initWmc' 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 = explode(",",$row["e_target"]);
-	$cnt++;
-}
-if ($cnt > 1 || $cnt == 0){
-	echo "alert('initWMC: ID not unique!');";
-}
-
 $x = false;
 $y = false;
 $icon = false;
@@ -36,7 +22,6 @@
 
 $adm = new administration();
 
-
 //KML
 if (isset($meetingPointId)) {
 	$sql = "SELECT * FROM mb_meetingpoint WHERE mb_meetingpoint_id = $1";

Modified: branches/2.5/http/javascripts/mod_insertKmlIntoDb.php
===================================================================
--- branches/2.5/http/javascripts/mod_insertKmlIntoDb.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_insertKmlIntoDb.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,10 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-include(dirname(__FILE__) . "/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__) . "/../classes/class_kml.php");
-session_start();
-$gui_id = $_REQUEST["gui_id"];
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
@@ -39,12 +37,7 @@
 <?php
 echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
 ?>
-<title>MB2 - <?php  echo  $_REQUEST["gui_id"];?></title>
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
+<title>MB2 - <?php  echo  $gui_id;?></title>
 </head>
 <body>
 <?php

Modified: branches/2.5/http/javascripts/mod_insertLayerPreviewIntoDb.php
===================================================================
--- branches/2.5/http/javascripts/mod_insertLayerPreviewIntoDb.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_insertLayerPreviewIntoDb.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,12 +17,10 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__)."/../../conf/geoportal.conf");
 require_once(dirname(__FILE__)."/../classes/class_administration.php");
 require_once(dirname(__FILE__)."/../classes/class_connector.php");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 
 function savePreview($fileName, $fileContent) {
 	if (strlen($fileContent) > 0) {
@@ -46,12 +44,6 @@
 	return false;
 }
 
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
 if ($_POST["data"]) {
 	$d = explode("____", $_POST["data"]);	
 

Modified: branches/2.5/http/javascripts/mod_key.php
===================================================================
--- branches/2.5/http/javascripts/mod_key.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_key.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,21 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'keyHandler' 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('keyHandler: ID not unique!');";}
-echo "var mod_key_map = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_key_map = '".$e_target[0]."';";
 
 $sql = "SELECT e_id,e_element FROM gui_element WHERE (e_element = 'body' or e_element = 'iframe') AND fkey_gui_id = $1 AND e_public = 1";
 $v = array($gui_id);

Modified: branches/2.5/http/javascripts/mod_legend.php
===================================================================
--- branches/2.5/http/javascripts/mod_legend.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_legend.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,11 +16,8 @@
 # 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.
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 

Modified: branches/2.5/http/javascripts/mod_loadKML.php
===================================================================
--- branches/2.5/http/javascripts/mod_loadKML.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_loadKML.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,13 +17,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../classes/class_kml.php");
 
-$gui_id = $_REQUEST["gui_id"];
+echo "var loadKmlTarget = '".$e_target[0]."';\n";
 
-echo "var loadKmlTarget = '".$e_target."';\n";
-
 ?>
 var kmlHasLoaded = new MapbenderEvent();
 
@@ -35,7 +33,7 @@
 loadKmlImgOver.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 var mpbn_loadKml = function () {
-	windowKml = window.open("../php/mb_listKMLs.php?<?php echo SID;?>","displayKml","width=500, height=600, scrollbars=yes, dependent=yes");
+	windowKml = window.open("../php/mb_listKMLs.php?<?php echo $urlParameters;?>","displayKml","width=500, height=600, scrollbars=yes, dependent=yes");
 };
 
 var mpbn_loadKmlInit = function (obj) {

Modified: branches/2.5/http/javascripts/mod_loadwmc.php
===================================================================
--- branches/2.5/http/javascripts/mod_loadwmc.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_loadwmc.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,30 +17,12 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../classes/class_wmc.php");
 
-$gui_id = $_REQUEST["gui_id"];
-
-$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 = $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++;
-}
-if($cnt > 1){
-	echo "alert('loadwmc: ID not unique!');";
-}
-$e_id_css = "loadwmc";
 include(dirname(__FILE__) . "/../include/dyn_js.php");
 
-echo "mod_loadwmc_target = '".$e_target."';";
+echo "mod_loadwmc_target = '".$e_target[0]."';";
 
 /*
 // this may be added at a later stage

Modified: branches/2.5/http/javascripts/mod_log.php
===================================================================
--- branches/2.5/http/javascripts/mod_log.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_log.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -1,3 +1,6 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
 mb_registerInitFunctions("mb_log_init()");
 function mb_log_init(){
 	mb_log = "mb_log_set";
@@ -4,6 +7,7 @@
 }
 try{if(logtype){}}catch(e){logtype="";}
 function mb_log_set(req, time_client){
-	mb_ajax_post('../php/mod_log.php'+"?<?php echo SID; ?>&gui_id=<?php echo $gui_id;?>&elementID=<?php echo $e_id;?>&req=" + escape(req)+ "&time_client=" + time_client, {req:req, time:time_client});
+	var url = '<?php echo $self; ?>&req=" + escape(req) + "&time_client=" + time_client;
+	mb_ajax_post(url, {req:req, time:time_client});
 	return true;
 }
\ No newline at end of file

Modified: branches/2.5/http/javascripts/mod_measure.php
===================================================================
--- branches/2.5/http/javascripts/mod_measure.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_measure.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,25 +17,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'measure' 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++;
-}
-if($cnt > 1){
-	echo "alert('measure: ID not unique!');";
-}
-echo "var mod_measure_target = '".$e_target."';";
+echo "var mod_measure_target = '".$e_target[0]."';";
 ?>
 var mod_measure_color1 = "white";
 var mod_measure_color2 = "black";

Modified: branches/2.5/http/javascripts/mod_navFrame.php
===================================================================
--- branches/2.5/http/javascripts/mod_navFrame.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_navFrame.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,26 +17,10 @@
 # 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(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include '../include/dyn_js.php';
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target,e_src FROM gui_element WHERE e_id = 'navFrame' 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++;
-}
-echo "var mod_navFrame_target = '".$e_target."';";
-if($cnt > 1){
-	echo "alert('navFrame: ID not unique!');";
-}
-echo "var mod_navFrame_src = '".db_result($res,0,"e_src")."';";
+echo "var mod_navFrame_target = '".$e_target[0]."';";
+echo "var mod_navFrame_src = '".$e_src."';";
 ?>
 
 try{

Modified: branches/2.5/http/javascripts/mod_owsproxy.php
===================================================================
--- branches/2.5/http/javascripts/mod_owsproxy.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_owsproxy.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,8 +16,6 @@
 # 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.
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
 
 include(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__)."/../classes/class_administration.php");

Modified: branches/2.5/http/javascripts/mod_pan.php
===================================================================
--- branches/2.5/http/javascripts/mod_pan.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_pan.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'pan1' 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++;
-}
-if($cnt > 1){
-	echo "alert('pan1: ID not unique!');";
-}
-echo "var mod_pan_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_pan_target = '".$e_target[0]."';";
 ?>
 var mod_pan_elName = "pan1";
 var mod_pan_frameName = "";

Modified: branches/2.5/http/javascripts/mod_perimeter.php
===================================================================
--- branches/2.5/http/javascripts/mod_perimeter.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_perimeter.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,30 +17,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'perimeter' 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++;
-}
-if($cnt > 1){
-	echo "alert('perimeter: ID not unique!');";
-}
-$e_id_css = 'perimeter';
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__).'/../include/dyn_js.php');
 ?>
 
-var mod_perimeter_target = "<?php echo $e_target; ?>";
+var mod_perimeter_target = "<?php echo $e_target[0]; ?>";
 mb_registerInitFunctions("mod_perimeter_prepare()");
 mb_registerSubFunctions("mod_perimeter_draw()");
 mb_registerPanSubElement("perimeter");

Modified: branches/2.5/http/javascripts/mod_poi.php
===================================================================
--- branches/2.5/http/javascripts/mod_poi.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_poi.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -1,9 +1,5 @@
 <?php
-require_once(dirname(__FILE__) . "/../../conf/mapbender.conf");
-session_start();
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -17,8 +13,6 @@
 <meta name="DC.Rights" content="CCGIS GbR, Bonn">
 <title>Suche</title>
 <?
-	$gui_id = $_SESSION["mb_user_gui"];
-	$e_id_css = 'poi';
 	include_once(dirname(__FILE__) . "/../include/dyn_css.php");
 ?>
 <style type="text/css">

Modified: branches/2.5/http/javascripts/mod_print1.php
===================================================================
--- branches/2.5/http/javascripts/mod_print1.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_print1.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,9 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__)."/../../conf/print.conf");
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -52,8 +51,6 @@
 $mb_module_id = "print1";
 /**********************************/
 
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
 $sql = "SELECT * from gui_element WHERE fkey_gui_id = '".$_SESSION["mb_user_gui"]."' AND e_id = $1";
 $v = array($mb_module_id);
 $t = array('s');
@@ -193,7 +190,7 @@
 		disablePrinting();
 	}
 	else{
-		alert("Das Format ist noch nicht ausgewählt.");
+		alert("Das Format ist noch nicht ausgew�hlt.");
 	}   
 		window.opener.mod_back_set();
 }

Modified: branches/2.5/http/javascripts/mod_reload.php
===================================================================
--- branches/2.5/http/javascripts/mod_reload.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_reload.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,26 +17,12 @@
 # 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(dirname(__FILE__)."/../../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 = 'reload' 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++;
-}
-if($cnt > 1){
-	echo "alert('reload: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
-var mod_reload_img = new Image(); mod_reload_img.src = "<?php  echo $e_src;  ?>";
-var mod_reload_img_over = new Image(); mod_reload_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+var mod_reload_img = new Image(); 
+mod_reload_img.src = "<?php  echo $e_src;  ?>";
+var mod_reload_img_over = new Image(); 
+mod_reload_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 function mod_reload(){
     location.reload();

Modified: branches/2.5/http/javascripts/mod_renderGML.php
===================================================================
--- branches/2.5/http/javascripts/mod_renderGML.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_renderGML.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -16,21 +16,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../../conf/geoportal.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../classes/class_gml2.php");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 
-$gui_id = $_SESSION["mb_user_gui"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'renderGML' AND fkey_gui_id = $1 LIMIT 1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$row = db_fetch_array($res);
-$e_target = explode(",",$row[0]);
-
 $gml_string = $_SESSION["GML"];
 
 if ($gml_string) {
@@ -59,7 +47,4 @@
 else {
 	$e = new mb_notice("renderGML: no GML.");
 }
-
-
-
 ?>
\ No newline at end of file

Modified: branches/2.5/http/javascripts/mod_repaint.php
===================================================================
--- branches/2.5/http/javascripts/mod_repaint.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_repaint.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,29 +17,15 @@
 # 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(dirname(__FILE__)."/../../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 = 'repaint' 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++;
-}
-if($cnt > 1){
-	echo "alert('repaint: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
-var mod_repaint_img = new Image(); mod_repaint_img.src = "<?php  echo $e_src;  ?>";
-var mod_repaint_img_over = new Image(); mod_repaint_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+var mod_repaint_img = new Image(); 
+mod_repaint_img.src = "<?php  echo $e_src;  ?>";
+var mod_repaint_img_over = new Image(); 
+mod_repaint_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 function mod_repaint(){
-	zoom("<?php  echo $e_target;  ?>", true,0.999);
+	zoom("<?php  echo $e_target[0];  ?>", true,0.999);
 }
 function mod_repaint_init(obj){
 	document.getElementById("repaint").src = mod_repaint_img_over.src;

Modified: branches/2.5/http/javascripts/mod_resize_mapsize.php
===================================================================
--- branches/2.5/http/javascripts/mod_resize_mapsize.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_resize_mapsize.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -20,12 +20,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$e_id_css = "resizeMapsize";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__) . "/../include/dyn_js.php");
 
 $sqltarget = "SELECT e_target FROM gui_element WHERE e_id = 'resizeMapsize' AND fkey_gui_id = $1";

Modified: branches/2.5/http/javascripts/mod_sandclock.php
===================================================================
--- branches/2.5/http/javascripts/mod_sandclock.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_sandclock.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'sandclock' 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('sandclock: ID not unique!');";
-}
-echo "var mod_sandclock_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_sandclock_target = '".$e_target[0]."';";
 include '../include/dyn_js.php';
 ?>
 try{

Modified: branches/2.5/http/javascripts/mod_sandclock2.php
===================================================================
--- branches/2.5/http/javascripts/mod_sandclock2.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_sandclock2.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'sandclock2' 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 = db_result($res,0,"e_target");
-	$cnt++;
-}
-if($cnt > 1){
-	echo "alert('sandclock2: ID not unique!');";
-}
-echo "var mod_sandclock_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_sandclock_target = '".$e_target[0]."';";
 ?>
 var mod_sandclock_maxWait = 1000 * 60;
 var mod_sandclock_minWait = 1000 * 0;

Modified: branches/2.5/http/javascripts/mod_saveLayerPreview.php
===================================================================
--- branches/2.5/http/javascripts/mod_saveLayerPreview.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_saveLayerPreview.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,29 +17,10 @@
 # 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(dirname(__FILE__) . "/../../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 = 'savewmc' 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++;
-}
-if($cnt > 1){
-	echo "alert('savewmc: ID not unique!');";
-}
-
-$e_id_css = "saveLayerPreview";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__) . "/../include/dyn_js.php");
 
-echo "mod_savewmc_target = '".$e_target."';";
+echo "mod_savewmc_target = '".$e_target[0]."';";
 ?>
 var mod_saveLayerPreview_img = new Image(); mod_saveLayerPreview_img.src = "<?php  echo $e_src;  ?>";
 

Modified: branches/2.5/http/javascripts/mod_saveWmcKml.php
===================================================================
--- branches/2.5/http/javascripts/mod_saveWmcKml.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_saveWmcKml.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,27 +17,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/mod_savewmc.php");
-$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 = $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++;
-}
-if($cnt > 1){
-	echo "alert('savewmc: ID not unique!');";
-}
-
-echo "mod_savewmc_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "mod_savewmc_target = '".$e_target[0]."';";
 ?>
 
 var mod_savewmc_img = new Image(); mod_savewmc_img.src = "<?php  echo $e_src;  ?>";

Modified: branches/2.5/http/javascripts/mod_savewmc.php
===================================================================
--- branches/2.5/http/javascripts/mod_savewmc.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_savewmc.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,28 +17,10 @@
 # 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(dirname(__FILE__) . "/../../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 = 'savewmc' 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++;
-}
-if($cnt > 1){
-	echo "alert('savewmc: ID not unique!');";
-}
-
-$e_id_css = "savewmc";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include(dirname(__FILE__) . "/../include/dyn_js.php");
 
-echo "mod_savewmc_target = '".$e_target."';";
+echo "mod_savewmc_target = '".$e_target[0]."';";
 ?>
 function setOnUnload() {
 	if (ie) {
@@ -55,7 +37,8 @@
 	mb_registerInitFunctions('setOnUnload()');
 }
 
-var mod_savewmc_img = new Image(); mod_savewmc_img.src = "<?php  echo $e_src;  ?>";
+var mod_savewmc_img = new Image(); 
+mod_savewmc_img.src = "<?php  echo $e_src;  ?>";
 //var mod_savewmc_img_over = new Image(); mod_savewmc_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 function mod_savewmc_session(){

Modified: branches/2.5/http/javascripts/mod_scaleHint.php
===================================================================
--- branches/2.5/http/javascripts/mod_scaleHint.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_scaleHint.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,29 +17,12 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT  e_target FROM gui_element WHERE e_id = 'setScaleHint' 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('mod_scaleHint: ID not unique!');";
-}
-$params = mb_split(",",$e_target);
+echo "var mod_scaleHint_target = '".$e_target[0]."';";
+echo "var mod_scaleHint_min = '".$e_target[1]."';";
+echo "var mod_scaleHint_max = '".$e_target[2]."';"; 
 
-echo "var mod_scaleHint_target = '".$params[0]."';";
-echo "var mod_scaleHint_min = '".$params[1]."';";
-echo "var mod_scaleHint_max = '".$params[2]."';"; 
-
 ?>
 
 mb_registerPreFunctions("mod_scaleHint_init(frameName)");

Modified: branches/2.5/http/javascripts/mod_scaleSel.php
===================================================================
--- branches/2.5/http/javascripts/mod_scaleSel.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_scaleSel.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'scaleSelect' 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++;
-}
-echo "var mod_scaleSelect_target = '".$e_target."';";
-if($cnt > 1){
-	echo "alert('scaleSelect: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_scaleSelect_target = '".$e_target[0]."';";
 ?>
 mb_registerSubFunctions("mod_scaleSelect_val(frameName)");
 function mod_scaleSelect(obj){

Modified: branches/2.5/http/javascripts/mod_scaleText.php
===================================================================
--- branches/2.5/http/javascripts/mod_scaleText.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_scaleText.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'scaleText' 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++;
-}
-echo "var mod_scaleText_target = '".$e_target."';";
-if($cnt > 1){
-	echo "alert('scaleSelect: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_scaleText_target = '".$e_target[0]."';";
 ?>
 function mod_scaleText(){
 	mod_scaleText_val(mod_scaleText_target);

Modified: branches/2.5/http/javascripts/mod_scalebar.php
===================================================================
--- branches/2.5/http/javascripts/mod_scalebar.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_scalebar.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = 'scalebar' 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('scalebar: ID not unique!');";
-}
-echo "var mod_scalebar_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_scalebar_target = '".$e_target[0]."';";
 ?>
 
 var mod_scalebar_left = 5;

Modified: branches/2.5/http/javascripts/mod_selArea.php
===================================================================
--- branches/2.5/http/javascripts/mod_selArea.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_selArea.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,31 +17,18 @@
 # 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(dirname(__FILE__)."/../../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 = $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++;
-}
-if($cnt > 1){
-	echo "alert('selArea1: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 var mod_selArea_elName = "selArea1";
 var mod_selArea_frameName = "";
-var mod_selArea_target = "<?php echo $e_target; ?>";
+var mod_selArea_target = "<?php echo $e_target[0]; ?>";
 
-var mod_selArea_img_on = new Image(); mod_selArea_img_on.src = "<?php  echo preg_replace("/_off/","_on",$e_src);  ?>";
-var mod_selArea_img_off = new Image(); mod_selArea_img_off.src = "<?php  echo $e_src;  ?>";
-var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+var mod_selArea_img_on = new Image(); 
+mod_selArea_img_on.src = "<?php  echo preg_replace("/_off/","_on",$e_src);  ?>";
+var mod_selArea_img_off = new Image(); 
+mod_selArea_img_off.src = "<?php  echo $e_src;  ?>";
+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);

Modified: branches/2.5/http/javascripts/mod_selArea1.php
===================================================================
--- branches/2.5/http/javascripts/mod_selArea1.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_selArea1.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,32 +17,18 @@
 # 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(dirname(__FILE__)."/../../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 = $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++;
-}
-if($cnt > 1){
-	echo "alert('selArea1: ID not unique!');";
-}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 var mod_selArea_elName = "selArea1";
 var mod_selArea_frameName = "";
-var mod_selArea_target = "<?php echo $e_target; ?>";
+var mod_selArea_target = "<?php echo $e_target[0]; ?>";
 
-var mod_selArea_img_on = new Image(); mod_selArea_img_on.src = "<?php  echo preg_replace("/_off/","_on",$e_src);  ?>";
-var mod_selArea_img_off = new Image(); mod_selArea_img_off.src = "<?php  echo $e_src;  ?>";
-var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+var mod_selArea_img_on = new Image(); 
+mod_selArea_img_on.src = "<?php  echo preg_replace("/_off/","_on",$e_src);  ?>";
+var mod_selArea_img_off = new Image(); 
+mod_selArea_img_off.src = "<?php  echo $e_src;  ?>";
+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);

Modified: branches/2.5/http/javascripts/mod_selectMapsize.php
===================================================================
--- branches/2.5/http/javascripts/mod_selectMapsize.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_selectMapsize.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # 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(dirname(__FILE__)."/../../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 = $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!');";
-}
-echo "var mod_selectMapsize_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_selectMapsize_target = '".$e_target[0]."';";
 ?>
 
 function mod_selectMapsize(obj){

Modified: branches/2.5/http/javascripts/mod_setBBOX1.php
===================================================================
--- branches/2.5/http/javascripts/mod_setBBOX1.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_setBBOX1.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,8 @@
 # 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"];
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setBBOX' 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('setBBOX: ID not unique!');";
-}
-echo "var mod_setBBOX_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_setBBOX_target = '".$e_target[0]."';";
 ?>
 mb_registerInitFunctions("mod_setBBOX_init()");
 function mod_setBBOX_init(){

Modified: branches/2.5/http/javascripts/mod_setBackground.php
===================================================================
--- branches/2.5/http/javascripts/mod_setBackground.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_setBackground.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,23 +17,7 @@
 # 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(dirname(__FILE__)."/../../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' 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('setBackground: ID not unique!');";
-}
-
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 if(isset($_REQUEST["wms"])){
 	$wms = $_REQUEST["wms"];
 }
@@ -41,7 +25,7 @@
 	$wms = 0;
 }
 echo "var mod_setBackground_wms = ".$wms.";";
-echo "var mod_setBackground_target = '".$e_target."';";
+echo "var mod_setBackground_target = '".$e_target[0]."';";
 ?>
 mb_registerInitFunctions("mod_setBackground_init()");
 var mod_setBackground_active = false;

Modified: branches/2.5/http/javascripts/mod_setBackground_all.php
===================================================================
--- branches/2.5/http/javascripts/mod_setBackground_all.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_setBackground_all.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,23 +18,8 @@
 # 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(dirname(__FILE__)."/../../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 = $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('setBackground_all: ID not unique!');";}
-
-echo "var mod_setBackground_all_target = '".$e_target."';";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_setBackground_all_target = '".$e_target[0]."';";
 ?>
 
 var mod_setBackground_all_wms = new Array();

Modified: branches/2.5/http/javascripts/mod_setPOI2Scale.php
===================================================================
--- branches/2.5/http/javascripts/mod_setPOI2Scale.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_setPOI2Scale.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,25 +17,8 @@
 # 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"];
-include(dirname(__FILE__) . "/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setPOI2Scale' 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('setPOI2SCale: ID not unique!');";
-}
-echo "var mod_setPOI2Scale_target = '".$e_target."';";
-$e_id_css = 'setPOI2Scale';
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_setPOI2Scale_target = '".$e_target[0]."';";
 include(dirname(__FILE__) . "/../include/dyn_js.php");
 
 ?>

Modified: branches/2.5/http/javascripts/mod_setTimeout.php
===================================================================
--- branches/2.5/http/javascripts/mod_setTimeout.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_setTimeout.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,10 +18,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'timeout';
-$gui_id = $_REQUEST["gui_id"];
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 include '../include/dyn_js.php';
 
 ?>

Modified: branches/2.5/http/javascripts/mod_state.php
===================================================================
--- branches/2.5/http/javascripts/mod_state.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_state.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,11 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-//require(dirname(__FILE__)."/mb_validateSession.php");
-$gui_id = $_SESSION["mb_user_gui"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <HTML>
 <?php

Modified: branches/2.5/http/javascripts/mod_tab.php
===================================================================
--- branches/2.5/http/javascripts/mod_tab.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_tab.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -19,11 +19,8 @@
 
 /********** Configuration*************************************************/
 
-$gui_id = $_REQUEST["gui_id"];
-$e_id_css = "tabs";
-$e_id = "tabs";
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__)."/../extensions/JSON.php");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
 include(dirname(__FILE__)."/../include/dyn_js.php");
 
 $tab_ids = array();

Modified: branches/2.5/http/javascripts/mod_tab_translation.php
===================================================================
--- branches/2.5/http/javascripts/mod_tab_translation.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_tab_translation.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -19,12 +19,8 @@
 
 /********** Configuration*************************************************/
 
-$gui_id = $_REQUEST["gui_id"];
-$e_id_css = 'tabs';
-$e_id = 'tabs';
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 require_once(dirname(__FILE__).'/../extensions/JSON.php');
-require_once(dirname(__FILE__).'/../classes/class_mb_exception.php');
-$e = new mb_exception("tab_ids");
 require_once(dirname(__FILE__).'/../include/dyn_js.php');
 
 $tab_ids = array();
@@ -44,7 +40,6 @@
 $json = new Services_JSON();
 $output = $json->encode($tab_ids);
 
-$e = new mb_exception("tab_ids" . $output);
 echo "var tab_ids = " . $output . ";";	
 
 ?>

Modified: branches/2.5/http/javascripts/mod_toggleModule.php
===================================================================
--- branches/2.5/http/javascripts/mod_toggleModule.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_toggleModule.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,24 +17,8 @@
 # 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(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'toggleModule' 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('toggleModule: ID not unique!');";
-}
-echo "var mod_toggleModule ='".$e_target."';"; 
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+echo "var mod_toggleModule ='".$e_target[0]."';"; 
 ?>
 mb_registerInitFunctions('mod_toggleModule_init()');
 function mod_toggleModule_init(){

Modified: branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_wfs_SpatialRequest.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,33 +17,13 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__) . "/../php/mb_validateSession.php");
-require_once(dirname(__FILE__) . "/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$gui_id = $_REQUEST["gui_id"];
-$e_id_css = "setSpatialRequest";
-
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 $wfs_conf_filename = "wfs_default.conf";
 include '../include/dyn_php.php';
 include(dirname(__FILE__) . "/../../conf/" . $wfs_conf_filename);
 
 include '../include/dyn_js.php';
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setSpatialRequest' 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++;
-}
-if($cnt > 1){ echo "alert('setExtRequest: ID not unique!');\n";}
-echo "var mod_wfs_spatialRequest_target = '".$e_target."';\n";
+echo "var mod_wfs_spatialRequest_target = '".$e_target[0]."';\n";
 ?>
 //element var openLinkFromSearch for opening attribute link directly onclick of searchResult entry
 try{

Modified: branches/2.5/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- branches/2.5/http/javascripts/mod_wfs_gazetteer_client.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_wfs_gazetteer_client.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -18,16 +18,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-session_start();
-$gui_id = $_SESSION["mb_user_gui"];
-
-$target = $_REQUEST["e_target"];
-$e_id_css = $_REQUEST["e_id_css"];
-
-require_once(dirname(__FILE__) . "/../../conf/mapbender.conf");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
@@ -40,7 +31,7 @@
 ?>
 <script type="text/javascript">
 <?php 
-	echo "var targetString = '" . $target . "';";
+	echo "var targetString = '" . $e_target[0] . "';";
 	echo "var wfsConfIdString = '" . $wfsConfIdString . "';";
 ?>
 

Modified: branches/2.5/http/javascripts/mod_zoomCoords.php
===================================================================
--- branches/2.5/http/javascripts/mod_zoomCoords.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_zoomCoords.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -1,9 +1,6 @@
 <?php
 #$Id$
 #$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomCoords.php,v 1.10 2006/03/09 08:57:13 uli_rothstein Exp $
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
-import_request_variables("PG");
 require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 
 ?>
@@ -67,23 +64,8 @@
 	    -->
 </style>
 <?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'zoomCoords' AND fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
-   $e_target = $row["e_target"];
-   $cnt++;
-}
-
 echo '<script type="text/javascript">';
-if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
-
-echo "var mod_zoomCoords_target = '".$e_target."';";
+echo "var mod_zoomCoords_target = '".$e_target[0]."';";
 echo "var target = mod_zoomCoords_target.split(',')";
 echo "</script>";
 ?>

Modified: branches/2.5/http/javascripts/mod_zoomFull.php
===================================================================
--- branches/2.5/http/javascripts/mod_zoomFull.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_zoomFull.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -1,27 +1,15 @@
 <?php
 #$Id$
 #$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomFull.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../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 = 'zoomFull' 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++;
-}
-if($cnt > 1){ echo "alert('zoomFull: ID not unique!');";}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
-   var mod_zoomFull_img = new Image(); mod_zoomFull_img.src = "<?php  echo $e_src;  ?>";
-   var mod_zoomFull_img_over = new Image(); mod_zoomFull_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+   var mod_zoomFull_img = new Image(); 
+   mod_zoomFull_img.src = "<?php  echo $e_src;  ?>";
+   var mod_zoomFull_img_over = new Image(); 
+   mod_zoomFull_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 function mod_zoomFull(){
-    var ind         = this.getMapObjIndexByName("<?php  echo $e_target;  ?>");		
+    var ind         = this.getMapObjIndexByName("<?php  echo $e_target[0];  ?>");		
 		var arrayThemen = new Array();
 		var arrayThemen = mb_mapObj[ind].wms[0].objLayer[0].layer_name;
 		this.Layer0     = arrayThemen;
@@ -32,7 +20,7 @@
 		//mb_mapObj[ind].epsg = "EPSG:31493";
     //alert(Layer0);
 		var arrayExt = new Array();		
-		var frameName = "<?php  echo $e_target;  ?>"
+		var frameName = "<?php  echo $e_target[0];  ?>"
 		var exts = setExtent(width,height,epsg);
 		arrayExt = exts.split(",");
 		

Modified: branches/2.5/http/javascripts/mod_zoomIn1.php
===================================================================
--- branches/2.5/http/javascripts/mod_zoomIn1.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_zoomIn1.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -17,29 +17,15 @@
 # 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(dirname(__FILE__)."/../../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 = 'zoomIn1' 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++;
-}
-if($cnt > 1){ echo "alert('zoomIn1: ID not unique!');";}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
-var mod_zoom1_img = new Image(); mod_zoom1_img.src = "<?php  echo $e_src;  ?>";
-var mod_zoom1_img_over = new Image(); mod_zoom1_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+var mod_zoom1_img = new Image(); 
+mod_zoom1_img.src = "<?php  echo $e_src;  ?>";
+var mod_zoom1_img_over = new Image(); 
+mod_zoom1_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
-
 function mod_zoomIn1(){
-	zoom("<?php  echo $e_target;  ?>", true,2.0);
+	zoom("<?php  echo $e_target[0];  ?>", true,2.0);
 }
 function mod_zoomIn1_init(obj){
 	document.getElementById("zoomIn1").src = mod_zoom1_img_over.src;

Modified: branches/2.5/http/javascripts/mod_zoomOut1.php
===================================================================
--- branches/2.5/http/javascripts/mod_zoomOut1.php	2008-02-22 15:11:53 UTC (rev 2142)
+++ branches/2.5/http/javascripts/mod_zoomOut1.php	2008-02-25 23:21:35 UTC (rev 2143)
@@ -2,28 +2,16 @@
 #$Id$
 #$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomOut1.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
 
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../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 = 'zoomOut1' 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++;
-}
-if($cnt > 1){ echo "alert('zoomOut1: ID not unique!');";}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
 ?>
-var mod_zoomOut_img = new Image(); mod_zoomOut_img.src = "<?php  echo $e_src;  ?>";
-var mod_zoomOut_img_over = new Image(); mod_zoomOut_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
+var mod_zoomOut_img = new Image(); 
+mod_zoomOut_img.src = "<?php  echo $e_src;  ?>";
+var mod_zoomOut_img_over = new Image(); 
+mod_zoomOut_img_over.src = "<?php  echo preg_replace("/_off/","_over",$e_src);  ?>";
 
 
 function mod_zoomOut1(){
-   zoom("<?php  echo $e_target;  ?>", false,2.0);
+   zoom("<?php  echo $e_target[0];  ?>", false,2.0);
 }
 function mod_zoomOut1_init(obj){
    document.getElementById("zoomOut1").src = mod_zoomOut_img_over.src;



More information about the Mapbender_commits mailing list