1, "s_interfaceType" => 21); if ($_SERVER[REQUEST_METHOD] == "POST") { $sortCriteria->sortColumn = $columnMap[$_POST['orderOn']]; $sortCriteria->ascending =(($_POST['orderBy']=="ASC")?(1):(0)); $sortCriteria->filterPattern = $_POST['filterPattern']; $libraryGUID = $_POST['libraryGUID']; $mediaTypeCode = (int)$_POST['mediaTypeCode']; } else { $sortCriteria->sortColumn = $columnMap['s_location']; $sortCriteria->ascending = 1; $sortCriteria->filterPattern = "*"; $libraryGUID = $_GET['libraryGUID']; $mediaTypeCode = (int)$_GET['mediaTypeCode']; } // error_log(print_r($sortCriteria, true)); $drives = get_all_drives_by_library($user, $libraryGUID, $sortCriteria, (int)0,(int)MEDIA_TYPE_ANY); $cpdrives = get_command_path_drives($user, $libraryGUID); $cpRdrive = get_root_command_path_drive($user, $libraryGUID); $maxLicense = get_max_dps_drive_cnt($user); $dpsLicenses= get_dps_licenses($user); error_log("dpsLicenses = ". print_r($dpsLicenses,true) ); /*######################################################## # This is a temporary soloution to set which drives are # the control path drives. See convertDriveDetails in # the php extension library.cpp for the CMI call that # will eventully set this setting. But right now # controlPath is always fales. We are setting it to the # correct value in this code. #########################################################*/ error_log("Setting controlpath drives..............................................."); $drivesUsingDps = 0; $i = 0; foreach ($drives as $drive) { // Get the licensing information to know what the user has rights to do. $DPSLicense = get_dps_license($user, $drive->guid); error_log( "DPSLicense for Drive ". $drive-guid ." = ". print_r($DPSLicense, true) ); if( $DPSLicense->CPFEnabled || $DPSLicense->LMEnabled ) { $drives[$i]->UsingDPS = true; $drivesUsingDps++; } else $drives[$i]->UsingDPS = false; foreach ($cpdrives as $cpdrive) { // Get the licensing information to know what the user has rights to do. //$DPSLicenseCP = get_dps_license($user, $cpdrive); //error_log( "DPSLicenseCP for Drive ". $drive-guid ." = ". print_r($DPSLicenseCP, true) ); error_log("---------------------- $cpdrive == $drive->guid"); if( $cpdrive == $drive->guid ) { error_log("Drive $drive->guid is a control path drive!!!" ); //NOTE: $drive is a copy of what's in $drives you must change the original not the copy if( $cpRdrive == $drive->guid ) { $drives[$i]->controlPathRoot = true; error_log("Found the ROOT command path drive ". $drive->guid); } else $drives[$i]->controlPathRoot = false; $drives[$i]->controlPath = true; break; } else { error_log("Drive $drive->guid is NOT a control path drive......" ); //NOTE: $drive is a copy of what's in $drives you must change the original not the copy $drives[$i]->controlPathRoot = false; $drives[$i]->controlPath = false; } } $i++; } error_log( "cpRdrive = ". print_r($cpRdrive, true) ); error_log( "cpdrives = ". print_r($cpdrives, true) ); error_log( "drives = " . print_r($drives, true) ); error_log( "\nmaxLicense = ". $maxLicense ); error_log( "Drives using a DPS license = ". $drivesUsingDps ); //$l = print_r($drives, TRUE); //error_log( "drives = ". $l); //$l = print_r($cpdrives, TRUE); //error_log( "cpdrives = " .$l); $numRows = count($drives); $numPages = ceil($numRows / ITEMS_PER_PAGE); $lowPageList = 1; $highPageList = min($numRows, ITEMS_PER_PAGE); // get the device Maps for Later check for mapped drives connected to blades $devices = get_device_maps($user); error_log("\n* * * * * * * devices for Host($aHostId) = ". print_r($devices,true) ); $CpItem = 0; // Which RB is the control path so we know which RBs to enable and disable ?>