include('user_inc.htm'); $i_columnSize = array( 14, 9, 8, 7, 8, 13, 8, 10, 7, 16 ); //NOTE: This is dupped in driveSetup.htm (They must match) $s_columnMap = array( "s_partitionName" =>0, "s_location" =>1, "s_status" =>17, "s_mediaType" =>19, "s_wwnn" =>3 ); $f_columnMap = array( "f_partitionName" =>0, "f_location" =>1, "f_status" =>17, "f_mediaType" =>19); $u_columnMap = array( "f_location" =>1); $columnMap = array("partitionName" =>"name", "location" =>"location", "status" =>"status", "mediaType" =>"mediaType", "wwnn" =>"wwnn"); if ($_SERVER[REQUEST_METHOD] == "GET") { $type = $_GET['type']; if( $type == 'SCSI') $sortCriteria = new SortCriteria($s_columnMap["partitionName"], "1"); else $sortCriteria = new SortCriteria($f_columnMap["partitionName"], "1"); } else { // The user must have pressed a column header to change sorting $type = $_POST['type']; if( $type == 'SCSI') $sortCriteria = new SortCriteria($s_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); else if( $type == 'Fibre') $sortCriteria = new SortCriteria($f_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); else $sortCriteria = new SortCriteria($u_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); } $currentType = $type; $drives = $_SESSION['drives']; $drives = columnSort($drives, $columnMap[substr($_POST['orderOn'], 2)], $_POST['orderBy']); // count the drives with this type // $numRows = 0; foreach($drives as $drive) { if( $drive->interfaceType == "$currentType" || (( !($drive->interfaceType) || ($drive->interfaceType == 'Unknown')) && ($currentType == 'unknown') )) { $numRows++; } } // insure that the document is empty if there are no drives of this type if( $numRows <= 0 ) { return; } $numPages = ceil($numRows / DRIVES_PER_PAGE); $lowPageList = 1; $highPageList = min($numRows, DRIVES_PER_PAGE); ?>
if( $numRows == 0 ) { // Change the text at the top of the screen to match which lists are being showed. if( $currentType == 'Fibre' ) { echo ""; } else if( $currentType == 'SCSI' ) { echo ""; } else { echo ""; } } else { echo "\n"; echo "\n"; } ?>