include_once('user_inc.htm'); if ($_SERVER[REQUEST_METHOD] == "POST") { error_log("_POST = ". print_r($_POST, true) ); $libraryGUID = $_POST['libraryGUID']; $mediaTypeCode = $_POST['mediaTypeCode']; $sourceGUID = $_POST['sourceGUID']; $destGUID = $_POST['destGUID']; // Required to support the operation in progress dialog. $operationInProgress = true; $status = new ReturnStatus(); // make sure th tape in the IE slot belongs to the system. //get_mailbox $sortCriteria->ascending = false; $sortCriteria->sortColumn = 's_location'; if( $sourceGUID == "IE" ) { $slots = get_physical_mailbox( $user, $sortCriteria, 2 ); // Only get full slots. error_log("Physical Mailbox Slots = " . print_r($slots, true ) ); $bNoTape = true; if( sizeof($slots) != 0 ) { foreach( $slots as $slot ) { error_log( "Looking at location " . $slot->location ); if( $slot->location == "0,6,1" ) { error_log("We found a tape owned by the system partition in the top IE slot."); $bNoTape = false; break; } } } if( $bNoTape ) { error_back( 0x50035 ); return; } } // Now clean the drives. foreach (explode(":", $destGUID) as $theGUID) { if( $sourceGUID == "CC" ) clean_drive($user,$libraryGUID,$theGUID); else // Do the OLD way with the TOP IE Slot by default. clean_drive_manually($user,$libraryGUID,$theGUID); } print $status->out_complete(); return; } else { $cleaning_configured = get_num_cleaning_slots($user); $cleanSlots = get_cleaning_slots($user, $sortCriteria, 2); // Get the FULL mail box slots error_log("Cleaning Slots = ". print_r($cleanSlots, true) ); // Get the number of logical libraies so we know if we need to bring up the partition Slect page or not. $libs = get_logical_libraries_brief($user); $lib_count = count($libs); } ?>