sortColumn = LIB_SORT_DEFAULT; $sortCriteria->ascending = true; if(get_snmp_audit_logging_enabled($user) == '1') { $drives = get_all_drives($user, $sortCriteria); } // Intialize variables $sortCriteria->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++) { if(get_snmp_audit_logging_enabled($user) == '1') { foreach($drives as $drive) { if($drive->slotID == $srcGuids[$i]) { error_log("send_snmp_audit_logging_drive_config_changed_trap"); send_snmp_audit_logging_drive_config_changed_trap($user, $drive->name, $drive->wwnn, $drive->logicalAddress, $drive->serialNumber, "A tape drive configuration setting has been changed from the web UI"); } } } // 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