// // // Condition // Response // Node // State // Action // // // //TOS5; $xml = docmd("webrun", "", array("lscondresp")); if(getXmlErrors($xml,$errors)) { echo "

",implode(' ', $errors), "

"; exit; } //get all the condition&response associations for RMC foreach ($xml->children() as $response) foreach($response->children() as $data) { //get the data from xcatd $record = split('"',$data); echo ""; echo <<$record[1] $record[3] $record[5] $record[7] TOS6; //TODO: insert the button here echo ""; if($record[7] == "Active") { echo ""; }else { echo ""; } echo ""; echo ""; // $association = explode("=", $data); // // $ooe = 0; // $line = 0; // foreach($association as $elem) { // $ooe = $ooe%2; // //the format should be // //"NodeReachability"\t"EmailRootOffShift"\t"hv8plus01.ppd.pok.ibm.com"\t"Active" // $record = explode("\"", $elem); // $cond = $record[1]; // $resp = $record[3]; // $node = $record[5]; // $state = $record[7]; // echo ""; // echo "$cond"; // echo "$resp"; // echo "$node"; // echo "$state"; // echo ""; // if($state == "Active") { // insertButtons(array('label'=>'DeActivate', 'id'=>'deactivate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"stop\")")); // }else if($state == "Not active"){ // insertButtons(array('label'=>'Activate', 'id'=>'activate', 'onclick'=>"control_RMCAssoc(\"$cond\", \"$node\", \"$resp\", \"start\")")); // } // echo ""; // echo ""; // $ooe++; // $line++; // } } // echo ""; ?>