Add php files
This commit is contained in:
35
modules/EcmCharts/CreatePDF2.php
Executable file
35
modules/EcmCharts/CreatePDF2.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
set_time_limit(99999);
|
||||
error_reporting(0);
|
||||
include_once("include/pChart/pChart/pData.class");
|
||||
include_once("include/pChart/pChart/pChart.class");
|
||||
include_once('modules/EcmCharts/helperChart.php');
|
||||
|
||||
$year=$_REQUEST['year'];
|
||||
$category=$_REQUEST['category'];
|
||||
$account=$_REQUEST['account'];
|
||||
$sh=$_REQUEST['show'];
|
||||
$ar=array();
|
||||
if(in_array("margin",$sh))$ar[]=generateImgChartCategories($year,$account,array("margin"));
|
||||
foreach($sh as $ssh){
|
||||
if($ssh!="margin")$shh[]=$ssh;
|
||||
}
|
||||
$ar[]=generateImgChartCategories($year,$account,$shh);
|
||||
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF();
|
||||
$p->SetLeftMargin(10);
|
||||
$p->SetRightMargin(10);
|
||||
$p->SetTopMargin(10);
|
||||
$p->SetAutoPageBreak(true,10);
|
||||
$p->AddPage();
|
||||
$p->SetFont('arialpl','B',16);
|
||||
$x=0;
|
||||
$y=0;
|
||||
foreach($ar as $a){
|
||||
$p->Image('modules/EcmCharts/files/'.$a.'.png',$x,$y,190);$p->Ln();
|
||||
$x=$p->GetX();
|
||||
$y=$p->GetY();
|
||||
}
|
||||
$p->Output("Chart.pdf","I");
|
||||
?>
|
||||
Reference in New Issue
Block a user