<?php if (@$_REQUEST['datacenterid'] == 0) { printf("<tr><td>%s:</td><td>\n", __("Data Center")); printf("<select name=\"datacenterid\" onChange=\"form.submit()\">\n"); printf("<option value=\"\">%s</option>\n", __("Select data center")); printf("<option value=\"-1\">%s</option>\n", __("All Data Centers")); foreach ($dcList as $dc) { printf("<option value=\"%d\">%s</option>\n", $dc->DataCenterID, $dc->Name); } printf("</td></tr>"); } else { if ($_REQUEST['datacenterid'] > 0) { /* If the datacenterid > 0, then it's a single data center */ $datacenter->DataCenterID = $_REQUEST['datacenterid']; $datacenter->GetDataCenter(); $sourceList = $pwrPanel->getSourcesByDataCenter($datacenter->DataCenterID); } else { /* All data centers were selected, so get ALL sources */ $sourceList = $pwrPanel->GetSources(); } printf("<input type=\"hidden\" name=\"datacenterid\" value=\"%d\">\n", $datacenter->DataCenterID); printf("<h3>%s: %s</h3>", __("Choose either power sources or panels to simulate for Data Center"), $datacenter->Name); printf("<input type=submit name=\"action\" value=\"%s\"><br>\n", __("Generate")); printf("<input type=checkbox name=\"skipnormal\">%s<br>\n", __("Only show down/unknown devices")); printf("<table border=1 align=center>\n"); printf("<tr><th>%s</th><th>%s</th></tr>\n", __("Power Source"), __("Power Panel")); foreach ($sourceList as $source) { $pwrPanel->ParentPanelID = $source->PanelID; $panelList = $pwrPanel->getPanelListBySource(); printf("<tr><td><input type=\"checkbox\" name=\"sourceid[]\" value=\"%d\">%s</td>\n", $source->PanelID, $source->PanelLabel); printf("<td><table>\n");
$pdf->SetFont($config->ParameterArray['PDFfont'], '', 8); $pdf->SetFillColor(0, 0, 0); $pdf->SetTextColor(255); $pdf->SetDrawColor(128, 0, 0); $pdf->SetLineWidth(0.3); $pdf->SetfillColor(224, 235, 255); $pdf->SetTextColor(0); $pdf->Bookmark('Data Centers'); $dcList = $dc->GetDCList(); 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);