sortColumn = DRV_SORT_DEFAULT;
$sortCriteria->ascending = true;
$numRows = 0;
$numEmptyIOs = 0;
$numRows = 0;
$numEnclosures = 0;
$numlogLibs = 0;
// For filtering
$llView = "All Logical Libraries";
$enclView = "All Enclosures";
// for sorting
$sortBy = "Index";
// for displaying message box
$errorCode = 0;
$displayMessage = 0; //no
// 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"];
}
// Get necessary data from the library
//$counts = get_all_resource_counts($user);
$counts = get_library_summary_info($user);
$loglibs = get_logical_libraries($user, $sortCriteria);
$enclosures = get_chassis($user);
$sortCriteria->sortColumn = DRV_SORT_DEFAULT;
$temp_drives = get_all_drives($user, $sortCriteria);
$numTempDrives = count($temp_drives);
$driveIndex = 0;
for ($d = 0; $d < $numTempDrives; $d++)
{
//error_log(print_r($temp_drives[$d], true));
if ($temp_drives[$d]->interfaceType == "Fibre")
{
$drives[$driveIndex] = $temp_drives[$d];
$driveIndex++;
}
}
// get the counts needed to display the main table
$numEmptyIOs = $counts->avail_mailbox_count;
$numRows = count($drives);
$numEnclosures = count($enclosures);
$numlogLibs = count($loglibs);
// sort the table data based on the sortBy value
$oldi = sortDrives($drives, $sortBy);
// determine the attributes for the div that handles displaying and scrolling
// for the main data table
$divAttributes = calculateDivAttributes($llView, $enclView, $drives, $numRows, MAX_ROWS, MAX_SIZE_DRIVE_LIST);
$numRowsDisplayed = $divAttributes['numDisplay'];
?>