sortColumn = SLOT_SORT_DEFAULT; $sortCriteria->ascending = true; // Used for Filtering $llView = "All Logical Libraries"; $enclView = "All Enclosures"; // Used for Sorting $sortBy = "location"; // Used for Message box $errorCode = 0; $displayMessage = 0; //no // Get necessary data from the library // $counts = get_all_resource_counts($user); $counts = get_library_summary_info($user); $enclosures = get_chassis($user); $loglibs = get_logical_libraries($user, $sortCriteria); $i = 0; $j = 0; $cartIndex = 0; $tmp_carts = get_physical_slots($user, $sortCriteria); $numTmpCarts = count($tmp_carts); // filter slots to only show carts in storage for ($j = 0; $j < $numTmpCarts; $j++) { if (($tmp_carts[$j]->barcode != "") && ($tmp_carts[$j]->slotType == "Storage")) { $carts[$cartIndex] = $tmp_carts[$j]; $carts[$cartIndex]->name = "System"; $cartIndex++; } } $tmp_carts = ""; $tempIndex = 0; $numLogLibs = count($loglibs); // traverse the logical libraries to get slot information for ($loglibIndex = 0; $loglibIndex < $numLogLibs; $loglibIndex++) { $libIndex[$loglibs[$loglibIndex]->name] = $loglibIndex; if ($loglibIndex == 0) { $allLibNames = $loglibs[$loglibIndex]->name; $allLibGuids = $loglibs[$loglibIndex]->guid; } else { $allLibNames = $allLibNames.":".$loglibs[$loglibIndex]->name; $allLibGuids = $allLibGuids.":".$loglibs[$loglibIndex]->guid; } $media_sources = get_media_sources($user, $sortCriteria, $loglibs[$loglibIndex]->guid, true, true, true); error_log(print_r($media_sources, true)); $numMediaSources = count($media_sources); for ($mediaIndex = 0; $mediaIndex < $numMediaSources; $mediaIndex++) { $duplicateFound = 0; $numCarts = count($carts); $i = 0; while (($i < $numCarts) && ($duplicateFound == 0)) { if (($media_sources[$mediaIndex]->barcode == $carts[$i]->barcode) && $media_sources[$mediaIndex]->barcode != "No_Label") { $carts[$i]->name = "Unassigned"; $duplicateFound = 1; } if (($media_sources[$mediaIndex]->guid == $carts[$i]->guid) && $media_sources[$mediaIndex]->barcode == "No_Label") { $carts[$i]->name = "Unassigned"; $duplicateFound = 1; } $i++; } if ($duplicateFound == 0) { $carts[$cartIndex] = $media_sources[$mediaIndex]; $cartIndex++; } } } // If a post, then this is a return from an operation // retrieve the results of the operation if ($_SERVER['REQUEST_METHOD'] == "POST") { $llView = $_REQUEST["llView"]; $enclView = $_REQUEST["enclView"]; $sortBy = $_REQUEST["sortBy"]; $errorCode= $_REQUEST["errorCode"]; $displayMessage = $_REQUEST["Message"]; $returnMessage = $_REQUEST["returnMessage"]; $selectedGuids = split(":", $_REQUEST['srcGuid']); } // get the counts needed to display the main table $numEmptyIOs = $counts->avail_mailbox_count; $numRows = count($carts); $numlogLibs = count($loglibs); $numEnclosures = count($enclosures); $numSelectedGuids = count($selectedGuids); // sort the table data based on the sortBy value $oldi = sortSlots($carts, $sortBy); // determine the attributes for the div that handles displaying and scrolling // for the main data table $divAttributes = calculateDivAttributes($llView, $enclView, $carts, $numRows, MAX_ROWS, MAX_SIZE_DATA_LIST); $numRowsDisplayed = $divAttributes['numDisplay']; ?>