} elseif ($t == '-') { $tInclude = false; } elseif ($tInclude) { $includeTags[] = $t; } else { $excludeTags[] = $t; } } } if (count($srcArray) > 0) { // Build an array of the Panels affected when the entire source goes down. // This will allow us to use one section of code to calculate effects of panels going down and use it for both cases. $pnlList = array(); foreach ($srcArray as $srcID) { $pan->ParentPanelID = $srcID; $pnlList = array_merge($pnlList, $pan->getPanelListBySource()); } } else { // Need to build an array of Panel Objects (what we got from input was just the IDs) $pnlList = array(); foreach ($pnlArray as $pnlID) { $pnlCount = count($pnlList); $pnlList[$pnlCount] = new PowerPanel(); $pnlList[$pnlCount]->PanelID = $pnlID; $pnlList[$pnlCount]->GetPanel(); } } // Now that we have a complete list of the panels, we need a list of the CDUs affected by the outage $pduList = array(); // Rebuild an array of just the Panel ID values $pnlArray = array();
foreach ($dcList as $dcRow) { $pdf->AddPage(); $pdf->BookMark($dcRow->Name, 1); $pdf->SetFont($config->ParameterArray['PDFfont'], 'BU', 12); $pdf->Cell(80, 5, __("Data Center") . ': ' . $dcRow->Name); $pdf->SetFont($config->ParameterArray['PDFfont'], '', 8); $sourceList = $pan->getSourcesByDataCenter($dcRow->DataCenterID); foreach ($sourceList as $sourceRow) { $pdf->BookMark($sourceRow->PanelLabel, 2); $pdf->Ln(); $pdf->SetFont($config->ParameterArray['PDFfont'], 'U', 12); $pdf->Cell(80, 5, __("Power Source") . ': ' . $sourceRow->PanelLabel); $pdf->SetFont($config->ParameterArray['PDFfont'], '', 8); $pdf->Ln(); $pan->ParentPanelID = $sourceRow->PanelID; $panList = $pan->getPanelListBySource(); foreach ($panList as $panRow) { $pdf->BookMark($panRow->PanelLabel, 3); $pdf->Ln(); $pdf->SetFont($config->ParameterArray['PDFfont'], 'U', 12); $pdf->Cell(80, 5, __("Panel") . ': ' . $panRow->PanelLabel); $pdf->SetFont($config->ParameterArray['PDFfont'], '', 8); $pdf->Ln(); $pdu->PanelID = $panRow->PanelID; $pduList = $pdu->GetPDUbyPanel(); foreach ($pduList as $pduRow) { $pdf->BookMark($pduRow->Label, 4); $pdf->Ln(); $pdf->SetFont($config->ParameterArray['PDFfont'], '', 12); $pdf->Cell(80, 5, __("PDU") . ': ' . $pduRow->Label); $pdf->SetFont($config->ParameterArray['PDFfont'], '', 8);