sortColumn = SLOT_SORT_DEFAULT; $sortCriteria->ascending = true; // if this is a post, then this is a request for work to be done if ($_SERVER['REQUEST_METHOD'] == "POST") { $libGuids = split(':', $_POST['libGuid']); $srcGuids = split(':', $_REQUEST['driveGuid']); $url = $_POST['url']; $tmp_slots = get_media_destinations_by_type($user, $sortCriteria, $libGuids[0], (int)MEDIA_TYPE_ANY); $i = 0; // filter slots to only show I/O slots foreach ($tmp_slots as $tmp_slot) { if ($tmp_slot->slotType == "I/O Station" || $tmp_slot->slotType == "IE Station" || $tmp_slot->slotType == "IO Station") { $slots[$i] = $tmp_slot; $i++; } } $numSlots = count($slots); $numGuids = count($srcGuids); if ($numSlots < $numGuids) { $returnMessage = "Remove could not complete. Not enough empty slots available."; } else { for ($i = 0; $i < $numGuids; $i++) { // call the extension to do the actual move $returnMessage = "move_media($user, $libGuids[$i], $srcGuids[$i], $slots[$i]->guid)"; move_media($user, $libGuids[$i], $srcGuids[$i], $slots[$i]->guid); } $returnMessage = "Remove successfully completed."; } } ?> Drive Unload: Remove