1, "h_wwnn" => 2, "h_type" => 3); $h_columnSize = array( 4, 32, 32, 31 ); //NOTE: This is dupped in hostAccessRegistration.htm (They must match) $a_columnSize = array( 4, 95); if( $_SERVER[REQUEST_METHOD] == "POST" ) { error_log("hostAccessRegistrationList.htm ". print_r($_POST, true) ); $prefix = $_POST['type']; // reset to type so we have the correct form $type = 'Hosts'; $sortCriteria = new SortCriteria($h_columnMap[$_POST['orderOn']], ($_POST['orderBy']=="ASC")?(1):(0)); } else if( $_SERVER[REQUEST_METHOD] == "GET" ) { $prefix = $_GET['type']; // reset to type so we have the correct form $type = 'Hosts'; $sortCriteria = new SortCriteria($h_columnMap["h_name"], "1"); } // Remove registered hosts from the device host list $devHosts = get_device_hosts($user, $sortCriteria); $regHosts = get_registered_hosts($user, $sortCriteria); error_log("hostAccessRegistrationList.htm devHosts = " . print_r($devHosts,true)); $addHosts = array(); foreach ($devHosts as $devHost) { $registered = 0; foreach ($regHosts as $regHost) { if (strtoupper($devHost->wwnn) == strtoupper($regHost->wwnn)) { $registered = 1; break; } } if (!$registered) { // add it to the list array_push($addHosts, $devHost); } } // set the count on the main form now $newHostCount = count($addHosts); echo ""; if($prefix == 'AddHosts') { $hosts = $addHosts; } else { $hosts = $regHosts; } $host_count = count($hosts); $numRows = $host_count; $numPages = ceil($numRows / ITEMS_PER_PAGE); $lowPageList = 1; $highPageList = min($numRows, ITEMS_PER_PAGE); error_log( "hostAccessRegistrationList hosts = ". print_r($hosts, true) ); ?>