svn commit: r126 - trunk/mapbender/http/php

arnulf at osgeo.org arnulf at osgeo.org
Sun Apr 23 05:09:27 EDT 2006


Author: arnulf
Date: 2006-04-23 09:09:27+0000
New Revision: 126

Modified:
   trunk/mapbender/http/php/mod_zoomCoords.php   (contents, props changed)
   trunk/mapbender/http/php/nestedSets.php   (contents, props changed)

Log:
code cleaned, SVN headers added

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=126&p1=trunk/mapbender/http/php/mod_zoomCoords.php&p2=trunk/mapbender/http/php/mod_zoomCoords.php&r1=125&r2=126
==============================================================================
--- trunk/mapbender/http/php/mod_zoomCoords.php	(original)
+++ trunk/mapbender/http/php/mod_zoomCoords.php	2006-04-23 09:09:27+0000
@@ -1,15 +1,29 @@
 <?php
-/* version 2.0.0*/
-session_start();
+# $Id$
+# http://www.mapbender.org/index.php/ZoomCoords
+# Copyright (C) 2002 CCGIS 
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+session_start();
 import_request_variables("PG");
 
-
 require_once("../php/mb_validateSession.php");
 require_once("../../conf/mapbender.conf");
 ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!-- version 2.0.0 -->
 <html>
 <head>
 <meta http-equiv="cache-control" content="no-cache">
@@ -24,7 +38,6 @@
 ?>
 <style type="text/css">
 	    <!--
-
 	    body{
 	    	font-family : Arial, Helvetica, sans-serif;
 	    	font-size: 11px;
@@ -77,8 +90,8 @@
 $res = db_query($sql);
 $cnt = 0;
 while($row = db_fetch_array($res)){
-   $e_target = $row["e_target"];
-   $cnt++;
+	$e_target = $row["e_target"];
+	$cnt++;
 }
 
 echo '<script type="text/javascript">';
@@ -91,57 +104,38 @@
 <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;
-    
- /*  if(parseFloat(coordx) < 5.88 ||  parseFloat(coordx) > 15){
-      alert("Eingabe unzulässig!");
-      document.form1.X.select();
-      document.form1.X.focus();
-      valid = false; 
-      return false;
-   }
-   if(parseFloat(coordy) < 46.62 ||  parseFloat(coordy) > 55.71){
-      alert("Eingabe unzulässig!");
-      document.form1.Y.select();
-      document.form1.Y.focus();
-      valid = false;
-      return false;
-   }   */
-   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){
-  
-   x=x.replace(",",".");
-   y=y.replace(",",".");
-   
-   document.form1.X.value=x;
-   document.form1.Y.value=y;
-   
-   if (isNaN(x)==true || isNaN(y)==true){
-     
-   }
-   else{
-      parent.mb_showHighlight(target[0],x,y);
-      parent.mb_showHighlight(target[1],x,y);
-   }
+	x=x.replace(",",".");
+	y=y.replace(",",".");
+	document.form1.X.value=x;
+	document.form1.Y.value=y;
+	if (isNaN(x)==true || isNaN(y)==true){
+	}
+	else{
+		parent.mb_showHighlight(target[0],x,y);
+		parent.mb_showHighlight(target[1],x,y);
+	}
 }
 
 function hideHighlight(){
-   parent.mb_hideHighlight(target[0]);
-   parent.mb_hideHighlight(target[1]);
+	parent.mb_hideHighlight(target[0]);
+	parent.mb_hideHighlight(target[1]);
 }
 
 function setPermanentMarker(x,y){
-   parent.mod_permanentHighlight_x = parseFloat(x);
-   parent.mod_permanentHighlight_y = parseFloat(y);
+	parent.mod_permanentHighlight_x = parseFloat(x);
+	parent.mod_permanentHighlight_y = parseFloat(y);
 }
 // -->
 </script>
@@ -149,16 +143,13 @@
 <body bgcolor='#ffffff' onload=''>
 
 <?php
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-#coordinates
-   
-   #deutsche Version
-      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'>";
-      echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
-
+# needs intl'!
+	echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
+	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'>";
+	echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
 ?>
 </form>
 </body>

Modified: trunk/mapbender/http/php/nestedSets.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/nestedSets.php?view=diff&rev=126&p1=trunk/mapbender/http/php/nestedSets.php&p2=trunk/mapbender/http/php/nestedSets.php&r1=125&r2=126
==============================================================================
--- trunk/mapbender/http/php/nestedSets.php	(original)
+++ trunk/mapbender/http/php/nestedSets.php	2006-04-23 09:09:27+0000
@@ -1,6 +1,7 @@
 <?php
-# $Id: nestedSets.php,v 1.12 2006/03/09 12:09:29 uli_rothstein Exp $
-# $Header: /cvsroot/mapbender/mapbender/http/php/nestedSets.php,v 1.12 2006/03/09 12:09:29 uli_rothstein Exp $
# Copyright (C) 2002 CCGIS 
+# $Id$
+# http://www.mapbender.org/index.php/TreeGde
+# Copyright (C) 2002 CCGIS 
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,6 +16,7 @@
 # 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("../../conf/mapbender.conf");
 import_request_variables("PG");
@@ -37,17 +39,15 @@
 ?>
 
 <style type="text/css">
-   <!--
-
-   input{
-   	width: 164px;
-   }
-   body{
-   	font-family : Arial, Helvetica, sans-serif;
-      font-size: 12px;
-   }
-   
-   -->
+	<!--
+	input{
+		width: 164px;
+	}
+	body{
+		font-family : Arial, Helvetica, sans-serif;
+		font-size: 12px;
+	}
+	-->
 </style>
 </head>
 <!-- <link rel='stylesheet' type='text/css' href='administration.css'> -->
@@ -103,7 +103,8 @@
 }
 function rmWMS(obj){
 	if(obj.value == ''){
-		document.forms[0].wmsList.selectedIndex = 0;
	}
+		document.forms[0].wmsList.selectedIndex = 0;
+	}
 }
 // -->
 </script>
@@ -200,7 +201,7 @@
 ?>
 <br />
 <b>Create your own tree for your GUI. Include the element treeconfGDE to see this tree</b><br />
-Detailed infos you will find in the mapbender wiki (<a href='http://www.mapbender.org' target='_blank'>http://www.mapbender.org</a>)<br />
+Find detailed infos in the (<a href='http://www.mapbender.org/index.php/ConfTreeGde' target='_blank'>Mapbender Wiki</a>)<br />
 1. Select the GUI you want to create the new tree for <br />
 2. Select an element in the folder view<br />
 <br />
@@ -237,16 +238,14 @@
 echo "<select class='guiList' size='10' name='guiList' class='guiList'  onchange='document.forms[0].submit()'>";
 echo "<option value=''>GUI ...</option>";
 while($row = db_fetch_array($res)){
-   echo "<option value='".$row["gui_id"]."' ";
-   if(isset($guiList) && $guiList == $row["gui_id"]){
-   	echo "selected";
-   }
-   echo ">".$row["gui_name"]."</option>";
-   $cnt++;
+	echo "<option value='".$row["gui_id"]."' ";
+	if(isset($guiList) && $guiList == $row["gui_id"]){
+		echo "selected";
+	}
+	echo ">".$row["gui_name"]."</option>";
+	$cnt++;
 }
 echo "</select><br>";
-
-
 echo "<tr>";
    #echo "<td>Beschriftung:</td>";
    echo "<td>Labeling:</td>";
@@ -267,7 +266,6 @@
 		$sql .= "WHERE gui_wms.fkey_gui_id = '" . $guiList . "' ";
 		$sql .= "ORDER BY wms.wms_title";
 		$res = db_query($sql);
-		
 		$cnt = 0;
 		while($row = db_fetch_array($res)){
 			echo "<option value='".$row["fkey_wms_id"]."' ";
@@ -282,25 +280,20 @@
 	}
 	
 	else{echo "<option value=''>no gui selected</option>";}
-
 	echo"</select>";
 	echo"</td>   </tr><tr>";
 	#echo"<td>Ordner oder Ebene: </td>";
 	echo"<td>Folder or Layer: </td>";
-	
 	echo"<td>";
 	echo"<select name='layer' onchange='rmWMS(this)'>";
- 	
 	#echo"<option value=''>Ordner</option>";
 	echo"<option value=''>Folder</option>";
-
 	if(isset($wmsList) && $wmsList != ""){
 		$sql_l = "SELECT gui_layer.fkey_layer_id, layer.layer_name, layer.layer_title FROM gui_layer ";
 		$sql_l .= "LEFT JOIN layer ON gui_layer.fkey_layer_id = layer.layer_id ";
 		$sql_l .= "WHERE gui_layer.gui_layer_wms_id = " . $wmsList . " AND layer.layer_parent = '0' AND gui_layer.fkey_gui_id = '".$guiList."'";
 		$sql_l .= " ORDER BY layer.layer_title";
 		$res_l = db_query($sql_l);
-
 		$cnt = 0;
 		while($row = db_fetch_array($res_l)){
 			echo "<option value='".$row["fkey_layer_id"]."###".$row["layer_name"]."'>";
@@ -318,58 +311,54 @@
    <td>
    <select name='pos'>
 <?php
-   #echo "<option value='hinter'>hinter</option>";
-   echo "<option value='hinter'>behind</option>";
-   
-   echo "<option value='in' ";
-   if($pos == 'in'){
-   	echo "selected";
-   }
-   echo ">in</option>";
-
-   echo"</select>      </td>   </tr><tr>";
-   #echo"<td>Hinter bzw. in Element Nr.:</td>";
-   echo"<td>Insert behind or <br>in element with number:</td>";
-
-   echo "<td><input type='text' size='1' name='left' ";
-   if($left)
-   { 
-   	echo "value='".$left."'"; 
-   }
-   echo "></td>";
+	#echo "<option value='hinter'>hinter</option>";
+	echo "<option value='hinter'>behind</option>";
+	echo "<option value='in' ";
+	if($pos == 'in'){
+		echo "selected";
+	}
+	echo ">in</option>";
+	echo"</select>      </td>   </tr><tr>";
+	#echo"<td>Hinter bzw. in Element Nr.:</td>";
+	echo"<td>Insert behind or <br>in element with number:</td>";
+	echo "<td><input type='text' size='1' name='left' ";
+	if($left)
+	{ 
+		echo "value='".$left."'"; 
+	}
+	echo "></td>";
 ?>
 </tr>
 <tr>
-   <td>
-   <!--<input class='abutton' type='button' name="insert" value='einf&uuml;gen' onclick="validate('insert')"></td>
-   -->
-   <input class='abutton' type='button' name="insert" value='create new element' onclick="validate('insert')"></td>
-   <td></td>
+	<td>
+	<!--<input class='abutton' type='button' name="insert" value='einf&uuml;gen' onclick="validate('insert')"></td>
+	-->
+	<input class='abutton' type='button' name="insert" value='create new element' onclick="validate('insert')"></td>
+	<td></td>
 </tr>
 <tr>
-   <td>
-   <!--
-   <input class='abutton' type='button' name="delete" value='l&ouml;schen' onclick="validate('delete')"></td>
-   -->
-   <input class='abutton' type='button' name="delete" value='delete element' onclick="validate('delete')"></td>
-   
+	<td>
+	<!--
+	<input class='abutton' type='button' name="delete" value='l&ouml;schen' onclick="validate('delete')"></td>
+	-->
+	<input class='abutton' type='button' name="delete" value='delete element' onclick="validate('delete')"></td>
    <td></td>
 </tr>
 <tr>
-   <td>
-   <!--
-   <input class='abutton' type='button' name="update" value='&amlndern' onclick="validate('update')"></td>
-   -->
-   <input class='abutton' type='button' name="update" value='change element' onclick="validate('update')"></td>
-   <td></td>
+	<td>
+	<!--
+	<input class='abutton' type='button' name="update" value='&amlndern' onclick="validate('update')"></td>
+	-->
+	<input class='abutton' type='button' name="update" value='change element' onclick="validate('update')"></td>
+	<td></td>
 </tr>
 <tr>
-   <td>
-   <!--
-   <input class='abutton' type='button' name="update" value='Ebene verbinden' onclick="validate('add')"></td>
-   -->
-   <input class='abutton' type='button' name="update" value='join layer' onclick="validate('add')"></td>
-   <td></td>
+	<td>
+	<!--
+	<input class='abutton' type='button' name="update" value='Ebene verbinden' onclick="validate('add')"></td>
+	-->
+	<input class='abutton' type='button' name="update" value='join layer' onclick="validate('add')"></td>
+	<td></td>
 </tr>
 <input type='hidden' name="action">
 </table>




More information about the Mapbender_commits mailing list