[Mapbender-commits] r1822 - branches/mapbender_sld/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Nov 15 11:32:35 EST 2007
Author: mschulz
Date: 2007-11-15 11:32:35 -0500 (Thu, 15 Nov 2007)
New Revision: 1822
Modified:
branches/mapbender_sld/http/php/mod_editGuiWms.php
Log:
display sld configuration status on layer sld button
Modified: branches/mapbender_sld/http/php/mod_editGuiWms.php
===================================================================
--- branches/mapbender_sld/http/php/mod_editGuiWms.php 2007-11-15 16:31:41 UTC (rev 1821)
+++ branches/mapbender_sld/http/php/mod_editGuiWms.php 2007-11-15 16:32:35 UTC (rev 1822)
@@ -405,7 +405,7 @@
$cnt_wf++;
}
#gui_layer
-$sql_gl = "SELECT * FROM layer AS l, gui_layer AS gl WHERE l.layer_id = gl.fkey_layer_id AND gl.gui_layer_wms_id = $1 AND gl.fkey_gui_id = $2 ORDER BY l.layer_pos";
+$sql_gl = "SELECT l.*, gl.*, sld.sld_user_layer_id, sld.use_sld FROM layer AS l, gui_layer AS gl left outer join sld_user_layer AS sld on sld.fkey_layer_id = gl.fkey_layer_id WHERE l.layer_id = gl.fkey_layer_id AND gl.gui_layer_wms_id = $1 AND gl.fkey_gui_id = $2 AND (sld.fkey_gui_id = $2 or sld.fkey_gui_id is NULL) ORDER BY l.layer_pos";
$v = array($wmsList,$guiList);
$t = array('i','s');
$res_gl = db_prep_query($sql_gl,$v,$t);
@@ -418,6 +418,7 @@
$gui_layer_maxscale = array();
$gui_layer_priority = array();
$gui_layer_wfs_featuretype = array();
+$layer_maxscale = array();
$layer_id = array();
$layer_parent = array();
$layer_name = array();
@@ -425,6 +426,8 @@
$layer_queryable = array();
$layer_minscale = array();
$layer_maxscale = array();
+$sld_user_layer_id = array();
+$use_sld = array();
while($row = db_fetch_array($res_gl)){
array_push($gui_layer_status, $row["gui_layer_status"]);
array_push($gui_layer_selectable, $row["gui_layer_selectable"]);
@@ -442,6 +445,8 @@
array_push($layer_queryable, $row["layer_queryable"]);
array_push($layer_minscale, $row["layer_minscale"]);
array_push($layer_maxscale, $row["layer_maxscale"]);
+ array_push($sld_user_layer_id, $row["sld_user_layer_id"]);
+ array_push($use_sld, $row["use_sld"]);
}
#layer_epsg
@@ -629,7 +634,10 @@
echo "<td>";
if ($i > 0) {
echo "<input class='button3' name='gui_layer_sld' type='button' onclick='window.open(\"../sld/sld_main.php?".SID."&gui_id=".$guiList."&wms_id=".$wms_id[0]."&layer_name=".$layer_name[$i]."\");' value='";
- echo "SLD-Editor";
+ if ($sld_user_layer_id[$i] != "")
+ echo "sld:".$sld_user_layer_id[$i]."(".$use_sld[$i].")";
+ else
+ echo "SLD";
echo "'>";
}
echo "</td>";
More information about the Mapbender_commits
mailing list