[Mapbender-commits] r3332 - branches/astroidex_25/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Dec 15 19:15:04 EST 2008
Author: astrid_emde
Date: 2008-12-15 19:15:04 -0500 (Mon, 15 Dec 2008)
New Revision: 3332
Modified:
branches/astroidex_25/http/php/mod_editElements.php
Log:
selectbox for category added - handling not finished yet
Modified: branches/astroidex_25/http/php/mod_editElements.php
===================================================================
--- branches/astroidex_25/http/php/mod_editElements.php 2008-12-16 00:13:13 UTC (rev 3331)
+++ branches/astroidex_25/http/php/mod_editElements.php 2008-12-16 00:15:04 UTC (rev 3332)
@@ -51,9 +51,14 @@
}
.buttonbar{
position:absolute;
- top:40px;
+ top:60px;
left:10px;
}
+ .guiCategory{
+ position:absolute;
+ top:50px;
+ left:80px;
+ }
.guiList1_text{
position:absolute;
top:10px;
@@ -90,7 +95,7 @@
}
.myForm{
position:absolute;
- top:70px;
+ top:80px;
left:10px;
}
.textfield{
@@ -219,6 +224,11 @@
$v = array($guiDesc,$guiId);
$t = array('s','s');
$res = db_prep_query($sql,$v,$t);
+ }elseif ($mySave == '3') {
+ $sql = "UPDATE gui_gui_category SET fkey_gui_category_id = $1 WHERE fkey_gui_id = $2";
+ $v = array($guiCategoryId,$guiId);
+ $t = array('i','s');
+ $res = db_prep_query($sql,$v,$t);
}
}
@@ -372,6 +382,12 @@
}
}
+
+function setCategory(){
+ document.form1.mySave.value = 3;
+ document.form1.submit();
+}
+
// -->
</script>
</head>
@@ -381,6 +397,8 @@
$admin = new administration();
$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
+$gui_category_name = "Container"; #the function to get the category has to be written
+
echo "<form name='form1' action='" . $self ."' method='post'>\n";
if(count($ownguis)>0){
$v = array();
@@ -446,7 +464,7 @@
}
else{
echo "<div class= 'guiList1_text'>";
- echo "Edit Elements: ".$guiList1;
+ echo _mb("Selected Application").": ".$guiList1;
// set guiDesc and guiId if guiList1 has just been selected
if (!$guiDesc) {
@@ -458,9 +476,35 @@
$guiId = $$Id;
}
- echo " (" . $guiDesc;
- echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> ) \n";
+ echo "<br>"._mb("Description").": ".$guiDesc;
+ echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> \n";
echo "</div>\n";
+
+ # Category
+ $v = array();
+ $t = array();
+ $c = 1;
+ $sql = "SELECT * from gui_category";
+ $sql .= " order by lower(category_name);";
+ $res = db_prep_query($sql,$v,$t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ $category_name[$count]= $row["category_name"];
+ $category_description[$count]=$row["category_description"];
+ $count++;
+ }
+ echo "<br>"._mb("Category").": ";
+ echo " <select class='guiCategory' size='1' name='category' onChange='setCategory()'> \n";
+ for ($i=0; $i<count($category_name);$i++){
+ echo "<option value='".$category_name[$i]."' ";
+ if($category_name[$i] == $gui_category_name){ echo "selected";}
+ echo ">".$category_name[$i]. "</option>\n";
+ }
+ echo " </select> \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";
More information about the Mapbender_commits
mailing list