1, "State" => 23, "Status" => 17, "Active" => 18, "Type" => 21, "Partition" => 0 ); // NOTE: Becasue this page has ONLINE/OFFLINE buttons the nomal // DRIVES_PER_PAGE define in common is to big. This needs to be 4 // So I am using my Own Define on this page. define( 'MYITEMS_PER_PAGE', 8 ); // # drives / page if ($_SERVER[REQUEST_METHOD] == "POST") { $sortCriteria = new SortCriteria($columnMap[$_POST['orderOn']], ($_POST['orderBy'] == "ASC")); } else { $sortCriteria = new SortCriteria(1, true); } error_log("Sort POST data: ".$_POST['orderOn']."/".$_POST['orderBy']); error_log("Sort criteria: ".$sortCriteria->sortColumn."/".$sortCriteria->ascending); $t_drives = get_all_drives($user, $sortCriteria); error_log( print_r( $t_drives, true ) ); $drives = array(); // Just load the drives that are capable of encryption and have library encryption enabled. // NOTE: We are doing the filtering up here because if we do it below all the page counts are aff becaseu the use the inital values. foreach($t_drives as $drive) { if( !($drive->encryptionSupported && $drive->encryptionMethod == 4) ) // 4 is apparently LME, but I don't know where this is defined. continue; if( $drive->vendor != 'IBM' ) //Only IBM drives do Q-EKM continue; $drives[] = $drive; } $numRows = count($drives); $numPages = ceil($numRows / MYITEMS_PER_PAGE); // Note: You must init these values here or they DO NOT WORK! $lowPageList = 1; $highPageList = min($numRows, MYITEMS_PER_PAGE); ?>