[Mapbender-commits] r3479 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jan 22 13:36:18 EST 2009
Author: marc
Date: 2009-01-22 13:36:18 -0500 (Thu, 22 Jan 2009)
New Revision: 3479
Modified:
trunk/mapbender/http/php/mod_editElements.php
Log:
rollback to revission 3448 (login Zebra will create by astroidex branch)
Modified: trunk/mapbender/http/php/mod_editElements.php
===================================================================
--- trunk/mapbender/http/php/mod_editElements.php 2009-01-22 18:35:29 UTC (rev 3478)
+++ trunk/mapbender/http/php/mod_editElements.php 2009-01-22 18:36:18 UTC (rev 3479)
@@ -34,7 +34,6 @@
<title>Edit Elements</title>
<?php
include '../include/dyn_css.php';
-
?>
<style type="text/css">
<!--
@@ -52,7 +51,7 @@
}
.buttonbar{
position:absolute;
- top:80px;
+ top:60px;
left:10px;
}
.guiList1_text{
@@ -91,16 +90,12 @@
}
.myForm{
position:absolute;
- top:110px;
+ top:90px;
left:10px;
}
.textfield{
width:277px
}
- .gui_type_text{
- font-size:80%;
- margin-top:
- }
.textfield_small{
width:150px
}
@@ -114,7 +109,7 @@
</style>
<?php
# handle database updates etc.....
-if(isset($mySave) && ($mySave == '1' || $mySave == '2' || $mySave == '3')) {
+if(isset($mySave) && ($mySave == '1' || $mySave == '2')) {
# check module-permission ---------------------------------------------------------
# e_attributes
# e_js_file
@@ -226,14 +221,6 @@
$res = db_prep_query($sql,$v,$t);
}
- elseif ($mySave == '3') {
- $sql = "UPDATE gui SET gui_type = $1 WHERE gui_id = $2";
- $v = array($guiType,$guiId);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- }
-
-
}
if(isset($myDelete) && $myDelete == '1'){
$sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
@@ -299,8 +286,8 @@
db_commit();
}
# end
-echo "<script type='text/javascript'>\n";
-echo "var guiIDs = new Array();\n";
+echo "<script language='javascript'>";
+echo "var guiIDs = new Array();";
if(isset($guiList1)){
$sql = "SELECT e_id FROM gui_element WHERE fkey_gui_id = $1";
$v = array($guiList1);
@@ -308,7 +295,7 @@
$res = db_prep_query($sql,$v,$t);
$cnt = 0;
while($row = db_fetch_array($res)){
- echo "guiIDs[".$cnt."] = '".$row["e_id"]."';\n ";
+ echo "guiIDs[".$cnt."] = '".$row["e_id"]."'; ";
$cnt++;
}
}
@@ -385,29 +372,6 @@
}
}
-
-function editType(){
- var newType = document.form1.newType.value;
-
- if (newType=="wms_container"){
- var adminText = "\n Hint:\n Gui Type \"WMS Container\" will not be displayed in login interface ";
- }
- else {
- var adminText = "";
- }
-
- var confirmType = confirm("Are you sure to change the Gui Type to \"" +newType+ "\"" +adminText);
- if (confirmType == true) {
- document.form1.guiType.value = newType;
- document.form1.mySave.value = 3;
- document.form1.submit();
- }
- else{
- document.form1.newType.value = document.form1.guiType.value;
- }
-}
-
-
// -->
</script>
</head>
@@ -437,8 +401,7 @@
$gui_id_own[$count]=$row["gui_id"];
$gui_name_own[$count]=$row["gui_name"];
$gui_description_own[$count]=$row["gui_description"];
- $gui_type_own[$count]=$row["gui_type"];
- $count++;
+ $count++;
}
$v = array();
@@ -459,7 +422,6 @@
$gui_id_perm[$count]= $row["gui_id"];
$gui_name_perm[$count]=$row["gui_name"];
$gui_description_perm[$count]=$row["gui_description"];
- $gui_type_perm[$count]=$row["gui_type"];
$count++;
}
@@ -479,9 +441,7 @@
for ($i=0; $i<count($gui_id_own);$i++){
echo "<input type='hidden' name='guiDesc_" . $gui_name_own[$i] . "' value='" . $gui_description_own[$i] . "' >\n";
echo "<input type='hidden' name='guiId_" . $gui_name_own[$i] . "' value='" . $gui_id_own[$i] . "' >\n";
- echo "<input type='hidden' name='guiType_" . $gui_name_own[$i] . "' value='" . $gui_type_own[$i] . "' >\n";
-
- }
+ }
echo "<input type='hidden' name='guiList2' value='' >\n";
}
else{
@@ -497,32 +457,10 @@
$Id = "guiId_" . $guiList1;
$guiId = $$Id;
}
- if (!$guiType) {
- $Type = "guiType_" . $guiList1;
- $guiType = $$Type;
- }
echo " <br /><span style='font-size:75%'>(" . $guiDesc;
echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> ) </span>\n";
- echo "<br /><font class='gui_type_text'>Change GUI Type:</font>";
- echo "<select name='newType' id='' onchange='editType()' >";
- echo " <option value='..'> ... </option>\n";
- echo " <option value='admin'";
- if ($guiType == "admin") echo "selected='selected'>Admin</option>\n";
- else echo ">Admin</option>\n";
- echo " <option value='map'";
- if ($guiType == "map") echo "selected='selected'>Map</option>\n";
- else echo ">Map</option>\n";
- echo " <option value='digitize'";
- if ($guiType == "digitize") echo "selected='selected'>Digitize</option>\n";
- else echo ">Digitize</option>\n";
- echo " <option value='wms_container'";
- if ($guiType == "wms_container") echo "selected='selected'>WMS Container</option>\n";
- else echo ">WMS Container</option>\n";
-
- echo "</select>";
- echo "<br />";
- echo "</div>\n";
+ echo "</div>\n";
echo "<div class='buttonbar'>\n";
echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
@@ -535,13 +473,9 @@
"\"edit application\", " .
"\"width=500,height=500,dependent\");'> \n";
echo "</div>\n";
-
-
echo "<input type='hidden' name='guiList1' value='".$guiList1."' >\n";
- echo "<input type='hidden' name='guiId' value='".$guiId."' >\n";
- echo "<input type='hidden' name='guiDesc' value='".$guiDesc."' >\n";
- echo "<input type='hidden' name='guiType' value='".$guiType."' >\n";
-
+ echo "<input type='hidden' name='guiId' value='".$guiId."' >\n";
+ echo "<input type='hidden' name='guiDesc' value='".$guiDesc."' >\n";
}
#Depot
if(isset($guiList1)){
More information about the Mapbender_commits
mailing list