getGuisByOwner($_SESSION["mb_user_id"],true); ?> '; ?> Delete GUI 0){ $v = array(); $t = array(); $sql = "SELECT * from gui WHERE gui.gui_id IN("; for($i=0; $i0){ $sql .= ",";} $sql .= "$".($i+1); array_push($v,$ownguis[$i]); array_push($t,'s'); } $sql .= ") order by gui_id"; $res = db_prep_query($sql,$v,$t); $cnt = 0; echo "
"; echo "
"; // If WMS is selected, show more info if($guiList) { echo "

"; // Show description $sql = "SELECT gui_description FROM gui WHERE gui_id = $1"; $v = array($guiList); $t = array('s'); $res = db_prep_query($sql,$v,$t); echo "Description:

"; $cnt = 0; while($row = db_fetch_array($res)) { $text = $row["gui_description"]; if ($text){ echo $text . "
"; $cnt++; } } if ($cnt == 0) { echo "- none -
"; } // Show users $sql = "SELECT mb_user_name FROM mb_user, gui_mb_user WHERE fkey_mb_user_id = mb_user_id AND fkey_gui_id = $1"; $v = array($guiList); $t = array('s'); $res = db_prep_query($sql,$v,$t); echo "

Users using this GUI

"; $cnt = 0; while($row = db_fetch_array($res)) { echo $row["mb_user_name"]."
"; $cnt++; } if ($cnt == 0) { echo "- none -
"; } // Show groups $sql = "SELECT mb_group_name FROM mb_group, gui_mb_group WHERE fkey_mb_group_id = mb_group_id AND fkey_gui_id = $1"; $v = array($guiList); $t = array('s'); $res = db_prep_query($sql,$v,$t); echo "

Groups using this GUI

"; $cnt = 0; while($row = db_fetch_array($res)) { echo $row["mb_group_name"]."
"; $cnt++; } if ($cnt == 0) { echo "- none -
"; } // Show list of WMS exclusive to this GUI $sql = "SELECT wms_id, wms_title FROM wms, gui_wms WHERE fkey_wms_id = wms_id AND fkey_gui_id = $1"; $v = array($guiList); $t = array('s'); $res = db_prep_query($sql,$v,$t); echo "

List of WMS exclusive to this GUI

"; $cnt = 0; $count = 0; while($row = db_fetch_array($res)) { $wmstitle = $row["wms_title"]; $wmsid = $row["wms_id"]; // Check how many GUIs use current WMS $sql2 = "SELECT COUNT(fkey_wms_id) FROM gui_wms WHERE fkey_wms_id = $1"; $v = array($wmsid); $t = array('i'); $res2 = db_prep_query($sql2,$v,$t); // Display if only selected GUI uses current WMS if (db_result($res2,0,0) == 1){ //echo ""; echo $wmstitle . "
"; $count++; } $cnt++; } if ($count == 0) { echo "- none -
"; } echo "

"; } echo ""; echo ""; echo "
"; }else{ echo "There are no guis available for this user. Please create a gui first."; } ?>