[Mapbender-commits] r2055 - branches/2.5/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Feb 1 11:21:01 EST 2008
Author: christoph
Date: 2008-02-01 11:21:00 -0500 (Fri, 01 Feb 2008)
New Revision: 2055
Modified:
branches/2.5/http/php/mod_editGuiWms.php
Log:
merged w/ SLD branch
Modified: branches/2.5/http/php/mod_editGuiWms.php
===================================================================
--- branches/2.5/http/php/mod_editGuiWms.php 2008-02-01 16:19:49 UTC (rev 2054)
+++ branches/2.5/http/php/mod_editGuiWms.php 2008-02-01 16:21:00 UTC (rev 2055)
@@ -258,18 +258,18 @@
if(isset($this_gui_wms_epsg)){
$sql = "UPDATE gui_wms set gui_wms_epsg = $1, gui_wms_mapformat = $2, ";
$sql .= "gui_wms_featureinfoformat = $3, gui_wms_exceptionformat = $4, ";
- $sql .= "gui_wms_visible = $5 ";
- $sql .= "WHERE fkey_gui_id = $6 AND fkey_wms_id = $7";
- $v = array($this_gui_wms_epsg,$this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui,$this_wms);
- $t = array('s','s','s','s','i','s','i');
+ $sql .= "gui_wms_visible = $5, gui_wms_sldurl = $6 ";
+ $sql .= "WHERE fkey_gui_id = $7 AND fkey_wms_id = $8";
+ $v = array($this_gui_wms_epsg,$this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui_wms_sldurl,$this_gui,$this_wms);
+ $t = array('s','s','s','s','i','s','s','i');
$res = db_prep_query($sql,$v,$t);
}
else{
$sql = "UPDATE gui_wms set gui_wms_mapformat = $1, ";
$sql .= "gui_wms_featureinfoformat = $2, gui_wms_exceptionformat = $3, ";
- $sql .= "gui_wms_visible = $4 ";
- $sql .= "WHERE fkey_gui_id = $5 AND fkey_wms_id = $6";
- $v = array($this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui,$this_wms);
+ $sql .= "gui_wms_visible = $4, gui_wms_sldurl = $5 ";
+ $sql .= "WHERE fkey_gui_id = $6 AND fkey_wms_id = $7";
+ $v = array($this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui_wms_sldurl,$this_gui,$this_wms);
$t = array('s','s','s','i','s','i');
$res = db_prep_query($sql,$v,$t);
}
@@ -392,6 +392,7 @@
$gui_wms_exceptionformat[$cnt_gw] = $row["gui_wms_exceptionformat"];
$gui_wms_epsg[$cnt_gw] = $row["gui_wms_epsg"];
$gui_wms_visible[$cnt_gw] = $row["gui_wms_visible"];
+ $gui_wms_sldurl[$cnt_gw] = $row["gui_wms_sldurl"]; # sld url
$cnt_gw++;
}
#wms
@@ -406,6 +407,7 @@
$wms_title[$cnt_w] = $row["wms_title"];
$wms_abstract[$cnt_w] = $row["wms_abstract"];
$wms_getcapabilities[$cnt_w] = $row["wms_getcapabilities"];
+ $wms_supportsld[$cnt_w] = $row["wms_supportsld"]; # Buttons zum sld support anzeigen?
$cnt_w++;
}
#wms_format
@@ -420,9 +422,10 @@
$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";
-$v = array($wmsList,$guiList);
-$t = array('i','s');
+$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) AND (sld.fkey_mb_user_id = $3 or sld.fkey_mb_user_id is NULL) ORDER BY l.layer_pos";
+$v = array($wmsList,$guiList,$mb_user_id);
+$t = array('i','s','i');
+
$res_gl = db_prep_query($sql_gl,$v,$t);
$gui_layer_status = array();
$gui_layer_selectable = array();
@@ -434,6 +437,7 @@
$gui_layer_priority = array();
$gui_layer_style = array();
$gui_layer_wfs_featuretype = array();
+$layer_maxscale = array();
$layer_id = array();
$layer_parent = array();
$layer_name = array();
@@ -441,6 +445,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"]);
@@ -459,6 +465,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
@@ -564,11 +572,25 @@
echo "</tr>";
+# sld support
+if($wms_supportsld[0]) {
+ echo "<tr>";
+ echo "<td>SLD-URL: </td><td>";
+ echo "<input type='text' class='myText' name='this_gui_wms_sldurl' title='".$gui_wms_sldurl[0]."' value='".$gui_wms_sldurl[0]."'>";
+ #echo "<a href='' onclick='return window.open(\"editor-start.php\");'><img src='sld_editor.png' border=0></a>";
+ #$layer_names = implode(",", $layer_name);
+ echo " <a href='".$gui_wms_sldurl[0]."' target='_new'>SLD laden/anzeigen</a>";
+ echo "</td>";
+ echo "</tr>";
+} else {
+ echo "<input type='hidden' value='' name='this_gui_wms_sldurl'>";
+}
+
echo "</table><br>";
echo "<table border='1' cellpadding='1'>";
+ echo "<tr>";
- echo "<tr>";
echo "<td>Nr.</td>";
echo "<td>ID</td>";
echo "<td>" . toImage('Parent') . "</td>";
@@ -583,7 +605,8 @@
echo "<td>" . toImage('maxScale 1:') . "</td>";
echo "<td>" . toImage('Style') . "</td>";
echo "<td>" . toImage('Prio') . "</td>";
- echo "<td>" . toImage('setWFS') . "</td>";
+ echo "<td>" . toImage('setWFS') . "</td>";
+ if($wms_supportsld[0]) {echo "<td>" . toImage('SLD') . "</td>";}
echo "</tr>";
#echo "<tr><td>Nr.</td><td>ID</td><td>Parent</td><td>Name</td><td>Title</td><td>on/off</td><td>sel</td><td>sel_default</td><td>info</td><td>info_default</td><td>minScale 1:</td><td>maxScale 1:</td><td>Prio</td><td>setWFS</td></tr>";
@@ -677,7 +700,19 @@
}
echo "'>";
}
- echo "</td>";
+ echo "</td>";
+ if($wms_supportsld[0]) {
+ 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='";
+ if ($sld_user_layer_id[$i] != "")
+ echo "sld:".$sld_user_layer_id[$i]."(".$use_sld[$i].")";
+ else
+ echo "SLD";
+ echo "'>";
+ }
+ echo "</td>";
+ }
echo "</tr>\n";
if($i == 0){ echo "<tr><td colspan='14'><hr></td></tr>";}
}
More information about the Mapbender_commits
mailing list