"", 'label' => '', 'ifAdminStatus' => '', 'ifOperStatus' => "", 'disabled' => "", 'ignore' => "", 'ifAlias' => '' ); foreach (dbFetchRows($sql, $param) as $port) { $port = ifLabel($port); // Mark interfaces which are OperDown (but not AdminDown) yet not ignored or disabled, or up yet ignored or disabled // - as to draw the attention to a possible problem. $isportbad = ($port['ifOperStatus'] == 'down' && $port['ifAdminStatus'] != 'down') ? 1 : 0; $dowecare = ($port['ignore'] == 0 && $port['disabled'] == 0) ? $isportbad : !$isportbad; $outofsync = $dowecare ? " class='red'" : ''; $response[] = array( 'ifIndex' => $port['ifIndex'], 'ifName' => $port['label'], 'ifAdminStatus' => $port['ifAdminStatus'], 'ifOperStatus' => ''.$port['ifOperStatus'].'', 'disabled' => ' ', 'ignore' => ' ', 'ifAlias' => '
' ); }//end foreach $output = array( 'current' => $current, 'rowCount' => $rowCount, 'rows' => $response, 'total' => $total, ); echo _json_encode($output);