sortColumn = DRV_SORT_DEFAULT; $sortCriteria->ascending = true; $loglibs = get_logical_libraries_brief($user); $numlogLibs = count($loglibs); if ($numlogLibs > 0) { if ($_SERVER[REQUEST_METHOD] == "POST") { $displayMessage = $_REQUEST["Message"]; $returnMessage = $_REQUEST["returnMessage"]; if ($displayMessage == 0) { $libraryFilter = split(':', $_REQUEST['libraryFilter']); $libraryGuid = $libraryFilter[0]; $libraryName = $libraryFilter[1]; } else { $libraryGuid = $loglibs[0]->guid; $libraryName = $loglibs[0]->name; } } else { $libraryGuid = $loglibs[0]->guid; $libraryName = $loglibs[0]->name; } $drives = get_all_drives_by_library($user, $libraryGuid, $sortCriteria, (int)0,(int)MEDIA_TYPE_ANY); error_log("count(drives)=".print_r(count($drives),true)); error_log("drives = ".print_r($drives,true)); foreach ($drives as $drive) { error_log("each drive=".print_r($drive,true)); } $cpdrives = get_command_path_drives($user, $libraryGuid); $numDrives = count($drives); $numCPs = count($cpdrives); for ($i = 0; $i < $numDrives; $i++) { $drives[$i]->controlPath = 0;//false; for ($j = 0; $j < $numCPs; $j++) { // error_log("---------------------- $cpdrive == $drive->guid"); if( $cpdrives[$j] == $drives[$i]->guid ) { error_log("Drive $drive->guid is a control path drive!!!!!!!!!!!!!!!!!!!!!!!!!!" ); $drives[$i]->controlPath = 1;//true; $theCPdrive = $drives[$i]->guid; } else { // error_log("Drive $drive->guid is NOT a control path drive......" ); // $drives[$i]->controlPath = 0;//false; } } } // determine the attributes for the div that handles displaying and scrolling // for the main data table if ($numDrives > MAX_ROWS) { // make the table scrollable $divAttributes['divClass'] = "table-scroll"; $divAttributes['thClass'] = "table-noscroll"; $divAttributes['divHeight'] = MAX_SIZE_DRIVE_LIST; } else { // no scrolling needed $divAttributes['divClass'] = ""; $divAttributes['thClass'] = ""; $divAttributes['divHeight'] = ""; } } ?>