[Mapbender-commits] r2057 - in branches/2.5/http: . sld sld/classes sld/img

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Feb 1 11:33:03 EST 2008


Author: christoph
Date: 2008-02-01 11:33:03 -0500 (Fri, 01 Feb 2008)
New Revision: 2057

Added:
   branches/2.5/http/sld/
   branches/2.5/http/sld/classes/
   branches/2.5/http/sld/classes/AddOperationModule.php
   branches/2.5/http/sld/classes/AnchorPoint.php
   branches/2.5/http/sld/classes/BinaryComparisonOp.php
   branches/2.5/http/sld/classes/BinaryLogicOp.php
   branches/2.5/http/sld/classes/ColorMap.php
   branches/2.5/http/sld/classes/ColorMapEntry.php
   branches/2.5/http/sld/classes/CssParameter.php
   branches/2.5/http/sld/classes/DbUtils.php
   branches/2.5/http/sld/classes/Displacement.php
   branches/2.5/http/sld/classes/DisplayOperationModule.php
   branches/2.5/http/sld/classes/ElseFilter.php
   branches/2.5/http/sld/classes/ExternalGraphic.php
   branches/2.5/http/sld/classes/FeatureTypeStyle.php
   branches/2.5/http/sld/classes/Fill.php
   branches/2.5/http/sld/classes/Filter.php
   branches/2.5/http/sld/classes/Font.php
   branches/2.5/http/sld/classes/Graphic.php
   branches/2.5/http/sld/classes/GraphicFill.php
   branches/2.5/http/sld/classes/GraphicStroke.php
   branches/2.5/http/sld/classes/Halo.php
   branches/2.5/http/sld/classes/LabelPlacement.php
   branches/2.5/http/sld/classes/LegendGraphic.php
   branches/2.5/http/sld/classes/LineSymbolizer.php
   branches/2.5/http/sld/classes/Mark.php
   branches/2.5/http/sld/classes/NamedLayer.php
   branches/2.5/http/sld/classes/ParameterValue.php
   branches/2.5/http/sld/classes/PointPlacement.php
   branches/2.5/http/sld/classes/PointSymbolizer.php
   branches/2.5/http/sld/classes/PolygonSymbolizer.php
   branches/2.5/http/sld/classes/PropertyIsBetween.php
   branches/2.5/http/sld/classes/PropertyIsLike.php
   branches/2.5/http/sld/classes/PropertyIsNull.php
   branches/2.5/http/sld/classes/RasterSymbolizer.php
   branches/2.5/http/sld/classes/Rule.php
   branches/2.5/http/sld/classes/Stroke.php
   branches/2.5/http/sld/classes/StyledLayerDescriptor.php
   branches/2.5/http/sld/classes/TextSymbolizer.php
   branches/2.5/http/sld/classes/UnaryLogicOp.php
   branches/2.5/http/sld/classes/UserStyle.php
   branches/2.5/http/sld/img/
   branches/2.5/http/sld/img/lightning.png
   branches/2.5/http/sld/img/map_magnify.png
   branches/2.5/http/sld/img/minus.gif
   branches/2.5/http/sld/img/plus.gif
   branches/2.5/http/sld/img/script.png
   branches/2.5/http/sld/img/script_code_red.png
   branches/2.5/http/sld/img/script_link.png
   branches/2.5/http/sld/img/script_save.png
   branches/2.5/http/sld/sld_config.php
   branches/2.5/http/sld/sld_edit_filter.php
   branches/2.5/http/sld/sld_filter_parse.php
   branches/2.5/http/sld/sld_function_handler.php
   branches/2.5/http/sld/sld_main.php
   branches/2.5/http/sld/sld_parse.php
   branches/2.5/http/sld/sld_pick_color.php
Log:
merged w/ SLD branch

Added: branches/2.5/http/sld/classes/AddOperationModule.php
===================================================================
--- branches/2.5/http/sld/classes/AddOperationModule.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/AddOperationModule.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,80 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Template class that only creates the source code for the function of adding an operation
+ * is used whereever an operation can be added. Simpyl change this class and the change
+ * will affect all the appearences of the add operation function.
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class AddOperationModule
+{
+	/**
+	 * stores the id of the referring object (the id member field of the object!)
+	 */
+	var $objId = "";
+	/**
+	 * stores the prefix of the referring object's html-form-fields
+	 */
+	var $htmlId = "";
+	
+	/**
+	 * constructor that sets the necessary values ov the member fields
+	 */
+	function AddOperationModule($objId, $htmlId)
+	{
+		$this->objId = $objId;
+		$this->htmlId = $htmlId;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<select name=\"".$this->htmlId."_newoperation\">\n";
+		$temp .= $offset." <option value=\"and\">AND - logisches UND</option>\n";
+		$temp .= $offset." <option value=\"or\">OR - logisches ODER</option>\n";
+		$temp .= $offset." <option value=\"not\">NOT - logisches NICHT</option>\n";
+		$temp .= $offset." <option value=\"propertyisequalto\">Eigenschaft = x</option>\n";
+		$temp .= $offset." <option value=\"propertyisnotequalto\">Eigenschaft != x</option>\n";
+		$temp .= $offset." <option value=\"propertyisgreaterthan\">Eigenschaft &gt; x</option>\n";
+		$temp .= $offset." <option value=\"propertyisgreaterthanorequalto\">Eigenschaft &gt;= x</option>\n";
+		$temp .= $offset." <option value=\"propertyislessthan\">Eigenschaft &lt; x</option>\n";
+		$temp .= $offset." <option value=\"propertyislessthanorequalto\">Eigenschaft &lt;= x</option>\n";
+		$temp .= $offset." <option value=\"propertyislike\">Eigenschaft �hnlich x</option>\n";
+		$temp .= $offset." <option value=\"propertyisnull\">Eigenschaft nicht definiert</option>\n";
+		$temp .= $offset." <option value=\"propertyisbetween\">x &lt;= Eigenschaft &lt;= y</option>\n";
+		$temp .= $offset."</select>\n";
+		$temp .= $offset."<span class=\"edit hand\"";
+		$temp .= " onClick=\"url='?function=addoperation&id=".$this->objId."&operation=';";
+		$temp .= " url += document.editFilter.".$this->htmlId."_newoperation.value;";
+		$temp .= " location.href = url;\"";
+		$temp .= ">";
+		$temp .= "<img src='./img/plus.gif' border='0'>&nbsp;hinzuf&uuml;gen\n</span>";
+		return $temp;
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/AddOperationModule.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/AnchorPoint.php
===================================================================
--- branches/2.5/http/sld/classes/AnchorPoint.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/AnchorPoint.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,151 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the AnchorPoint-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class AnchorPoint
+{
+	/**
+	 * The anchorpointx attribute from the xml-scheme.
+	 * Allowed values are between 0 and 1.
+	 * @var float
+	 */
+	var $anchorpointx = "";
+	
+	/**
+	 * The anchorpointy attribute from the xml-scheme.
+	 * Allowed values are between 0 and 1.
+	 * @var float
+	 */
+	var $anchorpointy = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<AnchorPoint>\n";
+		$temp .= $offset." <AnchorPointX>".htmlspecialchars($this->anchorpointx)."</AnchorPointX>\n";
+		$temp .= $offset." <AnchorPointY>".htmlspecialchars($this->anchorpointy)."</AnchorPointY>\n";
+		$temp .= $offset."</AnchorPoint>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"".$id."\" value=\"anchorpoint\">\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  AnchorPointX:\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		//TODO - check possible values and their meaning
+		$temp .= $offset."  <select name=\"".$id."_anchorpointx\">\n";
+		$temp .= $offset."   <option value=\"0.0\"";
+		if ( $this->anchorpointx == "0.0") $temp .= " selected";
+		$temp .= ">0.0 - Ankerpunkt rechts</option>\n";
+		$temp .= $offset."   <option value=\"0.5\"";
+		if ( $this->anchorpointx == "0.5") $temp .= " selected";
+		$temp .= ">0.5 - Ankerpunkt mitte</option>\n";
+		$temp .= $offset."   <option value=\"1.0\"";
+		if ( $this->anchorpointx == "1.0") $temp .= " selected";
+		$temp .= ">1.0 - Ankerpunkt links</option>\n";
+		$temp .= $offset."  </select>\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  AnchorPointY:\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		//TODO - check possible values and their meaning
+		$temp .= $offset."  <select name=\"".$id."_anchorpointy\">\n";
+		$temp .= $offset."   <option value=\"0.0\"";
+		if ( $this->anchorpointy == "0.0") $temp .= " selected";
+		$temp .= ">0.0 - Ankerpunkt oben</option>\n";
+		$temp .= $offset."   <option value=\"0.5\"";
+		if ( $this->anchorpointy == "0.5") $temp .= " selected";
+		$temp .= ">0.5 - Ankerpunkt mitte</option>\n";
+		$temp .= $offset."   <option value=\"1.0\"";
+		if ( $this->anchorpointy == "1.0") $temp .= " selected";
+		$temp .= ">1.0 - Ankerpunkt unten</option>\n";
+		$temp .= $offset."  </select>\n";
+		
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_anchorpointx"]))
+		{
+			$this->anchorpointx = $_REQUEST[$id."_anchorpointx"];
+		}
+		if (isset($_REQUEST[$id."_anchorpointy"]))
+		{
+			$this->anchorpointy = $_REQUEST[$id."_anchorpointy"];
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/AnchorPoint.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/BinaryComparisonOp.php
===================================================================
--- branches/2.5/http/sld/classes/BinaryComparisonOp.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/BinaryComparisonOp.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,158 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the BinaryComparisonOp-element
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class BinaryComparisonOp
+{
+	/**
+	 * Defines the type of comparison operation.
+	 * @var string
+	 */
+	var $name = "";
+	
+	/**
+	 * Name of the property that is addressed in this comparison.
+	 * @var string
+	 */
+	var $ogcPropertyName = "";
+	
+	/**
+	 * String that is compared to the property-value.
+	 * Regular Expression?
+	 * @var string
+	 */
+	var $ogcLiteral = "";
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * constructor that directly fills the $name variable.
+	 * @param string $name the type of the comparison operation
+	 */
+	function BinaryComparisonOp($name)
+	{
+		$this->name = $name;
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ogc:".$this->name.">\n";
+		$temp .= $offset. " <ogc:PropertyName>".$this->ogcPropertyName."</ogc:PropertyName>\n";
+		$temp .= $offset. " <ogc:Literal>".$this->ogcLiteral."</ogc:Literal>\n";
+		$temp .= $offset."</ogc:".$this->name.">\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"binaryComparisonOp\">\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."_name\" value=\"".$this->name."\">\n";
+		if (count($_SESSION["sld_objects"][3]->attrs)>0) {
+			$temp .= $offset."  <input type=\"hidden\" id=\"".$id."_ogcpropertyname\" name=\"".$id."_ogcpropertyname\" value=\"".$this->ogcPropertyName."\">\n";
+			$temp_elements = $_SESSION["sld_objects"][3]->generateElementsHtml($id."_ogcpropertyname",$this->ogcPropertyName);
+			$temp .= $offset.$temp_elements;
+		} else {
+			$temp .= $offset."  <input name=\"".$id."_ogcpropertyname\" value=\"".$this->ogcPropertyName."\">\n";
+		}
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td style=\"width:50px; text-align: center; font-size: large; \">";
+				
+		switch($this->name)
+		{
+			case "PropertyIsEqualTo": $temp .= "="; break;
+			case "PropertyIsNotEqualTo": $temp .= "!="; break;
+			case "PropertyIsGreaterThan": $temp .= "&gt;"; break;
+			case "PropertyIsGreaterThanOrEqualTo": $temp .= "&gt;="; break;
+			case "PropertyIsLessThan": $temp .= "&lt;"; break;
+			case "PropertyIsLessThanOrEqualTo": $temp .= "&lt;="; break;
+			default: $temp .= $this->name;
+		}
+		$temp .= "\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		$temp .= $offset."  <input name=\"".$id."_ogcliteral\" value=\"".$this->ogcLiteral."\">\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."  <a class=\"edit\" href=\"?function=deleteoperation&id=".$this->parent."&number=".$number."\">";
+		$temp .= "<img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->name = $_REQUEST[$id."_name"];
+		$this->ogcPropertyName = $_REQUEST[$id."_ogcpropertyname"];
+		$this->ogcLiteral = $_REQUEST[$id."_ogcliteral"];
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/BinaryComparisonOp.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/BinaryLogicOp.php
===================================================================
--- branches/2.5/http/sld/classes/BinaryLogicOp.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/BinaryLogicOp.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,208 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the BinaryLogicOp-element
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class BinaryLogicOp
+{
+	/**
+	 * Defines the type of logical operation.
+	 * Possible values: and + or
+	 * @var string
+	 */
+	var $name = "";
+	
+	/**
+	 * Array containing the operations of this filter
+	 * @see UnaryLogicOp
+	 * @see BinaryLogicOp
+	 * @see BinaryComparisonOp
+	 * @see PropertyIsLike
+	 * @see PropertyIsNull
+	 * @see PropertyIsBetween
+	 * @var array
+	 */
+	var $operations = array();
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * Constructor that directly fills the $name variable.
+	 * @param string $name the type of this logical operation.
+	 */
+	function BinaryLogicOp($name)
+	{
+		$this->name = $name;
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ogc:".$this->name.">\n";
+		foreach($this->operations as $operation)
+		{
+			$temp .= $operation->generateXml($offset." ");
+		}
+		$temp .= $offset."</ogc:".$this->name.">\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"binaryLogicOp\">\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."_name\" value=\"".$this->name."\">\n";
+		
+		$temp .= $offset."  ".$this->name."<br>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."   <a class=\"edit\" href=\"?function=deleteoperation&id=".$this->parent."&number=".$number."\">";
+		$temp .= "<img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		
+		
+		
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td colspan=\"3\">\n";
+		
+		$temp .= $offset."  <table>\n";
+		
+		$displayOperationModule = new DisplayOperationModule();
+		$temp .= $displayOperationModule->generateHtmlForm($offset."   ", $this->operations, $id);
+		
+		if(count($this->operations) == 1)
+		{
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset." <td colspan=\"4\">\n";
+			$temp .= $offset."  <hr style=\"color: black\">\n";
+			$temp .= $offset." </td>\n";
+			$temp .= $offset."</tr>\n";
+		}
+		
+		
+		//Only 2 Operations
+		//if (count($this->operations) < 2)
+		// why should there be only 2 operations? Nothing in the specs ...
+
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td colspan=\"4\">\n";
+		
+		$addOperationModule = new AddOperationModule($this->id, $id);
+		$temp .= $addOperationModule->generateHtmlForm($offset."   ");
+			
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		$temp .= $offset."   </table>\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->name = $_REQUEST[$id."_name"];
+		$countOperations = 0;
+		while (isset($_REQUEST[$id."_operation_".$countOperations]))
+		{
+			if ($_REQUEST[$id."_operation_".$countOperations] == "binaryComparisonOp")
+			{
+				$operation = new BinaryComparisonOp();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "binaryLogicOp")
+			{
+				$operation = new BinaryLogicOp();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "unaryLogicOp")
+			{
+				$operation = new UnaryLogicOp();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "propertyIsLike")
+			{
+				$operation = new PropertyIsLike();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "propertyIsNull")
+			{
+				$operation = new PropertyIsNull();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "propertyIsBetween")
+			{
+				$operation = new PropertyIsBetween();
+			}
+			
+			$operation->generateObjectFromPost($id."_operation_".$countOperations);
+			$this->operations[] = $operation;
+			$countOperations++;
+		}
+	}
+	
+	/**
+	 * deletes the rule with the given index from the $operations array
+	 * @param int $index index of the operation that has to be deleted
+	 */
+	function deleteOperation($index)
+	{
+		array_splice($this->operations, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/BinaryLogicOp.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/ColorMap.php
===================================================================
--- branches/2.5/http/sld/classes/ColorMap.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/ColorMap.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,135 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the ColorMap-element
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class ColorMap
+{
+	/**
+	 * Array containing the ColorMapEntry objects from the sld.
+	 *
+	 * @see ColorMapEntry
+	 * @var object
+	 */
+	var $colormapentries = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ColorMap>\n";
+		foreach ($this->colormapentries as $colormapentry)
+		{
+			$temp .= $colormapentry->generateXml($offset." ");
+		}
+		$temp .= $offset."</ColorMap>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<tr valign=\"top\">\n";
+		$temp .= $offset." <td style=\"width: 100px;\">\n";
+		$temp .= $offset."  ColorMap<br>\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"colormap\">\n";
+		$temp .= $offset."  <a class='edit' href=\"sld_function_handler.php?function=deletecolormap&id=".$this->parent."\">l&ouml;schen</a>\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$colormapentry_id = 0;
+		foreach ($this->colormapentries as $colormapentry)
+		{
+			$temp .= $colormapentry->generateHtmlForm($id."_colormapentry_".$colormapentry_id, $offset."  ");
+			$colormapentry_id++;
+		}
+		$temp .= $offset."  <a class='edit' href=\"sld_function_handler.php?function=addcolormapentry&id=".$this->id."\">ColorMapEntry hinzuf&uuml;gen</a>\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$countColorMapEntries = 0;
+		while (isset($_REQUEST[$id."_colormapentry_".$countColorMapEntries]))
+		{
+			$colormapentry = new ColorMapEntry();
+			$colormapentry->generateObjectFromPost($id."_colormapentry_".$countColorMapEntries);
+			$this->colormapentries[] = $colormapentry;
+			$countColorMapEntries++;
+		}
+	}
+	
+	/**
+	 * Adds a ColorMapEntry object to the array.
+	 */
+	function addColorMapEntry()
+	{
+		$this->colormapentries[] = new ColorMapEntry();
+	}
+	
+	/**
+	 * Deletes the ColorMapEntry object at the given index.
+	 * @param int $index index of the ColorMapEntry that has to be deleted
+	 */
+	function deleteColorMapEntry($index)
+	{
+		array_splice($this->colormapentries, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/ColorMap.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/ColorMapEntry.php
===================================================================
--- branches/2.5/http/sld/classes/ColorMapEntry.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/ColorMapEntry.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,183 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the ColorMapEntry-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class ColorMapEntry
+{
+	/**
+	 * The color attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $color = "";
+	
+	/**
+	 * The opacity attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $opacity = "";
+	
+	/**
+	 * The quantity attribute from the xml-scheme.
+	 * @var int
+	 */
+	var $quantity = "";
+	
+	/**
+	 * The label attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $label = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ColorMapEntry";
+		if ($this->color != "") $temp.= " color=\"".htmlspecialchars($this->color)."\"";
+		if ($this->opacity != "") $temp.= " opacity=\"".htmlspecialchars($this->opacity)."\"";
+		if ($this->quantity != "") $temp.= " quantity=\"".htmlspecialchars($this->quantity)."\"";
+		if ($this->label != "") $temp.= " label=\"".htmlspecialchars($this->label)."\"";
+		$temp .= " />\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   ColormapEntry<br>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletecolormapentry&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"colormapentry\">\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		
+		$temp .= $offset."   <table>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td style=\"width: 100px\">\n";
+		$temp .= $offset."      Color:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td";
+		$temp .= " id=\"".$id."_color_preview\" style=\"border: 1px solid black; width: 100px; cursor: hand; background-color:".htmlspecialchars($this->color).";\" ";
+		$temp .= "onClick=\"window.open('sld_pick_color.php?id=".$id."_color','Farbauswahl','width=299, height=194, resizable=no');\">\n";
+		$temp .= $offset."      <input type=\"hidden\" name=\"".$id."_color\" value=\"".htmlspecialchars($this->color)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      Opacity:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_opacity\" value=\"".htmlspecialchars($this->opacity)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      Quantity:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_quantity\" value=\"".htmlspecialchars($this->quantity)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      Label:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_label\" value=\"".htmlspecialchars($this->label)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."   </table>\n";
+		
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_color"]))
+		{
+			$this->color = $_REQUEST[$id."_color"];
+		}
+		if (isset($_REQUEST[$id."_opacity"]))
+		{
+			$this->opacity = $_REQUEST[$id."_opacity"];
+		}
+		if (isset($_REQUEST[$id."_quantity"]))
+		{
+			$this->quantity = $_REQUEST[$id."_quantity"];
+		}
+		if (isset($_REQUEST[$id."_label"]))
+		{
+			$this->label = $_REQUEST[$id."_label"];
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/ColorMapEntry.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/CssParameter.php
===================================================================
--- branches/2.5/http/sld/classes/CssParameter.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/CssParameter.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,173 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the CssParameter-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class CssParameter
+{
+	/**
+	 * The name attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $name = "";
+	
+	/**
+	 * The value attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $value = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<CssParameter ";
+		$temp .= "name=\"".htmlspecialchars($this->name)."\">";
+		$temp .= htmlspecialchars($this->value);
+		$temp .= "</CssParameter>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   CssParameter<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"cssparameter\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletecssparameter&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		
+		$temp .= $offset."   <table>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td style=\"width: 100px;\">\n";
+		$temp .= $offset."      ".htmlspecialchars($this->name)."\n";
+		$temp .= $offset."      <input type=\"hidden\" name=\"".$id."_name\" value=\"".htmlspecialchars($this->name)."\">\n";
+		$temp .= $offset."     </td>\n";
+		
+		//Farbauswahl
+		if ($this->name == "fill" || $this->name == "stroke")
+		{
+			$temp .= $offset."     <td";
+			$temp .= " id=\"".$id."_value_preview\" style=\"border: 1px solid black; width: 100px; cursor: hand; background-color:".htmlspecialchars($this->value).";\" ";
+			$temp .= "onClick=\"window.open('sld_pick_color.php?id=".$id."_value','Farbauswahl','width=299, height=194, resizable=no');\">\n";
+			$temp .= $offset."      <input type=\"hidden\" name=\"".$id."_value\" id=\"".$id."_value\" value=\"".htmlspecialchars($this->value)."\">\n";
+			$temp .= $offset."     </td>\n";
+		}
+		else if ($this->name == "stroke-width" || $this->name == "font-size")
+		{
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."      <select name=\"".$id."_value\" onchange=\"document.getElementById('sld_editor_form').submit();\">\n";
+			for ($i=0; $i < 17; $i++)
+			{
+				$temp .= $offset."      <option value=\"".$i."\"";
+				if ( $this->value == $i ) $temp .= " selected";
+				$temp .= ">".$i." px</option>\n";
+			}
+			$temp .= $offset."      </select>\n";
+			$temp .= $offset."     </td>\n";
+		}
+		else if ($this->name == "font-family")
+		{
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."      <select name=\"".$id."_value\" onchange=\"document.getElementById('sld_editor_form').submit();\">\n";
+			$temp .= $offset."       <option value=\"verdana\"";
+			if ($this->value == "verdana") $temp .= " selected";
+			$temp .= ">Verdana</option>\n";
+			$temp .= $offset."       <option value=\"arial\"";
+			if ($this->value == "arial") $temp .= " selected";
+			$temp .= ">Arial</option>\n";
+			$temp .= $offset."      </select>\n";
+			$temp .= $offset."     </td>\n";
+		}
+		else
+		{
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."      <input name=\"".$id."_value\" value=\"".htmlspecialchars($this->value)."\">\n";
+			$temp .= $offset."     </td>\n";
+		}
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."   </table>\n";
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_name"]))
+		{
+			$this->name = $_REQUEST[$id."_name"];
+		}
+		if (isset($_REQUEST[$id."_value"]))
+		{
+			$this->value = $_REQUEST[$id."_value"];
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/CssParameter.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/DbUtils.php
===================================================================
--- branches/2.5/http/sld/classes/DbUtils.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/DbUtils.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,134 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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__)."/../../../conf/mapbender.conf");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+/**
+ * This class wraps db functions of the sld implementation.
+ *
+ * @package sld_classes
+ * @author Michael Schulz
+ */
+class DbUtils 
+{
+    /**
+     * Read the layer_id from the DB.
+     * 
+     * @param <int> the wms_id
+     * @param <string> the layer_name
+     * @return <int> the layer_id
+     */
+	function getLayerIdFromLayerName($wms_id, $layer_name) {
+		$sql = "SELECT * FROM layer WHERE fkey_wms_id = $1 AND layer_name = $2";
+		$v = array($wms_id, $layer_name);
+		$t = array('i', 's');
+		$res = db_prep_query($sql,$v,$t);
+		if ( db_fetch_row($res, 0) ) {
+			return db_result($res, 0, "layer_id");
+		} else {
+			return false;
+		}
+	}
+	
+	/**
+     * Check for a layer wfs-Conf.
+     * 
+     * @param <int> the layer_id
+     * @param <string> the gui_id
+     * @return <int> wfs_conf_id
+     */
+	function getLayerWfsConfId($gui_id, $layer_id) {
+		$sql = "SELECT gui_layer_wfs_featuretype FROM gui_layer WHERE fkey_gui_id = $1 AND fkey_layer_id = $2";
+		$v = array($gui_id, $layer_id);
+		$t = array('s', 'i');
+		$res = db_prep_query($sql,$v,$t);
+		if ( db_fetch_row($res, 0) ) {
+			return db_result($res, 0, "gui_layer_wfs_featuretype");
+		} else {
+			return false;
+		}
+	}
+
+	/**
+     * return layer wfs-FeatureType-id.
+     * 
+     * @param <int> the wfs_conf_id
+     * @return <int> fkey_featuretype_id
+     */
+	function getWfsConfFeatureTypeId($wfs_conf_id) {
+		$sql = "SELECT fkey_featuretype_id FROM wfs_conf WHERE wfs_conf_id = $1";
+		$v = array($wfs_conf_id);
+		$t = array('i');
+		$res = db_prep_query($sql,$v,$t);
+		if ( db_fetch_row($res, 0) ) {
+			return db_result($res, 0, "fkey_featuretype_id");
+		} else {
+			return false;
+		}
+	}	
+	
+	/**
+	 * create a getmap request for the map images
+	 * 
+	 * @param <string> gui_id
+	 * @param <int> layer_id
+	 * @param <int> wms_id
+	 *
+	 * @return <string> getmap URL
+	 */
+	function getPreviewMapUrl($gui_id, $layer_id, $wms_id) {
+		$previewMapSrs = "";
+		$sql = "select w.gui_wms_epsg as srs, e.minx, e.miny, e.maxx, e.maxy ";
+		$sql .= "from gui_wms w, layer l, layer_epsg e ";
+		$sql .= "where l.fkey_wms_id=w.fkey_wms_id and e.fkey_layer_id=l.layer_id and e.epsg=w.gui_wms_epsg and ";
+		$sql .= "l.layer_parent = '' and w.fkey_gui_id = $1 and w.gui_wms_position=0";
+		$v = array($gui_id);
+		$t = array('s');
+		$res = db_prep_query($sql,$v,$t);
+		if ( $res ) {
+			$row = db_fetch_array($res, 0); 
+			$previewMapSrs .= "&SRS=".$row["srs"]."&BBOX=".$row["minx"].",".$row["miny"].",".$row["maxx"].",".$row["maxy"];
+		} else {
+			return false;
+		}
+		
+		$sql = "select wms.wms_getmap as mapurl, layer.layer_name, wms.wms_version as version, w.gui_wms_mapformat as format ";
+		$sql .= "from gui_wms w, gui_layer l, wms, layer ";
+		$sql .= "where w.fkey_gui_id=l.fkey_gui_id and wms.wms_id = w.fkey_wms_id and l.fkey_layer_id = layer.layer_id and ";
+		$sql .= "w.fkey_gui_id=$1 and l.fkey_layer_id=$2 and wms.wms_id = $3";
+		$v = array($gui_id, $layer_id, $wms_id);
+		$t = array('s', 'i', 'i');
+		$res = db_prep_query($sql,$v,$t);
+		$previewMapUrl = "";
+		if ( $res ) {
+			$row = db_fetch_array($res, 0); 
+			$previewMapUrl .= $row["mapurl"]."SERVICE=WMS&REQUEST=GetMap&VERSION=".$row["version"];
+			$previewMapUrl .= "&LAYERS=".$row["layer_name"]."&STYLES=";
+			$previewMapUrl .= $previewMapSrs;
+			$previewMapUrl .= "&FORMAT=".$row["format"];
+			return $previewMapUrl;
+		} else {
+			return false;
+		}
+	}
+}
+
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/DbUtils.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Displacement.php
===================================================================
--- branches/2.5/http/sld/classes/Displacement.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Displacement.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,122 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Displacement-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Displacement
+{
+	/**
+	 * The displacementx attribute from the xml-scheme.
+	 * @var int
+	 */
+	var $displacementx = "";
+	
+	/**
+	 * The displacementy attribute from the xml-scheme.
+	 * @var int
+	 */
+	var $displacementy = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Displacement>\n";
+		$temp .= $offset." <DisplacementX>".htmlspecialchars($this->displacementx)."</DisplacementX>\n";
+		$temp .= $offset." <DisplacementY>".htmlspecialchars($this->displacementy)."</DisplacementY>\n";
+		$temp .= $offset."</Displacement>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"".$id."\" value=\"displacement\">\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  DisplacementX:\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_displacementx\" value=\"".htmlspecialchars($this->displacementx)."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  DisplacementY:\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_displacementy\" value=\"".htmlspecialchars($this->displacementy)."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_displacementx"]))
+		{
+			$this->displacementx = $_REQUEST[$id."_displacementx"];
+		}
+		if (isset($_REQUEST[$id."_displacementy"]))
+		{
+			$this->displacementy = $_REQUEST[$id."_displacementy"];
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Displacement.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/DisplayOperationModule.php
===================================================================
--- branches/2.5/http/sld/classes/DisplayOperationModule.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/DisplayOperationModule.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,66 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Template Class that is used to display the operations
+ * creates the hmtl source code for the operations
+ * similar to the AddOperationModule
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class DisplayOperationModule
+{
+	/**
+	 * function that creates the html-form-fragment sourcecode
+	 * 
+	 * @param $offset string whitespaces that should be added in every row of sourcecode for formatting
+	 * @param $operations array containing the operations for which the source should be created
+	 * @return string the created code
+	 */
+	function generateHtmlForm($offset = "", $operations, $id)
+	{
+		$temp = "";
+		$operation_id = 0;
+		$max = count($operations);
+		foreach ($operations as $operation)
+		{
+			if ($id == "")
+			{
+				$temp .= $operation->generateHtmlForm($id."operation_".$operation_id, $offset);
+			}
+			else
+			{
+				$temp .= $operation->generateHtmlForm($id."_operation_".$operation_id, $offset);
+			}
+			//Display emtpy row or line to separate the operations
+			if ($operation_id+1 < $max)
+			{
+				$temp .= $offset."<tr>\n";
+				$temp .= $offset." <td colspan=\"4\">\n";
+				$temp .= $offset."  <hr style=\"color: black\">\n";
+				$temp .= $offset." </td>\n";
+				$temp .= $offset."</tr>\n";	
+			}
+			$operation_id++;
+		}
+		return $temp;
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/DisplayOperationModule.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/ElseFilter.php
===================================================================
--- branches/2.5/http/sld/classes/ElseFilter.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/ElseFilter.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,72 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the ElseFilter-element.
+ * An ElseFilter can be used instead of a Filter.
+ * An ElseFilter is always true an should be used to group those
+ * entities that do not have a specific rule for themselves.
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class ElseFilter extends Rule
+{
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<ElseFilter />\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"elsefilter\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr>\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   ElseFilter:<br>\n";
+		$temp .= $offset."   <a class=\"edit\" href=\"sld_edit_filter.php?function=deletefilter\">";
+		$temp .= "<img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/ElseFilter.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/ExternalGraphic.php
===================================================================
--- branches/2.5/http/sld/classes/ExternalGraphic.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/ExternalGraphic.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,143 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the ExternalGraphic-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class ExternalGraphic
+{
+	/**
+	 * The onlineresource element from the xml-scheme.
+	 * @var string
+	 */
+	var $onlineresource = "";
+	
+	/**
+	 * The format element from the xml-scheme.
+	 * @var string
+	 */
+	var $format = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ExternalGraphic>\n";
+		$temp .= $offset." <OnlineResource xlink:href=\"".htmlspecialchars($this->onlineresource)."\" />\n";
+		$temp .= $offset." <Format>".htmlspecialchars($this->format)."</Format>\n";
+		$temp .= $offset."</ExternalGraphic>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table style=\"border: 1px solid black;\" >\n";
+		$temp .= $offset." <tr valign='top'>\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   ExternalGraphic<br>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deleteexternalgraphicormark&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"externalgraphic\">\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		
+		$temp .= $offset."   <table border=\"0\">\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      OnlineResource:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_onlineresource\" value=\"".htmlspecialchars($this->onlineresource)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      Format:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_format\" value=\"".htmlspecialchars($this->format)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."   </table>\n";
+		
+		//TODO: Selectbox f�r Format
+
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."  <br>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_onlineresource"]))
+		{
+			$this->onlineresource = $_REQUEST[$id."_onlineresource"];
+		}
+		if (isset($_REQUEST[$id."_format"]))
+		{
+			$this->format = $_REQUEST[$id."_format"];
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/ExternalGraphic.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/FeatureTypeStyle.php
===================================================================
--- branches/2.5/http/sld/classes/FeatureTypeStyle.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/FeatureTypeStyle.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,197 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the FeatureTypeStyle-element
+ * 
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class FeatureTypeStyle extends UserStyle
+{
+	/**
+	 * Array containing the Rule-objects
+	 *
+	 * @see Rule
+	 * @var array
+	 */
+	var $rules = array();
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * Array containing the FeatureTypes attribute names (aka elements), acquired either by a 
+	 * - Mapbender WFS-configuration
+	 * - or via a DescribeFeatureType request (niy)
+	 * @see PropertyIsEqualTo, TextSymbolizer 
+	 * @var array
+	 */
+	var $attrs = array();
+	
+	final function setElementArray($name,$array) {
+		$this->attrs[$name] = $array;
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<FeatureTypeStyle>\n";
+		foreach($this->rules as $rule)
+		{
+			$temp .= $rule->generateXml($offset." ");
+		}
+		$temp .= $offset."</FeatureTypeStyle>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{	
+		###### -----------> Fensterrahmen Rule
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"".$id."\" value=\"featuretypestyle\">\n";
+		$temp .= $offset."<table border=\"0\" cellspacing=\"2\" cellspacing=\"1\">\n";
+		
+		$rule_id = 0;
+		foreach ($this->rules as $rule)
+		{
+			$temp .= $offset." <tr>\n";
+			$temp .= $rule->generateHtmlForm($id."_rule_".$rule_id, $offset."  ");
+			$rule_id++;
+			$temp .= $offset." </tr>\n";
+			
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset."<td colspan=\"3\"' height='5'>\n";
+			$temp .= $offset."<hr size='1' noshade color='#86A6C5'>\n";
+			$temp .= $offset."</td>\n";				
+			$temp .= $offset."</tr>\n";
+		}
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset."<td colspan=\"3\">\n";
+			$temp .= $offset."<table width='100%' border='0' cellspacing=\"2\" cellspacing=\"1\">\n";
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset."<td>\n";		
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addrule&id=".$this->id."\">\n";
+			$temp .= $offset."<img src='./img/plus.gif' border='0' alt='Rule hinzuf�gen'>&nbsp;hinzuf&uuml;gen\n";		
+			$temp .= $offset."</a>\n";
+			$temp .= $offset."</td>\n";		
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."</table>\n";				
+			$temp .= $offset."</td>\n";
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."</table>\n";
+
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$countRules = 0;
+		while (isset($_REQUEST[$id."_rule_".$countRules]))
+		{
+			$rule = new Rule();
+			$rule->generateObjectFromPost($id."_rule_".$countRules);
+			$this->rules[] = $rule;
+			$countRules++;
+		}
+	}
+	/**
+	 * adds a new Rule object to the $rules array
+	 *
+	 * this function is called from sld_function_handler.php
+	 */
+	function addRule()
+	{
+		$this->rules[] = new Rule();
+	}
+	/**
+	 * deletes the rule with the given index from the $rules array
+	 *
+	 * this function is called from sld_function_handler.php
+	 *
+	 * @param int $index index of the rule that has to be deleted
+	 */
+	function deleteRule($index)
+	{
+		array_splice($this->rules, $index, 1);
+	}
+	/**
+	 * generates html with the fts elements to choose from, useful for Label, Filter, etc.
+	 * 
+	 * @param string $field string that holds the id of the form field where to return the selected value
+	 *
+	 * @param string $value string that holds the name of an already used element name
+	 * 
+	 * @return string html-fragment that lists the elements, each can be clicked and the name is 
+	 * returned to the form field 
+	 */
+	final function generateElementsHtml($field,$value)
+	{
+		$html = "";
+		if ($this->attrs) {
+			$html .= "<select name='elementname' onchange=\"if (this.selectedIndex!=0) document.getElementById('".$field."').value=this.options[this.selectedIndex].value;\">\n";
+			$html .= "<option>Choose ...</option>";
+			foreach ($this->attrs["element_name"] as $ename) {
+				$html .= "<option value='".$ename."' ";
+				if ($value == $ename)
+					$html .= "selected";
+				$html .= ">".$ename."<otion>\n";
+			}
+			$html .= "</select>\n";
+		}
+		return $html;
+	}
+	
+}
+
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/FeatureTypeStyle.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Fill.php
===================================================================
--- branches/2.5/http/sld/classes/Fill.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Fill.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,172 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Fill-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Fill
+{
+	/**
+	 * The GraphicFill object from the xml-scheme.
+	 *
+	 * @see GraphicFill
+	 * @var string
+	 */
+	var $graphicfill = "";
+	
+	/**
+	 * Array containing the CssParameter objects from the xml-scheme.
+	 *
+	 * @see CssParameter
+	 * @var array
+	 */
+	var $cssparameters = array();
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Fill>\n";
+		if ($this->graphicfill != "") $temp .= $this->graphicfill->generateXml($offset." ");
+		foreach ($this->cssparameters as $cssparameter)
+		{
+			$temp .= $cssparameter->generateXml($offset." ");
+		}
+		$temp .= $offset."</Fill>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "<hr class=\"sep\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   Fill<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"fill\">\n";
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletefill&id=".$this->parent."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td valign=\"top\">\n";
+		if ($this->graphicfill != "")
+		{
+			$temp .= $this->graphicfill->generateHtmlForm($id."_graphicfill", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=addgraphicfill&id=".$this->id."\">GraphicFill hinzuf&uuml;gen</a><br>\n";
+		}
+		$cssparameter_id = 0;
+		foreach ($this->cssparameters as $cssparameter)
+		{
+			$temp .= $cssparameter->generateHtmlForm($id."_cssparameter_".$cssparameter_id, $offset."   ");
+			$cssparameter_id++;
+		}
+		$temp .= $offset."   <select name=\"".$id."_newcssparameter\">\n";
+		$temp .= $offset."    <option value=\"fill\">fill</option>\n";
+		$temp .= $offset."    <option value=\"fill-opacity\">fill-opacity</option>\n";
+		$temp .= $offset."   </select>\n";
+		$temp .= $offset."   <input type=\"button\" value=\"hinzuf&uuml;gen\"";
+		//Javascript to make a http request
+		$temp .= " onClick=\"url='sld_function_handler.php?function=addcssparameter&id=".$this->id."&cssparameter=';";
+		$temp .= " url += ".$id."_newcssparameter.value;";
+		$temp .= " location.href = url;\"";
+		$temp .= ">\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_graphicfill"]))
+		{
+			$this->graphicfill = new GraphicFill();
+			$this->graphicfill->generateObjectFromPost($id."_graphicfill");
+		}
+		$countCssParameters = 0;
+		while (isset($_REQUEST[$id."_cssparameter_".$countCssParameters]))
+		{
+			$cssParameter = new CssParameter();
+			$cssParameter->generateObjectFromPost($id."_cssparameter_".$countCssParameters);
+			$this->cssparameters[] = $cssParameter;
+			$countCssParameters++;
+		}
+	}
+	
+	/**
+	 * Function that adds a new CssParameter to the array.
+	 * @param string $cssparameter the name of the new CssParameter object
+	 */
+	function addCssParameter($cssParameter)
+	{
+		$newCssParameter = new CssParameter();
+		$newCssParameter->name = $cssParameter;
+		$this->cssparameters[] = $newCssParameter;
+	}
+	
+	/**
+	 * Deletes the CssParameter at the given index.
+	 * @param int $index index of the CssParamater in the array that has to be deleted
+	 */
+	function deleteCssParameter($index)
+	{
+		array_splice($this->cssparameters, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Fill.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Filter.php
===================================================================
--- branches/2.5/http/sld/classes/Filter.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Filter.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,180 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * This file contains the classes used for editing filter expressions.
+ * Filter expressions are currently limited to logical and comparison operations.
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+
+
+
+/**
+ * This class is the implementation of the filter-element from ogc:filter.
+ *
+ * This element builds up the root of filter-expressions.
+ * This class is directly referred to in the sld_edit_filter.php.
+ * 
+ * @package filter_classes
+ */
+class Filter extends Rule
+{
+	/**
+	 * Array containing the operations of this filter
+	 * @see UnaryLogicOp
+	 * @see BinaryLogicOp
+	 * @see BinaryComparisonOp
+	 * @see PropertyIsLike
+	 * @see PropertyIsNull
+	 * @see PropertyIsBetween
+	 * @var array
+	 */
+	var $operations = array();
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ogc:Filter>\n";
+		foreach($this->operations as $operation)
+		{
+			$temp .= $operation->generateXml($offset." ");
+		}
+		$temp .= $offset."</ogc:Filter>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"filter\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr>\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   Filter:<br>\n";
+		$temp .= $offset."   <a class=\"edit\" href=\"sld_edit_filter.php?function=deletefilter\">";
+		$temp .= "<img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td colspan=\"3\">\n";
+		$temp .= $offset."  &nbsp;\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		
+		$displayOperationModule = new DisplayOperationModule();
+		$temp .= $displayOperationModule->generateHtmlForm($offset." ", $this->operations, $id);
+		
+		if (count($this->operations) == 0)
+		{
+			$temp .= $offset." <tr>\n";
+			$temp .= $offset."  <td colspan=\"4\">\n";
+			
+			$addOperationModule = new AddOperationModule($this->id, $id);
+			$temp .= $addOperationModule->generateHtmlForm($offset."    ");
+			
+			$temp .= $offset."  </td>\n";
+			$temp .= $offset." </tr>\n";
+		}
+		$temp .= $offset."</table>\n";
+		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$countOperations = 0;
+		while (isset($_REQUEST[$id."operation_".$countOperations]))
+		{
+			if ($_REQUEST[$id."operation_".$countOperations] == "binaryComparisonOp")
+			{
+				$operation = new BinaryComparisonOp();
+			}
+			if ($_REQUEST[$id."operation_".$countOperations] == "binaryLogicOp")
+			{
+				$operation = new BinaryLogicOp();
+			}
+			if ($_REQUEST[$id."operation_".$countOperations] == "unaryLogicOp")
+			{
+				$operation = new UnaryLogicOp();
+			}
+			if ($_REQUEST[$id."operation_".$countOperations] == "propertyIsLike")
+			{
+				$operation = new PropertyIsLike();
+			}
+			if ($_REQUEST[$id."operation_".$countOperations] == "propertyIsNull")
+			{
+				$operation = new PropertyIsNull();
+			}
+			if ($_REQUEST[$id."operation_".$countOperations] == "propertyIsBetween")
+			{
+				$operation = new PropertyIsBetween();
+			}
+			$operation->generateObjectFromPost($id."operation_".$countOperations);
+			$this->operations[] = $operation;
+			$countOperations++;
+		}
+	}
+	
+	/**
+	 * deletes the rule with the given index from the $operations array
+	 * @param int $index index of the operation that has to be deleted
+	 */
+	function deleteOperation($index)
+	{
+		array_splice($this->operations, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Filter.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Font.php
===================================================================
--- branches/2.5/http/sld/classes/Font.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Font.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,156 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Font-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Font
+{
+	/**
+	 * Array containing the CssParameter objects from the sld.
+	 *
+	 * @see CssParameter
+	 * @var array
+	 */
+	var $cssparameters = array();
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Font>\n";
+		foreach ($this->cssparameters as $cssparameter)
+		{
+			$temp .= $cssparameter->generateXml($offset." ");
+		}
+		$temp .= $offset."</Font>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "<hr class=\"sep\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   Font<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"font\">\n";
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletefont&id=".$this->parent."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		$cssparameter_id = 0;
+		foreach ($this->cssparameters as $cssparameter)
+		{
+			$temp .= $cssparameter->generateHtmlForm($id."_cssparameter_".$cssparameter_id, $offset."   ");
+			$cssparameter_id++;
+		}
+		$temp .= $offset."   <select name=\"".$id."_newcssparameter\">\n";
+		$temp .= $offset."    <option value=\"font-family\">font-family</option>\n";
+		$temp .= $offset."    <option value=\"font-size\">font-size</option>\n";
+		
+		//Probably not supported by Mapserver
+		//$temp .= $offset."<option value=\"font-style\">font-style</option>\n";
+		//$temp .= $offset."<option value=\"font-weight\">font-weight</option>\n";
+		
+		$temp .= $offset."   </select>\n";
+		$temp .= $offset."   <input type=\"button\" value=\"hinzuf&uuml;gen\"";
+		//Javascript to make a http request
+		$temp .= " onClick=\"url='sld_function_handler.php?function=addcssparameter&id=".$this->id."&cssparameter=';";
+		$temp .= " url += ".$id."_newcssparameter.value;";
+		$temp .= " location.href = url;\"";
+		$temp .= ">\n";
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$countCssParameters = 0;
+		while (isset($_REQUEST[$id."_cssparameter_".$countCssParameters]))
+		{
+			$cssParameter = new CssParameter();
+			$cssParameter->generateObjectFromPost($id."_cssparameter_".$countCssParameters);
+			$this->cssparameters[] = $cssParameter;
+			$countCssParameters++;
+		}
+	}
+	
+	/**
+	 * Adds a new CssParameter object to the array.
+	 * @param string $cssParameter name of the new CssParameter object
+	 */
+	function addCssParameter($cssParameter)
+	{
+		$newCssParameter = new CssParameter();
+		$newCssParameter->name = $cssParameter;
+		$this->cssparameters[] = $newCssParameter;
+	}
+	
+	/**
+	 * Deletes the CssParameter object at the given index.
+	 * @param int $index index of the CssParameter object that should be deleted
+	 */
+	function deleteCssParameter($index)
+	{
+		array_splice($this->cssparameters, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Font.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Graphic.php
===================================================================
--- branches/2.5/http/sld/classes/Graphic.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Graphic.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,243 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Graphic-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Graphic
+{
+	/**
+	 * Array containing ExternalGraphic or Mark objects.
+	 *
+	 * @see ExternalGraphic
+	 * @see Mark
+	 * @var array
+	 */
+	var $externalgraphicsormarks = array();
+	
+	/**
+	 * The opacity element from the xml-scheme.
+	 *
+	 * Not sure if this feature is supported by UMN-MapServer!
+	 *
+	 * @var string
+	 */
+	var $opacity = "";
+	
+	/**
+	 * The size element from the xml-scheme.
+	 * @var string
+	 */
+	var $size = "";
+	
+	/**
+	 * The rotation element from the xml-scheme.
+	 *
+	 * Not sure if this feature is supported by UMN-MapServer!
+	 *
+	 * @var int
+	 */
+	var $rotation = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Graphic>\n";
+		foreach ($this->externalgraphicsormarks as $externalgraphicormark)
+		{
+			$temp .= $externalgraphicormark->generateXml($offset." ");
+		}
+		if ($this->opacity != "") $temp .= $offset." <Opacity>".htmlspecialchars($this->opacity)."</Opacity>\n";
+		if ($this->size != "") $temp .= $offset." <Size>".htmlspecialchars($this->size)."</Size>\n";
+		if ($this->rotation != "") $temp .= $offset." <Rotation>".htmlspecialchars($this->rotation)."</Rotation>\n";
+		$temp .= $offset."</Graphic>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table border='0' cellpadding='2' cellspacing='0'>\n";
+		$temp .= $offset."<tr valign='top'>\n";
+		$temp .= $offset."<td>\n";
+		$temp .= $offset."<span>\n";
+		$temp .= $offset."Graphic:\n";
+		$temp .= $offset."</span>\n";		
+		$temp .= $offset."<br>\n";
+		$temp .= $offset."<input type=\"hidden\" name=\"".$id."\" value=\"graphic\">\n";
+		$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=deletegraphic&id=".$this->parent."\">";
+		$temp .= $offset."<img src='./img/minus.gif' border='0' alt='Rule l&ouml;schen'>&nbsp;l&ouml;schen";
+		$temp .= $offset."</a>\n";
+		$temp .= $offset."</td>\n";
+		$temp .= $offset."<td valign='top'>\n";
+		
+			$temp .= $offset."   <table border='1' cellpadding='2' cellspacing='1'>\n";
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td class='edit_label_bg edit_label_text' style=\"width: 100px;\">\n";
+			$temp .= $offset."      Opacity:\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."      <input class='inputfield edit_label_text' name=\"".$id."_opacity\" value=\"".htmlspecialchars($this->opacity)."\">\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."    </tr>\n";
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td class='edit_label_bg edit_label_text'>\n";
+			$temp .= $offset."      Size:\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."      <input class='inputfield edit_label_text' name=\"".$id."_size\" value=\"".htmlspecialchars($this->size)."\">\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."    </tr>\n";
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td class='edit_label_bg edit_label_text'>\n";
+			$temp .= $offset."      Rotation:\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."      <input class='inputfield edit_label_text' name=\"".$id."_rotation\" value=\"".htmlspecialchars($this->rotation)."\">\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."    </tr>\n";
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td valign='top'>\n";
+			$temp .= $offset."      <select class=\"edit_label_text\" name=\"".$id."_newexternalgraphicormark\">\n";
+			$temp .= $offset."       <option value=\"mark\">Mark</option>\n";
+			$temp .= $offset."       <option value=\"externalgraphic\">ExternalGraphic</option>\n";
+			$temp .= $offset."      </select>\n";
+			$temp .= $offset."     </td>\n";			
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."    &nbsp;\n";											
+			$temp .= $offset."     </td>\n";						
+			$temp .= $offset."    </tr>\n";
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td colspan='2'>\n";
+			$externalgraphicormark_id = 0;
+			foreach ($this->externalgraphicsormarks as $externalgraphicormark)
+			{
+				$temp .= $externalgraphicormark->generateHtmlForm($id."_externalgraphicormark_".$externalgraphicormark_id, $offset."");
+				$externalgraphicormark_id++;
+			}									
+			$temp .= $offset."     </td>\n";									
+			$temp .= $offset."    </tr>\n";
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."<input class='edit' type=\"button\" value=\"hinzuf&uuml;gen\"";
+			$temp .= " onClick=\"url='sld_function_handler.php?function=addexternalgraphicormark&id=".$this->id."&externalgraphicormark=';";
+			$temp .= " url += ".$id."_newexternalgraphicormark.value;";
+			$temp .= " location.href = url;\"";
+			$temp .= ">\n";			
+			$temp .= $offset."     </td>\n";						
+			$temp .= $offset."     <td>\n";
+			$temp .= $offset."    &nbsp;\n";
+			$temp .= $offset."     </td>\n";			
+			$temp .= $offset."    </tr>\n";
+			$temp .= $offset."   </table>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";		
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$countExternalGraphicsOrMarks = 0;
+		while (isset($_REQUEST[$id."_externalgraphicormark_".$countExternalGraphicsOrMarks]))
+		{
+			$externalgraphicormark = "";
+			if ($_REQUEST[$id."_externalgraphicormark_".$countExternalGraphicsOrMarks] == "mark")
+			{
+				$externalgraphicormark = new Mark();
+			}
+			else if ($_REQUEST[$id."_externalgraphicormark_".$countExternalGraphicsOrMarks] == "externalgraphic")
+			{
+				$externalgraphicormark = new ExternalGraphic();
+			}
+			$externalgraphicormark->generateObjectFromPost($id."_externalgraphicormark_".$countExternalGraphicsOrMarks);
+			$this->externalgraphicsormarks[] = $externalgraphicormark;
+			$countExternalGraphicsOrMarks++;
+		}
+		if (isset($_REQUEST[$id."_opacity"]))
+		{
+			$this->opacity = $_REQUEST[$id."_opacity"];
+		}
+		if (isset($_REQUEST[$id."_size"]))
+		{
+			$this->size = $_REQUEST[$id."_size"];
+		}
+		if (isset($_REQUEST[$id."_rotation"]))
+		{
+			$this->rotation = $_REQUEST[$id."_rotation"];
+		}
+	}
+	function addExternalGraphicOrMark($externalgraphicormark)
+	{
+		if ($externalgraphicormark == "externalgraphic")
+		{
+			$this->externalgraphicsormarks[] = new ExternalGraphic();
+		}
+		else if ($externalgraphicormark == "mark")
+		{
+			$test = new Mark();
+			$this->externalgraphicsormarks[] = $test;
+		}
+	}
+	function deleteExternalGraphicOrMark($index)
+	{
+		array_splice($this->externalgraphicsormarks, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Graphic.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/GraphicFill.php
===================================================================
--- branches/2.5/http/sld/classes/GraphicFill.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/GraphicFill.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,116 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the GraphicFill-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class GraphicFill
+{
+	/**
+	 * The Graphic object from the xml-scheme.
+	 *
+	 * @see Graphic
+	 * @var object
+	 */
+	var $graphic = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<GraphicFill>\n";
+		if ($this->graphic != "") $temp .= $this->graphic->generateXml($offset." ");
+		$temp .= $offset."</GraphicFill>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table style=\"border: 1px solid black;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   GraphicFill<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"graphicfill\">\n";
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletegraphicfill&id=".$this->parent."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		if ($this->graphic != "")
+		{
+			$temp .= $this->graphic->generateHtmlForm($id."_graphic", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."Graphic hinzuf&uuml;gen<a class='edit' href=\"sld_function_handler.php?function=addgraphic&id=".$this->id."\">Graphic hinzuf&uuml;gen</a><br>\n";
+		}
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_graphic"]))
+		{
+			$this->graphic = new Graphic();
+			$this->graphic->generateObjectFromPost($id."_graphic");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/GraphicFill.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/GraphicStroke.php
===================================================================
--- branches/2.5/http/sld/classes/GraphicStroke.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/GraphicStroke.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,118 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the GraphicStroke-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class GraphicStroke
+{
+	/**
+	 * The Graphic object from the xml-scheme.
+	 *
+	 * @see Graphic
+	 * @var object
+	 */
+	var $graphic = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * Default constructor that automatically creates a Graphic object.
+	 */
+	function GraphicStroke()
+	{
+		$this->graphic = new Graphic();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<GraphicStroke>\n";
+		if ($this->graphic != "") $temp .= $this->graphic->generateXml($offset." ");
+		$temp .= $offset."</GraphicStroke>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table style=\"border: 1px solid black;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   GraphicStroke\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"graphicstroke\">\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		
+		if ($this->graphic != "") $temp .= $this->graphic->generateHtmlForm($id."_graphic", $offset."   ");
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_graphic"]))
+		{
+			$this->graphic = new Graphic();
+			$this->graphic->generateObjectFromPost($id."_graphic");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/GraphicStroke.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Halo.php
===================================================================
--- branches/2.5/http/sld/classes/Halo.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Halo.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,125 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Halo-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Halo
+{
+	/**
+	 * The radius attribute from the xml-scheme.
+	 * @var int
+	 */
+	var $radius = "";
+	
+	/**
+	 * The Fill object from the xml-scheme.
+	 *
+	 * @see Fill
+	 * @var string
+	 */
+	var $fill = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Halo>\n";
+		if ($this->radius != "") $temp .= $offset." <Radius>".htmlspecialchars($this->radius)."</Radius>\n";
+		if ($this->fill != "") $temp .= $this->fill->generateXml($offset." ");
+		$temp .= $offset."</Halo>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "<hr class=\"sep\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   Halo\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"halo\">\n<br />";
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletehalo&id=".$this->parent."\">l&ouml;schen</a>\n";		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   Radius: <input name=\"".$id."_radius\" value=\"".htmlspecialchars($this->radius)."\"><br>\n";
+		if ($this->fill != "") { 
+			$temp .= $this->fill->generateHtmlForm($id."_fill", $offset."   "); }
+		else {
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addfill&id=".$this->id."\">Fill hinzuf&uuml;gen</a><br>\n";
+		}
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_radius"]))
+		{
+			$this->radius = $_REQUEST[$id."_radius"];
+		}
+		if (isset($_REQUEST[$id."_fill"]))
+		{
+			$this->fill = new Fill();
+			$this->fill->generateObjectFromPost($id."_fill");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Halo.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/LabelPlacement.php
===================================================================
--- branches/2.5/http/sld/classes/LabelPlacement.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/LabelPlacement.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,125 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the LabelPlacement-element
+ *
+ * This implementation only supports PointPlacement for Labels, because UMN-Mapservers's implementation is limited to PointPlacement, too.
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class LabelPlacement
+{
+	/**
+	 * The Placement object from the xml-scheme.
+	 * Only PointPlacement is supported in UMN-MapServer.
+	 *
+	 * @see Pointplacement
+	 * @var object
+	 */
+	var $placement = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * Default constructor that automatically creates a PointPlacement object.
+	 */
+	function LabelPlacement()
+	{
+		//Only PointPlacement is supported by MapServer
+		$this->placement = new PointPlacement();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<LabelPlacement>\n";
+		$temp .= $this->placement->generateXml($offset." ");
+		$temp .= $offset."</LabelPlacement>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "<hr class=\"sep\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   LabelPlacement<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"labelplacement\">\n";
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletelabelplacement&id=".$this->parent."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		
+		$temp .= $this->placement->generateHtmlForm($id."_placement", $offset."   ");
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		//Todo - Unterscheidung von PointPlacement und anderen Placements (wenn vorhanden)
+		//not supported by Mapserver
+		if (isset($_REQUEST[$id."_placement"]))
+		{
+			$this->placement = new PointPlacement();
+			$this->placement->generateObjectFromPost($id."_placement");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/LabelPlacement.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/LegendGraphic.php
===================================================================
--- branches/2.5/http/sld/classes/LegendGraphic.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/LegendGraphic.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,154 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the LegendGraphic-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class LegendGraphic extends Rule
+{
+	/**
+	 * The Graphic object from the xml-scheme.
+	 *
+	 * @see Graphic
+	 * @var object
+	 */
+	var $graphic = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<LegendGraphic>\n";
+		//Graphic must occur once
+		if ($this->graphic != "") $temp .= $this->graphic->generateXml($offset." ");
+		$temp .= $offset."</LegendGraphic>\n";
+		return $temp;
+	}
+		
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";				
+		$temp .= $offset."<table width='100%' border='0' cellpadding='1' cellspacing='0'>\n";
+		$temp .= $offset." <tr>\n";
+		$temp .= $offset."  <td class='edit_label_bg edit_label_text' valign='top' width='136'>\n";
+		$temp .= $offset."   LegendGraphic:\n";
+		$temp .= $offset."  </td>\n";
+
+		if ($this->graphic != "")
+		{	
+			$temp .= $offset."<td rowspan='2'>\n";
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."<td rowspan='2' style='border:1px solid black; background-color:#FFFFFF'>\n";		
+			$temp .= $this->graphic->generateHtmlForm($id."_graphic", $offset."   ");
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."&nbsp;\n";
+			$temp .= $offset."</td>\n";
+			$temp .= $offset." </tr>\n";									
+		}
+		else
+		{	
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."&nbsp;\n";
+			$temp .= $offset."</td>\n";
+			$temp .= $offset."<td class='text' style='border:1px solid black; border-bottom:none; background-color:#FFFFFF'>\n";
+			$temp .= $offset."&nbsp;Graphic:\n";
+			$temp .= $offset."</td>\n";
+			$temp .= $offset."</tr>\n";			
+			//--------------------------
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."  <td valign='bottom'>\n";
+			$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"legendgraphic\">\n";
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletelegendgraphic&id=".$this->parent."\">\n";
+			$temp .= $offset."    <img src='./img/minus.gif' border='0' alt='LegendGraphic l&ouml;schen'>&nbsp;l&ouml;schen\n";
+			$temp .= $offset."   </a>\n";
+			$temp .= $offset."  </td>\n";
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."&nbsp;\n";
+			$temp .= $offset."</td>\n";							
+			$temp .= $offset."<td style='border:1px solid black; border-top:none; background-color:#FFFFFF'>\n";
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addgraphic&id=".$this->id."\">\n";
+			$temp .= $offset."   <img src='./img/plus.gif' border='0' alt='Graphic hinzuf&uuml;gen'>&nbsp;hinzuf&uuml;gen</a><br>\n";
+			$temp .= $offset."</td>\n";
+			$temp .= $offset." </tr>\n";				
+		}
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_graphic"]))
+		{
+			$this->graphic = new Graphic();
+			$this->graphic->generateObjectFromPost($id."_graphic");
+		}
+	}
+	
+	/**
+	 * Function that adds a graphic object.
+	 * Not sure if this function is neccessary / in use!
+	 */
+	function addGraphic()
+	{
+		$this->graphic = new Graphic();
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/LegendGraphic.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/LineSymbolizer.php
===================================================================
--- branches/2.5/http/sld/classes/LineSymbolizer.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/LineSymbolizer.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,129 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the LineSymbolizer-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class LineSymbolizer extends Rule
+{
+	/**
+	 * The Stroke object from the xml-scheme.
+	 *
+	 * @see Stroke
+	 * @var object
+	 */
+	var $stroke = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	
+	function LineSymbolizer()
+	{
+		//$this->stroke = new Stroke();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<LineSymbolizer>\n";
+		if ($this->stroke != "") $temp .= $this->stroke->generateXml($offset." ");
+		$temp .= $offset."</LineSymbolizer>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table bgcolor=\"#FFFFFF\" style=\"border: 1px solid black; width:100%;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td class='text' style=\"width: 130px;\">\n";
+		
+		$temp .= $offset."   LineSymbolizer<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"linesymbolizer\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletesymbolizer&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		
+		if ($this->stroke != "")
+		{
+			$temp .= $this->stroke->generateHtmlForm($id."_stroke", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=addstroke&id=".$this->id."\">Stroke hinzuf&uuml;gen</a>\n";
+		}
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."<br>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_stroke"]))
+		{
+			$this->stroke = new Stroke();
+			$this->stroke->generateObjectFromPost($id."_stroke");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/LineSymbolizer.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Mark.php
===================================================================
--- branches/2.5/http/sld/classes/Mark.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Mark.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,179 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Mark-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Mark
+{
+	/**
+	 * The wellknownname element from the xml-scheme.
+	 * @var string
+	 */
+	var $wellknownname = "";
+	
+	/**
+	 * The Fill object from the xml-scheme.
+	 *
+	 * @see Fill
+	 * @var object
+	 */
+	var $fill = "";
+	
+	/**
+	 * The Stroke object from the xml-scheme.
+	 *
+	 * @see Stroke
+	 * @var object
+	 */
+	var $stroke = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Mark>\n";
+		if ($this->wellknownname != "") $temp .= $offset." <WellKnownName>".htmlspecialchars($this->wellknownname)."</WellKnownName>\n";
+		if ($this->fill != "") $temp .= $this->fill->generateXml($offset." ");
+		if ($this->stroke != "") $temp .= $this->stroke->generateXml($offset." ");
+		$temp .= $offset."</Mark>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table style=\"border: 1px solid black;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px\">\n";
+		$temp .= $offset."   Mark<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"mark\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deleteexternalgraphicormark&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   WellKnownName:\n";
+		$temp .= $offset."   <select name=\"".$id."_wellknownname\" onchange=\"document.getElementById('sld_editor_form').submit();\">\n";
+		$temp .= $offset."    <option value=\"square\"";
+		if ($this->wellknownname == "square") $temp .= " selected";
+		$temp .= ">square</option>\n";
+		$temp .= $offset."    <option value=\"circle\"";
+		if ($this->wellknownname == "circle") $temp .= " selected";
+		$temp .= ">circle</option>\n";
+		$temp .= $offset."    <option value=\"triangle\"";
+		if ($this->wellknownname == "triangle") $temp .= " selected";
+		$temp .= ">triangle</option>\n";
+		$temp .= $offset."    <option value=\"star\"";
+		if ($this->wellknownname == "star") $temp .= " selected";
+		$temp .= ">star</option>\n";
+		$temp .= $offset."    <option value=\"cross\"";
+		if ($this->wellknownname == "cross") $temp .= " selected";
+		$temp .= ">cross</option>\n";
+		$temp .= $offset."<option value=\"x\"";
+		if ($this->wellknownname == "x") $temp .= " selected";
+		$temp .= ">x</option>\n";
+		$temp .= $offset."   </select>\n";
+		$temp .= $offset."   <br>\n";
+		//TODO - Zeilenumbruch
+		if ($this->fill != "")
+		{
+			$temp .= $this->fill->generateHtmlForm($id."_fill", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addfill&id=".$this->id."\">Fill hinzuf&uuml;gen</a><br>\n";
+		}
+		if ($this->stroke != "")
+		{
+			$temp .= $this->stroke->generateHtmlForm($id."_stroke", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addstroke&id=".$this->id."\">Stroke hinzuf&uuml;gen</a><br>\n";
+		}
+
+		$temp .= $offset."</td>\n";
+		$temp .= $offset."</tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."<br>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_wellknownname"]))
+		{
+			$this->wellknownname = $_REQUEST[$id."_wellknownname"];
+		}
+		if (isset($_REQUEST[$id."_fill"]))
+		{
+			$this->fill = new Fill();
+			$this->fill->generateObjectFromPost($id."_fill");
+		}
+		if (isset($_REQUEST[$id."_stroke"]))
+		{
+			$this->stroke = new Stroke();
+			$this->stroke->generateObjectFromPost($id."_stroke");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Mark.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/NamedLayer.php
===================================================================
--- branches/2.5/http/sld/classes/NamedLayer.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/NamedLayer.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,138 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the NamedLayer-element
+ *
+ * @package sld_classes
+ * @see StyledLayerDescriptor::$layers
+ * @author Markus Krzyzanowski
+ */
+class NamedLayer extends StyledLayerDescriptor
+{
+	/**
+	 * The name attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $name = "";
+	//Probably not supported by Mapserver - TODO
+	//var $layerfeatureconstraints = "";
+	/**
+	 * Array containing the style-objects of the layer.
+	 *
+	 * @see UserStyle
+	 * @var array
+	 */
+	var $styles = array();
+	// $id and $parent for the $objects session array
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<NamedLayer>\n";
+		$temp .= $offset." <Name>".htmlspecialchars($this->name)."</Name>\n";
+		foreach($this->styles as $style)
+		{
+			$temp .= $style->generateXml($offset." ");
+		}
+		$temp .= $offset."</NamedLayer>\n";
+		return $temp;
+	}
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr>\n";
+		$temp .= $offset."  <td class='edit_label_bg edit_label_text_head'>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"namedlayer\">\n";
+		$temp .= $offset."   <em>&nbsp;&nbsp;Layer: ".htmlspecialchars($this->name)."</em>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."_name\" value=\"".htmlspecialchars($this->name)."\">\n";			
+		$style_id = 0;
+		foreach ($this->styles as $style)
+		{
+			$temp .= $style->generateHtmlForm($id."_style_".$style_id, $offset."    ");
+			$style_id++;
+		}			
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->name = $_REQUEST[$id."_name"];
+		$countStyles = 0;
+		while (isset($_REQUEST[$id."_style_".$countStyles]))
+		{
+			$style = "";
+			if ($_REQUEST[$id."_style_".$countStyles] == "userstyle")
+			{
+				$style = new UserStyle();
+			}
+			else
+			{
+				//Todo evtl: namedstyle erstellen
+				//NamedStyle is currently not supported by UMN-MapServer!
+				//$style = new NamedStyle();
+			}
+			$style->generateObjectFromPost($id."_style_".$countStyles);
+			$this->styles[] = $style;
+			$countStyles++;
+		}
+	}
+}
+
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/NamedLayer.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/ParameterValue.php
===================================================================
--- branches/2.5/http/sld/classes/ParameterValue.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/ParameterValue.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,75 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the ParameterValueType type of elements
+ *
+ * @package sld_classes
+ * @author Michael Schulz
+ */
+class ParameterValue
+{
+	/**
+	 * The value attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $value = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml()
+	{
+		$temp = "<PropertyName>".$this->value."</PropertyName>";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = $this->value;
+		return $temp;
+	}
+	
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/ParameterValue.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/PointPlacement.php
===================================================================
--- branches/2.5/http/sld/classes/PointPlacement.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/PointPlacement.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,151 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the PointPlacement-element
+ *
+ * Creating an instance of this class will also create the anchorpoint and displacement objects for this instance.
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class PointPlacement
+{
+	/**
+	 * The anchorpoint object from the xml-scheme.
+	 *
+	 * @see AnchorPoint
+	 * @var object
+	 */
+	var $anchorpoint = "";
+	
+	/**
+	 * The displacement object from the xml-scheme.
+	 *
+	 * @see Displacement
+	 * @var object
+	 */
+	var $displacement = "";
+	
+	/**
+	 * The rotation attribute from the xml-scheme.
+	 *
+	 * Not sure if this feature is supported in UMN-MapServer.
+	 *
+	 * @var int
+	 */
+	var $rotation = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * Default constructor that automatically creates an AnchorPoint and a Displacement object.
+	 */
+	function PointPlacement()
+	{
+		$this->anchorpoint = new AnchorPoint();
+		$this->displacement = new Displacement();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<PointPlacement>\n";
+		$temp .= $this->anchorpoint->generateXml($offset." ");
+		$temp .= $this->displacement->generateXml($offset." ");
+		if ($this->rotation != "") $temp .= $offset." <Rotation>".htmlspecialchars($this->rotation)."</Rotation>\n";
+		$temp .= $offset."</PointPlacement>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"".$id."\" value=\"pointplacement\">\n";
+		$temp .= $offset."<table>\n";
+
+		$temp .= $this->anchorpoint->generateHtmlForm($id."_anchorpoint", $offset." ");
+		$temp .= $this->displacement->generateHtmlForm($id."_displacement", $offset." ");
+		
+		$temp .= $offset." <tr>\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   Rotation:\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		$temp .= $offset."   <input name=\"".$id."_rotation\" value=\"".htmlspecialchars($this->rotation)."\"><br>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_anchorpoint"]))
+		{
+			$this->anchorpoint = new AnchorPoint();
+			$this->anchorpoint->generateObjectFromPost($id."_anchorpoint");
+		}
+		if (isset($_REQUEST[$id."_displacement"]))
+		{
+			$this->displacement = new Displacement();
+			$this->displacement->generateObjectFromPost($id."_displacement");
+		}
+		if (isset($_REQUEST[$id."_rotation"]))
+		{
+			$this->rotation = $_REQUEST[$id."_rotation"];
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/PointPlacement.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/PointSymbolizer.php
===================================================================
--- branches/2.5/http/sld/classes/PointSymbolizer.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/PointSymbolizer.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,137 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the PointSymbolizer-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class PointSymbolizer extends Rule
+{
+	/**
+	 * The Graphic object from the xml-scheme.
+	 *
+	 * @see Graphic
+	 * @var object
+	 */
+	var $graphic = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	
+	function PointSymbolizer()
+	{
+		//$this->graphic = new Graphic();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<PointSymbolizer>\n";
+		if ($this->graphic != "") $temp .= $this->graphic->generateXml($offset." ");
+		$temp .= $offset."</PointSymbolizer>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table bgcolor=\"#FFFFFF\" style=\"border: 1px solid black; width:100%;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 130px;\">\n";
+		$temp .= $offset."   PointSymbolizer<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"pointsymbolizer\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletesymbolizer&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		if ($this->graphic != "")
+		{
+			$temp .= $this->graphic->generateHtmlForm($id."_graphic", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."Graphic:&nbsp;<a class='edit' href=\"sld_function_handler.php?function=addgraphic&id=".$this->id."\">Graphic hinzuf&uuml;gen</a>\n";
+		}
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."<br>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_graphic"]))
+		{
+			$this->graphic = new Graphic();
+			$this->graphic->generateObjectFromPost($id."_graphic");
+		}
+	}
+	
+	/**
+	 * Function that creates a new Graphic object.
+	 * 
+	 * Not sure if this function is neccessary / in use!
+	 */
+	function addGraphic()
+	{
+		$this->graphic = new Graphic();
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/PointSymbolizer.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/PolygonSymbolizer.php
===================================================================
--- branches/2.5/http/sld/classes/PolygonSymbolizer.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/PolygonSymbolizer.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,151 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the PolygonSymbolizer-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class PolygonSymbolizer extends Rule
+{
+	/**
+	 * The Fill object from the xml-scheme.
+	 *
+	 * @see Fill
+	 * @var object
+	 */
+	var $fill = "";
+	
+	/**
+	 * The Stroke object from the xml-scheme.
+	 *
+	 * @see Stroke
+	 * @var object
+	 */
+	var $stroke = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	
+	function PolygonSymbolizer()
+	{
+		//$this->fill = new Fill();
+		//$this->stroke = new Stroke();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<PolygonSymbolizer>\n";
+		if ($this->fill != "") $temp .= $this->fill->generateXml($offset." ");
+		if ($this->stroke != "") $temp .= $this->stroke->generateXml($offset." ");
+		$temp .= $offset."</PolygonSymbolizer>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table bgcolor=\"#FFFFFF\" style=\"border: 1px solid black; width:100%;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 130px;\">\n";
+		$temp .= $offset."   PolygonSymbolizer<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"polygonsymbolizer\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletesymbolizer&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		if ($this->fill != "")
+		{
+			$temp .= $this->fill->generateHtmlForm($id."_fill", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addfill&id=".$this->id."\">Fill hinzuf&uuml;gen</a><br>\n";
+		}
+		if ($this->stroke != "")
+		{
+			$temp .= $this->stroke->generateHtmlForm($id."_stroke", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=addstroke&id=".$this->id."\">Stroke hinzuf&uuml;gen</a>\n";
+		}
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."<br>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_fill"]))
+		{
+			$this->fill = new Fill();
+			$this->fill->generateObjectFromPost($id."_fill");
+		}
+		if (isset($_REQUEST[$id."_stroke"]))
+		{
+			$this->stroke = new Stroke();
+			$this->stroke->generateObjectFromPost($id."_stroke");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/PolygonSymbolizer.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/PropertyIsBetween.php
===================================================================
--- branches/2.5/http/sld/classes/PropertyIsBetween.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/PropertyIsBetween.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,152 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the PropertyIsBetween-element
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class PropertyIsBetween
+{
+	/**
+	 * The property name
+	 * @var string
+	 */
+	var $ogcPropertyName = "";
+	
+	/**
+	 * The lower boundary for this property
+	 * @var float
+	 */
+	var $upperBoundary = "";
+	
+	/**
+	 * The upper boundary for this property
+	 * @var float
+	 */
+	var $lowerBoundary = "";
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ogc:PropertyIsBetween>\n";
+		$temp .= $offset." <ogc:PropertyName>".$this->ogcPropertyName."</ogc:PropertyName>\n";
+		$temp .= $offset." <ogc:LowerBoundary><ogc:Literal>".$this->lowerBoundary."</ogc:Literal></ogc:LowerBoundary>\n";
+		$temp .= $offset." <ogc:UpperBoundary><ogc:Literal>".$this->upperBoundary."</ogc:Literal></ogc:UpperBoundary>\n";
+		$temp .= $offset."</ogc:PropertyIsBetween>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"propertyIsBetween\">\n";
+		$temp .= $offset."  PropertyName\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td style=\"width: 50px; text-align: center; font-size: large;\">=</td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_ogcpropertyname\" value=\"".$this->ogcPropertyName."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  &nbsp;\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  LowerBoundary\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td style=\"width: 50px; text-align: center; font-size: large;\">=</td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_lowerboundary\" value=\"".$this->lowerBoundary."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  &nbsp;\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  UpperBoundary\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td style=\"width: 50px; text-align: center; font-size: large;\">=</td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_upperboundary\" value=\"".$this->upperBoundary."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."  <a class=\"edit\" href=\"?function=deleteoperation&id=".$this->parent."&number=".$number."\">";
+		$temp .= "<img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->ogcPropertyName = $_REQUEST[$id."_ogcpropertyname"];
+		$this->lowerBoundary = $_REQUEST[$id."_lowerboundary"];
+		$this->upperBoundary = $_REQUEST[$id."_upperboundary"];
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/PropertyIsBetween.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/PropertyIsLike.php
===================================================================
--- branches/2.5/http/sld/classes/PropertyIsLike.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/PropertyIsLike.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,173 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the PropertyIsLike-element
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class PropertyIsLike
+{
+	/**
+	 * wildcard attribute
+	 * @var string
+	 */
+	var $wildCard = "*";
+	
+	/**
+	 * singleChar attribute
+	 * @var string
+	 */
+	var $singleChar = "#";
+	
+	/**
+	 * escape character attribute
+	 * @var string
+	 */
+	var $escape = "!";
+	
+	/**
+	 * Name of the Property
+	 * @var string
+	 */
+	var $ogcPropertyName = "";
+	
+	/**
+	 * Regular Expression using the above variables as escape + ... chars.
+	 * @var string
+	 */
+	var $ogcLiteral = "";
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ogc:PropertyIsLike";
+		$temp .= " wildCard=\"".$this->wildCard."\"";
+		$temp .= " singleChar=\"".$this->singleChar."\"";
+		$temp .= " escape=\"".$this->escape."\"";
+		$temp .= ">\n";
+		$temp .= $offset. " <ogc:PropertyName>".$this->ogcPropertyName."</ogc:PropertyName>\n";
+		$temp .= $offset. " <ogc:Literal>".$this->ogcLiteral."</ogc:Literal>\n";
+		$temp .= $offset."</ogc:PropertyIsLike>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td colspan=\"2\">\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"propertyIsLike\">\n";
+		$temp .= $offset."  WildCard\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_wildcard\" value=\"".$this->wildCard."\">";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>&nbsp;</td>\n";
+		$temp .= $offset."</tr>\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td colspan=\"2\">\n";
+		$temp .= $offset."  singleChar\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_singlechar\" value=\"".$this->singleChar."\">";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>&nbsp;</td>\n";
+		$temp .= $offset."</tr>\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td colspan=\"2\">\n";
+		$temp .= $offset."  Escape\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_escape\" value=\"".$this->escape."\">";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>&nbsp;</td>\n";
+		$temp .= $offset."</tr>\n";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_ogcpropertyname\" value=\"".$this->ogcPropertyName."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td style=\"width:50px; text-align: center;\">\n";
+		$temp .= $offset."  LIKE";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_ogcliteral\" value=\"".$this->ogcLiteral."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."  <a class=\"edit\" href=\"?function=deleteoperation&id=".$this->parent."&number=".$number."\">\n";
+		$temp .= $offset."  <img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->wildCard = $_REQUEST[$id."_wildcard"];
+		$this->singleChar = $_REQUEST[$id."_singlechar"];
+		$this->escape = $_REQUEST[$id."_escape"];
+		$this->ogcPropertyName = $_REQUEST[$id."_ogcpropertyname"];
+		$this->ogcLiteral = $_REQUEST[$id."_ogcliteral"];
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/PropertyIsLike.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/PropertyIsNull.php
===================================================================
--- branches/2.5/http/sld/classes/PropertyIsNull.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/PropertyIsNull.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,119 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the PropertyIsNull-element
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class PropertyIsNull
+{
+	/**
+	 * Name of the Property
+	 * @var string
+	 */
+	var $ogcPropertyName = "";
+	
+	/**
+	 * String. Not sure was this is used for in ogc:filter.
+	 * An "isNull" comparison usually does not require a literal string.
+	 * @var string
+	 */
+	var $ogcLiteral = "";
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<ogc:PropertyIsNull>\n";
+		$temp .= $offset. " <ogc:PropertyName>".$this->ogcPropertyName."</ogc:PropertyName>\n";
+		$temp .= $offset. " <ogc:Literal>".$this->ogcLiteral."</ogc:Literal>\n";
+		$temp .= $offset."</ogc:PropertyIsNull>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"propertyIsNull\">\n";
+		$temp .= $offset."  <input name=\"".$id."_ogcpropertyname\" value=\"".$this->ogcPropertyName."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td style=\"width:50px; text-align: center;\">\n";
+		$temp .= $offset."  NULL";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input name=\"".$id."_ogcliteral\" value=\"".$this->ogcLiteral."\">\n";
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td>\n";
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."  <a class=\"edit\" href=\"?function=deleteoperation&id=".$this->parent."&number=".$number."\">";
+		$temp .= $offset."  <img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->ogcPropertyName = $_REQUEST[$id."_ogcpropertyname"];
+		$this->ogcLiteral = $_REQUEST[$id."_ogcliteral"];
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/PropertyIsNull.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/RasterSymbolizer.php
===================================================================
--- branches/2.5/http/sld/classes/RasterSymbolizer.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/RasterSymbolizer.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,160 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the RasterSymbolizer-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class RasterSymbolizer extends Rule
+{
+	/**
+	 * The Opacity element from the xml-scheme.
+	 * This element is not implemented as an object.
+	 *
+	 * @var string
+	 */
+	var $opacity = "";
+	
+	/**
+	 * The ColorMap object from the xml-scheme.
+	 *
+	 * @see ColorMap
+	 * @var object
+	 */
+	var $colormap = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	
+	function RasterSymbolizer()
+	{
+		//$this->colormap = new ColorMap();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<RasterSymbolizer>\n";
+		if ($this->opacity != "") $temp .= $offset." <Opacity>".htmlspecialchars($this->opacity)."</Opacity>\n";
+		if ($this->colormap != "") $temp .= $this->colormap->generateXml($offset." ");
+		$temp .= $offset."</RasterSymbolizer>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<table bgcolor=\"#FFFFFF\" style=\"border: 1px solid black;width:100%\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 130px;\">\n";
+		
+		$temp .= $offset."   RasterSymbolizer<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"rastersymbolizer\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletesymbolizer&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		$temp .= $offset."  </td>\n";
+		
+		$temp .= $offset."  <td>\n";
+		
+		$temp .= $offset."   <table>\n";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td style=\"width: 100px;\">\n";
+		$temp .= $offset."      Opacity:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_opacity\" value=\"".htmlspecialchars($this->opacity)."\">\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		if ($this->colormap != "")
+		{
+			$temp .= $this->colormap->generateHtmlForm($id."_colormap", $offset."    ");
+		}
+		else
+		{
+			$temp .= $offset."    <tr>\n";
+			$temp .= $offset."     <td colspan=\"2\">\n";
+			$temp .= $offset."      <a class='edit' href=\"sld_function_handler.php?function=addcolormap&id=".$this->id."\">ColorMap hinzuf&uuml;gen</a>\n";
+			$temp .= $offset."     </td>\n";
+			$temp .= $offset."    </tr>\n";
+		}
+		$temp .= $offset."   </table>\n";
+		
+		
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."<br>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_opacity"]))
+		{
+			$this->opacity = $_REQUEST[$id."_opacity"];
+		}
+		if (isset($_REQUEST[$id."_colormap"]))
+		{
+			$this->colormap = new ColorMap();
+			$this->colormap->generateObjectFromPost($id."_colormap");
+		}
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/RasterSymbolizer.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Rule.php
===================================================================
--- branches/2.5/http/sld/classes/Rule.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Rule.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,378 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Rule-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Rule extends FeatureTypeStyle
+{
+	/**
+	 * The name attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $name = "";
+	
+	/**
+	 * The title attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $title = "";
+	
+	/**
+	 * The LegendGraphic element from the xml-scheme.
+	 * @see LegendGraphic
+	 * @var object
+	 */
+	var $legendgraphic = "";
+	
+	/**
+	 * The complete filter expression.
+	 *
+	 * The parsing an editing of the filter expressions is not done in the main sld editor.
+	 * This field contains the complete filter expression without any parsing.
+	 * The parsing is done in sld_filter_parse.php using the classes in sld_filter_classes.php.
+	 * Editing is possible in sld_edit_filter.php. This page is opened in a popup-window.
+	 *
+	 * @see sld_filter_classes.php
+	 * @var string
+	 */
+	var $filter = "";
+	
+	/**
+	 * The miscaledenominator attribute from the xml-scheme.
+	 * @var int
+	 */
+	var $minscaledenominator = "";
+	
+	/**
+	 * The maxscaledenominator attribute from the xml-scheme.
+	 * @var int
+	 */
+	var $maxscaledenominator = "";
+	
+	/**
+	 * Array containing the different symbolizers for this rule.
+	 * @var array
+	 */
+	var $symbolizers = array();
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Rule>\n";
+		if ($this->name != "") $temp .= $offset." <Name>".htmlspecialchars($this->name)."</Name>\n";
+		if ($this->title != "") $temp .= $offset." <Title>".htmlspecialchars($this->title)."</Title>\n";
+		if ($this->legendgraphic != "") $temp .= $this->legendgraphic->generateXml($offset." ");
+		
+		if ($this->filter != "") $temp .= $offset." ".$this->filter."\n";
+		if ($this->minscaledenominator != "") $temp .= $offset." <MinScaleDenominator>".htmlspecialchars($this->minscaledenominator)."</MinScaleDenominator>\n";
+		if ($this->maxscaledenominator != "") $temp .= $offset." <MaxScaleDenominator>".htmlspecialchars($this->maxscaledenominator)."</MaxScaleDenominator>\n";
+		foreach($this->symbolizers as $symbolizer)
+		{
+			$temp .= $symbolizer->generateXml($offset." ");
+		}
+		$temp .= $offset."</Rule>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<td rowspan=\"2\" valign='top'>\n";
+		
+			//Table in the first cell for the attributes of this rule
+			###### -----------> Fenster Rule Eigenschaften
+			$temp .= $offset." <table class='edit_label_bg2' border=\"0\" cellspacing=\"2\" cellpadding=\"1\">\n";
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."   <td class='edit_label_bg edit_label_text'>\n";
+			$temp .= $offset."    Rule:\n";
+			$temp .= $offset."    <input type=\"hidden\" name=\"".$id."\" value=\"rule\">\n";
+			$temp .= $offset."   </td>\n";
+			
+			$number = split("_", $id);
+			$number = $number[count($number)-1];
+			
+			$temp .= $offset."   <td>\n";
+			$temp .= $offset."    &nbsp;\n";
+			$temp .= $offset."   </td>\n";
+			$temp .= $offset."  </tr>\n";
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."   <td class='edit_label_bg edit_label_text'>Name:</td>\n";
+			$temp .= $offset."   <td><input class='inputfield edit_label_text' name=\"".$id."_name\" value=\"".htmlspecialchars($this->name)."\"></td>\n";
+			$temp .= $offset."  </tr>\n";
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."   <td class='edit_label_bg edit_label_text'>Title:</td>\n";
+			$temp .= $offset."   <td><input class='inputfield edit_label_text' name=\"".$id."_title\" value=\"".htmlspecialchars($this->title)."\"></td>\n";
+			$temp .= $offset."  </tr>\n";
+			
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."   <td class='edit_label_bg edit_label_text'>";
+			$temp .= $offset."	 Filter:";
+			$temp .= $offset."	</td>\n";
+			$temp .= $offset."   <td>\n";
+			$temp .= $offset."    <input type=\"hidden\" name=\"".$id."_filter\" value=\"".htmlspecialchars($this->filter)."\">\n";
+			$temp .= $offset."    	<img src='./img/lightning.png' class='hand' border='0' alt='Filter bearbeiten'";
+			$temp .= "onClick=\"window.open('sld_edit_filter.php?sld_form_element_id=".$id."_filter&sld_objects_rule_id=".$this->id."','editFilter',";
+			$temp .= " 'width=1000, height=800, resizable=yes');\">\n";
+			$temp .= $offset."   </td>\n";
+			$temp .= $offset."  </tr>\n";
+			
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."   <td class='edit_label_bg edit_label_text'>Minscale:</td>\n";
+			$temp .= $offset."   <td><input class='inputfield edit_label_text' name=\"".$id."_minscale\" value=\"".$this->minscaledenominator."\"></td>\n";
+			$temp .= $offset."  </tr>\n";
+			$temp .= $offset."  <tr>\n";
+			$temp .= $offset."   <td class='edit_label_bg edit_label_text'>Maxscale:</td>\n";
+			$temp .= $offset."   <td><input class='inputfield edit_label_text' name=\"".$id."_maxscale\" value=\"".$this->maxscaledenominator."\"></td>\n";
+			$temp .= $offset."  </tr>\n";
+			$temp .= $offset."  <tr>\n";				
+			$temp .= $offset."   <td>\n";
+			$temp .= $offset."	  <a class='edit' href=\"sld_function_handler.php?function=deleterule&id=".$this->parent."&number=".$number."\">\n";
+			$temp .= $offset."    <img src='./img/minus.gif' border='0' alt='Rule l&ouml;schen'>&nbsp;l&ouml;schen\n";
+			$temp .= $offset."    </a>\n";
+			$temp .= $offset."   </td>\n";
+			$temp .= $offset."   <td>\n";
+			$temp .= $offset."   	&nbsp;";
+			$temp .= $offset."   </td>\n";
+			$temp .= $offset."  </tr>\n";
+			$temp .= $offset." </table>\n";
+			//End Table in first cell
+		
+		$temp .= $offset."</td>\n";
+		$temp .= $offset."<td>\n";
+		$temp .= $offset."-\n";
+		$temp .= $offset."</td>\n";
+
+		
+		$temp .= $offset."<td>\n";
+			//Second cell for the symbolizers and the legendgraphic			
+			// Table1 in second cell
+			$temp .= $offset."<table class='edit_label_bg2' border=\"0\" cellspacing=\"2\" cellpadding=\"1\">\n";
+			$temp .= $offset."<tr>\n";
+			########### -----------> LEGENDGRAPHIC		
+			if ($this->legendgraphic != "")
+			{
+				$temp .= $offset."<td>\n";
+				$temp .= $this->legendgraphic->generateHtmlForm($id."_legendgraphic", $offset." ");
+				$temp .= $offset."</td>\n";
+				$temp .= $offset."</tr>\n";							
+			}
+			else
+			{	
+			$temp .= $offset."<td class='edit_label_bg edit_label_text' width='136'>\n";			
+			$temp .= $offset."LegendGraphic:\n";
+			$temp .= $offset."</td>\n";			
+			$temp .= $offset."<td>\n";						
+			$temp .= $offset."&nbsp;\n";			
+			$temp .= $offset."</td>\n";						
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addlegendgraphic&id=".$this->id."\">\n";
+			$temp .= $offset."<img src='./img/plus.gif' border='0' alt='LegendGraphic hinzuf&uuml;gen'>&nbsp;hinzuf&uuml;gen</a>\n";
+			$temp .= $offset."</td>\n";	
+			$temp .= $offset."<td>\n";
+			$temp .= $offset."&nbsp;\n";									
+			$temp .= $offset."</td>\n";														
+			$temp .= $offset."</tr>\n";
+			}
+			$temp .= $offset."</table>\n";
+			//End Table1 in second cell
+			
+		$temp .= $offset."</td>\n";
+		$temp .= $offset."</tr>\n";
+
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset."<td>\n";
+		$temp .= $offset."-\n";
+		$temp .= $offset."</td>\n";
+
+		$temp .= $offset."<td>\n";
+
+			// Table in second cell
+			$temp .= $offset."<table class='edit_label_bg2' border=\"0\" cellspacing=\"2\" cellpadding=\"1\">\n";
+			########### -----------> SYMBOLIZER
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset."<td class='edit_label_bg edit_label_text' valign='top'>\n";
+			$temp .= $offset." <select class=\"edit_label_text\" name=\"".$id."_newsymbolizer\">\n";
+			$temp .= $offset."  <option value=\"textsymbolizer\">Textsymbolizer</option>\n";
+			$temp .= $offset."  <option value=\"polygonsymbolizer\">Polygonsymbolizer</option>\n";
+			$temp .= $offset."  <option value=\"pointsymbolizer\">Pointsymbolizer</option>\n";
+			$temp .= $offset."  <option value=\"rastersymbolizer\">Rastersymbolizer</option>\n";
+			$temp .= $offset."  <option value=\"linesymbolizer\">Linesymbolizer</option>\n";
+			$temp .= $offset." </select>\n";					
+			$temp .= $offset."</td>\n";
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."<tr>\n";			
+			$temp .= $offset."<td>\n";	
+			$symbolizer_id = 0;
+			foreach ($this->symbolizers as $symbolizer)
+			{
+				$temp .= $symbolizer->generateHtmlForm($id."_symbolizer_".$symbolizer_id, $offset."  ");
+				$symbolizer_id++;
+			}
+			$temp .= $offset."</td>\n";							
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."<tr>\n";
+			$temp .= $offset."<td valign='bottom'>\n";		
+			$temp .= $offset."<input class=\"edit\" type=\"button\" value=\"hinzuf&uuml;gen\"";
+			//Javascript to make a http request
+			$temp .= " onClick=\"url='sld_function_handler.php?function=addsymbolizer&id=".$this->id."&symbolizer=';";
+			$temp .= " url += ".$id."_newsymbolizer.value;";
+			$temp .= " location.href = url;\"";
+			$temp .= ">\n";
+			$temp .= $offset."</td>\n";
+			$temp .= $offset."</tr>\n";
+			$temp .= $offset."</table>\n";
+			//End Table in second cell
+			
+		$temp .= $offset."</td>\n";													
+		$temp .= $offset."</tr>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->name = $_REQUEST[$id."_name"];
+		$this->title = $_REQUEST[$id."_title"];
+		
+		$this->filter = $_REQUEST[$id."_filter"];
+		
+		$this->minscaledenominator = $_REQUEST[$id."_minscale"];
+		$this->maxscaledenominator = $_REQUEST[$id."_maxscale"];
+		if (isset($_REQUEST[$id."_legendgraphic"]))
+		{
+			$this->legendgraphic = new LegendGraphic();
+			$this->legendgraphic->generateObjectFromPost($id."_legendgraphic");
+		}
+		$countSymbolizers = 0;
+		while (isset($_REQUEST[$id."_symbolizer_".$countSymbolizers]))
+		{
+			$symbolizer = "";
+			if ($_REQUEST[$id."_symbolizer_".$countSymbolizers] == "linesymbolizer")
+			{
+				$symbolizer = new LineSymbolizer();
+			}
+			else if ($_REQUEST[$id."_symbolizer_".$countSymbolizers] == "polygonsymbolizer")
+			{
+				$symbolizer = new PolygonSymbolizer();
+			}
+			else if ($_REQUEST[$id."_symbolizer_".$countSymbolizers] == "pointsymbolizer")
+			{
+				$symbolizer = new PointSymbolizer();
+			}
+			else if ($_REQUEST[$id."_symbolizer_".$countSymbolizers] == "textsymbolizer")
+			{
+				$symbolizer = new TextSymbolizer();
+			}
+			else if ($_REQUEST[$id."_symbolizer_".$countSymbolizers] == "rastersymbolizer")
+			{
+				$symbolizer = new RasterSymbolizer();
+			}
+			
+			$symbolizer->generateObjectFromPost($id."_symbolizer_".$countSymbolizers);
+			$this->symbolizers[] = $symbolizer;
+			$countSymbolizers++;
+		}
+	}
+	
+	/**
+	 * Function that adds a symbolizer to the symbolizers array.
+	 *
+	 * This function is called from sld_function_handler.php
+	 *
+	 * @param string $symbolizer string containing the type of the symbolizer that has to be added
+	 */
+	function addSymbolizer($symbolizer)
+	{
+		if ($symbolizer == "linesymbolizer")
+		{
+			$this->symbolizers[] = new LineSymbolizer();
+		}
+		else if ($symbolizer == "textsymbolizer")
+		{
+			$this->symbolizers[] = new TextSymbolizer();
+		}
+		else if ($symbolizer == "polygonsymbolizer")
+		{
+			$this->symbolizers[] = new PolygonSymbolizer();
+		}
+		else if ($symbolizer == "rastersymbolizer")
+		{
+			$this->symbolizers[] = new RasterSymbolizer();
+		}
+		else if ($symbolizer == "pointsymbolizer")
+		{
+			$this->symbolizers[] = new PointSymbolizer();
+		}
+	}
+	
+	/**
+	 * Deletes the symbolizer at the given index from the symbolizers array.
+	 *
+	 * This function is called from sld_function_handler.php
+	 *
+	 * @param int $index index of the symbolizer that should be deleted.
+	 */
+	function deleteSymbolizer($index)
+	{
+		array_splice($this->symbolizers, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Rule.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/Stroke.php
===================================================================
--- branches/2.5/http/sld/classes/Stroke.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/Stroke.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,202 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the Stroke-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class Stroke
+{
+	//choice
+	//GraphicFill and GraphicStroke are not supported by Mapserver
+	//var $graphicfill = "";
+	//var $graphicstroke = "";
+	//end choice
+	
+	/**
+	 * Array containing the CssParameter objects from the xml-scheme.
+	 *
+	 * @see CssParameter
+	 * @var array
+	 */
+	var $cssparameters = array();
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<Stroke>\n";
+		//if ($this->graphicfill != "") $temp .= $this->graphicfill->generateXml($offset." ");
+		//if ($this->graphicstroke != "") $temp .= $this->graphicstroke->generateXml($offset." ");
+		foreach ($this->cssparameters as $cssparameter)
+		{
+			$temp .= $cssparameter->generateXml($offset." ");
+		}
+		$temp .= $offset."</Stroke>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = $offset."<hr class=\"sep\">\n";
+		$temp .= $offset."<table>\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."  <td style=\"width: 100px;\">\n";
+		$temp .= $offset."   Stroke<br>\n";
+		$temp .= $offset."   <input type=\"hidden\" name=\"".$id."\" value=\"stroke\">\n";
+		$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=deletestroke&id=".$this->parent."\">l&ouml;schen</a>\n";
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td valign=\"top\">\n";
+
+//		if ($this->graphicfill == "" && $this->graphicstroke == "")
+//		{
+//			//Add new Graphicfill or Graphicstroke TODO!!!
+//			$temp .= $offset."<select name=\"".$id."_newgraphicfillorgraphicstroke\">\n";
+//			$temp .= $offset."<option value=\"graphicfill\">GraphicFill</option>\n";
+//			$temp .= $offset."<option value=\"graphicstroke\">GraphicStroke</option>\n";
+//			$temp .= $offset."</select>\n";
+//			$temp .= $offset."<input type=\"button\" value=\"GraphicFill oder GraphicStroke hinzuf&uuml;gen\"";
+//			$temp .= $offset." onClick=\"url='sld_function_handler.php?function=addgraphicfillorgraphicstroke&id=".$id."&graphicfillorgraphicstroke=';";
+//			$temp .= $offset." url += ".$id."_newgraphicfillorgraphicstroke.value;";
+//			$temp .= $offset." location.href = url;\"";
+//			$temp .= $offset."><br>\n";
+//		}
+//		else if ($this->graphicfill != "")
+//		{
+//			$this->graphicfill->generateHtmlForm($id."_graphicfill");
+//		}
+//		else if ($this->graphicstroke != "")
+//		{
+//			$this->graphicstroke->generateHtmlForm($id."_graphicstroke");
+//		}
+		
+
+		$cssparameter_id = 0;
+		foreach ($this->cssparameters as $cssparameter)
+		{
+			$temp .= $cssparameter->generateHtmlForm($id."_cssparameter_".$cssparameter_id, $offset."      ");
+			$cssparameter_id++;
+		}
+
+		
+		$temp .= $offset."      <select name=\"".$id."_newcssparameter\">\n";
+		//Some of the options are not supported by Mapserver
+		$temp .= $offset."       <option value=\"stroke\">stroke</option>\n";
+		$temp .= $offset."       <option value=\"stroke-width\">stroke-width</option>\n";
+		$temp .= $offset."       <option value=\"stroke-dasharray\">stroke-dasharray</option>\n";
+		$temp .= $offset."      </select>\n";
+
+		
+		$temp .= $offset."      <input type=\"button\" value=\"hinzuf&uuml;gen\"";
+		//Javascript to make a http request
+		$temp .= " onClick=\"url='sld_function_handler.php?function=addcssparameter&id=".$this->id."&cssparameter=';";
+		$temp .= " url += ".$id."_newcssparameter.value;";
+		$temp .= " location.href = url;\"";
+		$temp .= ">\n";
+
+
+
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+//		if (isset($_REQUEST[$id."_graphicfill"]))
+//		{
+//			$this->graphicfill = new GraphicFill();
+//			$this->graphicfill->generateObjectFromPost($id."_graphicfill");
+//		}
+//		if (isset($_REQUEST[$id."_graphicstroke"]))
+//		{
+//			$this->graphicstroke = new GraphicStroke();
+//			$this->graphicstroke->generateObjectFromPost($id."_graphicstroke");
+//		}
+		$countCssParameters = 0;
+		while (isset($_REQUEST[$id."_cssparameter_".$countCssParameters]))
+		{
+			$cssParameter = new CssParameter();
+			$cssParameter->generateObjectFromPost($id."_cssparameter_".$countCssParameters);
+			$this->cssparameters[] = $cssParameter;
+			$countCssParameters++;
+		}
+	}
+	
+	/**
+	 * Adds a new CssParameter to the array.
+	 * @param string $cssParameter name attribute of the CssParameter that has to be created.
+	 */
+	function addCssParameter($cssParameter)
+	{
+		$newCssParameter = new CssParameter();
+		$newCssParameter->name = $cssParameter;
+		$this->cssparameters[] = $newCssParameter;
+	}
+	
+	/**
+	 * Deletes a CssParameter from the array at the given index.
+	 * @param int $index index of the CssParameter that has to be deleted.
+	 */
+	function deleteCssParameter($index)
+	{
+		array_splice($this->cssparameters, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/Stroke.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/StyledLayerDescriptor.php
===================================================================
--- branches/2.5/http/sld/classes/StyledLayerDescriptor.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/StyledLayerDescriptor.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,212 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * This file contains the class definitions for the sld-editor.
+ *
+ * This class is the implementation of the StyledLayerDescriptor-element of the sld-xml-scheme.
+ * This element builds up the root of every sld-document.
+ * This class is directly referred to in the sld_main.php.
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski, Design for all HTML-output by Bao Ngan
+ */
+class StyledLayerDescriptor
+{
+	/**
+	 * The name attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $name = "";
+	/**
+	 * The title attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $title = "";
+	/**
+	 * The abstract attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $abstract = "";
+	/**
+	 * Array containing the layers of the sld.
+	 * @see NamedLayer
+	 * @var array
+	 */
+	var $layers = array();
+	/**
+	 * The version attribute from the xml-scheme.
+	 * @var string
+	 */
+	var $version = "";
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * Generates the sld-document as an xml-string and returns it.
+	 *
+	 * Calls the generateXml-function of its child objects.
+	 * This object only has layers as childs, all other child-elements of
+	 * StyledLayerDescriptor are modelled as primitive datatypes
+	 * 
+	 * @param string $offset string that should be added at the beginning
+	 * of every line of xml that is being created. Should only contain
+	 * a number of whitespaces to format the output and provide a
+	 * good readability.
+	 *
+	 * @return string the created sld-document
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+		$temp .= $offset."<StyledLayerDescriptor";
+		if ($this->version != "") $temp .= " version=\"".htmlspecialchars($this->version)."\"";
+		$temp .= " xsi:schemaLocation=\"http://www.opengis.net/sld StyledLayerDescriptor.xsd\"";
+		$temp .= " xmlns=\"http://www.opengis.net/sld\"";
+		$temp .= " xmlns:ogc=\"http://www.opengis.net/ogc\""; 
+		$temp .= " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
+		$temp .= " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"";
+		$temp .= ">\n";
+		if ($this->name != "") $temp .= $offset." <Name>".htmlspecialchars($this->name)."</Name>\n";
+		if ($this->title != "") $temp .= $offset." <Title>".htmlspecialchars($this->title)."</Title>\n";
+		if ($this->abstract != "") $temp .= $offset." <Abstract>".htmlspecialchars($this->abstract)."</Abstract>\n";
+
+		
+		foreach($this->layers as $layer)
+		{
+			$temp .= $layer->generateXml($offset." ");
+		}
+		$temp .= $offset."</StyledLayerDescriptor>\n";
+		return $temp;
+	}
+	
+	
+	/**
+	 * Generates a html-form-fragment
+	 * that contains form-elements (e.g. input) for every member of this class.
+	 * Some of these are hidden fields and so they are not editable by the user.
+	 * The reason for this is that some values should not be changed (such as the layer name)
+	 * or they are to complicated for end-users that are not familiar to the sld-xml-scheme.
+	 * 
+	 * Calls the generateHtmlForm-function of its child objects.
+	 *
+	 * @param string $id string identifying the form-elements belonging to this object
+	 * @param string $offset string for formatting the output
+	 * @return string the created html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		//Commented out, because these options should not be changed by the end user
+		//$temp .= $offset."<table style=\"border: 1px solid black\">\n";
+		//$temp .= $offset."<tr>\n";
+		//$temp .= $offset."<td>Name:</td>\n";
+		//$temp .= $offset."<td><input name=\"name\" value=\"".$this->name."\"></td>\n";
+		//$temp .= $offset."</tr>\n";
+		//$temp .= $offset."<tr>\n";
+		//$temp .= $offset."<td>Title:</td>\n";
+		//$temp .= $offset."<td><input name=\"title\" value=\"".$this->title."\"></td>\n";
+		//$temp .= $offset."</tr>\n";
+		//$temp .= $offset."<tr>\n";
+		//$temp .= $offset."<td>Abstract:</td>\n";
+		//$temp .= $offset."<td><input name=\"abstract\" value=\"".$this->abstract."\"></td>\n";
+		//$temp .= $offset."</tr>\n";
+		//$temp .= $offset."<tr>\n";
+		//$temp .= $offset."<td>Version:</td>\n";
+		//$temp .= $offset."<td><input name=\"version\" value=\"".$this->version."\"></td>\n";
+		//$temp .= $offset."</tr>\n";
+		//$temp .= $offset."</table>\n";
+		//$temp .= $offset."<br>\n";
+		
+		//Hidden fields to hold the values
+		$temp .= $offset."<input type=\"hidden\" name=\"name\" value=\"".htmlspecialchars($this->name)."\">\n";
+		$temp .= $offset."<input type=\"hidden\" name=\"title\" value=\"".htmlspecialchars($this->title)."\">\n";
+		$temp .= $offset."<input type=\"hidden\" name=\"abstract\" value=\"".htmlspecialchars($this->abstract)."\">\n";
+		$temp .= $offset."<input type=\"hidden\" name=\"version\" value=\"".htmlspecialchars($this->version)."\">\n";
+		
+		$layer_id = 0;
+		foreach ($this->layers as $layer)
+		{
+			$temp .= $layer->generateHtmlForm("layer_".$layer_id, $offset." ");
+			$layer_id++;
+		}
+		return $temp;
+	}
+	
+	/**
+	 * Populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 * this parameter has no use for this object, because it is only called without a value
+	 * in other classes this parameter should have the same value, that was used in
+	 * generateHtmlForm(...) for the $id to create the html-form
+	 *
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->version = $_REQUEST[$id."version"];
+		$this->name = $_REQUEST[$id."name"];
+		$this->title = $_REQUEST[$id."title"];
+		$this->abstract = $_REQUEST[$id."abstract"];
+		$countLayers = 0;
+		while (isset($_REQUEST[$id."layer_".$countLayers]))
+		{
+			if ($_REQUEST[$id."layer_".$countLayers] == "namedlayer")
+			{
+				$layer = new NamedLayer();
+			}
+			else
+			{
+				//Todo evtl: userlayer erstellen
+				$layer = new NamedLayer();
+			}
+			$layer->generateObjectFromPost($id."layer_".$countLayers);
+			$this->layers[] = $layer;
+			$countLayers++;
+		}
+	}
+}
+
+/**
+ * Loads classes by name
+ * 
+ * If the php interpreter finds a class that is needed in a module or class 
+ * and it is not yet included via include, then it tries to load this class 
+ * with the given name in the current context. No need for includes ... 
+ * 
+ * @param string $class_name
+ */
+function __autoload($class_name) {
+    require_once $class_name . '.php';
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/StyledLayerDescriptor.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/TextSymbolizer.php
===================================================================
--- branches/2.5/http/sld/classes/TextSymbolizer.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/TextSymbolizer.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,224 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the TextSymbolizer-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class TextSymbolizer extends Rule
+{
+	/**
+	 * The Label element from the xml-scheme.
+	 * This element is not implemented as an object.
+	 * Although it is an object, we'll use a workaround ...
+	 * <Label>Townname: <ogc:PropertyValue>NAME</ogc:PropertyValue></Label> should be possible
+	 *
+	 * @var object
+	 */
+	var $label = "";
+	
+	/**
+	 * The Font object from the xml-scheme.
+	 *
+	 * @see Font
+	 * @var object
+	 */
+	var $font = "";
+	
+	/**
+	 * The Labelplacement object from the xml-scheme.
+	 *
+	 * @see LabelPlacement
+	 * @var object
+	 */
+	var $labelplacement = "";
+	
+	//Halo is not supported by Mapserver
+	var $halo = "";
+	
+	//Fill is not supported by Mapserver - only solid color
+	var $fill = "";
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	
+	function TextSymbolizer()
+	{
+		//$this->label = new ParameterValue();
+		//$this->labelplacement = new LabelPlacement();
+		//$this->fill = new Fill();
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<TextSymbolizer>\n";
+		#if ($this->label != "") $temp .= $offset." <Label>".htmlspecialchars($this->label)."</Label>\n";
+		if ($this->label != "") $temp .= $offset." <Label>".$this->label->generateXml()."</Label>\n";
+		if ($this->font != "") $temp .= $this->font->generateXml($offset." ");
+		if ($this->labelplacement != "") $temp .= $this->labelplacement->generateXml($offset." ");
+		if ($this->halo != "") $temp .= $this->halo->generateXml($offset." ");
+		if ($this->fill != "") $temp .= $this->fill->generateXml($offset." ");
+		$temp .= $offset."</TextSymbolizer>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset= "")
+	{
+		$temp = "";
+		$label_value = "";
+		$temp .= $offset."<table bgcolor=\"#FFFFFF\" cellspacing='2' cellpadding='0' style=\"border: 1px solid black; width:100%;\">\n";
+		$temp .= $offset." <tr valign=\"top\">\n";
+		$temp .= $offset."   <td class='text' style=\"width: 130px;\">\n";
+		$temp .= $offset."    TextSymbolizer<br>\n";
+		$temp .= $offset."    <input type=\"hidden\" name=\"".$id."\" value=\"textsymbolizer\">\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		
+		$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=deletesymbolizer&id=".$this->parent."&number=".$number."\">l&ouml;schen</a>\n";
+		
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset."  <td>\n";
+		
+		$temp .= $offset."   <table>";
+		$temp .= $offset."    <tr>\n";
+		$temp .= $offset."     <td style=\"width: 100px\">\n";
+		$temp .= $offset."      Label:\n";
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."     <td>\n";
+		$temp .= $offset."      <input name=\"".$id."_label\" id=\"".$id."_label\" value=\"";
+		if ($this->label != "")
+			$label_value = $this->label->generateHtmlForm($id."_label","");
+			$temp .= $label_value;
+		$temp .= "\">\n";
+		//experimental
+		$temp_elements = $_SESSION["sld_objects"][3]->generateElementsHtml($id."_label",$label_value);
+		$temp .= $offset.$temp_elements;
+		$temp .= $offset."     </td>\n";
+		$temp .= $offset."    </tr>\n";
+		$temp .= $offset."   </table>\n";
+
+		if ($this->font != "")
+		{
+			$temp .= $this->font->generateHtmlForm($id."_font", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=addfont&id=".$this->id."\">Font hinzuf&uuml;gen</a><br>\n";
+		}
+		if ($this->labelplacement != "")
+		{
+			$temp .= $this->labelplacement->generateHtmlForm($id."_labelplacement", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."<a class='edit' href=\"sld_function_handler.php?function=addlabelplacement&id=".$this->id."\">Labelplacement hinzuf&uuml;gen</a><br>\n";
+		}
+		//Halo is not supported - removed from source
+		if ($this->halo != "")
+		{
+			$temp .= $this->halo->generateHtmlForm($id."_halo", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=addhalo&id=".$this->id."\">Halo hinzuf&uuml;gen</a><br>\n";
+		}
+		
+		if ($this->fill != "")
+		{
+			$temp .= $this->fill->generateHtmlForm($id."_fill", $offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."   <a class='edit' href=\"sld_function_handler.php?function=addfill&id=".$this->id."\">Fill hinzuf&uuml;gen</a><br>\n";
+		}
+		$temp .= $offset."  </td>\n";
+		$temp .= $offset." </tr>\n";
+		$temp .= $offset."</table>\n";
+		$temp .= $offset."<br>\n";		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		if (isset($_REQUEST[$id."_label"]))
+		{
+			$this->label = new ParameterValue();
+			$this->label->value = $_REQUEST[$id."_label"];
+		}
+		if (isset($_REQUEST[$id."_font"]))
+		{
+			$this->font = new Font();
+			$this->font->generateObjectFromPost($id."_font");
+		}
+		if (isset($_REQUEST[$id."_labelplacement"]))
+		{
+			$this->labelplacement = new LabelPlacement();
+			$this->labelplacement->generateObjectFromPost($id."_labelplacement");
+		}
+		if (isset($_REQUEST[$id."_halo"]))
+		{
+			$this->halo = new Halo();
+			$this->halo->generateObjectFromPost($id."_halo");
+		}
+		if (isset($_REQUEST[$id."_fill"]))
+		{
+			$this->fill = new Fill();
+			$this->fill->generateObjectFromPost($id."_fill");
+		}
+	}
+}
+?>


Property changes on: branches/2.5/http/sld/classes/TextSymbolizer.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/UnaryLogicOp.php
===================================================================
--- branches/2.5/http/sld/classes/UnaryLogicOp.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/UnaryLogicOp.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,191 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the UnaryLogicOp-element
+ *
+ * @package filter_classes
+ * @author Markus Krzyzanowski
+ */
+class UnaryLogicOp
+{
+	/**
+	 * Defines the type of logical operation.
+	 * Possible value: not
+	 * @var string
+	 */
+	var $name = "";
+	
+	/**
+	 * Array containing the operations of this filter
+	 * @see UnaryLogicOp
+	 * @see BinaryLogicOp
+	 * @see BinaryComparisonOp
+	 * @see PropertyIsLike
+	 * @see PropertyIsNull
+	 * @see PropertyIsBetween
+	 * @var array
+	 */
+	var $operations = array();
+	
+	/**
+	 * Index of this object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	
+	/**
+	 * Index of this object's parent object in the $_SESSION("sld_filter_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * constructor tha directly fills the $name variable
+	 * @param string $name the type of this logical operation
+	 */
+	function UnaryLogicOp($name)
+	{
+		$this->name = $name;
+	}
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<".$this->name.">\n";
+		foreach($this->operations as $operation)
+		{
+			$temp .= $operation->generateXml($offset." ");
+		}
+		$temp .= $offset."</".$this->name.">\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id = "", $offset = "")
+	{
+		$temp = "";
+		
+		$temp .= $offset."<tr>\n";
+		$temp .= $offset." <td>\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."\" value=\"unaryLogicOp\">\n";
+		$temp .= $offset."  <input type=\"hidden\" name=\"".$id."_name\" value=\"".$this->name."\">\n";
+		$temp .= $offset."  ".$this->name."<br>\n";
+		
+		$number = split("_", $id);
+		$number = $number[count($number)-1];
+		$temp .= $offset."   <a class=\"edit\" href=\"?function=deleteoperation&id=".$this->parent."&number=".$number."\">";
+		$temp .= "<img src='./img/minus.gif' border='0'>&nbsp;l&ouml;schen</a>\n";
+				
+		$temp .= $offset." </td>\n";
+		$temp .= $offset." <td colspan=\"3\" valign=\"top\">\n";
+		//Only 1 operation
+		if (count($this->operations) < 1)
+		{
+			$addOperationModule = new AddOperationModule($this->id, $id);
+			$temp .= $addOperationModule->generateHtmlForm($offset."   ");
+		}
+		else
+		{
+			$temp .= $offset."  <table>\n";
+			$displayOperationModule = new DisplayOperationModule();
+			$temp .= $displayOperationModule->generateHtmlForm($offset."   ", $this->operations, $id);
+			$temp .= $offset."  </table>\n";
+		}
+		
+		$temp .= $offset." </td>\n";
+		$temp .= $offset."</tr>\n";
+		
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$this->name = $_REQUEST[$id."_name"];
+		$countOperations = 0;
+		while (isset($_REQUEST[$id."_operation_".$countOperations]))
+		{
+			if ($_REQUEST[$id."_operation_".$countOperations] == "binaryComparisonOp")
+			{
+				$operation = new BinaryComparisonOp();
+			}
+//			if ($_REQUEST[$id."_operation_".$countOperations] == "unaryComparisonOp")
+//			{
+//				$operation = new UnaryComparisonOp();
+//			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "binaryLogicOp")
+			{
+				$operation = new BinaryLogicOp();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "unaryLogicOp")
+			{
+				$operation = new UnaryLogicOp();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "propertyIsLike")
+			{
+				$operation = new PropertyIsLike();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "propertyIsNull")
+			{
+				$operation = new PropertyIsNull();
+			}
+			if ($_REQUEST[$id."_operation_".$countOperations] == "propertyIsBetween")
+			{
+				$operation = new PropertyIsBetween();
+			}
+			$operation->generateObjectFromPost($id."_operation_".$countOperations);
+			$this->operations[] = $operation;
+			$countOperations++;
+		}
+	}
+	
+	/**
+	 * deletes the rule with the given index from the $operations array
+	 * @param int $index index of the operation that has to be deleted
+	 */
+	function deleteOperation($index)
+	{
+		array_splice($this->operations, $index, 1);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/UnaryLogicOp.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/classes/UserStyle.php
===================================================================
--- branches/2.5/http/sld/classes/UserStyle.php	                        (rev 0)
+++ branches/2.5/http/sld/classes/UserStyle.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,110 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * Implementation of the UserStyle-element
+ *
+ * @package sld_classes
+ * @author Markus Krzyzanowski
+ */
+class UserStyle extends NamedLayer
+{
+	/**
+	 * Array containing the FeatureTypeStyle-objects.
+	 *
+	 * @see FeatureTypeStyle
+	 * @var string
+	 */
+	var $featuretypestyles = array();
+	
+	/**
+	 * Index identifying the object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $id = "";
+	/**
+	 * Index identifying the object's parent object in the $_SESSION("sld_objects") array.
+	 * @var int
+	 */
+	var $parent = "";
+	
+	/**
+	 * creates the xml for this object and its child objects
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the xml-fragment
+	 */
+	function generateXml($offset = "")
+	{
+		$temp = $offset."<UserStyle>\n";
+		foreach($this->featuretypestyles as $style)
+		{
+			$temp .= $style->generateXml($offset." ");
+		}
+		$temp .= $offset."</UserStyle>\n";
+		return $temp;
+	}
+	
+	/**
+	 * creates the html-form-fragment for this object
+	 *
+	 * @param $id string containing a prefix that should be used to identify this
+	 * object's html fields. This must be done, so that the generateObjectFromPost(...)
+	 * function can address the fields belonging to this object in the http-post.
+	 *
+	 * @param string $offset string used for formatting the output
+	 * @return string containing the html-form-fragment
+	 */
+	function generateHtmlForm($id, $offset = "")
+	{
+		$temp = "";
+		$temp .= $offset."<input type=\"hidden\" name=\"".$id."\" value=\"userstyle\">\n";
+		$featuretypestyle_id = 0;
+		foreach ($this->featuretypestyles as $featuretypestyle)
+		{
+			$temp .= $featuretypestyle->generateHtmlForm($id."_featuretypestyle_".$featuretypestyle_id, $offset);
+			$featuretypestyle_id++;
+		}
+		return $temp;
+	}
+	
+	/**
+	 * populates the member fields of a new object from the data in the http-post-request
+	 * to rebuild the object after the submission of the html-form.
+	 *
+	 * creates its own child objects from the post parameters and calls their
+	 * generateObjectFromPost(...) function
+	 *
+	 * @param string $id string that contains a prefix for the html-form-fields
+	 * that is common to all of the fields belonging to this object
+	 */
+	function generateObjectFromPost($id = "")
+	{
+		$countFeatureTypeStyles = 0;
+		while (isset($_REQUEST[$id."_featuretypestyle_".$countFeatureTypeStyles]))
+		{
+			$featuretypestyle = new FeatureTypeStyle();
+			$featuretypestyle->generateObjectFromPost($id."_featuretypestyle_".$countFeatureTypeStyles);
+			$this->featuretypestyles[] = $featuretypestyle;
+			$countFeatureTypeStyles++;
+		}
+	}
+}
+
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/classes/UserStyle.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/img/lightning.png
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/lightning.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/map_magnify.png
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/map_magnify.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/minus.gif
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/minus.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/plus.gif
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/plus.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/script.png
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/script.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/script_code_red.png
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/script_code_red.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/script_link.png
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/script_link.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/img/script_save.png
===================================================================
(Binary files differ)


Property changes on: branches/2.5/http/sld/img/script_save.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/2.5/http/sld/sld_config.php
===================================================================
--- branches/2.5/http/sld/sld_config.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_config.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,76 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * This file contains some global configuration variables for the sld-editor
+ *
+ * @package sld_config
+ * @author Markus Krzyzanowski
+ */
+
+include_once(dirname(__FILE__)."/classes/StyledLayerDescriptor.php");
+
+session_start();
+
+include_once(dirname(__FILE__)."/sld_parse.php");
+
+// this should come from mapbender.conf
+$SLD_MAIN = "sld_main.php?".SID;
+$SLD_FUNCTION_HANDLER = "sld_function_handler.php";
+$MAPBENDER_URL = "http://".$_SERVER["HTTP_HOST"].dirname($_SERVER['PHP_SELF']);
+
+function char_encode($s){
+	if(CHARSET == 'UTF-8'){
+		$s = utf8_encode($s);
+	}
+	return $s;
+}
+
+if (isset($_REQUEST["wms_id"]) && isset($_REQUEST["gui_id"]))
+{
+	$_SESSION["sld_wms_id"] = $_REQUEST["wms_id"];
+	$_SESSION["sld_gui_id"] = $_REQUEST["gui_id"];
+}
+
+if (isset($_REQUEST["layer_name"]))
+{
+	$_SESSION["sld_layer_name"] = $_REQUEST["layer_name"];
+}
+
+if (isset($_SESSION["sld_wms_id"]) && isset($_SESSION["sld_layer_name"]))
+{
+	$layer_name = $_SESSION["sld_layer_name"];
+	$wms_id = $_SESSION["sld_wms_id"];
+
+	//Read from DB
+	require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+	$con = db_connect($DBSERVER,$OWNER,$PW);
+	db_select_db($DB,$con);
+	$sql = "SELECT * FROM wms WHERE wms_id = ".$wms_id.";"; 
+	$res = db_query($sql);
+	$mapfileUrl = "";
+	if ( db_fetch_row($res, 0) )
+	{
+		$mapfileUrl = db_result($res, 0, "wms_getmap");
+		//echo $mapfileUrl;
+	}
+	
+}
+
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/sld_config.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/sld_edit_filter.php
===================================================================
--- branches/2.5/http/sld/sld_edit_filter.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_edit_filter.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,275 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD/
+# 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.
+
+/**
+ * This file contains the source of the filter-expression-editor-module.
+ * This was separated from the sld-editor's parsing and functionhandling
+ * due to readability reasons.
+ * Contains all the source for displaying the form and the functionhandling.
+ *
+ * @package filter_editor
+ * @author Markus Krzyzanowski
+ */
+
+
+
+
+include_once(dirname(__FILE__)."/classes/StyledLayerDescriptor.php");
+session_start();
+include_once(dirname(__FILE__)."/sld_filter_parse.php");
+
+//get the neccessary variables from the request or from the session
+//if from request set up the session variables
+
+$sld_objects = $_SESSION["sld_objects"];
+
+if ( isset($_REQUEST["sld_form_element_id"]) && isset($_REQUEST["sld_objects_rule_id"]) )
+{
+	$first_load = 1;
+	$sld_form_element_id = $_REQUEST["sld_form_element_id"];
+	$_SESSION["sld_form_element_id"] = $sld_form_element_id;
+	
+	$sld_objects_rule_id = $_REQUEST["sld_objects_rule_id"];
+	$_SESSION["sld_objects_rule_id"] = $sld_objects_rule_id;
+	
+	$filter = $sld_objects[$sld_objects_rule_id]->filter;
+	$_SESSION["sld_filter"] = $filter;
+}
+else
+{
+	$first_load = 0;
+	$sld_form_element_id = $_SESSION["sld_form_element_id"];
+	$sld_objects_rule_id = $_SESSION["sld_objects_rule_id"];
+	$filter = $_SESSION["sld_filter"];
+}
+
+//Parse the Filter Expression
+$filterObj = parseFilter($filter);
+if ($filterObj == "")
+{
+	//$filterObj = new Filter();
+}
+
+
+
+//Function handling
+if (isset($_REQUEST["function"]))
+{
+	$function = $_REQUEST["function"];
+	//Handle the requested functions
+	if ($function == "addoperation")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_REQUEST["operation"]) )
+		{
+			$operation = $_REQUEST["operation"];
+			
+			switch(strtoupper($operation))
+			{
+				case "OR":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryLogicOp("Or");
+					break;
+				case "AND":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryLogicOp("And");
+					break;
+				case "NOT":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new UnaryLogicOp("Not");
+					break;
+				case "PROPERTYISEQUALTO":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsEqualTo");
+					break;
+				case "PROPERTYISNOTEQUALTO":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsNotEqualTo");
+					break;
+				case "PROPERTYISGREATERTHAN":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsGreaterThan");
+					break;
+				case "PROPERTYISGREATERTHANOREQUALTO":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsGreaterThanOrEqualTo");
+					break;
+				case "PROPERTYISLESSTHAN":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsLessThan");
+					break;
+				case "PROPERTYISLESSTHANOREQUALTO":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new BinaryComparisonOp("ogc:PropertyIsLessThanOrEqualTo");
+					break;
+				case "PROPERTYISLIKE":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new PropertyIsLike();
+					break;
+				case "PROPERTYISNULL":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new PropertyIsNull();
+					break;
+				case "PROPERTYISBETWEEN":
+					$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->operations[] = new PropertyIsBetween();
+					break;
+			}
+			$_SESSION["sld_filter"] = $_SESSION["sld_filter_objects"][0]->generateXml();
+		}
+	}
+	else if ($function == "deleteoperation")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_REQUEST["number"]) )
+		{
+			$_SESSION["sld_filter_objects"][$_REQUEST["id"]]->deleteOperation($_REQUEST["number"]);
+			$_SESSION["sld_filter"] = $_SESSION["sld_filter_objects"][0]->generateXml();
+		}
+	}
+	else if ($function == "addfilter")
+	{
+		if ( isset($_REQUEST["type"]) )
+		{
+			if ($_REQUEST["type"] == "filter")
+			{
+				$_SESSION["sld_filter_objects"][0] = new Filter();
+				$_SESSION["sld_filter"] = $_SESSION["sld_filter_objects"][0]->generateXml();
+			}
+			else if ($_REQUEST["type"] == "elsefilter")
+			{
+				$_SESSION["sld_filter_objects"][0] = new ElseFilter();
+				$_SESSION["sld_filter"] = $_SESSION["sld_filter_objects"][0]->generateXml();
+			}
+		}
+	}
+	else if ($function == "deletefilter")
+	{
+		$_SESSION["sld_filter_objects"][0] = "";
+		$_SESSION["sld_filter"] = "";
+	}
+	else if ($function == "save")
+	{
+		if( isset($_REQUEST["filter"]) )
+		{
+			$filter = new Filter();
+			$filter->generateObjectFromPost();
+			$_SESSION["sld_filter"] = $filter->generateXml();
+		}
+		else if( isset($_REQUEST["elsefilter"]) )
+		{
+			$filter = new ElseFilter();
+			$_SESSION["sld_filter"] = $filter->generateXml();
+		}
+		else
+		{
+			$_SESSION["sld_filter"] = "";
+		}
+	}
+	else
+	{
+		echo "Die Funktion: ".$function." wird nicht unterst�tzt.";
+		exit();
+	}
+	
+	
+	header("Location: sld_edit_filter.php");
+	exit();
+}
+else
+{
+	//Write the new filter expression to the sld objects
+	if ($filterObj != "")
+	{
+		$sld_objects[$sld_objects_rule_id]->filter = $filterObj->generateXml();
+	}
+	else
+	{
+		$sld_objects[$sld_objects_rule_id]->filter = "";
+	}
+	//display the html form
+	echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
+        echo "<html>\n";
+        echo "<head>\n";
+        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";
+        echo "<meta HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE\">\n";
+        echo "<META HTTP-EQUIV=\"PRAGMA\" CONTENT=\"NO-CACHE\">\n";
+	echo "<title>Filter-Editor</title>\n";
+	echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/sldEditor.css\">\n";
+	echo "<script Language=\"JavaScript\">\n";
+	
+	//write the filter expression into the hidden field in the sld editor on load automatically
+	echo "function setFilter()\n";
+	echo "{\n";
+	echo "var filter = document.getElementById(\"filter_textarea\").value;\n";
+	echo "window.opener.document.getElementById(\"sld_editor_form\").".$sld_form_element_id.".value = filter;\n";
+	echo "//window.opener.document.getElementById(\"sld_editor_form\").submit();\n";
+	echo "}\n";
+	
+	echo "function updateFilter()\n";
+	echo "{\n";
+	echo "//var filter = document.getElementById(\"filter_textarea\").value;\n";
+	echo "//window.opener.document.getElementById(\"sld_editor_form\").".$sld_form_element_id.".value = filter;\n";
+	echo "window.opener.document.getElementById(\"sld_editor_form\").submit();\n";
+	echo "}\n";	
+	
+	echo "</script>\n";
+	echo "</head>\n";
+	echo "<body";
+	if ($first_load != 1) echo " onLoad=\"setFilter();\"";
+	echo ">\n";
+	
+	echo "<form name=\"editFilter\" action=\"sld_edit_filter.php\" method=\"post\">\n";
+	
+	echo "<table cellspacing=\"0\" cellpadding=\"0\">\n";
+	echo "<tr align=\"center\"><td class=\"bg2 text3\">Filter bearbeiten</td></tr>\n";
+	echo "<tr><td class=\"line_left2 line_down2 line_right2 bg text1\">\n";
+	
+	if ($filterObj != "")
+	{
+		echo "<input type=\"hidden\" name=\"function\" value=\"save\">\n";
+		echo $filterObj->generateHtmlForm();
+		echo "<input class=\"edit hand\" type=\"submit\" value=\"Aktualisieren\">\n";
+		echo "<input class=\"edit hand\" type=\"button\" value=\"&Auml;nderungen speichern\" onclick=\"updateFilter()\">\n";
+		
+	}
+	else
+	{
+		echo "Filter oder ElseFilter?<br>";
+		echo "<input type=\"radio\" name=\"type\" value=\"filter\" onClick=\"submit()\">Filter<br>\n";
+		echo "<input type=\"radio\" name=\"type\" value=\"elsefilter\" onClick=\"submit()\">ElseFilter<br>\n";
+		echo "<input type=\"hidden\" name=\"function\" value=\"addfilter\">\n";
+	}
+	echo "</td></tr>\n";
+	
+	echo "<tr><td>&nbsp;</td></tr>\n";
+	
+	echo "<tr align=\"center\"><td class=\"bg2 text3\">Vorschau</td></tr>\n";
+	echo "<tr><td class=\"line_left2 line_down2 line_right2 bg text1\">\n";
+	
+	if ($filterObj != "")
+	{
+		echo "<pre>\n";
+		echo htmlspecialchars($filterObj->generateXml());
+		print_r ($_SESSION["sld_filter_objects"]);
+		echo "</pre>\n";
+		echo "<textarea  id=\"filter_textarea\" style=\"visibility:hidden;\">\n";
+		echo htmlspecialchars($filterObj->generateXml());
+		echo "</textarea>\n";
+	}
+	else
+	{
+		echo "&nbsp;\n";
+	}
+	
+	echo "</td></tr>\n";
+	echo "</table>\n";
+	echo "</form>\n";
+	
+	echo "</body>\n";
+	echo "</html>";
+
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/sld_edit_filter.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/sld_filter_parse.php
===================================================================
--- branches/2.5/http/sld/sld_filter_parse.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_filter_parse.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,369 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD/
+# 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.
+
+/**
+ * This file parses the filter expressions and creates the corresponding objects.
+ *
+ * @package filter_editor
+ * @author Markus Krzyzanowski
+ */
+
+
+
+include_once(dirname(__FILE__)."/classes/StyledLayerDescriptor.php");
+session_start();
+
+/**
+ * Parses a given filter expression and creates the object structure.
+ * @param string $data filter expression that has to be parsed
+ * @return Filter root object of the filter expression
+ */
+function parseFilter($data)
+{
+	$xml_parser = xml_parser_create_ns();
+	xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
+	xml_parse_into_struct($xml_parser, $data, $vals, $index);
+	xml_parser_free($xml_parser);
+	
+	
+	$filter;
+	$parent = array();
+	$objects = array();
+	$parentactual = 0;
+	
+	for ($i=0; $i<count($vals); $i++)
+	{
+		$element = $vals[$i];
+		$tag = $element["tag"];
+		$tagname=strtoupper($tag);
+		switch($tagname)
+		{
+			case "FILTER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = false;
+					$parentactual = 0;
+					$filter = new Filter();
+					$filter->id = 0;
+					$filter->parent = false;
+					$objects[] = &$filter;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = false;
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "ELSEFILTER":
+				if ($element["type"] == "complete")
+				{
+					$parent[] = false;
+					$parentactual = 0;
+					$filter = new ElseFilter();
+					$filter->id = 0;
+					$filter->parent = false;
+					$objects[] = &$filter;
+				}
+				break;
+			case "OR":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryLogicOp("Or");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "AND":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryLogicOp("And");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "NOT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new UnaryLogicOp("Not");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISEQUALTO":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsEqualTo");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISNOTEQUALTO":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsNotEqualTo");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISGREATERTHAN":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsGreaterThan");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISGREATERTHANOREQUALTO":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsGreaterThanOrEqualTo");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISLESSTHAN":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsLessThan");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISLESSTHANOREQUALTO":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new BinaryComparisonOp("PropertyIsLessThanOrEqualTo");
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISLIKE":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new PropertyIsLike();
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[count($parent)-1]->wildCard = $element["attributes"]["wildCard"];
+					$objects[count($parent)-1]->singleChar = $element["attributes"]["singleChar"];
+					$objects[count($parent)-1]->escape = $element["attributes"]["escape"];
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISNULL":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new PropertyIsNull();
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "PROPERTYISBETWEEN":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new PropertyIsBetween();
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[$parentactual]->operations[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+
+			case "LITERAL":
+				if ($element["type"] == "complete")
+				{
+					if ($boundary == "upper")
+					{
+						$objects[$parentactual]->upperBoundary = $element["value"];
+					}
+					else if ($boundary == "lower")
+					{
+						$objects[$parentactual]->lowerBoundary = $element["value"];
+					}
+					else
+					{
+						$objects[$parentactual]->ogcLiteral = $element["value"];
+					}
+				}
+				break;
+			case "PROPERTYNAME":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->ogcPropertyName = $element["value"];
+				}
+				break;
+			case "LOWERBOUNDARY":
+				if ($element["type"] == "open")
+				{
+					$boundary = "lower";
+				}
+				else if ($element["type"] == "close")
+				{
+					$boundary = "";
+				}
+				break;
+			case "UPPERBOUNDARY":
+				if ($element["type"] == "open")
+				{
+					$boundary = "upper";
+				}
+				else if ($element["type"] == "close")
+				{
+					$boundary = "";
+				}
+				break;
+		}
+	}
+	
+	$_SESSION["sld_filter_objects"] = $objects;
+	
+	return $filter;
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/sld_filter_parse.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/sld_function_handler.php
===================================================================
--- branches/2.5/http/sld/sld_function_handler.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_function_handler.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,445 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * This file realizes the function handling for the sld editor.
+ * Requests from the sld_edit_form are forwarded to this page.
+ * After processing the requested function this file forwards to the
+ * sld_main.php.
+ * Only if the request is to get the sld it will not forward to sld_main.php - 
+ * in this case this file will return the requested sld-document instead.
+ * 
+ * @package sld_function_handler
+ * @author Markus Krzyzanowski
+ */
+
+
+//session_start();
+include_once(dirname(__FILE__)."/sld_config.php");
+
+include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+
+
+/**
+ * This function saves the data into the database
+ * @param string $data the content of the sld-document to be stored inside the database
+ */
+function saveSld($data)
+{	
+	$con = db_connect($DBSERVER,$OWNER,$PW);
+	db_select_db($DB,$con);
+	$sql = "UPDATE sld_user_layer SET sld_xml='".$data."' WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_layer_id=".$_SESSION["sld_layer_id"]." AND fkey_mb_user_id=".$_SESSION["mb_user_id"].";";
+	$res = db_query($sql);
+}
+
+
+
+
+
+
+if (isset($_REQUEST["function"]))
+{
+	//MAIN FUNCTIONS:
+	if ($_REQUEST["function"] == "getdefaultsld")
+	{
+		$file = $mapfileUrl."VERSION=1.1.1&REQUEST=GetStyles&LAYERS=".urlencode($layer_name);
+		$data = readSld($file);
+		$data = char_encode($data);
+		saveSld($data);
+	}
+	else if ($_REQUEST["function"] == "save")
+	{
+		$styledlayerdescriptor = new StyledLayerDescriptor();
+		$styledlayerdescriptor->generateObjectFromPost();
+		saveSld($styledlayerdescriptor->generateXml());
+	}
+	// the function "getusersld" is called by the mapserver to get the user's sld
+	else if ($_REQUEST["function"] == "getusersld")
+	{
+		if ( isset($_REQUEST["layer_id"]) && isset($_REQUEST["gui_id"]) && isset($_REQUEST["user_id"]) )
+		{ //Used for the preview
+			$con = db_connect($DBSERVER,$OWNER,$PW);
+			db_select_db($DB,$con);
+			$sql = "SELECT * FROM sld_user_layer WHERE fkey_gui_id='".$_REQUEST["gui_id"]."' AND fkey_layer_id=".$_REQUEST["layer_id"]." AND fkey_mb_user_id=".$_REQUEST["user_id"].";";
+			$res = db_query($sql);
+			if ( db_fetch_row($res, 0) )
+			{
+				//forcesld is used for the preview image to force the sld
+				if ( db_result($res, 0, "use_sld") == "1" || $_REQUEST["forcesld"] == "1" )
+				{
+					echo db_result($res, 0, "sld_xml");
+				}
+			}
+		} //Used for mapbender integration - old deprecated
+			else if ( isset($_REQUEST["layer_names"]) && isset($_REQUEST["user_id"]) )
+		{
+			$layer_names = split(",", urldecode($_REQUEST["layer_names"]));
+			
+			$con = db_connect($DBSERVER,$OWNER,$PW);
+			db_select_db($DB,$con);
+			
+			/*$sld_xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<StyledLayerDescriptor version=\"1.0.0\">\n";*/
+			$sld_xml = "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\">\n";
+			
+			foreach ($layer_names as $layer_name)
+			{
+				$sql = "SELECT * FROM layer WHERE layer_name='".$layer_name."';";
+				$res = db_query($sql);
+
+				$layer_id = "";
+				if ( db_fetch_row($res, 0) )
+				{
+					$layer_id = db_result($res, 0, "fkey_layer_id");
+					$sql = "SELECT * FROM sld_user_layer WHERE fkey_layer_id=".$layer_id." AND fkey_mb_user_id=".$_REQUEST["user_id"].";";
+					$res = db_query($sql);
+					if ( db_fetch_row($res, 0) )
+					{
+						if ( db_result($res, 0, "use_sld") == "1" )
+						{
+							$data = db_result($res, 0, "sld_xml");
+							$styledlayerdescriptor = parseSld($data);
+							$sld_xml .= $styledlayerdescriptor->layers[0]->generateXml(" ");
+						}
+					}
+				}
+			}
+			$sld_xml .= "</StyledLayerDescriptor>";
+			echo $sld_xml;
+		} //Used for mapbender integration
+			else if ( isset($_REQUEST["wms_id"]) && isset($_REQUEST["gui_id"]) )
+		{
+		
+			$con = db_connect($DBSERVER,$OWNER,$PW);
+			db_select_db($DB,$con);
+			$sql = "SELECT fkey_layer_id FROM gui_layer WHERE fkey_gui_id='".$_REQUEST["gui_id"]."' AND gui_layer_wms_id=".$_REQUEST["wms_id"].";";
+			$res = db_query($sql);
+			
+			$sld_xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";
+			$sld_xml .= "<StyledLayerDescriptor version=\"1.0.0\" xmlns=\"http://www.opengis.net/sld\" xmlns:ogc=\"http://www.opengis.net/ogc\">\n";			
+
+			while ($row = db_fetch_row($res))
+			{
+				$layer_id = $row[0];
+				$sql = "SELECT * FROM sld_user_layer WHERE fkey_layer_id=".$layer_id." AND fkey_gui_id='".$_REQUEST["gui_id"]."';";
+				$res2 = db_query($sql);
+				if ( db_fetch_row($res2, 0) )
+				{
+					if ( db_result($res2, 0, "use_sld") == "1" )
+					{
+						$data = db_result($res2, 0, "sld_xml");
+						$styledlayerdescriptor = parseSld($data);
+						$sld_xml .= $styledlayerdescriptor->layers[0]->generateXml(" ");
+					}
+				}
+			}
+			$sld_xml .= "</StyledLayerDescriptor>";
+			echo $sld_xml;
+		}
+	}
+	// sets whether the user wishes to use a sld for this layer
+	else if ($_REQUEST["function"] == "usesld")
+	{
+		if ( isset($_REQUEST["use_sld"]) )
+		{
+			$con = db_connect($DBSERVER,$OWNER,$PW);
+			db_select_db($DB,$con);
+			$sql = "UPDATE sld_user_layer SET use_sld=".$_REQUEST["use_sld"]." WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_layer_id='".$_SESSION["sld_layer_id"]."' AND fkey_mb_user_id='".$_SESSION["mb_user_id"]."';";
+			$res = db_query($sql);
+			
+			# update gui_wms_sldurl
+			if ($_REQUEST["use_sld"]=="1") {
+				$sld_url = $_REQUEST["mb_sld_url"];
+				$sql = "UPDATE gui_wms SET gui_wms_sldurl='".$sld_url."' WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_wms_id=".$_SESSION["sld_wms_id"];
+				$res = db_query($sql); 
+			}
+		}
+	}
+	
+	
+	
+	
+	//MANIPULATE SLD FUNCTIONS - ADD & DELETE
+	else if ($_REQUEST["function"] == "addrule")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->addRule();
+		}
+	}
+	else if ($_REQUEST["function"] == "deleterule")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_REQUEST["number"]) && isset($_SESSION["sld"]) )
+		{
+			$number = $_REQUEST["number"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->deleteRule($number);
+		}
+	}
+	else if ($_REQUEST["function"] == "addsymbolizer")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"]))&&(isset($_REQUEST["symbolizer"])))
+		{
+			$symbolizer = $_REQUEST["symbolizer"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->addSymbolizer($symbolizer);
+		}
+	}
+	else if ($_REQUEST["function"] == "deletesymbolizer")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) && isset($_REQUEST["number"]) )
+		{
+			$number = $_REQUEST["number"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->deleteSymbolizer($number);
+		}
+	}
+	else if ($_REQUEST["function"] == "addcssparameter")
+	{
+		if (isset($_REQUEST["id"]) && isset($_SESSION["sld"]) && isset($_REQUEST["cssparameter"]))
+		{
+			$cssparameter = $_REQUEST["cssparameter"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->addCssParameter($cssparameter);
+		}
+	}
+	else if ($_REQUEST["function"] == "deletecssparameter")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) && isset($_REQUEST["number"]) )
+		{
+			$number = $_REQUEST["number"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->deleteCssParameter($number);
+		}
+	}
+
+	else if ($_REQUEST["function"] == "addlegendgraphic")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->legendgraphic = new LegendGraphic();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletelegendgraphic")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->legendgraphic = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addcolormapentry")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->addColorMapEntry();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletecolormapentry")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) && isset($_REQUEST["number"]) )
+		{
+			$number = $_REQUEST["number"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->deleteColorMapEntry($number);
+		}
+	}
+
+	else if ($_REQUEST["function"] == "addexternalgraphicormark")
+	{
+		if ((isset($_REQUEST["id"])) && (isset($_SESSION["sld"])) && isset($_REQUEST["externalgraphicormark"]))
+		{
+			$externalgraphicormark = $_REQUEST["externalgraphicormark"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->addExternalGraphicOrMark($externalgraphicormark);
+		}
+	}
+	else if ($_REQUEST["function"] == "deleteexternalgraphicormark")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) && isset($_REQUEST["number"]) )
+		{
+			$number = $_REQUEST["number"];
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->deleteExternalGraphicOrMark($number);
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addgraphic")
+	{
+		if ((isset($_REQUEST["id"])) && (isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->graphic = new Graphic();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletegraphic")
+	{
+		if ((isset($_REQUEST["id"])) && (isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->graphic = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addcolormap")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->colormap = new ColorMap();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletecolormap")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->colormap = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addfont")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->font = new Font();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletefont")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->font = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addlabelplacement")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->labelplacement = new LabelPlacement();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletelabelplacement")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->labelplacement = "";
+		}
+	}
+
+	else if ($_REQUEST["function"] == "addhalo")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->halo = new Halo();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletehalo")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->halo = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addfill")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->fill = new Fill();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletefill")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->fill = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addstroke")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->stroke = new Stroke();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletestroke")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->stroke = "";
+		}
+	}
+	
+	else if ($_REQUEST["function"] == "addgraphicfill")
+	{
+		if ((isset($_REQUEST["id"]))&&(isset($_SESSION["sld"])))
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->graphicfill = new GraphicFill();
+		}
+	}
+	else if ($_REQUEST["function"] == "deletegraphicfill")
+	{
+		if ( isset($_REQUEST["id"]) && isset($_SESSION["sld"]) )
+		{
+			$id = $_REQUEST["id"];
+			$_SESSION["sld_objects"][$id]->graphicfill = "";
+		}
+	}
+	//TODO:
+	//graphicstroke???
+	
+	else
+	{
+		echo "function ".$_REQUEST["function"]." is not defined!";
+	}
+	
+	
+	
+	if ( $_REQUEST["function"] != "getdefaultsld" && $_REQUEST["function"] != "save" && $_REQUEST["function"] != "getusersld")
+	{
+		//Create the new SLD XML
+		saveSld($_SESSION["sld_objects"][0]->generateXml());
+	}
+	if ( $_REQUEST["function"] != "getusersld" )
+	{
+		//header("Location: ".$MAPBENDER_URL."/sld/".$SLD_MAIN);
+		//is ist faster to leave away the http?
+		//redirect to a local file or to a http ressource?
+		header("Location: ".$SLD_MAIN);
+	}
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/sld_function_handler.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/sld_main.php
===================================================================
--- branches/2.5/http/sld/sld_main.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_main.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,310 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD
+# 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.
+
+/**
+ * This is the main page of the sld-editor.
+ * It displays the preview images and creates the sld_edit_form
+ * used for editing the sld.
+ *
+ * @package sld_main
+ * @author Markus Krzyzanowski
+ */
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_wfs_conf.php");
+$classWfsConf = new wfs_conf();
+
+include_once(dirname(__FILE__)."/sld_config.php");
+include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+if (isset($_REQUEST["wms_id"]) && isset($_REQUEST["gui_id"]))
+{
+	$_SESSION["sld_wms_id"] = $_REQUEST["wms_id"];
+	$_SESSION["sld_gui_id"] = $_REQUEST["gui_id"];
+}
+
+if (isset($_REQUEST["layer_name"]))
+{
+	$_SESSION["sld_layer_name"] = $_REQUEST["layer_name"];
+}
+
+//read custom sld for this user&wms&layer&gui from the db instead using sld.xml
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db($DB,$con);
+
+//Read the layer_id from the DB
+//$sql = "SELECT * FROM layer WHERE fkey_wms_id=".$_SESSION["sld_wms_id"]." AND layer_name='".$_SESSION["sld_layer_name"]."';";
+//$res = db_query($sql);
+
+$dbutils = new DbUtils();
+$layer_id = $dbutils->getLayerIdFromLayerName($_SESSION["sld_wms_id"], $_SESSION["sld_layer_name"]);
+if ( $layer_id )
+{
+	$_SESSION["sld_layer_id"] = $layer_id;
+}
+
+//Read the mb_user_id from the Session
+$mb_user_id = $_SESSION["mb_user_id"];
+
+
+//if layer is not found in DB
+if (!$layer_id)
+{
+	echo "layer existiert nicht in Datenbank";
+	exit();
+}
+else
+{
+	//Try to read sld from the DB
+	$sql = "SELECT * FROM sld_user_layer WHERE fkey_gui_id='".$_SESSION["sld_gui_id"]."' AND fkey_layer_id='".$layer_id."' AND fkey_mb_user_id='".$mb_user_id."';";
+	$res = db_query($sql);
+	if (!$res || db_numrows($res)== 0)
+	{
+		//No user specific sld found in DB -> get it from the mapserver
+		$file = $mapfileUrl."SERVICE=WMS&VERSION=1.1.1&REQUEST=GetStyles&LAYERS=".urlencode($layer_name);
+		$data = readSld($file);
+		$data = char_encode($data);
+		//write the sld to the DB
+		$sql = "INSERT INTO sld_user_layer(fkey_mb_user_id, fkey_layer_id, sld_xml, use_sld, fkey_gui_id) VALUES('".$mb_user_id."','".$layer_id."','".$data."',0,'".$_SESSION["sld_gui_id"]."' );";
+		$res = @db_query($sql);
+		//Use the new sld
+	}
+	else
+	{
+		$data = db_result($res, 0, "sld_xml");
+		$use_sld = db_result($res, 0, "use_sld");
+	}
+}
+
+//$file = "sld.xml";
+//$data = readSld($file);
+
+$styledlayerdescriptor = parseSld($data);
+$_SESSION["sld"] = $data;
+
+/* Check for a related WFS featuretype */
+$wfs_conf_id = $dbutils->getLayerWfsConfId($_SESSION["sld_gui_id"], $layer_id);
+if ( $wfs_conf_id ) {
+	$featuretype_id = $dbutils->getWfsConfFeatureTypeId($wfs_conf_id);
+	$classWfsConf->getelements($featuretype_id);
+	$wfs_element = $classWfsConf->elements;
+	$fts = $styledlayerdescriptor->layers[0]->styles[0]->featuretypestyles[0];
+	$fts->setElementArray("element_id",$wfs_element->element_id);
+	$fts->setElementArray("element_name",$wfs_element->element_name);
+} else {
+	$wfs_element = false;
+}
+
+/* create getMap-Url for preview with/without sld */
+$previewMapUrl = $dbutils->getPreviewMapUrl($_SESSION["sld_gui_id"], $layer_id, $_SESSION["sld_wms_id"]);
+
+echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
+echo "<html>\n";
+echo "<head>\n";
+echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n";
+echo "<meta HTTP-EQUIV=\"CACHE-CONTROL\" CONTENT=\"NO-CACHE\">\n";
+echo "<META HTTP-EQUIV=\"PRAGMA\" CONTENT=\"NO-CACHE\">\n";
+echo "<title>Mapbender - SLD Editor</title>\n";
+echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/sldEditor.css\">\n";
+echo "</head>\n";
+echo "<body leftmargin=\"10\" topmargin=\"0\">\n";
+
+## - Fensteranfang
+echo "<table width=\"800px\"  border='0' cellspacing='0'>\n"; 	      
+## - 1.Zeile
+echo " <tr>\n";
+echo "  <td class='text2 bg2' colspan='2'>\n";
+echo "   &nbsp;&nbsp;Vorschau mit SLD:\n";
+echo "  </td>\n";
+echo "  <td>\n";
+echo "   &nbsp;\n";
+echo "  </td>\n";
+echo "  <td class='text2 bg2' colspan='2'>\n";
+echo "   &nbsp;&nbsp;Original ohne SLD:\n";
+echo "  </td>\n";
+echo " </tr>\n";
+
+## - Build URL to SLD
+$sld_url = "";
+$mb_sld_url = "";
+//$sld_url = "http://".$_SERVER["HTTP_HOST"]."/mapbender/sld/sld_function_handler.php?function=getusersld&layer_id=".$layer_id."&user_id=".$mb_user_id."&forcesld=1";
+$sld_url = $MAPBENDER_URL."/sld_function_handler.php?function=getusersld&gui_id=".$_SESSION["sld_gui_id"]."&layer_id=".$layer_id."&user_id=".$mb_user_id."&forcesld=1";
+$mb_sld_url = $MAPBENDER_URL."/sld_function_handler.php?function=getusersld&gui_id=".$_SESSION["sld_gui_id"]."&wms_id=".$_SESSION["sld_wms_id"]."&user_id=".$mb_user_id;
+echo "<!-- $sld_url -->";
+echo "<!-- $previewMapUrl -->";
+## - 2.Zeile
+/*
+echo " <tr align='right'>\n";
+echo "  <td class='line_left2 text4'>\n";
+echo "   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Karte";
+echo "  </td>\n";
+echo "  <td class='line_right2'>\n";
+echo "   <img src='./img/map_magnify.png' border='0' alt='Originalgr&ouml;&szlig;e im neuen Fenster anzeigen' onClick=\"window.open('map.php','','fullsreen=yes,resizable=no,scrollbars=yes');\">\n";
+echo "  </td>\n";
+echo "  <td>\n";
+echo "   &nbsp;\n";
+echo "  </td>\n";
+echo "  <td class='line_left2 text4'>\n";
+echo "   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Karte";
+echo "  </td>\n";
+echo "  <td class='line_right2'>\n";
+echo "   <img src='./img/map_magnify.png' border='0' alt='Originalgr&ouml;&szlig;e im neuen Fenster anzeigen' onClick=\"window.open('map_original.php','','fullsreen=yes,resizable=no,scrollbars=yes');\">\n";
+echo "  </td>\n";
+echo " </tr>\n";
+*/
+
+## - 3.Zeile
+echo " <tr align='center'>\n";
+echo "  <td class='line_left2 line_right2' colspan='2'>\n";
+
+## - Map with SLD
+//Added rand(...) to force a reload of the image because the url should be different
+echo "   <img src=\"".$previewMapUrl."&WIDTH=320&HEIGHT=240&sld=".urlencode($sld_url)."&".rand(0,10000)."\" border=\"0\" width=\"320\" height=\"240\">";
+echo "  </td>\n";
+
+echo "  <td>\n";
+echo "   &nbsp;\n";
+echo "  </td>\n";
+
+echo "  <td class='line_left2 line_right2' colspan='2'>\n";
+
+## - Map without SLD
+echo "   <img src=\"".$previewMapUrl."&WIDTH=320&HEIGHT=240\" border=\"0\" width=\"320\" height=\"240\">";
+echo "  </td>\n";
+
+#4.Zeile
+echo " <tr>\n";
+echo "  <td class='line_left2 line_right2 text4' colspan='2'>\n";
+echo "   &nbsp;&nbsp;&nbsp;&nbsp;Legende\n";
+echo "  </td>\n";
+echo "  <td>\n";
+echo "   &nbsp;\n";
+echo "  </td>\n";
+echo "  <td class='line_left2 line_right2 text4' colspan='2'>\n";
+echo "   &nbsp;&nbsp;&nbsp;&nbsp;Legende\n";
+echo "  </td>\n";
+echo " </tr>\n";
+
+#5.Zeile
+echo " <tr>\n";
+echo "  <td class='line_left2 line_down2 line_right2' colspan='2'>\n";
+echo "   &nbsp;\n";
+## - Legend with SLD
+echo "   <img src=\"".$mapfileUrl."VERSION=1.1.0&REQUEST=GetLegendGraphic&SERVICE=WMS&LAYER=".urlencode($layer_name)."&FORMAT=image/png&sld=".urlencode($sld_url)."&".rand(0,10000)."\">\n";
+echo "  </td>\n";
+echo "   &nbsp;\n";
+echo "  <td>\n";
+echo "   &nbsp;\n";
+echo "  </td>\n";
+echo "  <td class='line_left2 line_down2 line_right2' colspan='2'>\n";
+echo "   &nbsp;\n";
+## - Legend without SLD
+echo "   <img src=\"".$mapfileUrl."VERSION=1.1.0&REQUEST=GetLegendGraphic&SERVICE=WMS&LAYER=".urlencode($layer_name)."&FORMAT=image/png\">";
+echo "  </td>\n";
+echo " </tr>\n";
+echo "</table>\n";
+
+echo "<br>\n";
+
+echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
+echo " <tr valign=\"top\">\n";
+echo "  <td>\n";
+
+echo "   <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
+echo "    <tr align=\"center\">\n";
+echo "     <td class=\"bg2 text3\">MENU</td>\n";
+echo "    </tr>\n";
+echo "    <tr>\n";
+echo "     <td class=\"line_left2 line_down2 line_right2 text4 bg_menu\">\n";
+
+//echo "      <form name=\"use_sld\" action=\"http://".$_SERVER["HTTP_HOST"]."/mapbender/sld/".$SLD_FUNCTION_HANDLER."\" method=post >\n";
+echo "      <form name=\"use_sld\" action=\"".$MAPBENDER_URL."/".$SLD_FUNCTION_HANDLER."\" method=post >\n";
+echo "      <input type=\"hidden\" name=\"function\" value=\"usesld\">\n";
+echo "      <input type=\"hidden\" name=\"sld_url\" value=\"".$sld_url."\">\n";
+echo "      <input type=\"hidden\" name=\"mb_sld_url\" value=\"".$mb_sld_url."\">\n";
+echo "      &nbsp;&nbsp;Ansicht in Mapbender&nbsp;&nbsp;<br>\n";
+	
+echo "      <input type=\"radio\" name=\"use_sld\" value=\"0\"";
+if ($use_sld == 0) echo " checked";
+echo " onClick=\"submit()\">\n";
+echo "      &nbsp;Original ohne SLD&nbsp;&nbsp;<br>";
+
+echo "      <input type=\"radio\" name=\"use_sld\" value=\"1\"";
+if ($use_sld == 1) echo " checked";
+echo " onClick=\"submit()\">\n";
+echo "      &nbsp;mit SLD&nbsp;&nbsp;<br>";
+echo "      </form>\n";
+echo "     </td>\n";
+echo "    </tr>\n";
+echo "    <tr align=\"left\">\n";
+echo "     <td class=\"line_left2 line_down2 line_right2 text1 bg_menu\" style=\"padding:3px;\">\n";
+
+//echo "      <form id=\"sld_editor_form\" action=\"http://".$_SERVER["HTTP_HOST"]."/mapbender/sld/".$SLD_FUNCTION_HANDLER."\" method=post >\n";
+echo "      <form id=\"sld_editor_form\" action=\"".$MAPBENDER_URL."/".$SLD_FUNCTION_HANDLER."\" method=post >\n";
+
+echo "      <a href='".$SLD_FUNCTION_HANDLER."?function=getdefaultsld' onclick='if(!confirm(\"Aktuelle SLD-Definition ersetzen?\")) return false;'>\n";
+echo "      <img src='./img/script.png' border='0' alt='Standard SLD aus WMS auslesen'>\n";
+echo "      </a> Standard &ouml;ffnen<br /><br />\n";
+
+echo "      <input type='image' src='./img/script_save.png' border='0' alt='�nderungen an die Map senden'>\n";
+echo "      SLD speichern<br>\n";
+echo "      <input type='hidden' name='function' value='save'>\n";
+echo "      <br /><a href=\"".$sld_url."\" target=_new>";	
+echo "      <img src='./img/script_code_red.png' border='0' alt='SLD anzeigen'>\n";
+echo "      </a>";
+echo "      SLD anzeigen";
+
+echo "     </td>\n";
+echo "    </tr>\n";
+echo "   </table>\n";
+
+echo "  </td>\n";
+echo "  <td>\n";
+echo "   &nbsp;&nbsp;&nbsp;";
+echo "  </td>\n";
+echo "  <td>\n";
+
+##  -  Fenster Eigenschaft
+echo "   <table border='0' cellspacing='0' cellpadding='0'>\n";
+echo "    <tr align='center'>\n";
+echo "     <td class='bg2 text3'>SLD Eigenschaften</td>\n";
+echo "    </tr>\n";
+echo "    <tr>\n";
+echo "     <td class='line_left2 line_down2 line_right2'>\n";
+
+echo $styledlayerdescriptor->generateHtmlForm("","      ");
+
+echo "     </td>\n";
+echo "    </tr>\n";
+echo "   </table>\n";
+echo "   </form>\n";
+
+echo "  </td>\n";
+echo " </tr>\n";
+echo "</table>\n";
+echo "<!-- ";
+print_r ($wfs_element);
+print_r ($_SESSION["sld_objects"][3]);
+echo "-->";
+echo "</body>\n";
+echo "</html>\n";
+##Debug
+//echo "------------------------------------------------------------------\n";
+//echo $styledlayerdescriptor->generateXml();
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/sld_main.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/sld_parse.php
===================================================================
--- branches/2.5/http/sld/sld_parse.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_parse.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,906 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD/sld_config.php
+# 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.
+
+/**
+ * Parses the sld-documents and creates the object structure.
+ * This file does the parsing of the sld-data.
+ * For all sld-elements that cannot be converted to a trivial datatype
+ * a corresponding object is created.
+ *
+ * Creates the sld_objects and the sld_parent $_SESSION variables.
+ * sld_objects is an array that contains the objects.
+ * sld_parent is an array that contains the index of the object's parent object in sld_objects.
+ * These variables are used to easily access the objects.
+ *
+ * @see sld_classes.php contains the class definitions
+ * @package sld_parse
+ * @author Markus Krzyzanowski
+ */
+
+session_start();
+
+/**
+ *  Creates a empty SLD object up to the rule object
+ * 
+ *  @return StyledLayerDescriptor
+ */
+function createEmptySLD() {
+	$styledlayerdescriptor = new StyledLayerDescriptor();
+	$layer = new NamedLayer();
+	$style = new UserStyle();
+	$fts = new FeatureTypeStyle();
+	$rule = new Rule();
+	
+	$fts->rules[] = $rule;
+	$style->featuretypestyles[] = $fts;
+	$layer->styles[] = $style;
+	$layer->name = $_SESSION["sld_layer_name"];
+	$styledlayerdescriptor->layers[] = $layer;
+	$styledlayerdescriptor->version = "1.0.0";
+	$styledlayerdescriptor->id = 0;
+	$styledlayerdescriptor->parent = false;
+	
+	return $styledlayerdescriptor;
+}
+
+/**
+ * Opens the file at the specified URL and returns the content.
+ *
+ * @param string $file URL of the file
+ * @return string content of the file
+ */
+function readSld($file)
+{
+	if (!($fp = fopen($file, "rb")))
+	{
+		die("could not open XML input - ".$file);
+	}
+	
+	$data = "";
+	
+	while(!feof($fp))
+	{
+		$data .= fread($fp, 1024);
+
+	}
+	return $data;
+}
+
+/**
+ * Parses the data and creates the object structure.
+ *
+ * @param string $data data to be parsed
+ * @return StyledLayerDesciptor root object of the sld-document
+ */
+function parseSld($data)
+{
+	$xml_parser = xml_parser_create();
+	xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
+	xml_parse_into_struct($xml_parser, $data, $vals, $index);
+	xml_parser_free($xml_parser);
+	
+	$styledlayerdescriptor;
+	$parent = array();
+	$objects = array();
+	$parentactual = 0;
+	
+	for ($i=0; $i<count($vals); $i++)
+	{
+		$element = $vals[$i];
+		$tag = $element["tag"];
+		$tagname=strtoupper($tag);
+		switch($tagname)
+		{
+			// uh, the server responded with an error, should be break or start with an empty sld?
+			case "SERVICEEXCEPTIONREPORT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = false;
+					$parentactual = 0;
+					/*
+					$styledlayerdescriptor = new StyledLayerDescriptor();
+					$styledlayerdescriptor->version = "1.0.0";
+					//Experimental:
+					*/
+					$styledlayerdescriptor = createEmptySLD();
+					$styledlayerdescriptor->id = 0;
+					$styledlayerdescriptor->parent = false;
+					//END Experimental
+					$objects[] = &$styledlayerdescriptor;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = false;
+					}
+					$_SESSION["sld_objects"] = $objects;
+					$_SESSION["sld_parent"] = $parent;
+					return $styledlayerdescriptor;
+				}				
+			case "STYLEDLAYERDESCRIPTOR":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = false;
+					$parentactual = 0;
+					$styledlayerdescriptor = new StyledLayerDescriptor();
+					$styledlayerdescriptor->version = $element["attributes"]["version"];
+					//Experimental:
+					$styledlayerdescriptor->id = 0;
+					$styledlayerdescriptor->parent = false;
+					//END Experimental
+					$objects[] = &$styledlayerdescriptor;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = false;
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "NAMEDLAYER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new NamedLayer();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->layers[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "NAME":
+				if ($element["type"] == "complete")
+				{
+					//TODO - workaround suchen...!!!
+					//echo "-------------\n";
+					//echo $element["value"]."\n";
+					//$element["value"] = str_replace("<","&lt;",$element["value"]);
+					//$element["value"] = str_replace(">","&gt;",$element["value"]);
+					$objects[$parentactual]->name = $element["value"];
+				}
+				break;
+			case "TITLE":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->title = $element["value"];
+				}break;
+			case "ABSTRACT":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->abstract = $element["value"];
+				}
+				break;
+			case "MINSCALEDENOMINATOR":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->minscaledenominator = $element["value"];
+				}
+				break;
+			case "MAXSCALEDENOMINATOR":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->maxscaledenominator = $element["value"];
+				}
+				break;
+			case "USERSTYLE":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new UserStyle();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->styles[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "FEATURETYPESTYLE":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new FeatureTypeStyle();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->featuretypestyles[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "RULE":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Rule();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->rules[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "LINESYMBOLIZER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new LineSymbolizer();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->symbolizers[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "POLYGONSYMBOLIZER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new PolygonSymbolizer();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->symbolizers[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "POINTSYMBOLIZER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new PointSymbolizer();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->symbolizers[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "TEXTSYMBOLIZER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new TextSymbolizer();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->symbolizers[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "RASTERSYMBOLIZER":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new RasterSymbolizer();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->symbolizers[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "LEGENDGRAPHIC":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new LegendGraphic();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->legendgraphic = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+	//Commented out - Filters will be created through the creation of xml in the default case
+	//		case "ELSEFILTER":
+	//			if ($element["type"] == "complete")
+	//			{
+	//				$objects[$parentactual]->filter = new ElseFilter();
+	//			}
+	//			break;
+	//		case "OGC:FILTER": //TODO
+	//			if ($element["type"] == "complete")
+	//			{
+	//				//Create a new ElseFilter and write it to the parent object
+	//				$objects[$parentactual]->filter = new ElseFilter();
+	//			}
+	//			break;
+			case "GRAPHIC":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Graphic();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					
+					$objects[$parentactual]->graphic = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "EXTERNALGRAPHIC":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new ExternalGraphic();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->externalgraphicsormarks[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "ONLINERESOURCE":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->onlineresource = $element["attributes"]["xlink:href"];
+				}
+				break;
+			case "FORMAT":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->format = $element["value"];
+				}
+				break;
+			case "STROKE":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Stroke();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->stroke = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "CSSPARAMETER":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->cssparameters[] = new CssParameter();
+					//Experimental:
+					$objects[$parentactual]->cssparameters[count($objects[$parentactual]->cssparameters)-1]->id = count($parent)-1;
+					$objects[$parentactual]->cssparameters[count($objects[$parentactual]->cssparameters)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->cssparameters[count($objects[$parentactual]->cssparameters)-1]->name = $element["attributes"]["name"];
+					$objects[$parentactual]->cssparameters[count($objects[$parentactual]->cssparameters)-1]->value = $element["value"];
+				}
+				break;
+			case "GRAPHICFILL":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new GraphicFill();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					
+					
+					//print_r($objects[count($parent)-1]);
+					
+					$objects[$parentactual]->graphicfill = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "GRAPHICSTROKE":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new GraphicStroke();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->graphicstroke = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "FILL":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Fill();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->fill = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+					}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "MARK":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Mark();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->externalgraphicsormarks[] = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "WELLKNOWNNAME":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->wellknownname = $element["value"];
+				}
+				break;
+			case "FONT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Font();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->font = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "LABELPLACEMENT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new LabelPlacement();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->labelplacement = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "POINTPLACEMENT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new PointPlacement();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->placement = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "ANCHORPOINT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new AnchorPoint();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->anchorpoint = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "DISPLACEMENT":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Displacement();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->displacement = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "HALO":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new Halo();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->halo = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "COLORMAP":
+				if ($element["type"] == "open" || $element["type"] == "complete")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new ColorMap();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->colormap = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					if ($element["type"] == "complete")
+					{
+						$parentactual = $parent[$parentactual];
+					}
+				}
+				else if($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "COLORMAPENTRY":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->colormapentries[] = new ColorMapEntry();
+					//Experimental:
+					$objects[$parentactual]->colormapentries[count($objects[$parentactual]->colormapentries)-1]->id = count($parent)-1;
+					$objects[$parentactual]->colormapentries[count($objects[$parentactual]->colormapentries)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->colormapentries[count($objects[$parentactual]->colormapentries)-1]->color = $element["attributes"]["color"];
+					$objects[$parentactual]->colormapentries[count($objects[$parentactual]->colormapentries)-1]->opacity = $element["attributes"]["opacity"];
+					$objects[$parentactual]->colormapentries[count($objects[$parentactual]->colormapentries)-1]->quantity = $element["attributes"]["quantity"];
+					$objects[$parentactual]->colormapentries[count($objects[$parentactual]->colormapentries)-1]->label = $element["attributes"]["label"];
+				}
+				break;
+			case "LABEL":
+				if ($element["type"] == "complete")
+				{
+					//Kl�ren, ob Label nur so vorkommen kann - TODO
+					//$objects[$parentactual]->label = $element["value"];
+					
+					//use the new ParameterValue class to store the mixed content value
+					//simple case no extra markup ...
+					//the label is instanciated by TextSymbolizer
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new ParameterValue();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					$objects[count($parent)-1]->value = $element["value"];
+					//END Experimental
+					$objects[$parentactual]->label = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+					$parentactual = $parent[$parentactual];
+				}				
+				elseif ($element["type"] == "open")
+				{
+					$parent[] = $parentactual;
+					$objects[count($parent)-1] = new ParameterValue();
+					//Experimental:
+					$objects[count($parent)-1]->id = count($parent)-1;
+					$objects[count($parent)-1]->parent = $parentactual;
+					//END Experimental
+					$objects[$parentactual]->label = &$objects[count($parent)-1];
+					$parentactual = count($parent)-1;
+				}
+				elseif ($element["type"] == "close")
+				{
+					$parentactual = $parent[$parentactual];
+				}
+				break;
+			case "RADIUS":
+				if ($element["type"] == "complete")
+				{
+					//Kl�ren, ob Radius nur so vorkommen kann - TODO
+					$objects[$parentactual]->radius = $element["value"];
+				}
+				break;
+			case "OPACITY":
+				if ($element["type"] == "complete")
+				{
+					//Kl�ren, ob Opacity nur so vorkommen kann - TODO
+					$objects[$parentactual]->opacity = $element["value"];
+				}
+				break;
+			case "SIZE":
+				if ($element["type"] == "complete")
+				{
+					//Kl�ren, ob Size nur so vorkommen kann - TODO
+					$objects[$parentactual]->size = $element["value"];
+				}
+				break;
+			case "ROTATION":
+				if ($element["type"] == "complete")
+				{
+					//Kl�ren, ob Rotation nur so vorkommen kann - TODO
+					$objects[$parentactual]->rotation = $element["value"];
+				}
+				break;
+			case "ANCHORPOINTX":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->anchorpointx = $element["value"];
+				}
+				break;
+			case "ANCHORPOINTY":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->anchorpointy = $element["value"];
+				}
+				break;
+			case "DISPLACEMENTX":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->displacementx = $element["value"];
+				}
+				break;
+			case "DISPLACEMENTY":
+				if ($element["type"] == "complete")
+				{
+					$objects[$parentactual]->displacementy = $element["value"];
+				}
+				break;
+			//TODO: Kl�ren mit sld:parameterValueType
+			//bei den folgenden XML Elementen
+			case "PROPERTYNAME":
+				if ($element["type"] == "complete")
+				{
+					if ($temp == "") {
+						$objects[$parentactual]->value = $element["value"];
+						$parentactual = count($parent)-1;
+					}
+					else {
+						die($temp);
+					}
+				}
+				break;
+			//END TODO
+			//von den vorhergegangenen XML Elementen
+			
+			
+			default:
+					$temp = "";
+					if ($element["type"] == "open")
+					{
+						$temp .= "<".$tag;
+						if ($element["attributes"] != "")
+						{
+							$keys = array_keys($element["attributes"]);
+							foreach ($keys as $key)
+							{
+								$temp .= " ".$key."=\"".$element["attributes"][$key]."\"";
+							}
+						}
+						$temp .= ">";
+					}
+					if ($element["type"] == "close")
+					{
+						$temp .= "</".$tag.">";
+					}
+					if ($element["type"] == "complete")
+					{
+						$temp .= "<".$tag.">";
+						$temp .= $element["value"];
+						$temp .= "</".$tag.">";
+					}
+					//Wenn Parent vom Typ Rule, dann muss es ein Filter sein, also hinzuf�gen
+					if (strtoupper(get_class($objects[$parentactual])) == "RULE")
+					{
+						$objects[$parentactual]->filter .= $temp;
+						$temp = "";
+					}
+		}
+	}
+	
+	
+	//print_r($objects);
+	
+	
+	$_SESSION["sld_objects"] = $objects;
+	$_SESSION["sld_parent"] = $parent;
+	
+	return $styledlayerdescriptor;
+}
+?>
\ No newline at end of file


Property changes on: branches/2.5/http/sld/sld_parse.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision

Added: branches/2.5/http/sld/sld_pick_color.php
===================================================================
--- branches/2.5/http/sld/sld_pick_color.php	                        (rev 0)
+++ branches/2.5/http/sld/sld_pick_color.php	2008-02-01 16:33:03 UTC (rev 2057)
@@ -0,0 +1,329 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/SLD/
+# 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.
+
+/**
+ * Color-picker module.
+ * This file realizes a color-picker module for the sld-editor so that
+ * the users do not have to work with RGB values.
+ * A number of colors from a wide spectrum is available with a preview
+ * of each color.
+ * Choosing a color and submitting the form will also submit the sld_edit_form
+ * to directly save the changes to the sld.
+ *
+ * @package sld_pick_color
+ * @author Markus Krzyzanowski, Design by Bao Ngan
+ */
+
+
+session_start();
+$id = $_REQUEST["id"];
+$color= $_REQUEST["color"];
+?>
+<html>
+<head>
+<link rel="stylesheet" type="text/css" href="../css/sldEditor.css">
+<script Language="JavaScript">
+function returnToMain()
+{
+	window.opener.document.getElementById("<?php echo $id; ?>").value = document.getElementById('color').value;
+	var preview = window.opener.document.getElementById('<?php echo $id; ?>_preview');
+	preview.style.background = document.getElementById('color').value;
+	window.opener.document.getElementById("sld_editor_form").submit();
+	window.close();
+}
+function showColor(color)
+{
+	document.getElementById('color').value = color;
+	document.getElementById('preview').style.background = color;
+}
+function showColor_over(color)
+{
+	document.getElementById('preview_over').style.background = color;
+}
+</script>
+</head>
+<body leftmargin="2" topmargin="2">
+<!------ Rahmentabelle ------>
+<table width="294" height="188" border="0" cellpadding="0" cellspacing="0">
+  <tr>
+    <td height="14" colspan="4" align="center" class="text3 bg2">Farbpalette</td>
+  </tr>
+  <tr>
+    <td width="33" height="135" class="line_left2 ">
+	  <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid black; background-color: #FFFFFF">
+    	<tr>
+      	 <td height="132" id="preview_over" width="100%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
+    	</tr>
+      </table>
+    </td>
+    <td width="4">&nbsp;</td>
+    <td colspan="2" class="line_right2 ">
+	  <table style="border:1px solid black;" cellspacing="1" cellpadding="1" width="87%">
+	   <tr>
+  	  	<td width="10" style="width: 10px; background-color: #00FF00;" onClick="showColor('#00FF00');"   onMouseOver="showColor_over('#00FF00');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #00FF33;" onClick="showColor('#00FF33');"   onMouseOver="showColor_over('#00FF33');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #00FF66;" onClick="showColor('#00FF66');"   onMouseOver="showColor_over('#00FF66');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #00FF99;" onClick="showColor('#00FF99');"   onMouseOver="showColor_over('#00FF99');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #00FFCC;" onClick="showColor('#00FFCC');"   onMouseOver="showColor_over('#00FFCC');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #00FFFF;" onClick="showColor('#00FFFF');"    onMouseOver="showColor_over('#00FFFF');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #33FF00;" onClick="showColor('#33FF00');"   onMouseOver="showColor_over('#33FF00');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #33FF33;" onClick="showColor('#33FF33');"   onMouseOver="showColor_over('#33FF33');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #33FF66;" onClick="showColor('#33FF66');"   onMouseOver="showColor_over('#33FF66');">&nbsp;</td>
+  	  	<td width="10" style="width: 10px; background-color: #33FF99;" onClick="showColor('#33FF99');"   onMouseOver="showColor_over('#33FF99');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #33FFCC;" onClick="showColor('#33FFCC');"   onMouseOver="showColor_over('#33FFCC');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #33FFFF;" onClick="showColor('#33FFFF');"    onMouseOver="showColor_over('#33FFFF');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #66FF00;" onClick="showColor('#66FF00');"   onMouseOver="showColor_over('#66FF00');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #66FF33;" onClick="showColor('#66FF33');"   onMouseOver="showColor_over('#66FF33');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #66FF66;" onClick="showColor('#66FF66');"   onMouseOver="showColor_over('#66FF66');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #66FF99;" onClick="showColor('#66FF99');"   onMouseOver="showColor_over('#66FF99');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #66FFCC;" onClick="showColor('#66FFCC');"   onMouseOver="showColor_over('#66FFCC');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #66FFFF;" onClick="showColor('#66FFFF');"    onMouseOver="showColor_over('#66FFFF');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #99FF00;" onClick="showColor('#99FF00');"   onMouseOver="showColor_over('#99FF00');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #99FF33;" onClick="showColor('#99FF33');"   onMouseOver="showColor_over('#99FF33');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #99FF66;" onClick="showColor('#99FF66');"   onMouseOver="showColor_over('#99FF66');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #99FF99;" onClick="showColor('#99FF99');"   onMouseOver="showColor_over('#99FF99');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #99FFCC;" onClick="showColor('#99FFCC');"   onMouseOver="showColor_over('#99FFCC');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #99FFFF;" onClick="showColor('#99FFFF');"    onMouseOver="showColor_over('#99FFFF');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #CCFF00;" onClick="showColor('#CCFF00');"   onMouseOver="showColor_over('#CCFF00');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #CCFF33;" onClick="showColor('#CCFF33');"   onMouseOver="showColor_over('#CCFF33');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #CCFF66;" onClick="showColor('#CCFF66');"   onMouseOver="showColor_over('#CCFF66');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #CCFF99;" onClick="showColor('#CCFF99');"   onMouseOver="showColor_over('#CCFF99');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #CCFFCC;" onClick="showColor('#CCFFCC');"   onMouseOver="showColor_over('#CCFFCC');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #CCFFFF;" onClick="showColor('#CCFFFF');"    onMouseOver="showColor_over('#CCFFFF');">&nbsp;</td>
+    	<td width="10" style="width: 10px; background-color: #FFFF00;" onClick="showColor('#FFFF00');"    onMouseOver="showColor_over('#FFFF00');">&nbsp;</td>
+		<td width="10" style="width: 10px; background-color: #FFFF33;" onClick="showColor('#FFFF33');"    onMouseOver="showColor_over('#FFFF33');">&nbsp;</td>
+		<td width="10" style="width: 10px; background-color: #FFFF66;" onClick="showColor('#FFFF66');"    onMouseOver="showColor_over('#FFFF66');">&nbsp;</td>
+		<td width="10" style="width: 10px; background-color: #FFFF99;" onClick="showColor('#FFFF99');"    onMouseOver="showColor_over('#FFFF99');">&nbsp;</td>
+		<td width="10" style="width: 10px; background-color: #FFFFCC;" onClick="showColor('#FFFFCC');"    onMouseOver="showColor_over('#FFFFCC');">&nbsp;</td>
+		<td width="10" style="width: 10px; background-color: #FFFFFF;" onClick="showColor('#FFFFFF');"    onMouseOver="showColor_over('#FFFFFF');">&nbsp;</td>
+	   </tr>
+	   <tr>                                                                                         
+        <td style="width: 10px; background-color: #00CC00;" onClick="showColor('#00CC00');"		onMouseOver="showColor_over('#00CC00');">&nbsp;</td>
+		<td style="width: 10px; background-color: #00CC33;" onClick="showColor('#00CC33');"		onMouseOver="showColor_over('#00CC33');">&nbsp;</td>
+		<td style="width: 10px; background-color: #00CC66;" onClick="showColor('#00CC66');"		onMouseOver="showColor_over('#00CC66');">&nbsp;</td>
+		<td style="width: 10px; background-color: #00CC99;" onClick="showColor('#00CC99');"		onMouseOver="showColor_over('#00CC99');">&nbsp;</td>
+		<td style="width: 10px; background-color: #00CCCC;" onClick="showColor('#00CCCC');"		onMouseOver="showColor_over('#00CCCC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #00CCFF;" onClick="showColor('#00CCFF');"		onMouseOver="showColor_over('#00CCFF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #33CC00;" onClick="showColor('#33CC00');"		onMouseOver="showColor_over('#33CC00');">&nbsp;</td>
+		<td style="width: 10px; background-color: #33CC33;" onClick="showColor('#33CC33');"		onMouseOver="showColor_over('#33CC33');">&nbsp;</td>
+		<td style="width: 10px; background-color: #33CC66;" onClick="showColor('#33CC66');"		onMouseOver="showColor_over('#33CC66');">&nbsp;</td>
+		<td style="width: 10px; background-color: #33CC99;" onClick="showColor('#33CC99');"		onMouseOver="showColor_over('#33CC99');">&nbsp;</td>
+		<td style="width: 10px; background-color: #33CCCC;" onClick="showColor('#33CCCC');"		onMouseOver="showColor_over('#33CCCC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #33CCFF;" onClick="showColor('#33CCFF');"		onMouseOver="showColor_over('#33CCFF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #66CC00;" onClick="showColor('#66CC00');"		onMouseOver="showColor_over('#66CC00');">&nbsp;</td>
+		<td style="width: 10px; background-color: #66CC33;" onClick="showColor('#66CC33');"		onMouseOver="showColor_over('#66CC33');">&nbsp;</td>
+		<td style="width: 10px; background-color: #66CC66;" onClick="showColor('#66CC66');"		onMouseOver="showColor_over('#66CC66');">&nbsp;</td>
+		<td style="width: 10px; background-color: #66CC99;" onClick="showColor('#66CC99');"		onMouseOver="showColor_over('#66CC99');">&nbsp;</td>
+		<td style="width: 10px; background-color: #66CCCC;" onClick="showColor('#66CCCC');"		onMouseOver="showColor_over('#66CCCC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #66CCFF;" onClick="showColor('#66CCFF');"		onMouseOver="showColor_over('#66CCFF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #99CC00;" onClick="showColor('#99CC00');"		onMouseOver="showColor_over('#99CC00');">&nbsp;</td>
+		<td style="width: 10px; background-color: #99CC33;" onClick="showColor('#99CC33');"		onMouseOver="showColor_over('#99CC33');">&nbsp;</td>
+		<td style="width: 10px; background-color: #99CC66;" onClick="showColor('#99CC66');"		onMouseOver="showColor_over('#99CC66');">&nbsp;</td>
+		<td style="width: 10px; background-color: #99CC99;" onClick="showColor('#99CC99');"		onMouseOver="showColor_over('#99CC99');">&nbsp;</td>
+		<td style="width: 10px; background-color: #99CCCC;" onClick="showColor('#99CCCC');"		onMouseOver="showColor_over('#99CCCC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #99CCFF;" onClick="showColor('#99CCFF');"		onMouseOver="showColor_over('#99CCFF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CCCC00;" onClick="showColor('#CCCC00');"		onMouseOver="showColor_over('#CCCC00');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CCCC33;" onClick="showColor('#CCCC33');"		onMouseOver="showColor_over('#CCCC33');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CCCC66;" onClick="showColor('#CCCC66');"		onMouseOver="showColor_over('#CCCC66');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CCCC99;" onClick="showColor('#CCCC99');"		onMouseOver="showColor_over('#CCCC99');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CCCCCC;" onClick="showColor('#CCCCCC');"		onMouseOver="showColor_over('#CCCCCC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CCCCFF;" onClick="showColor('#CCCCFF');"		onMouseOver="showColor_over('#CCCCFF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FFCC00;" onClick="showColor('#FFCC00');"		onMouseOver="showColor_over('#FFCC00');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FFCC33;" onClick="showColor('#FFCC33');"		onMouseOver="showColor_over('#FFCC33');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FFCC66;" onClick="showColor('#FFCC66');"		onMouseOver="showColor_over('#FFCC66');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FFCC99;" onClick="showColor('#FFCC99');"		onMouseOver="showColor_over('#FFCC99');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FFCCCC;" onClick="showColor('#FFCCCC');"		onMouseOver="showColor_over('#FFCCCC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FFCCFF;" onClick="showColor('#FFCCFF');"		onMouseOver="showColor_over('#FFCCFF');">&nbsp;</td>
+       </tr>
+	   <tr>                                                                         	          
+		<td style="width: 10px; background-color: #009900;" onClick="showColor('#009900');"		onMouseOver="showColor_over('#009900');">&nbsp;</td>
+		<td style="width: 10px; background-color: #009933;" onClick="showColor('#009933');"		onMouseOver="showColor_over('#009933');">&nbsp;</td>
+		<td style="width: 10px; background-color: #009966;" onClick="showColor('#009966');"		onMouseOver="showColor_over('#009966');">&nbsp;</td>
+		<td style="width: 10px; background-color: #009999;" onClick="showColor('#009999');"		onMouseOver="showColor_over('#009999');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0099CC;" onClick="showColor('#0099CC');"		onMouseOver="showColor_over('#0099CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0099FF;" onClick="showColor('#0099FF');"		onMouseOver="showColor_over('#0099FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #339900;" onClick="showColor('#339900');"		onMouseOver="showColor_over('#339900');">&nbsp;</td>
+		<td style="width: 10px; background-color: #339933;" onClick="showColor('#339933');"		onMouseOver="showColor_over('#339933');">&nbsp;</td>
+		<td style="width: 10px; background-color: #339966;" onClick="showColor('#339966');"		onMouseOver="showColor_over('#339966');">&nbsp;</td>
+		<td style="width: 10px; background-color: #339999;" onClick="showColor('#339999');"		onMouseOver="showColor_over('#339999');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3399CC;" onClick="showColor('#3399CC');"		onMouseOver="showColor_over('#3399CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3399FF;" onClick="showColor('#3399FF');"		onMouseOver="showColor_over('#3399FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #669900;" onClick="showColor('#669900');"		onMouseOver="showColor_over('#669900');">&nbsp;</td>
+		<td style="width: 10px; background-color: #669933;" onClick="showColor('#669933');"		onMouseOver="showColor_over('#669933');">&nbsp;</td>
+		<td style="width: 10px; background-color: #669966;" onClick="showColor('#669966');"		onMouseOver="showColor_over('#669966');">&nbsp;</td>
+		<td style="width: 10px; background-color: #669999;" onClick="showColor('#669999');"		onMouseOver="showColor_over('#669999');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6699CC;" onClick="showColor('#6699CC');"		onMouseOver="showColor_over('#6699CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6699FF;" onClick="showColor('#6699FF');"		onMouseOver="showColor_over('#6699FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #999900;" onClick="showColor('#999900');"		onMouseOver="showColor_over('#999900');">&nbsp;</td>
+		<td style="width: 10px; background-color: #999933;" onClick="showColor('#999933');"		onMouseOver="showColor_over('#999933');">&nbsp;</td>
+		<td style="width: 10px; background-color: #999966;" onClick="showColor('#999966');"		onMouseOver="showColor_over('#999966');">&nbsp;</td>
+		<td style="width: 10px; background-color: #999999;" onClick="showColor('#999999');"		onMouseOver="showColor_over('#999999');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9999CC;" onClick="showColor('#9999CC');"		onMouseOver="showColor_over('#9999CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9999FF;" onClick="showColor('#9999FF');"		onMouseOver="showColor_over('#9999FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC9900;" onClick="showColor('#CC9900');"		onMouseOver="showColor_over('#CC9900');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC9933;" onClick="showColor('#CC9933');"		onMouseOver="showColor_over('#CC9933');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC9966;" onClick="showColor('#CC9966');"		onMouseOver="showColor_over('#CC9966');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC9999;" onClick="showColor('#CC9999');"		onMouseOver="showColor_over('#CC9999');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC99CC;" onClick="showColor('#CC99CC');"		onMouseOver="showColor_over('#CC99CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC99FF;" onClick="showColor('#CC99FF');"		onMouseOver="showColor_over('#CC99FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF9900;" onClick="showColor('#FF9900');"		onMouseOver="showColor_over('#FF9900');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF9933;" onClick="showColor('#FF9933');"		onMouseOver="showColor_over('#FF9933');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF9966;" onClick="showColor('#FF9966');"		onMouseOver="showColor_over('#FF9966');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF9999;" onClick="showColor('#FF9999');"		onMouseOver="showColor_over('#FF9999');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF99CC;" onClick="showColor('#FF99CC');"		onMouseOver="showColor_over('#FF99CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF99FF;" onClick="showColor('#FF99FF');"		onMouseOver="showColor_over('#FF99FF');">&nbsp;</td>
+       </tr>
+	   <tr>                                                                          		           
+		<td style="width: 10px; background-color: #006600;" onClick="showColor('#006600');"		onMouseOver="showColor_over('#006600');">&nbsp;</td>
+		<td style="width: 10px; background-color: #006633;" onClick="showColor('#006633');"		onMouseOver="showColor_over('#006633');">&nbsp;</td>
+		<td style="width: 10px; background-color: #006666;" onClick="showColor('#006666');"		onMouseOver="showColor_over('#006666');">&nbsp;</td>
+		<td style="width: 10px; background-color: #006699;" onClick="showColor('#006699');"		onMouseOver="showColor_over('#006699');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0066CC;" onClick="showColor('#0066CC');"		onMouseOver="showColor_over('#0066CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0066FF;" onClick="showColor('#0066FF');"		onMouseOver="showColor_over('#0066FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #336600;" onClick="showColor('#336600');"		onMouseOver="showColor_over('#336600');">&nbsp;</td>
+		<td style="width: 10px; background-color: #336633;" onClick="showColor('#336633');"		onMouseOver="showColor_over('#336633');">&nbsp;</td>
+		<td style="width: 10px; background-color: #336666;" onClick="showColor('#336666');"		onMouseOver="showColor_over('#336666');">&nbsp;</td>
+		<td style="width: 10px; background-color: #336699;" onClick="showColor('#336699');"		onMouseOver="showColor_over('#336699');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3366CC;" onClick="showColor('#3366CC');"		onMouseOver="showColor_over('#3366CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3366FF;" onClick="showColor('#3366FF');"		onMouseOver="showColor_over('#3366FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #666600;" onClick="showColor('#666600');"		onMouseOver="showColor_over('#666600');">&nbsp;</td>
+		<td style="width: 10px; background-color: #666633;" onClick="showColor('#666633');"		onMouseOver="showColor_over('#666633');">&nbsp;</td>
+		<td style="width: 10px; background-color: #666666;" onClick="showColor('#666666');"		onMouseOver="showColor_over('#666666');">&nbsp;</td>
+		<td style="width: 10px; background-color: #666699;" onClick="showColor('#666699');"		onMouseOver="showColor_over('#666699');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6666CC;" onClick="showColor('#6666CC');"		onMouseOver="showColor_over('#6666CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6666FF;" onClick="showColor('#6666FF');"		onMouseOver="showColor_over('#6666FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #996600;" onClick="showColor('#996600');"		onMouseOver="showColor_over('#996600');">&nbsp;</td>
+		<td style="width: 10px; background-color: #996633;" onClick="showColor('#996633');"		onMouseOver="showColor_over('#996633');">&nbsp;</td>
+		<td style="width: 10px; background-color: #996666;" onClick="showColor('#996666');"		onMouseOver="showColor_over('#996666');">&nbsp;</td>
+		<td style="width: 10px; background-color: #996699;" onClick="showColor('#996699');"		onMouseOver="showColor_over('#996699');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9966CC;" onClick="showColor('#9966CC');"		onMouseOver="showColor_over('#9966CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9966FF;" onClick="showColor('#9966FF');"		onMouseOver="showColor_over('#9966FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC6600;" onClick="showColor('#CC6600');"		onMouseOver="showColor_over('#CC6600');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC6633;" onClick="showColor('#CC6633');"		onMouseOver="showColor_over('#CC6633');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC6666;" onClick="showColor('#CC6666');"		onMouseOver="showColor_over('#CC6666');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC6699;" onClick="showColor('#CC6699');"		onMouseOver="showColor_over('#CC6699');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC66CC;" onClick="showColor('#CC66CC');"		onMouseOver="showColor_over('#CC66CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC66FF;" onClick="showColor('#CC66FF');"		onMouseOver="showColor_over('#CC66FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF6600;" onClick="showColor('#FF6600');"		onMouseOver="showColor_over('#FF6600');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF6633;" onClick="showColor('#FF6633');"		onMouseOver="showColor_over('#FF6633');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF6666;" onClick="showColor('#FF6666');"		onMouseOver="showColor_over('#FF6666');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF6699;" onClick="showColor('#FF6699');"		onMouseOver="showColor_over('#FF6699');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF66CC;" onClick="showColor('#FF66CC');"		onMouseOver="showColor_over('#FF66CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF66FF;" onClick="showColor('#FF66FF');"		onMouseOver="showColor_over('#FF66FF');">&nbsp;</td>
+	   </tr>
+	   <tr>                                                                          		            
+		<td style="width: 10px; background-color: #003300;" onClick="showColor('#003300');"		onMouseOver="showColor_over('#003300');">&nbsp;</td>
+		<td style="width: 10px; background-color: #003333;" onClick="showColor('#003333');"		onMouseOver="showColor_over('#003333');">&nbsp;</td>
+		<td style="width: 10px; background-color: #003366;" onClick="showColor('#003366');"		onMouseOver="showColor_over('#003366');">&nbsp;</td>
+		<td style="width: 10px; background-color: #003399;" onClick="showColor('#003399');"		onMouseOver="showColor_over('#003399');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0033CC;" onClick="showColor('#0033CC');"		onMouseOver="showColor_over('#0033CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0033FF;" onClick="showColor('#0033FF');"		onMouseOver="showColor_over('#0033FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #333300;" onClick="showColor('#333300');"		onMouseOver="showColor_over('#333300');">&nbsp;</td>
+		<td style="width: 10px; background-color: #333333;" onClick="showColor('#333333');"		onMouseOver="showColor_over('#333333');">&nbsp;</td>
+		<td style="width: 10px; background-color: #333366;" onClick="showColor('#333366');"		onMouseOver="showColor_over('#333366');">&nbsp;</td>
+		<td style="width: 10px; background-color: #333399;" onClick="showColor('#333399');"		onMouseOver="showColor_over('#333399');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3333CC;" onClick="showColor('#3333CC');"		onMouseOver="showColor_over('#3333CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3333FF;" onClick="showColor('#3333FF');"		onMouseOver="showColor_over('#3333FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #663300;" onClick="showColor('#663300');"		onMouseOver="showColor_over('#663300');">&nbsp;</td>
+		<td style="width: 10px; background-color: #663333;" onClick="showColor('#663333');"		onMouseOver="showColor_over('#663333');">&nbsp;</td>
+		<td style="width: 10px; background-color: #663366;" onClick="showColor('#663366');"		onMouseOver="showColor_over('#663366');">&nbsp;</td>
+		<td style="width: 10px; background-color: #663399;" onClick="showColor('#663399');"		onMouseOver="showColor_over('#663399');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6633CC;" onClick="showColor('#6633CC');"		onMouseOver="showColor_over('#6633CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6633FF;" onClick="showColor('#6633FF');"		onMouseOver="showColor_over('#6633FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #993300;" onClick="showColor('#993300');"		onMouseOver="showColor_over('#993300');">&nbsp;</td>
+		<td style="width: 10px; background-color: #993333;" onClick="showColor('#993333');"		onMouseOver="showColor_over('#993333');">&nbsp;</td>
+		<td style="width: 10px; background-color: #993366;" onClick="showColor('#993366');"		onMouseOver="showColor_over('#993366');">&nbsp;</td>
+		<td style="width: 10px; background-color: #993399;" onClick="showColor('#993399');"		onMouseOver="showColor_over('#993399');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9933CC;" onClick="showColor('#9933CC');"		onMouseOver="showColor_over('#9933CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9933FF;" onClick="showColor('#9933FF');"		onMouseOver="showColor_over('#9933FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC3300;" onClick="showColor('#CC3300');"		onMouseOver="showColor_over('#CC3300');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC3333;" onClick="showColor('#CC3333');"		onMouseOver="showColor_over('#CC3333');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC3366;" onClick="showColor('#CC3366');"		onMouseOver="showColor_over('#CC3366');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC3399;" onClick="showColor('#CC3399');"		onMouseOver="showColor_over('#CC3399');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC33CC;" onClick="showColor('#CC33CC');"		onMouseOver="showColor_over('#CC33CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC33FF;" onClick="showColor('#CC33FF');"		onMouseOver="showColor_over('#CC33FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF3300;" onClick="showColor('#FF3300');"		onMouseOver="showColor_over('#FF3300');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF3333;" onClick="showColor('#FF3333');"		onMouseOver="showColor_over('#FF3333');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF3366;" onClick="showColor('#FF3366');"		onMouseOver="showColor_over('#FF3366');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF3399;" onClick="showColor('#FF3399');"		onMouseOver="showColor_over('#FF3399');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF33CC;" onClick="showColor('#FF33CC');"		onMouseOver="showColor_over('#FF33CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF33FF;" onClick="showColor('#FF33FF');"		onMouseOver="showColor_over('#FF33FF');">&nbsp;</td>
+	   </tr>
+	   <tr>                                                                          		                                                                                      		          
+		<td height="21" style="width: 10px; background-color: #000000;" onClick="showColor('#000000');"		onMouseOver="showColor_over('#000000');">&nbsp;</td>
+		<td style="width: 10px; background-color: #000033;" onClick="showColor('#000033');"		onMouseOver="showColor_over('#000033');">&nbsp;</td>
+		<td style="width: 10px; background-color: #000066;" onClick="showColor('#000066');"		onMouseOver="showColor_over('#000066');">&nbsp;</td>
+		<td style="width: 10px; background-color: #000099;" onClick="showColor('#000099');"		onMouseOver="showColor_over('#000099');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0000CC;" onClick="showColor('#0000CC');"		onMouseOver="showColor_over('#0000CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #0000FF;" onClick="showColor('#0000FF');"		onMouseOver="showColor_over('#0000FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #330000;" onClick="showColor('#330000');"		onMouseOver="showColor_over('#330000');">&nbsp;</td>
+		<td style="width: 10px; background-color: #330033;" onClick="showColor('#330033');"		onMouseOver="showColor_over('#330033');">&nbsp;</td>
+		<td style="width: 10px; background-color: #330066;" onClick="showColor('#330066');"		onMouseOver="showColor_over('#330066');">&nbsp;</td>
+		<td style="width: 10px; background-color: #330099;" onClick="showColor('#330099');"		onMouseOver="showColor_over('#330099');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3300CC;" onClick="showColor('#3300CC');"		onMouseOver="showColor_over('#3300CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #3300FF;" onClick="showColor('#3300FF');"		onMouseOver="showColor_over('#3300FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #660000;" onClick="showColor('#660000');"		onMouseOver="showColor_over('#660000');">&nbsp;</td>
+		<td style="width: 10px; background-color: #660033;" onClick="showColor('#660033');"		onMouseOver="showColor_over('#660033');">&nbsp;</td>
+		<td style="width: 10px; background-color: #660066;" onClick="showColor('#660066');"		onMouseOver="showColor_over('#660066');">&nbsp;</td>
+		<td style="width: 10px; background-color: #660099;" onClick="showColor('#660099');"		onMouseOver="showColor_over('#660099');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6600CC;" onClick="showColor('#6600CC');"		onMouseOver="showColor_over('#6600CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #6600FF;" onClick="showColor('#6600FF');"		onMouseOver="showColor_over('#6600FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #990000;" onClick="showColor('#990000');"		onMouseOver="showColor_over('#990000');">&nbsp;</td>
+		<td style="width: 10px; background-color: #990033;" onClick="showColor('#990033');"		onMouseOver="showColor_over('#990033');">&nbsp;</td>
+		<td style="width: 10px; background-color: #990066;" onClick="showColor('#990066');"		onMouseOver="showColor_over('#990066');">&nbsp;</td>
+		<td style="width: 10px; background-color: #990099;" onClick="showColor('#990099');"		onMouseOver="showColor_over('#990099');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9900CC;" onClick="showColor('#9900CC');"		onMouseOver="showColor_over('#9900CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #9900FF;" onClick="showColor('#9900FF');"		onMouseOver="showColor_over('#9900FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC0000;" onClick="showColor('#CC0000');"		onMouseOver="showColor_over('#CC0000');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC0033;" onClick="showColor('#CC0033');"		onMouseOver="showColor_over('#CC0033');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC0066;" onClick="showColor('#CC0066');"		onMouseOver="showColor_over('#CC0066');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC0099;" onClick="showColor('#CC0099');"		onMouseOver="showColor_over('#CC0099');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC00CC;" onClick="showColor('#CC00CC');"		onMouseOver="showColor_over('#CC00CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #CC00FF;" onClick="showColor('#CC00FF');"		onMouseOver="showColor_over('#CC00FF');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF0000;" onClick="showColor('#FF0000');"		onMouseOver="showColor_over('#FF0000');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF0033;" onClick="showColor('#FF0033');"		onMouseOver="showColor_over('#FF0033');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF0066;" onClick="showColor('#FF0066');"		onMouseOver="showColor_over('#FF0066');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF0099;" onClick="showColor('#FF0099');"		onMouseOver="showColor_over('#FF0099');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF00CC;" onClick="showColor('#FF00CC');"		onMouseOver="showColor_over('#FF00CC');">&nbsp;</td>
+		<td style="width: 10px; background-color: #FF00FF;" onClick="showColor('#FF00FF');"		onMouseOver="showColor_over('#FF00FF');">&nbsp;</td>
+       </tr>
+      </table>
+	</td>
+  </tr>
+  <tr align="center">
+    <td height="14" colspan="4" class="line_left2 line_right2 text3 bg2">&nbsp;Ausgew�hlte Farbe:</td>
+  </tr>
+  <tr>
+    <td height="25" class="line_left2 line_down2 text1">
+	   <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid black; background-color: #FFFFFF">
+    	<tr>
+      	  <td id="preview" width="100%">&nbsp;</td>
+    	</tr>
+      </table>
+	</td>
+    <td class="line_down2">&nbsp;</td>
+    <td width="38" class="text1 line_down2"><input id="color" value="#000000" size="6" readonly class="inputfield"></td>
+    <td width="364" class="line_down2 line_right2" align="right">
+	<input type="button" value="Speichern" onClick="returnToMain();" class="button">
+	<input type="button" value="Abbruch" onClick="window.close();" class="button">    
+	</td>
+  </tr>
+</table>
+</body>
+</html>


Property changes on: branches/2.5/http/sld/sld_pick_color.php
___________________________________________________________________
Name: svn:keywords
   + HeadURL Id LastChangedBy LastChangedDate LastChangedRevision



More information about the Mapbender_commits mailing list