guid = $guid; $this->map = $map; } }; include_once('user_inc.htm'); // Note: columnSize arrays are duped in hostAccessConnectionList.htm (the must match) $h_columnSize = array( 4, 32, 32, 32 ); $p_columnSize = array( 4, 34, 34, 28 ); $d_columnSize = array( 4, 12, 16, 24, 12, 16, 16); // Note: columnSize arrays are duped in hostAccessTargetList.htm (the must match) $t_columnSize = array( 4, 10, 10, 10, 10, 10, 10, 10, 10, 16 ); if( $_SERVER[REQUEST_METHOD] == "POST" ) { error_log("hostAccessManagement POST = ". print_r($_POST, true )); $wwnn = $_POST['hostSelection']; $operation = $_POST['operation']; $libs = split(":", $_POST['libSelection']); $drives = split(":", $_POST['deviceSelection']); error_log("drives = ".print_r($drives, true)); $mapList = array(); // Add all command path drives first foreach ($libs as $lib) { if ($lib != "") { $CP_drives = get_command_path_drives($user, $lib); error_log("CP_drives = ".print_r($CP_drives, true)); foreach ($CP_drives as $CP_drive) { $smc_map = 0x2; $theHostMap = new HostAccessMap($CP_drive, $smc_map); array_push($mapList, $theHostMap); } } } error_log("hostAccessManagement mapList = ". print_r($mapList, true )); // add the ssc drives and map the ssc. // if already in the list map the ssc. foreach ($drives as $drive) { if ($drive != "") { $index = 0; $ssc_map = 0x1; $gotone = 0; foreach ($mapList as $mapItem) { if ($mapItem->guid == $drive) { $new_map = $mapList[$index]->map; $new_map |= $ssc_map; $mapList[$index]->map = $new_map; $gotone = 1; break; } $index++; } if (!$gotone) { // Not an smc drive, map the ssc $theHostMap = new HostAccessMap($drive, $ssc_map); array_push($mapList, $theHostMap); } } } // mapList is built, send it to PHP $operationInProgress = true; $status = new ReturnStatus(); $command_status = set_host_mappings($user, $wwnn, $mapList); print $status->out(); return; } else { error_log("hostAccessManagement GET = ". print_r($_GET, true )); $source = $_GET['source']; } $disabled=''; ?>