'; include '../include/dyn_css.php'; ?> Add WMS from Filtered Catalog 0){ $v = array(); $t = array(); $sql_group = "SELECT mb_group_id, mb_group_name, mb_group_description FROM mb_group WHERE mb_group_id IN ("; for($i=0; $i < count($group_id); $i++){ if($i>0){ $sql_group .= ",";} $sql_group .= "$".strval($i + 1); array_push($v,$group_id[$i]); array_push($t,"i"); } $sql_group.= ") ORDER BY mb_group_name"; $res_group = db_prep_query($sql_group,$v,$t); while($row = db_fetch_array($res_group)){ $mb_group_description[$cnt_group] = $row["mb_group_description"]; $my_group_name[$cnt_group] = $row["mb_group_name"]; $my_group_id[$cnt_group] = $row["mb_group_id"]; $cnt_group++; } } /*get group name ********************************************************************************************/ /*get allocated gui ********************************************************************************************/ $arrayGuis=mb_getGUIs($logged_user_id); $sql_gui = "SELECT * FROM gui WHERE gui_id IN ("; $v = $arrayGuis; $t = array(); for ($i = 1; $i <= count($arrayGuis); $i++){ if ($i > 1) { $sql_gui .= ","; } $sql_gui .= "$" . $i; array_push($t, "s"); } $sql_gui.= ") ORDER BY gui_name"; $res_gui = db_prep_query($sql_gui, $v, $t); while($row = db_fetch_array($res_gui)){ $gui_id[$cnt_gui] = $row["gui_id"]; $gui_name[$cnt_gui] = $row["gui_name"]; $gui_description[$cnt_gui] = $row["gui_description"]; #echo"$gui_name[$cnt_gui]"; $cnt_gui++; } /*get allocated gui ********************************************************************************************/ /*get allocated wms from allocated gui ********************************************************************************************/ $sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN ("; $v = $arrayGuis; $t = array(); for ($i = 1; $i <= count($arrayGuis); $i++){ if ($i > 1) { $sql_gui_wms .= ","; } $sql_gui_wms .= "$".$i; array_push($t, "s"); } $sql_gui_wms.= ") ORDER BY fkey_wms_id"; $res_gui_wms = db_prep_query($sql_gui_wms, $v, $t); while($row = db_fetch_array($res_gui_wms)){ $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"]; $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"]; $cnt_gui_wms++; } /*get allocated wms from allocated gui ********************************************************************************************/ /*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ $sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN ("; $v = $fkey_wms_id; $t = array(); for ($i = 1; $i <= count($fkey_wms_id); $i++){ if ($i > 1) { $sql_wms .= ","; } $sql_wms .= "$".$i; array_push($t, "s"); } $sql_wms.= ") ORDER BY wms_title"; $res_wms = db_prep_query($sql_wms, $v, $t); while($row = db_fetch_array($res_wms)){ $wms_title[$cnt_wms] = $row["wms_title"]; $wms_abstract[$cnt_wms] = $row["wms_abstract"]; $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"]; $wms_version[$cnt_wms] = $row["wms_version"]; $cnt_wms++; } /*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ /*INSERT HTML*/ echo "
"; # Button echo ""; echo ""; if (!empty($wms_show) || !empty($show_gui_configured_wms) || !empty($show_group_wms) || !empty($show_gui_wms)){ echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; ###### SQL ##################################################################################### ###### SHOW GUI WMS OR GROUP WMS ##################################################################################### /*show goup wms ********************************************************************************************/ #if (isset($show_group_wms)) if (!empty($show_group_wms)){ /*get gui goup ********************************************************************************************/ $sql_gui_mb_group = "SELECT fkey_gui_id, fkey_mb_group_id FROM gui_mb_group WHERE fkey_mb_group_id=$1"; $v = array($show_group_wms); $t = array("s"); $res_gui_mb_group = db_prep_query($sql_gui_mb_group, $v, $t); while($row = db_fetch_array($res_gui_mb_group)){ $group_gui_id[$cnt_gui_mb_group] = $row["fkey_gui_id"]; $fkey_mb_group_id[$cnt_gui_mb_group] = $row["fkey_mb_group_id"]; #echo"$group_gui_id[$cnt_gui_mb_group]"; $cnt_gui_mb_group++; } /*get gui goup ********************************************************************************************/ /*get group gui WMS ********************************************************************************************/ if(count($group_gui_id)>0) { $sql_fkey_group_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN ("; $v = $group_gui_id; $t = array(); for ($i = 1; $i <= count($group_gui_id); $i++){ if ($i > 1) { $sql_fkey_group_gui_wms .= ","; } $sql_fkey_group_gui_wms .= "$".$i; array_push($t, "s"); } $sql_fkey_group_gui_wms.= ") ORDER BY fkey_wms_id"; $res_fkey_group_gui_wms = db_prep_query($sql_fkey_group_gui_wms, $v, $t); while($row = db_fetch_array($res_fkey_group_gui_wms)){ $fkey_group_gui_gui_id[$cnt_fkey_group_gui_wms] = $row["fkey_gui_id"]; $fkey_group_gui_wms_id[$cnt_fkey_group_gui_wms] = $row["fkey_wms_id"]; #echo"$fkey_group_gui_wms_id[$cnt_fkey_group_gui_wms]"; $cnt_fkey_group_gui_wms++; } /*get group gui WMS ********************************************************************************************/ /*group: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ if(count($fkey_group_gui_wms_id)>0){ $sql_group_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN ("; $v = $fkey_group_gui_wms_id; $t = array(); for ($i = 1; $i <= count($fkey_group_gui_wms_id); $i++){ if ($i > 1) { $sql_group_gui_wms .= ","; } $sql_group_gui_wms .= "$".$i; array_push($t, "s"); } $sql_group_gui_wms.= ") ORDER BY wms_title"; $res_group_gui_wms = db_prep_query($sql_group_gui_wms, $v, $t); while($row = db_fetch_array($res_group_gui_wms)){ $group_wms_title[$cnt_group_gui_wms] = $row["wms_title"]; $group_wms_abstract[$cnt_group_gui_wms] = $row["wms_abstract"]; $group_wms_getcapabilities[$cnt_group_gui_wms] = $row["wms_getcapabilities"]; $group_wms_version[$cnt_group_gui_wms] = $row["wms_version"]; #echo"$group_wms_title[$cnt_group_gui_wms]"; $cnt_group_gui_wms++; } } } /*group: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ #if ($show_group_wms > 0) if ($cnt_group_gui_wms > 0){ /*get goup name for showing in the table ********************************************************************************************/ $sql_group_name = "SELECT mb_group_id, mb_group_name FROM mb_group WHERE mb_group_id = $1"; $v = array($show_group_wms); $t = array("s"); $res_group_name = db_prep_query($sql_group_name, $v, $t); while($row = db_fetch_array($res_group_name)){ $group_name_table[$cnt_group_name] = $row["mb_group_name"]; $my_group_id_table[$cnt_group_name] = $row["mb_group_id"]; $cnt_group_name++; } /*get goup name ********************************************************************************************/ echo"
"; echo"
"; echo"wms from group: $group_name_table[0]"; echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_group_gui_wms; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
WMS-TitleWMS-Abstract
".$group_wms_title[$i]."
".$group_wms_abstract[$i]."
"; } else{ echo"
"; echo"
"; echo "no wms in this group"; }/*End: if ($show_group_wms > 0) *********/ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ }/*End: if (!empty($show_group_wms)) *********/ /*show gui wms ********************************************************************************************/ if (!empty($show_gui_wms)){ /*get group gui WMS ********************************************************************************************/ $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1"; $v = array($show_gui_wms); $t = array("s"); #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id"; $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t); while($row = db_fetch_array($res_fkey_show_gui_wms)){ $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"]; $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"]; #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]"; $cnt_fkey_show_gui_wms++; } /*get group gui WMS ********************************************************************************************/ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ if(count($fkey_show_gui_wms_id)>0){ $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN ("; $v = $fkey_show_gui_wms_id; $t = array(); for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){ if ($i > 1) { $sql_show_gui_wms .= ","; } $sql_show_gui_wms .= "$".$i; array_push($t, "s"); } $sql_show_gui_wms.= ") ORDER BY wms_title"; $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t); while($row = db_fetch_array($res_show_gui_wms)){ $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"]; $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"]; $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"]; $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"]; $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"]; #echo"$gui_wms_title[$cnt_show_gui_wms]"; $cnt_show_gui_wms++; } /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ #if (isset($cnt_show_gui_wms > 0)) } if ($cnt_show_gui_wms > 0){ /*get selected gui name for table caption ********************************************************************************************/ $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1"; $v = array($show_gui_wms); $t = array("s"); $res_gui_table = db_prep_query($sql_gui_table, $v, $t); while($row = db_fetch_array($res_gui_table)){ $gui_id_table[$cnt_gui_table] = $row["gui_id"]; $gui_name_table[$cnt_gui_table] = $row["gui_name"]; $cnt_gui_table++; #echo"$gui_id_table[0]"; } /*get selected gui name for table caption ********************************************************************************************/ echo"
"; echo"
"; echo"wms from gui: $gui_name_table[0]"; echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_show_gui_wms; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
WMS-TitleWMS-Abstract
".$gui_wms_title[$i]."
".$gui_wms_abstract[$i]."
"; } else{ echo"
"; echo"
"; echo"
"; echo "no wms in this gui"; } /*End: if ($cnt_show_gui_wms > 0) *********/ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ } /*End: if(isset($show_gui_wms)) *********/ /*show gui wms ********************************************************************************************/ if (!empty($show_gui_configured_wms)){ /*get group gui WMS ********************************************************************************************/ $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1"; #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id"; $v = array($show_gui_configured_wms); $t = array("s"); $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t); while($row = db_fetch_array($res_fkey_show_gui_wms)){ $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"]; $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"]; #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]"; $cnt_fkey_show_gui_wms++; } /*get group gui WMS ********************************************************************************************/ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ if(count($fkey_show_gui_wms_id)>0){ $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN ("; $v = $fkey_show_gui_wms_id; $t = array(); for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){ if ($i > 1) { $sql_show_gui_wms .= ","; } $sql_show_gui_wms .= "$".$i; array_push($t, "s"); } $sql_show_gui_wms.= ") ORDER BY wms_title"; $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t); while($row = db_fetch_array($res_show_gui_wms)){ $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"]; $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"]; $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"]; $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"]; $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"]; #echo"$gui_wms_title[$cnt_show_gui_wms]"; $cnt_show_gui_wms++; } /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ #if (isset($cnt_show_gui_wms > 0)) } if ($cnt_show_gui_wms > 0){ /*get selected gui name for table caption ********************************************************************************************/ $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1"; $v = array($show_gui_configured_wms); $t = array("s"); $res_gui_table = db_prep_query($sql_gui_table, $v, $t); while($row = db_fetch_array($res_gui_table)){ $gui_id_table[$cnt_gui_table] = $row["gui_id"]; $gui_name_table[$cnt_gui_table] = $row["gui_name"]; $cnt_gui_table++; #echo"$gui_id_table[0]"; } /*get selected gui name for table caption ********************************************************************************************/ echo"
"; echo"
"; echo"wms from gui: $gui_name_table[0]"; echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_show_gui_wms; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
WMS-TitleWMS-Abstract
".$gui_wms_title[$i]."
".$gui_wms_abstract[$i]."
"; } else{ echo"
"; echo"
"; echo"
"; echo "no wms in this gui"; } /*End: if ($cnt_show_gui_wms > 0) *********/ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/ } /*End: if(isset($show_gui_configured_wms)) *********/ ###### SHOW GUI WMS OR GROUP WMS ##################################################################################### ###### SHOW GUI OR GROUP OR ALL WMS ##################################################################################### if ($wms_show == 4){ #gui echo"
"; echo"
"; echo"Please select a gui:"; echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_gui; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
gui namedescription
".$gui_name[$i]."
".$gui_description[$i]."
"; } if ($wms_show == 3){ #gui echo"
"; echo"
"; echo"Please select a gui:"; echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_gui; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
gui namedescription
".$gui_name[$i]."
".$gui_description[$i]."
"; } elseif ($wms_show== 2){ # group echo"
"; echo"
"; if($cnt_group>0){ echo "Please select a group:"; echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_group; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
group namedescription
".$my_group_name[$i]."
".$mb_group_description[$i]."
"; } else{ echo"no group for this user"; } } elseif ($wms_show== 1){ # all wms echo"
"; echo"
"; echo ""; echo " "; echo ""; echo " "; echo " "; for($i=0; $i<$cnt_wms; $i++){ echo ""; echo ""; echo ""; echo ""; } echo " "; echo "
WMS-TitleWMS-Abstract
".$wms_title[$i]."
".$wms_abstract[$i]."
"; } } ###### SHOW GUI OR GROUP OR ALL WMS ##################################################################################### /*show group wms ********************************************************************************************/ echo ""; /*show gui wms ********************************************************************************************/ echo ""; echo ""; /*show button ********************************************************************************************/ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; ?>