mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix coding style part 2
This commit is contained in:
55
html/pdf.php
55
html/pdf.php
@@ -12,54 +12,53 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
if (strpos($_SERVER['PATH_INFO'], "debug"))
|
||||
{
|
||||
$debug = "1";
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_reporting', E_ALL);
|
||||
} else {
|
||||
$debug = FALSE;
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
ini_set('log_errors', 0);
|
||||
ini_set('error_reporting', 0);
|
||||
if (strpos($_SERVER['PATH_INFO'], 'debug')) {
|
||||
$debug = '1';
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_reporting', E_ALL);
|
||||
}
|
||||
else {
|
||||
$debug = false;
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
ini_set('log_errors', 0);
|
||||
ini_set('error_reporting', 0);
|
||||
}
|
||||
|
||||
include "../includes/defaults.inc.php";
|
||||
include "../config.php";
|
||||
include_once "../includes/definitions.inc.php";
|
||||
include "../includes/functions.php";
|
||||
include "includes/functions.inc.php";
|
||||
include "includes/authenticate.inc.php";
|
||||
require '../includes/defaults.inc.php';
|
||||
require '../config.php';
|
||||
require_once '../includes/definitions.inc.php';
|
||||
require '../includes/functions.php';
|
||||
require 'includes/functions.inc.php';
|
||||
require 'includes/authenticate.inc.php';
|
||||
require_once 'lib/tcpdf/tcpdf.php';
|
||||
|
||||
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
|
||||
|
||||
$pdf->SetCreator($config['project_name']);
|
||||
$pdf->SetAuthor($config['project_name']);
|
||||
$pdf->setFooterData(array(0,64,0), array(0,64,128));
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
$pdf->setFooterData(array(0, 64, 0), array(0, 64, 128));
|
||||
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
|
||||
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
|
||||
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
|
||||
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
|
||||
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
|
||||
$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
|
||||
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
||||
$pdf->setFontSubsetting(true);
|
||||
$pdf->SetFont('helvetica', '', 14, '', true);
|
||||
$pdf->setTextShadow(array('enabled'=>false, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
|
||||
$pdf->setTextShadow(array('enabled' => false, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));
|
||||
|
||||
if (isset($_GET['report']) && !empty($_GET['report'])) {
|
||||
$report = mres($_GET['report']);
|
||||
$pdf->SetHeaderData('../../' . $config['title_image'], 40, ucfirst($report), $config['project_name'], array(0,0,0), array(0,64,128));
|
||||
$pdf->SetHeaderData('../../'.$config['title_image'], 40, ucfirst($report), $config['project_name'], array(0, 0, 0), array(0, 64, 128));
|
||||
include_once "includes/reports/$report.pdf.inc.php";
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$report = 'report';
|
||||
}
|
||||
|
||||
$pdf->Output("$report.pdf", 'I');
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user