499 lines
20 KiB
PHP
499 lines
20 KiB
PHP
<?php
|
|
|
|
error_reporting(E_ALL); ini_set('display_errors', 0);
|
|
|
|
if ($_GET['monat']>0) { $monat_aktuell=$_GET['monat']; } else { $monat_aktuell = (int)date('m'); }
|
|
if ($_GET['jahr']>0) { $jahr_aktuell=$_GET['jahr']; } else { $jahr_aktuell = (int)date('Y'); }
|
|
|
|
$monatstage = date("t",mktime(0, 0, 0,$monat_aktuell, 1,$jahr_aktuell));
|
|
|
|
|
|
require('lib/fpdf.php');
|
|
class PDF extends FPDF {
|
|
|
|
/*function Header()
|
|
{
|
|
$this->SetFont('Arial','B',8);
|
|
$this->Cell(30,3,'Title',1,0,'C');
|
|
//Line break
|
|
$this->Ln(20);
|
|
}
|
|
*/
|
|
/* function Footer() {
|
|
$this->SetY(-15);
|
|
$this->SetFont('Helvetica','I',6);
|
|
$this->Cell(190,3,'JB-Transport.de - Bautzner Str. 67 - 04347 Leipzig ***** Interne Liste - NON Public ***** by. F. Teichert ©2012','1','0','C','1');
|
|
} */
|
|
}
|
|
$pdf = new PDF('L','mm','A4');
|
|
//$pdf->SetTopMargin(1);
|
|
$pdf->SetAutoPageBreak(false);
|
|
$pdf->AddPage();
|
|
|
|
// blau (0,160,230)
|
|
// Orange (240,150, 0)
|
|
// grau (200,200,200)
|
|
|
|
|
|
$pdf->SetFont('Helvetica','B',12);
|
|
$pdf->SetTextColor(0,0,140);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(140,6,"Auswertung PVL ".(sprintf("%02d",$monat_aktuell).".".$jahr_aktuell),'1','0','L','1');
|
|
$pdf->SetTextColor(240,150,0);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->Cell(140,6,"JB-Transport.de",'1','0','R','1');
|
|
$pdf->Write(6,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->SetTextColor(240,150,0);
|
|
|
|
$pdf->SetFont('Helvetica','B',10);
|
|
$pdf->SetTextColor(0,0,140);
|
|
//$pdf->SetFillColor(0,0,0);
|
|
$pdf->Cell(280,4,"Seite 1/2",'0','1','R','0');
|
|
$pdf->Write(4,"\n");
|
|
|
|
//------------------------------ Tabellenkopf
|
|
$pdf->SetFillColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,Datum,'1','0','L','1');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=3 ORDER BY id LIMIT 8");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['tour'];
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(32.5,5,$tournummer,'1','0','L','1');
|
|
}
|
|
$pdf->Write(7,"\n");
|
|
|
|
//---------------------- auslesen
|
|
|
|
|
|
for($x=1;$x<=$monatstage;$x++){
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,sprintf("%02d",$x).".".sprintf("%02d",$monat_aktuell).".".$jahr_aktuell,'1','0','R','1');
|
|
if(date("N", mktime(0, 0, 0,$monat_aktuell,$x,$jahr_aktuell))<7) {
|
|
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=3 ORDER BY id LIMIT 8");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['id'];
|
|
$stammf=$row_tour['s_fahrer'];
|
|
$row_data = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$row_tour['id']."' AND tag='".$x."' AND monat='".$monat_aktuell."' AND jahr='".$jahr_aktuell."'");
|
|
$stamma=$row_tour['s_auto']; $stammf=$row_tour['s_fahrer']; if($stammf != $row_data['fahrer']) { $pdf->SetFont('Helvetica','B',10); }
|
|
if($row_data['fahrer']==0) {
|
|
$pdf->Cell(32.5,5,' ','1','0','L','1');
|
|
} else {
|
|
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_data['fahrer']."'");
|
|
$pdf->Cell(32.5,5,($row_fahrerx['name']),'1','0','L','1'); $pdf->SetFont('');
|
|
}
|
|
$pdf->SetFont('');
|
|
}
|
|
$pdf->Ln(5);
|
|
} else {
|
|
// $pdf->Ln(1);
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$pdf->Cell(260,5,' ','1','1','L','1');
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
}
|
|
}
|
|
$pdf->Write(2,"\n");
|
|
|
|
//--------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------- 2. Seite PVL
|
|
$pdf->SetAutoPageBreak(false);
|
|
//$pdf->SetTopMargin(10);
|
|
$pdf->AddPage();
|
|
$pdf->SetFont('Helvetica','B',12);
|
|
$pdf->SetTextColor(0,0,140);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(140,6,"Auswertung PVL ".(sprintf("%02d",$monat_aktuell).".".$jahr_aktuell),'1','0','L','1');
|
|
$pdf->SetTextColor(240,150,0);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->Cell(140,6,"JB-Transport.de",'1','0','R','1');
|
|
$pdf->Write(6,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->SetTextColor(240,150,0);
|
|
|
|
$pdf->SetFont('Helvetica','B',10);
|
|
$pdf->SetTextColor(0,0,140);
|
|
//$pdf->SetFillColor(0,0,0);
|
|
$pdf->Cell(280,4,"Seite 2/2",'0','1','R','0');
|
|
$pdf->Write(4,"\n");
|
|
|
|
//------------------------------ Tabellenkopf
|
|
$pdf->SetFillColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,Datum,'1','0','L','1');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=3 ORDER BY id LIMIT 8,8");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['tour'];
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(32.5,5,$tournummer,'1','0','L','1');
|
|
}
|
|
$pdf->Write(7,"\n");
|
|
|
|
//---------------------- auslesen
|
|
|
|
|
|
for($x=1;$x<=$monatstage;$x++){
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,sprintf("%02d",$x).".".sprintf("%02d",$monat_aktuell).".".$jahr_aktuell,'1','0','R','1');
|
|
if(date("N", mktime(0, 0, 0,$monat_aktuell,$x,$jahr_aktuell))<7) {
|
|
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=3 ORDER BY id LIMIT 8,8");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['id'];
|
|
$stammf=$row_tour['s_fahrer'];
|
|
$row_data = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$row_tour['id']."' AND tag='".$x."' AND monat='".$monat_aktuell."' AND jahr='".$jahr_aktuell."'");
|
|
$stamma=$row_tour['s_auto']; $stammf=$row_tour['s_fahrer']; if($stammf != $row_data['fahrer']) { $pdf->SetFont('Helvetica','B',10); }
|
|
if($row_data['fahrer']==0) {
|
|
$pdf->Cell(32.5,5,' ','1','0','L','1');
|
|
} else {
|
|
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_data['fahrer']."'");
|
|
$pdf->Cell(32.5,5,($row_fahrerx['name']),'1','0','L','1'); $pdf->SetFont('');
|
|
}
|
|
$pdf->SetFont('');
|
|
}
|
|
$pdf->Ln(5);
|
|
} else {
|
|
// $pdf->Ln(1);
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$pdf->Cell(260,5,' ','1','1','L','1');
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
}
|
|
}
|
|
$pdf->Write(2,"\n");
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------- LVZ
|
|
$pdf->SetAutoPageBreak(false);
|
|
//$pdf->SetTopMargin(10);
|
|
$pdf->AddPage();
|
|
$pdf->SetFont('Helvetica','B',12);
|
|
$pdf->SetTextColor(0,0,140);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(140,6,"Auswertung LVZ ".(sprintf("%02d",$monat_aktuell).".".$jahr_aktuell),'1','0','L','1');
|
|
$pdf->SetTextColor(240,150,0);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->Cell(140,6,"JB-Transport.de",'1','0','R','1');
|
|
$pdf->Write(6,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->SetTextColor(240,150,0);
|
|
|
|
$pdf->SetFont('Helvetica','B',10);
|
|
$pdf->SetTextColor(0,0,140);
|
|
//$pdf->SetFillColor(0,0,0);
|
|
$pdf->Cell(280,4,"Seite 1/1",'0','1','R','0');
|
|
$pdf->Write(4,"\n");
|
|
|
|
//------------------------------ Tabellenkopf
|
|
$pdf->SetFillColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,Datum,'1','0','L','1');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=4 ORDER BY id ");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['tour'];
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(32.5,5,$tournummer,'1','0','L','1');
|
|
}
|
|
$pdf->Write(7,"\n");
|
|
|
|
//---------------------- auslesen
|
|
|
|
|
|
for($x=1;$x<=$monatstage;$x++){
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,sprintf("%02d",$x).".".sprintf("%02d",$monat_aktuell).".".$jahr_aktuell,'1','0','R','1');
|
|
if(date("N", mktime(0, 0, 0,$monat_aktuell,$x,$jahr_aktuell))<7) {
|
|
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=4 ORDER BY id");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['id'];
|
|
$stammf=$row_tour['s_fahrer'];
|
|
$row_data = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$row_tour['id']."' AND tag='".$x."' AND monat='".$monat_aktuell."' AND jahr='".$jahr_aktuell."'");
|
|
$stamma=$row_tour['s_auto']; $stammf=$row_tour['s_fahrer']; if($stammf != $row_data['fahrer']) { $pdf->SetFont('Helvetica','B',10); }
|
|
if($row_data['fahrer']==0) {
|
|
$pdf->Cell(32.5,5,' ','1','0','L','1');
|
|
} else {
|
|
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_data['fahrer']."'");
|
|
$pdf->Cell(32.5,5,($row_fahrerx['name']),'1','0','L','1'); $pdf->SetFont('');
|
|
}
|
|
$pdf->SetFont('');
|
|
}
|
|
$pdf->Ln(5);
|
|
} else {
|
|
// $pdf->Ln(1);
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$pdf->Cell(227.5,5,' ','1','1','L','1');
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
}
|
|
}
|
|
$pdf->Write(2,"\n");
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------- Marktplatz
|
|
$pdf->SetAutoPageBreak(false);
|
|
//$pdf->SetTopMargin(10);
|
|
$pdf->AddPage();
|
|
$pdf->SetFont('Helvetica','B',12);
|
|
$pdf->SetTextColor(0,0,140);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(140,6,"Auswertung Marktplatz ".(sprintf("%02d",$monat_aktuell).".".$jahr_aktuell),'1','0','L','1');
|
|
$pdf->SetTextColor(240,150,0);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->Cell(140,6,"JB-Transport.de",'1','0','R','1');
|
|
$pdf->Write(6,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->SetTextColor(240,150,0);
|
|
|
|
$pdf->SetFont('Helvetica','B',10);
|
|
$pdf->SetTextColor(0,0,140);
|
|
//$pdf->SetFillColor(0,0,0);
|
|
$pdf->Cell(280,4,"Seite 1/1",'0','1','R','0');
|
|
$pdf->Write(4,"\n");
|
|
|
|
//------------------------------ Tabellenkopf
|
|
$pdf->SetFillColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,Datum,'1','0','L','1');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=10 ORDER BY id ");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['tour'];
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(32.5,5,$tournummer,'1','0','L','1');
|
|
}
|
|
$pdf->Write(7,"\n");
|
|
|
|
//---------------------- auslesen
|
|
|
|
|
|
for($x=1;$x<=$monatstage;$x++){
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,sprintf("%02d",$x).".".sprintf("%02d",$monat_aktuell).".".$jahr_aktuell,'1','0','R','1');
|
|
if(date("N", mktime(0, 0, 0,$monat_aktuell,$x,$jahr_aktuell))<7) {
|
|
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=10 ORDER BY id");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['id'];
|
|
$stammf=$row_tour['s_fahrer'];
|
|
$row_data = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$row_tour['id']."' AND tag='".$x."' AND monat='".$monat_aktuell."' AND jahr='".$jahr_aktuell."'");
|
|
$stamma=$row_tour['s_auto']; $stammf=$row_tour['s_fahrer']; if($stammf != $row_data['fahrer']) { $pdf->SetFont('Helvetica','B',10); }
|
|
if($row_data['fahrer']==0) {
|
|
$pdf->Cell(32.5,5,' ','1','0','L','1');
|
|
} else {
|
|
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_data['fahrer']."'");
|
|
$pdf->Cell(32.5,5,($row_fahrerx['name']),'1','0','L','1'); $pdf->SetFont('');
|
|
}
|
|
$pdf->SetFont('');
|
|
}
|
|
$pdf->Ln(5);
|
|
} else {
|
|
// $pdf->Ln(1);
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$pdf->Cell(162.5,5,' ','1','1','L','1');
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
}
|
|
}
|
|
$pdf->Write(2,"\n");
|
|
//-------------------------------------------------
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------- Marktplatz
|
|
$pdf->SetAutoPageBreak(false);
|
|
//$pdf->SetTopMargin(10);
|
|
$pdf->AddPage();
|
|
$pdf->SetFont('Helvetica','B',12);
|
|
$pdf->SetTextColor(0,0,140);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(140,6,"Auswertung PIN-Touren ".(sprintf("%02d",$monat_aktuell).".".$jahr_aktuell),'1','0','L','1');
|
|
$pdf->SetTextColor(240,150,0);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->Cell(140,6,"JB-Transport.de",'1','0','R','1');
|
|
$pdf->Write(6,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->SetTextColor(240,150,0);
|
|
|
|
$pdf->SetFont('Helvetica','B',10);
|
|
$pdf->SetTextColor(0,0,140);
|
|
//$pdf->SetFillColor(0,0,0);
|
|
$pdf->Cell(280,4,"Seite 1/1",'0','1','R','0');
|
|
$pdf->Write(4,"\n");
|
|
|
|
//------------------------------ Tabellenkopf
|
|
$pdf->SetFillColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,Datum,'1','0','L','1');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=5 ORDER BY id ");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['tour'];
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(32.5,5,$tournummer,'1','0','L','1');
|
|
}
|
|
$pdf->Write(7,"\n");
|
|
|
|
//---------------------- auslesen
|
|
|
|
|
|
for($x=1;$x<=$monatstage;$x++){
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,sprintf("%02d",$x).".".sprintf("%02d",$monat_aktuell).".".$jahr_aktuell,'1','0','R','1');
|
|
if(date("N", mktime(0, 0, 0,$monat_aktuell,$x,$jahr_aktuell))<7) {
|
|
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=5 ORDER BY id");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['id'];
|
|
$stammf=$row_tour['s_fahrer'];
|
|
$row_data = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$row_tour['id']."' AND tag='".$x."' AND monat='".$monat_aktuell."' AND jahr='".$jahr_aktuell."'");
|
|
$stamma=$row_tour['s_auto']; $stammf=$row_tour['s_fahrer']; if($stammf != $row_data['fahrer']) { $pdf->SetFont('Helvetica','B',10); }
|
|
if($row_data['fahrer']==0) {
|
|
$pdf->Cell(32.5,5,' ','1','0','L','1');
|
|
} else {
|
|
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_data['fahrer']."'");
|
|
$pdf->Cell(32.5,5,($row_fahrerx['name']),'1','0','L','1'); $pdf->SetFont('');
|
|
}
|
|
$pdf->SetFont('');
|
|
}
|
|
$pdf->Ln(5);
|
|
} else {
|
|
// $pdf->Ln(1);
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$pdf->Cell(130.0,5,' ','1','1','L','1');
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
}
|
|
}
|
|
$pdf->Write(2,"\n");
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------- Marktplatz
|
|
$pdf->SetAutoPageBreak(false);
|
|
//$pdf->SetTopMargin(10);
|
|
$pdf->AddPage();
|
|
$pdf->SetFont('Helvetica','B',12);
|
|
$pdf->SetTextColor(0,0,140);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(140,6,"Auswertung PIN-Einholrunden ".(sprintf("%02d",$monat_aktuell).".".$jahr_aktuell),'1','0','L','1');
|
|
$pdf->SetTextColor(240,150,0);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->Cell(140,6,"JB-Transport.de",'1','0','R','1');
|
|
$pdf->Write(6,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
$pdf->SetFillColor(0,0,140);
|
|
$pdf->SetTextColor(240,150,0);
|
|
|
|
$pdf->SetFont('Helvetica','B',10);
|
|
$pdf->SetTextColor(0,0,140);
|
|
//$pdf->SetFillColor(0,0,0);
|
|
$pdf->Cell(280,4,"Seite 1/1",'0','1','R','0');
|
|
$pdf->Write(4,"\n");
|
|
|
|
//------------------------------ Tabellenkopf
|
|
$pdf->SetFillColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,Datum,'1','0','L','1');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=6 ORDER BY id ");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['tour'];
|
|
$pdf->SetFont('Helvetica','BI',10);
|
|
$pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(32.5,5,$tournummer,'1','0','L','1');
|
|
}
|
|
$pdf->Write(7,"\n");
|
|
|
|
//---------------------- auslesen
|
|
|
|
|
|
for($x=1;$x<=$monatstage;$x++){
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(255,255,255);
|
|
$pdf->Cell(20,5,sprintf("%02d",$x).".".sprintf("%02d",$monat_aktuell).".".$jahr_aktuell,'1','0','R','1');
|
|
if(date("N", mktime(0, 0, 0,$monat_aktuell,$x,$jahr_aktuell))<7) {
|
|
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$tournr = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE typ=6 ORDER BY id");
|
|
while($row_tour = $tournr->fetch_assoc()) {
|
|
$tournummer=$row_tour['id'];
|
|
$stammf=$row_tour['s_fahrer'];
|
|
$row_data = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$row_tour['id']."' AND tag='".$x."' AND monat='".$monat_aktuell."' AND jahr='".$jahr_aktuell."'");
|
|
$stamma=$row_tour['s_auto']; $stammf=$row_tour['s_fahrer']; if($stammf != $row_data['fahrer']) { $pdf->SetFont('Helvetica','B',10); }
|
|
if($row_data['fahrer']==0) {
|
|
$pdf->Cell(32.5,5,' ','1','0','L','1');
|
|
} else {
|
|
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_data['fahrer']."'");
|
|
$pdf->Cell(32.5,5,($row_fahrerx['name']),'1','0','L','1'); $pdf->SetFont('');
|
|
}
|
|
$pdf->SetFont('');
|
|
}
|
|
$pdf->Ln(5);
|
|
} else {
|
|
// $pdf->Ln(1);
|
|
$pdf->SetFillColor(100,100,100); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
$pdf->Cell(162.5,5,' ','1','1','L','1');
|
|
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('');
|
|
}
|
|
}
|
|
$pdf->Write(2,"\n");
|
|
|
|
|
|
|
|
|
|
|
|
//$pdf->Output('monatsliste_'.($monat_aktuell).'_'.$jahr_aktuell.'.pdf','I');
|
|
//---------------------------------------
|
|
if ($_GET['icon'] ==0) { $pdf->Output('monatsliste_'.($monat_aktuell).'_'.$jahr_aktuell.'.pdf','I'); }
|
|
if ($_GET['icon'] ==1) { $pdf->Output('monatsliste_'.($monat_aktuell).'_'.$jahr_aktuell.'.pdf','D'); }
|
|
if ($_GET['icon'] ==2) {
|
|
|
|
if (!class_exists("phpmailer")) {
|
|
require_once('lib/phpmailer/class.phpmailer.php');
|
|
}
|
|
$empfaenger = "dispo@jb-transport.de";
|
|
$betreff="monatsliste ".$monat_aktuell."/".$kw_aktuell.".kw.pdf";
|
|
$Dateiname = "monatsliste_".$monat_aktuell."/".$kw_aktuell.".pdf";
|
|
$DateinameMail = "monatsliste_".$monat_aktuell."/".$kw_aktuell.".pdf";
|
|
|
|
require_once('lib/phpmailer/class.phpmailer.php');
|
|
$mail = new PHPMailer();
|
|
$mail->SetLanguage('de', $mail->PluginDir . '/language/');
|
|
$mail->Body = "Gesamtliste ".$kw_aktuell.".kw";
|
|
$mail->From = "dispo@jb-transport.de";
|
|
$mail->FromName = "dispo@jb-transport.de";
|
|
$mail->AddAddress("dispo@jb-transport.de");
|
|
$mail->Subject = $betreff;
|
|
$doc = $pdf->Output('','S');
|
|
$mail->AddStringAttachment($doc,"monatsliste_".$monat_aktuell."/".$kw_aktuell.".kw.pdf", 'base64', 'application/pdf'); //$Dateiname
|
|
$mail->Send();
|
|
|
|
echo $Dateiname.' wurde versendet an: '.$empfaenger;
|
|
?><meta http-equiv="refresh" content="2; URL=https://edv.jb-transport.de/index.php?s=linfo&mailok=1"><?php
|
|
}
|
|
|
|
?>
|