/****************************************************************************** * Copyright 1991-2006 by ADIC, Inc. All rights reserved. * No part of this work may be reproduced or transmitted in any * form or by any means, electronic or mechanical, including * photocopying and recording, or by any information storage * or retrieval system, except as may be expressly permitted by * the 17 U.S.C. section 101, et. seq., or in writing by * ADIC, Inc. *******************************************************************************/ include('common_admin_inc.htm'); include('IOB_inc.htm'); // Handle the progress screen if opened and get the NEW data if ($_SERVER[REQUEST_METHOD] == "POST") { $operationInProgress = true; $status = new ReturnStatus(); error_log("_POST = ". print_r($_POST, true) ); error_log("Doing operation: ". $_POST['operation']); switch( $_POST['operation'] ) { case 'create': // Determin if any blades were slected first. for($i=1; $i <=7; $i++) { if(isset($_POST['bladeSel'.$i])) $theBladeIds[] = $_POST['bladeSel'.$i]; } error_log("theBladeIds = ". $theBladeIds); $theHost = new CBHost( $_POST['hostName'], $_POST['hostId'], $_POST['bladeLoc'], $_POST['hostPort'], $_POST['hostWwpn'], $_POST['hostType'] ); error_log("The host for the create is: ". print_r($theHost, true) ); create_blade_host($user, $theHost, $theBladeIds); break; case 'modify': // Note: hosts will have the last selected hostId in it so we can use it for the id to use. $theHost = new CBHost( $_POST['hostName_m'], $_POST['hosts'], $_POST['bladeLoc'], $_POST['hostPort_m'], $_POST['hostWwpn_m'], $_POST['hostType_m'] ); error_log("The host for the modify is: ". print_r($theHost, true) ); modify_blade_host($user, $theHost); break; case 'delete': delete_blade_host($user, $_POST['hosts']); break; } print $status->out(); return; } $hosts = get_blade_hosts($user); error_log( "hosts = ". print_r($hosts, true) ); $numHosts = sizeof($hosts); $bEnableHostMapping = get_host_mapping_enabled($user); $bladesOrig = get_blades($user); $blades = array(); // Convert the array into an array keyed off the Blade ID instead of the index. foreach( $bladesOrig as $blade ) $blades[$blade->id] = $blade; error_log( "blades = ". print_r($blades, true) ); ?>