svn commit: r702 - trunk/mapbender/http/php/mod_zoomCoords.php
astrid_emde at osgeo.org
astrid_emde at osgeo.org
Wed Jul 26 10:01:58 EDT 2006
Author: astrid_emde
Date: 2006-07-26 14:01:58+0000
New Revision: 702
Modified:
trunk/mapbender/http/php/mod_zoomCoords.php
Log:
change: db connection is opened earlier
Modified: trunk/mapbender/http/php/mod_zoomCoords.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_zoomCoords.php?view=diff&rev=702&p1=trunk/mapbender/http/php/mod_zoomCoords.php&p2=trunk/mapbender/http/php/mod_zoomCoords.php&r1=701&r2=702
==============================================================================
--- trunk/mapbender/http/php/mod_zoomCoords.php (original)
+++ trunk/mapbender/http/php/mod_zoomCoords.php 2006-07-26 14:01:58+0000
@@ -34,6 +34,9 @@
?>
<title>Zoom to Coordinate</title>
<?php
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
include '../include/dyn_css.php';
?>
<style type="text/css">
@@ -84,8 +87,7 @@
-->
</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');
@@ -106,15 +108,15 @@
<script type="text/javascript">
<!--
function zoomCoordinate(){
- var coordx = document.form1.X.value;
- var coordy = document.form1.Y.value;
- coordx = coordx.replace(",",".");
- coordy = coordy.replace(",",".");
- var valid = true;
- setPermanentMarker(coordx,coordy);
- parent.mb_hideHighlight(target[0]);
- parent.mb_hideHighlight(target[1]);
- parent.zoom(target[0],true, 1.0,coordx,coordy);
+ var coordx = document.form1.X.value;
+ var coordy = document.form1.Y.value;
+ coordx = coordx.replace(",",".");
+ coordy = coordy.replace(",",".");
+ var valid = true;
+ setPermanentMarker(coordx,coordy);
+ parent.mb_hideHighlight(target[0]);
+ parent.mb_hideHighlight(target[1]);
+ parent.zoom(target[0],true, 1.0,coordx,coordy);
}
function highlight(x, y){
@@ -147,7 +149,7 @@
<?php
# needs intl'!
echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
- echo "<span class='labelx'>Länge:</span>";
+ echo "<span class='labelx'>Länge:</span>";
echo "<span class='labely'>Breite:</span>";
echo "<input class='textx' type='text' name='X'>";
echo "<input class='texty' type='text' name='Y'>";
More information about the Mapbender_commits
mailing list