Пример #1
0
$pdf->SetTextColor(255);
$pdf->SetDrawColor(128, 0, 0);
$pdf->SetLineWidth(0.3);
$pdf->SetfillColor(224, 235, 255);
$pdf->SetTextColor(0);
$pdf->SetFont($config->ParameterArray["PDFfont"], "", 12);
if (function_exists('money_format')) {
    $pdf->Cell(300, 5, __("Annual Cost Per Rack Unit (Year)") . ': ' . money_format("%.2n", $annualCostPerUYear), "", 1, "L", "");
    $pdf->Cell(300, 5, __("Annual Cost Per Watt (Year)") . ': ' . money_format("%.4n", $annualCostPerWattYear), "", 1, "L", "");
} else {
    $pdf->Cell(300, 5, __("Annual Cost Per Rack Unit (Year)") . ': ' . sprintf($annualCostPerUYear, "%.2n"), "", 1, "L", "");
    $pdf->Cell(300, 5, __("Annual Cost Per Watt (Year)") . ': ' . sprintf($annualCostPerWattYear, "%.4n"), "", 1, "L", "");
}
$pdf->Ln();
$pdf->Ln();
$pdf->Bookmark("Departments");
$deptList = $dept->GetDepartmentList();
foreach ($deptList as $deptRow) {
    // Skip ITS for Now
    // if ( $deptRow->Name == "ITS" )
    // 	continue;
    $pdf->AddPage();
    $pdf->Bookmark($deptRow->Name, 1, 0);
    $pdf->SetFont($config->ParameterArray["PDFfont"], "B", 12);
    $pdf->Cell(80, 5, __("Department") . ":");
    $pdf->SetFont($config->ParameterArray["PDFfont"], "", 12);
    $pdf->Cell(0, 5, $deptRow->Name);
    $pdf->Ln();
    $pdf->SetFont($config->ParameterArray["PDFfont"], "B", 12);
    $pdf->Cell(80, 5, __("Executive Sponsor") . ":");
    $pdf->SetFont($config->ParameterArray["PDFfont"], "", 12);
Пример #2
0
//
$pdf = new PDF_Diag();
include_once "loadfonts.php";
$pdf->AliasNbPages();
$pdf->AddPage();
$colors[0] = array(100, 100, 255);
$colors[1] = array(255, 100, 100);
$colors[2] = array(255, 255, 100);
$colors[3] = array(170, 170, 255);
$colors[4] = array(0, 255, 255);
$colors[5] = array(255, 0, 0);
$colors[6] = array(0, 255, 0);
$colors[7] = array(0, 0, 255);
$colors[8] = array(100, 175, 255);
$colors[9] = array(255, 175, 100);
$pdf->Bookmark('Graphs');
$pdf->Bookmark('Occupancy', 1, 0);
$pdf->SetFont($config->ParameterArray['PDFfont'], 'B', 16);
$pdf->Cell(0, 18, __("Top 10 Data Center Occupancy Rates"), '', 1, 'C', 0);
$pdf->SetXY(10, 70);
$pdf->PieChart(250, 80, $tenantList, '%l: %v RU (%p)', $colors);
$pdf->AddPage();
$pdf->Bookmark('Power Usage', 1, 0);
$pdf->SetFont($config->ParameterArray['PDFfont'], 'B', 16);
$pdf->Cell(0, 18, __("Top 10 Data Center Power Users"), '', 1, 'C', 0);
$pdf->SetXY(10, 70);
$pdf->PieChart(250, 80, $powerList, '%l: %v Watts (%p)', $colors);
$pdf->SetFont($config->ParameterArray['PDFfont'], '', 8);
$pdf->SetFillColor(0, 0, 0);
$pdf->SetTextColor(255);
$pdf->SetDrawColor(128, 0, 0);