sortColumn = SLOT_SORT_DEFAULT; $sortCriteria->ascending = true; // Used for Sorting $sortBy = "Index"; // if this is a post, this is a request to move data // retrieve the source information for this move // from the post values if ($_SERVER['REQUEST_METHOD'] == "POST") { $url = $_REQUEST['url']; $libGuid = $_REQUEST['libGuids']; $srcGuid = $_REQUEST['srcGuids']; $sortBy = $_REQUEST["sortBy"]; } // Get necessary data from the library $carts = get_media_sources($user, $sortCriteria, $libGuid); foreach ($carts as $cart) { if ($cart->guid == $srcGuid) { $srcBarcode = $cart->barcode; $srcLib = $cart->name; $srcMediaType = $cart->mediaType; $srcSlotType = $cart->slotType; $srcLoc = $cart->location; $mediaTypeCode = $cart->mediaTypeCode; $srcLogicalAddress = $cart->logicalAddress; } } // get slot destinations from the library //$tmp_slots = get_media_destinations_by_type($user, $sortCriteria, $libGuid, $mediaTypeCode); $tmp_slots = get_media_destinations_by_type($user, $sortCriteria, $libGuid, (int)MEDIA_TYPE_ANY); $empty_slots = get_available_storage_slots($user, $libGuid); $num_empty_slots = count($empty_slots); $i = 0; // filter slots to only show storage and drive slots foreach ($tmp_slots as $tmp_slot) { //error_log("slot data = ". print_r($tmp_slots, true)); for ($eIndex=0; $eIndex<$num_empty_slots; $eIndex++) { //error_log($empty_slots[$eIndex]->location.' == '.$tmp_slot->location); if ($empty_slots[$eIndex]->location == $tmp_slot->location) { $slots[$i] = $tmp_slot; $i++; } } if ($tmp_slot->slotType != 'Storage') { $slots[$i] = $tmp_slot; $i++; } } // store the number of rows to be displayed in the destination table $numRows = count($slots); // sort the table data based on the sortBy value $oldi = sortSlots($slots, $sortBy); // determine the attributes for the div that handles displaying and scrolling // for the main data table $divAttributes = calculateDivAttributes("All Logical Libraries", "All Enclosures", $slots, $numRows, MAX_ROWS_MOVE, MAX_SIZE_DATA_MOVE_LIST); ?>