[Mapbender-commits] r7290 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sun Dec 12 07:23:34 EST 2010


Author: christoph
Date: 2010-12-12 04:23:34 -0800 (Sun, 12 Dec 2010)
New Revision: 7290

Removed:
   trunk/mapbender/http/php/mod_getStyles.php
   trunk/mapbender/http/php/mod_loadCapabilities_temp.php
   trunk/mapbender/http/php/mod_loadwms_temp.php
   trunk/mapbender/http/php/mod_printView1.php
   trunk/mapbender/http/php/mod_saveWKT.php
   trunk/mapbender/http/php/mod_treefolderAdmin.php
Log:
http://www.mapbender.org/Talk:Import_request_variables

Deleted: trunk/mapbender/http/php/mod_getStyles.php
===================================================================
--- trunk/mapbender/http/php/mod_getStyles.php	2010-12-12 12:06:52 UTC (rev 7289)
+++ trunk/mapbender/http/php/mod_getStyles.php	2010-12-12 12:23:34 UTC (rev 7290)
@@ -1,185 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-/*
- * @security_patch irv open
- */
-security_patch_log(__FILE__,__LINE__); 
-import_request_variables("PG"); 
-
-$pattern = "admin_name";
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-<title>SLD Get Styles</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
-<!-- 
-body{
-   background-color: #ffffff;
-}
-.button_del{
-   color: red;
- 
-}
-.textfield{
- 
-}
-.wmsList{
-
-   	width:200px
-} 
--->
-</style>
-<script type="text/javascript">
-<!--
-function validate(){
-	var ind = document.form1.wmsList.selectedIndex;
-
-	document.form1.getstyle.value = 1;
-	document.form1.submit();
-}
-// -->
-</script>
-</head>
-<body>
-<?php
-###delete
-if($wmsList && $getstyle == '1'){
-	
-function proxy_url($proxy_url)
-{
-   global $proxy_name,$proxy_port,$proxy_cont,$proxy_user,$proxy_pass;
-//echo $proxy_user;
-   $proxy_fp = fsockopen($proxy_name, $proxy_port) or die ("Fehler beim �ffnen der Verbindung zum Proxy");
-   if (!$proxy_fp)    {return false;}
-      $headers = "GET $proxy_url HTTP/1.0\r\nHost: $proxy_name\r\n";
-   $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($proxy_user . ':' . $proxy_pass)."\r\nConnection: Keep-Alive\r\n\r\n";
-   fputs($proxy_fp, $headers);   
-   while(!feof($proxy_fp)) 
-   {$proxy_cont .= fread($proxy_fp,4096);   
-   }
-   fclose($proxy_fp);
-   $proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n")+4);
-   return $proxy_cont;
-} 
-
-
-/* Sends an http request to www.example.com
-   with additional headers shown above */
-//$fp = fopen('http://www.example.com', 'r', false, $context);
-	
-	$style_xml = proxy_url($url) or die("Error: ". $ur . " .. no valid resource");
-	#echo "<pre>";
-	#echo $style_xml;
-	#echo "</pre>";
-	#$style_content = fread($style_xml);
-	#<ogc:PropertyName>admin_name</ogc:PropertyName><ogc:Literal>Brandenburg</ogc:Literal>
-	
-	$style_filename = "../getstyles/wms_".$wmsList.".php";
-	$style_file = fopen($style_filename,"w") or die ($style_filename." not writable!");
-	if(!is_writable($style_filename)){
-		echo $style_filename."not writable!!!<br>";
-	}
-	$cnt_line = 0;
-	fwrite($style_file, "<".chr(63)."php echo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\" ?>'; ".chr(63).">\r\n");
-	//while(!feof($style_xml)){
-		//$line = preg_replace("md5userid", "<".chr(63)."php echo ".chr(36)."_REQUEST['id']; ".chr(63).">",fgets($style_xml));
-		
-		fwrite($style_file, $style_xml);
-		#echo fgets($style_xml);
-		//$cnt_line++;
-	//}
-	#fputs($style_file, $style_content) or die ($style_filename." not writable");
-	
-	
-	@fclose($style_xml);
-	fclose($style_file);
-	#include(dirname(__FILE__)."/../../conf/www.conf");
-	$pattern = "/" . basename($login) . "/";
-	$sql = "UPDATE wms SET wms_filter = $1 WHERE wms_id = $2";
-	$v = array(preg_replace($pattern,$style_filename,$login), $wmsList);
-	$t = array("s", "i");
-	echo $sql;
-	db_prep_query($sql, $v, $t) or die("unable to change filter!");	
-}
-###
-
-$sql = "SELECT * FROM wms ORDER BY wms_title";
-$res = db_query($sql);
-$cnt = 0;
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<select class='wmsList' size='20' name='wmsList' class='wmsList' onchange='submit()'>";
-while($row = db_fetch_array($res)){
-	# getStyle - Request:
-	if($wmsList && $row["wms_id"] == $wmsList){
-		$getStyle = $row["wms_getmap"]."&VERSION=1.1.1&REQUEST=getStyles&SERVICE=WMS&LAYERS=";
-		$sql_style = "SELECT layer_name FROM layer WHERE fkey_wms_id = $1";
-		$v = array($wmsList);
-		$t = array("i");
-		$res_style = db_prep_query($sql_style, $v, $t);
-	
-		$cnt_style = 0;
-		while($row2 = db_fetch_array($res_style)){
-			if($cnt_style > 0){
-				if($cnt_style > 1){
-					$getStyle .= ",";
-				}
-				$getStyle .= $row2["layer_name"];
-			}
-			$cnt_style++;
-		}
-	}
-	echo "<option value='".$row["wms_id"]."' ";
-	if($row["wms_id"] == $wmsList){
-		echo "selected";
-	}
-	echo ">".$row["wms_title"]."</option>";
-	$cnt++;
-}
-echo "</select><br>";
-echo "<textarea class='textfield' name='url' cols='70' rows='3' wrap='virtual'>".htmlentities($getStyle,ENT_QUOTES)."</textarea><br>";
-echo "<input class='button_del' type='button' value='getStyle' onclick='validate()'><br>";
-if($style_filename){
-	$style_file = fopen($style_filename,"r");
-	while(!feof($style_file)){
-		$content = preg_replace("/</","&lt;",fgets($style_file));
-		echo preg_replace("/>/","&gt;",$content)."<br>";
-	}
-	fclose($style_file);
-}
-?>
-<input type='hidden' name='getstyle'>
-</form>
-</body>
-</html>

Deleted: trunk/mapbender/http/php/mod_loadCapabilities_temp.php
===================================================================
--- trunk/mapbender/http/php/mod_loadCapabilities_temp.php	2010-12-12 12:06:52 UTC (rev 7289)
+++ trunk/mapbender/http/php/mod_loadCapabilities_temp.php	2010-12-12 12:23:34 UTC (rev 7290)
@@ -1,99 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-/*
- * @security_patch irv open
- */
-security_patch_log(__FILE__,__LINE__); 
-import_request_variables("PG"); 
-
-require_once(dirname(__FILE__)."/mb_validateInput.php");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-<title>Load WMS Capabilities</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
-  	<!--
-  	body{
-      background-color: #fbc327;
-  		font-family: Arial, Helvetica, sans-serif;
-  		font-size : 12px;
-  		color: #808080
-  	}
-  	.list_guis{
-  		font-family: Arial, Helvetica, sans-serif;
-  		font-size : 12px;
-  		color: #808080;
-  	}
-  	a:link{
-  		font-family: Arial, Helvetica, sans-serif;
-  		font-size : 12px;
-  		text-decoration : none;
-  		color: #808080;
-  	}
-  	a:visited {
-  		font-family: Arial, Helvetica, sans-serif;
-  		text-decoration : none;
-  		color: #808080;
-  		font-size : 12px;
-  	}
-  	a:active {
-  		font-family: Arial, Helvetica, sans-serif;
-  		text-decoration : none;
-  		color: #808080;
-  		font-size : 12px;
-  	}
-  	-->
-</style>
-<script language="JavaScript">
-function validate(wert){
-			var gui_id= document.form1.gui_id.value; 
-			document.form1.action='../php/mod_loadwms_temp.php?<?php echo $urlParameters;?>';
-			document.form1.submit();
-			var main = parent.window.location;
-			main.reload();
-}
-</script>
-</head>
-<body>
-
-<?php
-echo "<form name='form1' action='" . $self . "' method='post'>";
-echo "<input type='hidden'name='gui_id' value='".$gui_id."'>";
-echo "WMS hinzuladen<br>";
-
-if (isset($xml_file)) {
-	echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
-}
-else {
-	echo"<input type='text' name='xml_file' size='50' value='http://'>";
-}
-?>
-<input type='button' name='loadCap' value='Laden' onClick='validate("guiList")'>
-</form>
-</body>
-</html>
\ No newline at end of file

Deleted: trunk/mapbender/http/php/mod_loadwms_temp.php
===================================================================
--- trunk/mapbender/http/php/mod_loadwms_temp.php	2010-12-12 12:06:52 UTC (rev 7289)
+++ trunk/mapbender/http/php/mod_loadwms_temp.php	2010-12-12 12:23:34 UTC (rev 7290)
@@ -1,30 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/mb_validateInput.php");
-require_once(dirname(__FILE__)."/../classes/class_wms.php"); 
-
-$gui_id=mb_validateInput($_REQUEST["gui_id"]);
-$xml=mb_validateInput($_REQUEST["xml_file"]);
-
-$mywms = new wms();
-$mywms->createObjFromXML($xml);      
-$mywms->writeObjInDB($gui_id);     
-?>
\ No newline at end of file

Deleted: trunk/mapbender/http/php/mod_printView1.php
===================================================================
--- trunk/mapbender/http/php/mod_printView1.php	2010-12-12 12:06:52 UTC (rev 7289)
+++ trunk/mapbender/http/php/mod_printView1.php	2010-12-12 12:23:34 UTC (rev 7290)
@@ -1,100 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-/*
- * @security_patch irv open
- */
-security_patch_log(__FILE__,__LINE__); 
-import_request_variables("PG"); 
-
-include(dirname(__FILE__)."/../../conf/print.conf");
-Mapbender::session()->set("mb_print_url",$map_url);
-Mapbender::session()->set("mb_print_resolution",$quality);
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-<title>Print Settings</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
-	<!--
-
-	.bg_header{
-		background-color: white;
-	}
-	.bg{
-		background-color: black;
-	}
-	body{
-		font-family: Arial, Helvetica, sans-serif;
-	}
-	-->
-</style>
-</head>
-<body leftmargin="0" topmargin="0"> 
-<?php
-
-$printOffset_top = intval($_REQUEST["printOffset_top"]) * $deformation;
-$printOffset_left = intval($_REQUEST["printOffset_left"]) * $deformation;
-$header_height = intval($_REQUEST["header_height"]) * $deformation;
-$map_width = intval($_REQUEST["map_width"]) * $deformation;
-$map_height = intval($_REQUEST["map_height"]) * $deformation;
-$date = date("d.m.y");
-#map
-echo "<img style='position:absolute; top:".($printOffset_top + $header_height)."px; left:".($printOffset_left+1)."px; z-index:3;' src='../extensions/ext_weldMaps.php?". SID."' width='".$map_width."' height='".$map_height."'>";
-echo "<img style='position:absolute; top:".($printOffset_top + $header_height)."px; left:".($printOffset_left+1)."px; z-index:2;' src='../img/white.gif' width='".$map_width."' height='".$map_height."'>";
-
-echo "<img class='bg' style='position: absolute; top:".($printOffset_top - 1)."px;left:".($printOffset_left-1)."px; z-index:1;width:".($map_width+3)."px; height:".($map_height +$header_height +2)."px;' src='../img/black.gif'>";
-#header
-
-
-echo "<img class='bg_header' style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left+1)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' src='../img/white.gif'>";
-
-echo "<div  style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left+1)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;'>";
-echo "<div style='position:relative;left:5px; font-weight:bold; font-size:20px;z-index:3;'>".htmlentities($printTitle, ENT_QUOTES) . "</div>";
-echo "<div style='position:relative;left:5px;z-index:3;'>Datum: ".$date . "</div>";
-echo "<div style='position:relative;left:5px;z-index:3;'>Ma�stab: 1:". htmlentities($map_scale, ENT_QUOTES) . "</div>";
-echo"</div>"; 
-
-echo "<img class='bg_header' style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left + $map_width/2+2)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' src='../img/white.gif'>";
-echo "<div style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left + $map_width/2+2)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' >";
-echo "<div style='position:relative;left:5px;z-index:3;'>". htmlentities($printComment, ENT_QUOTES) . "</div>";
-echo"</div>"; 
-
-echo "<div style='position: absolute; top:".($printOffset_top + $header_height + $map_height+5)."px;left:".($printOffset_left+2)."px; z-index:3;font-size:10px' >";
-echo htmlentities($footer, ENT_QUOTES);
-echo "</div>";
-#$myfactor = 37.81;
-#echo "<img style='position: absolute; top:".($printOffset_top + $header_height + $map_height+10)."px;left:".($printOffset_left+2)."px; '  src='../img/black.gif' height='2' width='".(10 * $myfactor)."'>"; 
-?>
-</body>
-</html>

Deleted: trunk/mapbender/http/php/mod_saveWKT.php
===================================================================
--- trunk/mapbender/http/php/mod_saveWKT.php	2010-12-12 12:06:52 UTC (rev 7289)
+++ trunk/mapbender/http/php/mod_saveWKT.php	2010-12-12 12:23:34 UTC (rev 7290)
@@ -1,254 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# 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.
-
-
-die("This script has many security issues and should not be used! Activate it at your own risk!");
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-?>
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-<title>mod_saveWKT</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-<!--
-function validate(){
-	 document.forms[0].x.value = "";
-     document.forms[0].y.value = "";
-     for(var i=0; i<window.opener.mod_measure_RX.length;i++){
-        if(i>0){ document.forms[0].x.value += ",";}
-        document.forms[0].x.value += window.opener.mod_measure_RX[i];
-     }
-     for(var i=0; i<window.opener.mod_measure_RY.length;i++){
-        if(i>0){ document.forms[0].y.value += ",";}
-        document.forms[0].y.value += window.opener.mod_measure_RY[i];
-     }
-     document.forms[0].save.value='true';
-     document.forms[0].src_epsg.value=window.opener.mod_measure_epsg.substr(5,5); //NEW!!!
-     document.forms[0].submit();
-}
-var geoType;
-function checkGeom(){
-   if(window.opener.mod_measure_RX.length == 1){
-      geoType = "POINT";
-   }
-   if(window.opener.mod_measure_RX.length > 1 && (window.opener.mod_measure_RX[0] =! window.opener.mod_measure_RX[window.opener.mod_measure_RX.length -1])){
-      geoType = "MULTILINESTRING";
-   }
-   if(window.opener.mod_measure_RX.length > 1 && (window.opener.mod_measure_RX[0] == window.opener.mod_measure_RX[window.opener.mod_measure_RX.length -1])){
-      geoType = "MULTIPOLYGON";
-   }
-   if(document.forms[0].myGeometryType.value != geoType){
-      alert("Falscher Geometrietyp!");
-   }      
-}
-// -->
-</script>
-</head>
-<!-- <body onload='checkGeom()'>  
-//NEW!!! Bei Erstaufruf ist die ausgew�hlte Tabelle (und deren Geometrie) noch nicht bekannt! 
-Deshalb zuvor eine Fehlermeldung.  Jetzt als PHP-Code, siehe if($save)   -->
-<body> 
-<?php 
-/*****************************************************************************
-personal postgresql parameters - pers�nliche Postgresql-Einstellungen    */
-$host = "localhost";
-$port = "5432";
-define("DBname", "databasename");
-$user = "username";
-$password = "password";
-//personal example: pick only certain (working-) tables, here: tables which start with "mapbender_"
-$tblmb="mapbender_%";  
-//*****************************************************************************
-
-/*
- * @security_patch irv open
- */
-security_patch_log(__FILE__,__LINE__);
-import_request_variables("P");
-
-$con_string = "host=$host port=$port dbname=DBname user=$user password=$password";
-$con = pg_connect ($con_string) or die ("Error while connecting database DBname");
-
-/*
- * @security_patch sqli done
- */
-
-$sql = "SELECT f_table_name, f_geometry_column,type,srid FROM geometry_columns 
-        where f_table_name like '".pg_escape_string($tblmb)."'"; //pick only certain tables (see above)
-//$sql = "SELECT f_table_name, f_geometry_column,type,srid FROM geometry_columns";
-$res = pg_query($con,$sql);
-$cnt = 0;
-echo "<form action='".$self."' method='POST'>";
-#echo "Selektieren: <input name='actionType' type='radio' value='select'>";
-#echo "Speichern: <input name='actionType' type='radio' value='create'><br>";
-echo "<select name='tablenames' onchange='submit()'>";
-echo "<option value=''>Bitte Tabelle ausw&auml;hlen...</option>";
-while(pg_fetch_row($res)){   
-   echo "<option value='".pg_result($res,$cnt,"f_table_name")."' ";
-   if($tablenames == pg_result($res,$cnt,"f_table_name")){
-      echo "selected";
-      $geometry = pg_result($res,$cnt,"f_geometry_column");
-      $geometryType = pg_result($res,$cnt,"type");
-      $epsg = pg_result($res,$cnt,"srid");
-   }
-   echo ">".pg_result($res,$cnt,"f_table_name")."</option>";
-   $cnt++;
-}
-echo "</select>";
-
-/*
- * @security_patch sqli done
- */
-if(isset($tablenames)){
-   $sql = "SELECT * from ".pg_escape_string($tablenames)." limit 1";
-   $res = pg_query($con,$sql);
-   $num = pg_num_fields($res);
-   
-   echo "<table>";
-   $cnt = 0;
-   for($i=0; $i<$num; $i++){
-      echo "<tr>";
-      echo "<td>".pg_fieldname($res,$i)."</td><td><input type='text' name='".pg_fieldname($res,$i)."'></td><td>".pg_fieldtype($res,$i)."</td>";
-      echo "</tr>";
-      if(!isset($str_names)){
-         $str_names = pg_fieldname($res,$i);
-      }
-      else{
-         $str_names .= ",".pg_fieldname($res,$i);
-      }
-      $cnt++;        
-   }
-   echo "</table>";
-   echo "<br>";
-   echo "<input type='button' value='save' onclick='validate()'>";
-   echo "<input type='hidden' value='' name='save'>";
-   echo "<input type='text' value='".$x."' name='x'>";  //NEW!!!
-   echo "<input type='text' value='".$y."' name='y'>";  //NEW!!!
-   echo "<input type='text' value='".$geometry."' name='myGeometry'>";
-   echo "<input type='text' value='".$geometryType."' name='myGeometryType'>";
-   echo "<input type='text' value='".$src_epsg."' name='src_epsg'>";   //NEW!!!
-   echo "<input type='text' value='".$epsg."' name='epsg'>";   
-   echo "<input name='myStrColumns' type='text' value='".$str_names."'>";   
-}
-if($save){
- $myColumns = explode(",",$myStrColumns); 
- $myX = explode(",", $x);
- $myY = explode(",", $y);
- $myxcount = count($myX);
- 
- if ($myxcount == 1) {
-	$geoType = 'POINT';
- }
- if ($myxcount > 1 && $myX[0] != $myX[$myxcount-1]) {
-	$geoType = 'MULTILINESTRING';
-    if ($geometryType == 'LINESTRING') { $geoType = 'LINESTRING'; } //NEW!! funktioniert aber nur solange, wie keine wirklichen MULTILINESTRING's digitalisiert werden
- }
- if ($myxcount > 1 && $myX[0] == $myX[$myxcount-1]) {
-	$geoType = 'MULTIPOLYGON';
-    if ($geometryType == 'POLYGON') { $geoType = 'POLYGON'; } //NEW!! funktioniert aber nur...
- }
- //NEW!!! in Tabellen vom GEOMETRY-Typ lassen sich (datensatzweise) verschiedene Geometrien abspeichern
- if ($geometryType != $geoType && $geometryType != 'GEOMETRY') { 
-	echo "<br>";
-	echo "Geometrie (".$geoType.") stimmt nicht mit der der Tabelle (".$geometryType.") �berein!";
-	die;
- }
-
- if(count(myX) != count(myY)){
-   echo "Geometrie verschl�sselt.....................";
-   die;
- }
- $sql = "INSERT INTO ".$tablenames."(";
- for($i=0; $i<count($myColumns); $i++){
-   if($i>0){
-      $sql .= ",";
-   }
-   $sql .= $myColumns[$i]; 
- }
- $sql .= ") ";
- $sql .= "VALUES (";
- for($i=0; $i<count($myColumns); $i++){
-   if($i>0){
-      $sql .= ",";
-   } 
-
-   if($myColumns[$i] == $myGeometry){
-		//NEW!!  $geoType anstelle von $geometryType, um a) auch in Tabellen mit Geometrietyp 'Geometry' abspeichern zu k�nnen
-		if ($geoType == "POINT") { 
-			$sql .= "transform(GeometryFromText('".$geoType."("; //$geoType anstelle von $geometryType s. o.
-		} elseif ($geoType == "LINESTRING") { 
-			$sql .= "transform(GeometryFromText('".$geoType."("; 
-		} elseif ($geoType == "MULTILINESTRING") { 
-			$sql .= "transform(GeometryFromText('".$geoType."(("; 
-		} elseif ($geoType == "POLYGON") { 
-			$sql .= "transform(GeometryFromText('".$geoType."(("; 
-		} elseif ($geoType == "MULTIPOLYGON") { 
-			$sql .= "transform(GeometryFromText('".$geoType."((("; 
-		}
-     	for($j=0; $j<count($myX); $j++){  
-     		if($j > 0){$sql .= ", ";}
-  	   	$sql .= $myX[$j] . " " . $myY[$j];
-     	}  	
-		if ($geoType == "POINT") {
-//			$sql .= ")))',".$src_epsg."),".$epsg.")"; //OLD!!!  so funktioniert es mit postgis Version 0.9 !!
-			$sql .= ")',".$src_epsg."),".$epsg.")"; //NEW!!! aber nur so mit 1.0.0 RC6
-			} elseif ($geoType == "LINESTRING") { //NEW!!!
-			$sql .= ")',".$src_epsg."),".$epsg.")"; 
-			} elseif ($geoType == "MULTILINESTRING") { 
-//			$sql .= "))))',".$src_epsg."),".$epsg.")";  // 0.9
-			$sql .= "))',".$src_epsg."),".$epsg.")"; // postgis 1.0.0
-			} elseif ($geoType == "POLYGON") { 
-			$sql .= "))',".$src_epsg."),".$epsg.")"; //NEW!!!
-			} elseif ($geoType == "MULTIPOLYGON") { 
-//			$sql .= ")))))',".$src_epsg."),".$epsg.")";  // 0.9
-			$sql .= ")))',".$src_epsg."),".$epsg.")"; // postgis 1.0.0
-		} 
-/* Linestrings lassen sich in MULTILINESTRING, Polygone in MULTIPOLYGON-Tabellen abspeichern, wenn gegen $geoType gepr�ft wird, ergibt sich kein Problem
-// da sich aber MULTI... nicht in Tabellen vom einfachen Typ LINESTRING bzw. POLYGON  abspeichern lassen, wurde dies oben (unelegant) abgefangen		
-		else {
-			echo "<br>Tabelle vom Typ Linestring, Polygon etc?";
-		}
-*/
-   }
-   else{
-    /*
-     * @security_patch sqli done
-     */
-      $sql .= "'".pg_escape_string($_REQUEST[$myColumns[$i]])."'";
-   }
- }
- $sql .= ")";
- #echo  $sql;
-$res = pg_query($con,$sql);
-}
-
-?>
-</form>
-</body>
-</html>

Deleted: trunk/mapbender/http/php/mod_treefolderAdmin.php
===================================================================
--- trunk/mapbender/http/php/mod_treefolderAdmin.php	2010-12-12 12:06:52 UTC (rev 7289)
+++ trunk/mapbender/http/php/mod_treefolderAdmin.php	2010-12-12 12:23:34 UTC (rev 7290)
@@ -1,563 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) see license below
-#
-# Dual License
-#
-# 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.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-/*
- * @security_patch irv open
- */
-security_patch_log(__FILE__,__LINE__); 
-import_request_variables("PG"); 
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<META NAME="Generator" CONTENT="Cosmo Create 1.0.3">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';	
-?>
-<TITLE>Treefolder Administration</TITLE>
-<STYLE TYPE="text/css"> 
-    <!-- 
-    .sitemap { 
-	    font-family:Arial,Helvetica;
-	    font-size:10pt;
-	    line-height:6pt;
-    }
-
-    body { margin-top:7px;
-           margin-left:4px;
-    }
-    a:link { text-decoration: none }
-    a:visited { text-decoration: none }
-    a:active { text-decoration: none }
-    // -->
-</STYLE>
-<SCRIPT language="JavaScript1.2">
-  <!--
-  
-  /*
-   * sitemap.js 1.31 05/02/2000
-   *  - Opera 5
-   *
-   * sitemap.js 1.3 27/11/2000
-   *  - Netscape 6
-   *
-   * sitemap.js 1.2 20/05/2000
-   *  - split array tree into arrays for each element old tree
-   *  - no mory type flag, an folder is an entry which has sons
-   *  - a folder can have an link
-   *  - while initing an default layers is shown 
-   *
-   * sitemap.js 1.1 20/10/1999
-   *  - showTree only updates and init layers new which have been really changed
-   *  - add deep to knot entry
-   *  - substitute knotDeep[ id ] w/ tree[ id2treeIndex[ id ] ].deep
-   *  - add alignment to img and a &nbsp; at the beginning of eyery line
-   *  - add a fake img for bookmarks on top panel
-   *
-   * sitemap.js 1.02 14/10/1999
-   *  - fix bug in initStyles
-   *
-   * sitemap.js 1.01 06/10/1999
-   *  - fix bug in knotDeep for Netscape 4.00-4.0.5
-   *
-   * sitemap.js 1.0 20/09/1999
-   *
-   * Javascript function for displaying hierarchic directory structures with
-   * the ability to collapse and expand directories.
-   *
-   * Copyright (c) 1999 Polzin GmbH, Duesseldorf. All Rights Reserved.
-   * Author: Lutz Eymers <ixtab at polzin.com>
-   * Download: http://www.polzin.com/inet/fset_inet.phtml?w=goodies
-   *
-   * Permission to use, copy, modify, and distribute this software
-   * and its documentation for any purposes and without fee
-   * is hereby granted provided that this copyright notice
-   * appears in all copies. 
-   *
-   * Of course, this software is provided "as is" without express or implied
-   * warranty of any kind.
-   *
-   */
-
-window.onError=null;
-
-var idx=0
-var treeId = new Array();
-var treeP_id = new Array();
-var treeIsOn = new Array();
-var treeTyp = new Array();
-var treeName = new Array();
-var treeUrl = new Array();
-var treeWasOn = new Array();
-var treeDeep = new Array();
-var treeLastY = new Array();
-var treeIsShown = new Array();
-var treeURL = new Array();
-var treeWMS = new Array();
-  
-function Note( id,p_id,name,url,left,wms_id) {
-	treeId[ idx ] = id;
-	treeP_id[ idx ] = p_id;
-	treeIsOn[ idx ] = true;
-	treeTyp[ idx ] = 'f';
-	treeName[ idx ] = name + " &nbsp;<input type='radio' value='"+left+"' name='radio1' style='width:10px;height:10px' onclick='parent.document.forms[0].left.value="+left+"'>" + left + " ("+url+" - "+wms_id+")"; 
-	treeUrl[ idx ] = url ;
-	treeWasOn[ idx ] = true;
-	treeDeep[ idx ] = 0;
-	treeLastY[ idx ] = 0;
-	treeIsShown[ idx ] = true;
-	treeURL [ idx ] = url;
-	treeWMS [ idx ] = wms_id;
-	idx++;
-//     if(url != ''){
-//      parent.loadImage(name);
-//     }
-  }
-
-  function initDiv ( )
-  {
-    if ( isDOM || isDomIE )
-    {
-      divPrefix='<DIV CLASS="sitemap" style="position:absolute; left:0; top:0; visibility:hidden;" ID="sitemap'
-      divInfo='<DIV CLASS="sitemap" style="position:absolute; visibility:visible" ID="sitemap'
-    }
-    else
-    {
-      divPrefix='<DIV CLASS="sitemap" ID="sitemap'
-      divInfo='<DIV CLASS="sitemap" ID="sitemap'
-    }
-    document.writeln( divInfo +  'info">Bitte haben Sie etwas Geduld.<BR>&nbsp;<BR>Es werden die Eintr&auml;ge aus<BR>&nbsp;<BR>der Datenbank initialisiert.</DIV> ' );
-	 document.writeln("<form name='treeForm'>");
-    for ( var i=1; i<idx; i++ )
-    {
-	 
-      // linked Name ? 
-      if ( treeUrl[i] != '' )
-//		 onClick='if(this.checked){parent.addSelectedLayer(&quot;1&quot;,&quot;"+treeURL[i]+"&quot;,&quot;visibles&quot;)} else{parent.removeSelectedLayer(&quot;1&quot;,&quot;"+treeURL[i]+"&quot;,&quot;visibles&quot;)}'
-        linkedName = "<input type='checkbox' onClick=''><IMG SRC='../img/tree/1w.gif' BORDER='0' WIDTH='3'><span>" + treeName[i] + "</span>"
-      else
-        linkedName =  '<IMG SRC="../img/tree/1w.gif" BORDER="0" WIDTH="3">' + treeName[i]
-      // don't link folder icon if node has no sons
-      if ( i == idx-1 || treeP_id[i+1] != treeId[i] ) {
-        if ( treeDeep[ i ] == 0 )
-          folderImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="1" HSPACE="0">'
-        else
-          folderImg = ''
-      } else {
-        folderImg = '<A HREF="javascript:sitemapClick(' + treeId[i] + ')"><IMG ALIGN="BOTTOM" SRC="../img/tree/folder_off.gif" BORDER="0" NAME="folder' + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0"></A>'
-      }
-      // which type of file icon should be displayed?
-      if ( treeP_id[i] != 0 )
-      {
-        if ( lastEntryInFolder( treeId[i] ) )
-          fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_last.gif" BORDER="0" NAME="file'
-            + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'  
-        else    
-          fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file.gif" BORDER="0" NAME="file'
-            + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'  
-      }
-      else
-        fileImg = ''
-      // traverse parents up to root and show vertical lines if parent 
-      // is not the last entry on this layer
-      verticales = ''
-      for( var act_id=treeId[i] ; treeDeep[ id2treeIndex[ act_id ] ] > 1;  )
-      {  
-        act_id = treeP_id[ id2treeIndex[ act_id ]]
-        if ( lastEntryInFolder( act_id ) )
-        {
-          verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
-        }
-        else
-        {
-          verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_vert.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
-        }
-      }
-
-      
-      document.writeln( divPrefix + treeId[i] + '"><NOBR>&nbsp;' + verticales + fileImg + folderImg + linkedName + '</NOBR></DIV><BR>'
-      )  
-    }
-	  document.writeln("</form>");
-  }
-
-  function initStyles ( )
-  {
-    document.writeln( '<STYLE TYPE="text/css">' + "\n" + '<!--' )
-    for ( var i=1,y=y0; i<idx; i++ )
-    {  
-      document.writeln( '#sitemap' + treeId[i] + ' {POSITION: absolute; VISIBILITY: hidden;}' )
-      if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
-        y += deltaY
-    }
-    document.writeln( '#sitemapinfo {POSITION: absolute; VISIBILITY: visible;}' )
-    document.writeln( '//-->' + "\n" + '</STYLE>' )
-  }
-
-
-
-  function sitemapClick( id )
-  {
-    var i = id2treeIndex[ id ]
-
-    if ( treeIsOn[ i ] )
-    // close directory
-    {
-      // mark node as invisible
-      treeIsOn[ i ]=false
-      // mark all sons as invisible
-      actDeep = treeDeep[ i ]
-      for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
-      {
-        treeWasOn[ j ] = treeIsOn[ j ]
-        treeIsOn[ j ]=false
-      }
-      gif_off( id )
-    }
-    else
-    // open directory
-    { 
-      treeIsOn[ i ]=true
-      // remember and restore old status
-      actDeep = treeDeep[ i ]
-      for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
-      {
-        treeIsOn[ j ] = treeWasOn[ j ]
-      }
-      gif_on( id )
-    }
-    showTree()
-  }
-
-  function knotDeep( id )
-  {
-    var deep=0
-    while ( true )
-      if ( treeP_id[ id2treeIndex[id] ] == 0 )
-        return deep
-      else
-      {
-        ++deep
-        id = treeP_id[ id2treeIndex[id] ]
-      }
-    return deep  
-  }
-
-  function initTree( id )
-  {
-    treeIsOn[ id2treeIndex[id] ] = true
-    if ( treeTyp[ id2treeIndex[id] ] != 'b' )
-      gif_on( id ) 
-    while ( treeP_id[ id2treeIndex[id] ] != 0 )
-    {
-      id = treeP_id[ id2treeIndex[id] ]
-      treeIsOn[ id2treeIndex[id] ] = true
-      if ( treeTyp[ id2treeIndex[id] ] != 'b' )
-        gif_on( id ) 
-    }
-  }
-
-  function lastEntryInFolder( id )
-  {
-    var i = id2treeIndex[id]
-    if ( i == idx-1 )
-      return true
-    if ( treeTyp[i] == 'b' )
-    {
-      if ( treeP_id[i+1] != treeP_id[i] )
-        return true
-      else 
-        return false
-    }
-    else
-    {
-      var actDeep = treeDeep[i]
-      for( var j=i+1; j<idx && treeDeep[j] > actDeep ; j++ )
-      ;
-      if ( j<idx && treeDeep[j] == actDeep )
-        return false
-      else
-        return true
-    }
-  }
-
-  function showTree()
-  {
-    for( var i=1, y=y0, x=x0; i<idx; i++ )
-    {
-      if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
-      {
-        // show current node
-        if ( !(y == treeLastY[i] && treeIsShown[i] ) )
-        {
-          showLayer( "sitemap"+ treeId[i] ) 
-          setyLayer( "sitemap"+ treeId[i], y )
-          treeIsShown[i] = true
-        } 
-        treeLastY[i] = y
-        y += deltaY
-      }
-      else
-      {
-        // hide current node and all sons
-        if ( treeIsShown[ i ] )
-        {
-          hideLayer( "sitemap"+ treeId[i] ) 
-          treeIsShown[i] = false
-        }
-      }
-    }
-  }
-
-  function initIndex() {
-    for( var i=0; i<idx; i++ )
-      id2treeIndex[ treeId[i] ] = i
-  }
-
-  function gif_name (name, width, height) {
-    this.on = new Image (width, height);
-    this.on.src ="../img/tree/" +  name + "_on.gif"
-    this.off = new Image (width, height);
-    this.off.src ="../img/tree/" +  name + "_off.gif"
-  }
-
-  function load_gif (name, width, height) {
-    gif_name [name] = new gif_name (name,width,height);
-  }
-
-  function load_all () {
-    load_gif ('folder',30,16)
-    file_last = new Image( 30,16 )
-    file_last.src = "file_last.gif"
-    file_middle = new Image( 30,16 )
-    file_middle.src = "file.gif"
-    file_vert = new Image( 30,16 )
-    file_vert.src = "file_vert.gif"
-    file_empty = new Image( 30,16 )
-    file_empty = "file_empty.gif"
-  }
-
-  function gif_on ( id ) {
-    eval("document['folder" + id + "'].src = gif_name['folder'].on.src")
-  }
-
-  function gif_off ( id ) {
-    eval("document['folder" + id + "'].src = gif_name['folder'].off.src")
-  }
- 
-  // global configuration
-  var deltaX = 30
-  var deltaY = 16
-  var x0 = 5
-  var y0 = 5
-  var defaultTarget = 'examplemain'
-
-  var browserName = navigator.appName;
-  var browserVersion = parseInt(navigator.appVersion);
-  var isIE = false;
-  var isNN = false;
-  var isDOM = false;
-  var isDomIE = false;
-  var isDomNN = false;
-  var layerok = false;
-
-  var isIE = browserName.indexOf("Microsoft Internet Explorer" )==-1?false:true;
-  var isNN = browserName.indexOf("Netscape")==-1?false:true;
-  var isOpera = browserName.indexOf("Opera")==-1?false:true;
-  var isDOM = document.getElementById?true:false;
-  var isDomNN = document.layers?true:false;
-  var isDomIE = document.all?true:false;
-
-  if ( isNN && browserVersion>=4 ) layerok=true;
-  if ( isIE && browserVersion>=4 ) layerok=true;
-  if ( isOpera && browserVersion>=5 ) layerok=true;
-
-    
-  function hideLayer(layerName) {
-    if (isDOM)
-      document.getElementById(layerName).style.visibility="hidden"
-    else if (isDomIE)
-      document.all[layerName].style.visibility="hidden";
-    else if (isDomNN) 
-      document.layers[layerName].visibility="hidden";
-  }
-
-  function showLayer(layerName) {
-    if (isDOM)
-      document.getElementById(layerName).style.visibility="visible"
-    else if (isDomIE)
-      document.all[layerName].style.visibility="visible";
-    else if (isDomNN)
-      document.layers[layerName].visibility="visible";
-  }
-
-  function setyLayer(layerName, y) {
-    if (isDOM)
-      document.getElementById(layerName).style.top=y + "px"
-    else if (isDomIE)
-      document.all[layerName].style.top=y + "px";
-    else if (isDomNN)
-      document.layers[layerName].top=y + "px";
-  }
-
-  var id2treeIndex = new Array()
-
-  // the structure is easy to understand with a simple example
-  // p_id is the id of the parent
-  // E0                                      ( id=0,p_id=-1 )
-  //          E11                            ( id=1,p_id=0)
-  //                     E111                ( id=2,p_id=1 )
-  //                     E112                ( id=3,p_id=1 )
-  //          E12                            ( id=4,p_id=0 )
-  //                     E121                ( id=5,p_id=4 ) 
-  //          E13                            ( id=6,p_id=0 ) 
-  //                     E131                ( id=7,p_id=6 ) 
-  //                                 E1311   ( id=8,p_id=7 ) 
-  //                     E132                ( id=9,p_id=6 ) 
-  // this is a multinary tree structure which is easy to
-  // populate with database data :)
-<?php
-$sql = "SELECT id FROM gui_treegde WHERE fkey_gui_id = $1";
-// $v and $t will be re-used below!
-$v = array($guiList);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-if(!db_fetch_row($res)){
-	$sql = "INSERT INTO gui_treegde(fkey_gui_id, my_layer_title,lft,rgt,layer) VALUES($1, 'new','1','4','')";
-	//using $v and $t fom above
-	db_prep_query($sql, $v, $t);
-	$sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES($1,'new','2','3','')";
-	//using $v and $t fom above
-	db_prep_query($sql, $v, $t);
-}
-	
-$sql = "SELECT n.wms_id, n.id, n.my_layer_title, n.lft, n.rgt, n.layer, COUNT(*) AS level1, ((n.rgt - n.lft -1)/2) AS offspring ";
-$sql .= "FROM gui_treegde as n, gui_treegde as p WHERE n.lft BETWEEN p.lft AND p.rgt ";
-$sql .= " AND n.fkey_gui_id = $1 AND p.fkey_gui_id = $2 ";
-$sql .= " GROUP BY n.wms_id, n.lft, n.my_layer_title,  ((n.rgt - n.lft -1)/2) , n.id, n.rgt, n.layer ORDER BY n.lft;";
-#echo $sql;
-$v = array($guiList, $guiList);
-$t = array("s", "s");
-$res = db_prep_query($sql, $v, $t);
-	echo "function initArray(){";
-	echo "Note(0,-1,'','');";
-	$cnt = 0;
-	
-	while($row = db_fetch_array($res)){
-		if(db_result($res, $cnt, "level1") == 1 && $row["offspring"] >= 0 ){
-			if(count($parent) > 0){unset($parent);}
-			$level =  db_result($res, $cnt, "level1");
-			$parent[$level+1] = db_result($res, $cnt, "id");
-			echo "Note(".$row["id"].",0,'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
-			if($row["wms_id"] != ''){
-				echo ", '".$row["wms_id"]."'";
-			}
-			echo ");";
-			}
-		/**/
-		else if($row["level1"] > $level){
-			$level =  $row["level1"];
-			$parent[$level+1] = $row["id"]; 
-			echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
-			if($row["wms_id"] != ''){
-				echo ", '".$row["wms_id"]."'";
-			}
-			echo ");";
-		}
-		/**/
-		else if($row["level1"] == $level){
-			$level =  $row["level1"];
-			$parent[$level+1] = $row["id"];
-			echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
-			if($row["wms_id"] != ''){
-				echo ", '".$row["wms_id"]."'";
-			}
-			echo ");";
-		}
-		/**/
-		else if($row["level1"] < $level){
-			$level =  $row["level1"];
-			$parent[$level + 1] = $row["id"]; 
-			echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
-			if($row["wms_id"] != ''){
-				echo ", '".$row["wms_id"]."'";
-			}
-			echo ");";
-		}
-	
-		$cnt++;
-	}
-	echo "treeTyp[0] = 'f'; treeIsOn[0] = true; treeWasOn[0] = true;";
-	echo "}";
-?>	
-  function initArray_()
-  {
-    Note(0,-1,'','')
-	  Note(1,0,'Tutorials','')	  	  
-    Note(8,1,'HTML','')
-    Note(10,8,'SelfHtml','http://www.teamone.de/selfaktuell/') 
-	  Note(9,1,'willi','')
-    Note(100,9,'SelfHtml','http://www.teamone.de/selfaktuell/')       
-	  Note(3,1,'JavaScript','')
-    Note(4,3, 'Netscape Guide 1.3','http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm')
-    Note(7,3, 'Introduction to Javascript','http://rummelplatz.uni-mannheim.de/~skoch/js/script.htm')	  
-    Note(12,1, 'Perl','')
-    Note(14,12, 'Perl Tutorial','http://www.awu.id.ethz.ch/~didi/perl/perl_start.html')
-    Note(13,1,'SQL','')
-    Note(15,13, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
-	  Note(111,1, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
-    Note(2,0, 'Reference Manuals','')
-    Note(11,2, 'HTML Version 3.2 Referenz','http://www.cls-online.de/htmlref/index.htm')
-    Note(6,2,'Netscape Reference 1.3','http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm')
-    Note(17,2,'PHP Manual','http://www.php.net/manual/html/')	  
-    treeTyp[0] = 'f'
-    treeIsOn[0] = true
-    treeWasOn[0] = true
-  }
-
-  var idx=0
-  initArray()
-  initIndex()
-  load_all()
-  for( i=1; i<idx; i++ )
-  {
-    treeDeep[i] = knotDeep( treeId[i] )
-    if ( treeDeep[i] == 0 )
-      treeIsShown[i] = true
-  }
-  if ( isDomNN )
-    initStyles();
-  //-->  
-  </SCRIPT>
-</HEAD>
-<BODY VLINK="#000000" ALINK="#000000" LINK="#000000" BGCOLOR="#ffffff" TEXT="#000000"
- onLoad="if (layerok) showTree();"
- MARGINHEIGHT="0" MARGINWIDTH="0" LEFTMARGIN="0" TOPMARGIN="0" onkeydown="parent.keyhandler('FolderFrame')">
-<SCRIPT language="JavaScript1.2">
-<!--
-  initDiv();
-  hideLayer("sitemapinfo");
-//-->
-</SCRIPT>
-</BODY>
-</HTML>



More information about the Mapbender_commits mailing list