604 lines
26 KiB
PHP
604 lines
26 KiB
PHP
<?php
|
|
header("Content-Type: text/html; charset=utf-8");
|
|
|
|
error_reporting(E_ALL);
|
|
ini_set('display_errors',0);
|
|
|
|
$kw_aktuell = (int)date('W');
|
|
$a_jahr = (int)date('Y');
|
|
require('lib/config.php');
|
|
session_name(CONFIG_SESSION);
|
|
session_start(); require('lib/mysql.class.php');
|
|
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
|
// $GLOBALS['mysql']->mysql_query("SET NAMES 'utf8'");
|
|
// $GLOBALS['mysql']->mysql_query("SET CHARACTER SET 'utf8'");
|
|
// date_default_timezone_set('Europe/London');
|
|
date_default_timezone_set('Europe/Berlin');
|
|
$_SESSION['norm']=20;
|
|
//print_r($_POST);
|
|
$dateityp = GetImageSize($_FILES['datei']['tmp_name']);
|
|
//echo $_FILES['datei']['name'];
|
|
//echo $_FILES['datei']['tmp_name'];
|
|
//echo $_FILES['datei']['size'];
|
|
//echo $_FILES['datei']['type'];
|
|
|
|
//echo "<pre>"; print_r($row['A']); echo "</pre>";
|
|
|
|
if($_FILES['datei']['type'] == 'application/vnd.ms-excel') {
|
|
move_uploaded_file($_FILES['datei']['tmp_name'], $_FILES['datei']['name']);
|
|
$ok=1; $dat=substr($_FILES['datei']['name'], 0,6);
|
|
//-------------------------------------------------------------------------------------------------------------- einlesen druckdaten !!!!!!!!!!
|
|
if ($dat=='Druckd') {
|
|
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
|
require_once dirname(__FILE__) . '/lib/PHPExcel.php';
|
|
$objPHPExcel = PHPExcel_IOFactory::load($_FILES['datei']['name']);
|
|
$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); $key=0; $test=0;
|
|
$key=0; $norm=20; $wert=0; $zaehler=0; $data=0;
|
|
|
|
|
|
//-------------------------------------- PDF vorbereiten
|
|
require('lib/fpdf.php');
|
|
$jahr = (int)date('Y');
|
|
$kw_aktuell = (int)date('W');
|
|
$summe1=0;
|
|
//----------------------------------PDF KOPF und Fuss
|
|
class PDF extends FPDF {
|
|
function Header() {
|
|
$this->SetFont('Helvetica','B',20);
|
|
$this->SetFillColor(255,255,255); $this->SetTextColor(80,80,80);
|
|
$timestamp_sonntag=strtotime("next Sunday");
|
|
$tag=date("d", $timestamp_sonntag);
|
|
$monat=date("m", $timestamp_sonntag);
|
|
$jahr=date("Y", $timestamp_sonntag);
|
|
$this->Cell(33,8,'Erscheinungsdatum: '.$tag.".".$monat.".".$jahr,'0','1','L','1');
|
|
$this->Cell(33,8,'Paketnorm: '.$_SESSION['norm'],'0','1','L','1'); //----------------------
|
|
$this->Cell(22,12,' ','0','1','L','1'); $this->SetFont('Helvetica','',16);
|
|
$this->SetFont('Helvetica','BI',20);
|
|
$this->Image('template/images/faz_logo_sonntag_neu.png', 180, 7);
|
|
$this->Line(10, 30, 290, 30);
|
|
// $this->Write(2,"\n");
|
|
}
|
|
function Footer() {
|
|
$this->SetY(-10);
|
|
$this->SetFont('Helvetica','I',6); $this->SetFillColor(255,255,255); $this->SetTextColor(200,200,200);
|
|
$this->Cell(280,3,'NON Public ***** by. F. T. '.date('Y'),'0','0','R','0');
|
|
}
|
|
}
|
|
|
|
|
|
$pdf = new PDF('L','mm','A4');
|
|
|
|
|
|
foreach ($sheetData as $index => $row) {
|
|
//echo "<pre>"; print_r($row); echo "</pre>";
|
|
//------------------------------------ Namen Ablage / Agentur
|
|
|
|
if(isset($row['A'])) {
|
|
$zaehler=strlen($row['A']);
|
|
if ($zaehler==7) { $data=$row['A']; }
|
|
//if ($zaehler==7) { $data=substr($row['A'], -2,-1); echo"---".$data; }
|
|
elseif ($zaehler!=4) { $data=substr($row['A'], 0,6); }
|
|
else { $data=$row['A']; }
|
|
if(isset($row['H'])) { $norm=(int)$row['H']; $_SESSION['norm']=(int)$row['H']; }
|
|
if ((int)$data=='1') { $wert=1; }
|
|
if ((int)$data=='2') { $wert=2; }
|
|
if ((int)$data=='3') { $wert=3; }
|
|
if ((int)$data=='4') { $wert=4; }
|
|
if ((int)$data=='5') { $wert=5; }
|
|
if ((int)$data=='6') { $wert=6; }
|
|
if ((int)$data=='7') { $wert=7; }
|
|
} //echo $data."\n";
|
|
//--------------------------------------------------- Zeitungsbote
|
|
if ($wert==1) {
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) {
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage();
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,'* Zeitungsbote *','0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(8,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
}
|
|
}
|
|
//------------------------------------
|
|
//--------------------------------------------------- olatu NO
|
|
if ($wert==2) {
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) {
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage(); //- neue seite
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,'* Zustells. Olaru (Lpz.-Nordost) *','0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(8,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
}
|
|
}
|
|
//------------------------------------
|
|
//--------------------------------------------------- olaru noost
|
|
if ($wert==3) {
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) {
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage(); //- neue seite
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,utf8_decode('* Zustells. Olaru (Lpz.-Süd/West) *'),'0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(8,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
}
|
|
}
|
|
//------------------------------------
|
|
//--------------------------------------------------- Zeitungsbote
|
|
if ($wert==4) {
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) {
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage(); //- neue seite
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,utf8_decode('* freier Bereich *'),'0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(8,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
}
|
|
}
|
|
//------------------------------------
|
|
//--------------------------------------------------- heincke steinmacher
|
|
if ($wert==5) {
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) {
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage(); //- neue seite
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,utf8_decode('* Heinicke -
|
|
/ Firma Steinmacher *'),'0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(7,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
|
|
//------ eigene fahrer
|
|
$pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','B',10);
|
|
$timestamp_sonntag=strtotime("next Sunday");
|
|
$tag=date("d", $timestamp_sonntag); $monat=date("m", $timestamp_sonntag); $jahr=date("Y", $timestamp_sonntag);
|
|
//***** 04205
|
|
$abfrage=$GLOBALS['mysql']->query_single("SELECT * FROM faz WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND plz=4205");
|
|
$faztour=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND tour=4205");
|
|
$fahrerx=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$faztour['fahrer']."' and faz>0 && aktiv>0 ORDER BY name");
|
|
$abfrage['num_rows'];
|
|
$pdf->Cell(25,7,('ZP-04205'),'1','0','L','0');
|
|
$pdf->Cell(40,7,($fahrerx['name']),'1','0','L','0');
|
|
$pdf->Cell(25,7,($abfrage['num_rows'].' Exemplare'),'1','1','R','0');
|
|
//***** 04356
|
|
$abfrage=$GLOBALS['mysql']->query_single("SELECT * FROM faz WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND plz=4356");
|
|
$faztour=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND tour=4356");
|
|
$fahrerx=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$faztour['fahrer']."' and faz>0 && aktiv>0 ORDER BY name");
|
|
$abfrage['num_rows'];
|
|
$pdf->Cell(25,7,('ZP-04356'),'1','0','L','0');
|
|
$pdf->Cell(40,7,($fahrerx['name']),'1','0','L','0');
|
|
$pdf->Cell(25,7,($abfrage['num_rows'].' Exemplare'),'1','1','R','0');
|
|
//----- 0
|
|
$abfrage=$GLOBALS['mysql']->query_single("SELECT * FROM faz WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND plz=4329");
|
|
$faztour=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND tour=4329");
|
|
$fahrerx=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$faztour['fahrer']."' and faz>0 && aktiv>0 ORDER BY name");
|
|
$abfrage['num_rows'];
|
|
$pdf->Cell(25,7,('ZP-04329'),'1','0','L','0');
|
|
$pdf->Cell(40,7,($fahrerx['name']),'1','0','L','0');
|
|
$pdf->Cell(25,7,($abfrage['num_rows'].' Exemplare'),'1','1','R','0');
|
|
$abfrage=$GLOBALS['mysql']->query_single("SELECT * FROM faz WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND plz=4349");
|
|
$faztour=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND tour=4349");
|
|
$fahrerx=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$faztour['fahrer']."' and faz>0 && aktiv>0 ORDER BY name");
|
|
$abfrage['num_rows'];
|
|
$pdf->Cell(25,7,('ZP-04349'),'1','0','L','0');
|
|
$pdf->Cell(40,7,($fahrerx['name']),'1','0','L','0');
|
|
$pdf->Cell(25,7,($abfrage['num_rows'].' Exemplare'),'1','1','R','0');
|
|
$abfrage=$GLOBALS['mysql']->query_single("SELECT * FROM faz WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND plz=04357");
|
|
$faztour=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND tour=04357");
|
|
$fahrerx=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$faztour['fahrer']."' and faz>0 && aktiv>0 ORDER BY name");
|
|
$abfrage['num_rows'];
|
|
$pdf->Cell(25,7,('ZP-04357'),'1','0','L','0');
|
|
$pdf->Cell(40,7,($fahrerx['name']),'1','0','L','0');
|
|
$pdf->Cell(25,7,($abfrage['num_rows'].' Exemplare'),'1','1','R','0');
|
|
|
|
//-------- rita reserve
|
|
$pdf->Cell(25,7,('Reserve'),'1','0','L','0');
|
|
$pdf->Cell(40,7,('R. Melzig'),'1','0','L','0');
|
|
$pdf->Cell(25,7,('4 Exemplare'),'1','1','R','0');
|
|
|
|
|
|
}
|
|
}
|
|
//------------------------------------
|
|
//--------------------------------------------------- mücke
|
|
if ($wert==6) { //echo "<pre>"; print_r($row); echo "</pre>";
|
|
/*
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) {
|
|
*/
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage(); //- neue seite
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,utf8_decode('* Heinicke -
|
|
Mitnahme über Firma Mücke *'),'0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(8,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
//}
|
|
}
|
|
//------------------------------------
|
|
|
|
//--------------------------------------------------- Zeitungsbote
|
|
if ($wert==7) { /*
|
|
if(
|
|
$row['B']=='* * *' ||
|
|
$row['C']=='* * *' ||
|
|
$row['D']=='* * *' ||
|
|
$row['E']=='* * *' ||
|
|
$row['F']=='* * *' ||
|
|
$row['G']=='* * *' ||
|
|
$row['H']=='* * *'
|
|
) { */
|
|
$summe1=0; $wert=0;
|
|
if(isset($row['E'])) { $summe1=$row['E']; }
|
|
if(isset($row['F'])) { $summe1=$row['F']; }
|
|
if(isset($row['G'])) { $summe1=$row['G']; }
|
|
if(isset($row['H'])) { $summe1=$row['H']; }
|
|
if(isset($row['I'])) { $summe1=$row['I']; }
|
|
if(isset($row['J'])) { $summe1=$row['J']; }
|
|
if(isset($row['K'])) { $summe1=$row['K']; }
|
|
if(isset($row['L'])) { $summe1=$row['L']; }
|
|
if(isset($row['M'])) { $summe1=$row['M']; }
|
|
if(isset($row['N'])) { $summe1=$row['N']; }
|
|
if(isset($row['O'])) { $summe1=$row['O']; }
|
|
if(isset($row['P'])) { $summe1=$row['P']; }
|
|
if(isset($row['Q'])) { $summe1=$row['Q']; }
|
|
if(isset($row['R'])) { $summe1=$row['R']; }
|
|
if(isset($row['S'])) { $summe1=$row['S']; }
|
|
if(isset($row['T'])) { $summe1=$row['T']; }
|
|
if(isset($row['U'])) { $summe1=$row['U']; }
|
|
if(isset($row['V'])) { $summe1=$row['V']; }
|
|
if(isset($row['W'])) { $summe1=$row['W']; }
|
|
if(isset($row['X'])) { $summe1=$row['X']; }
|
|
if(isset($row['Y'])) { $summe1=$row['Y']; }
|
|
if(isset($row['Z'])) { $summe1=$row['Z']; }
|
|
|
|
$pdf->AddPage(); //- neue seite
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,30,utf8_decode('* ZVG Leipzig *'),'0','1','C','0');
|
|
$pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',30); $pdf->Cell(270,10,'Abholung 1.00 Uhr','0','1','C','0');
|
|
$pdf->SetTextColor(0,0,0);
|
|
$pdf->Write(8,"\n"); $pdf->Cell(24,8,(' '),'0','1','C','0');
|
|
$pdf->Line(80, 85, 210, 85);
|
|
$pdf->SetFont('Helvetica','B',40); $pdf->Cell(270,8,((int)$summe1.' Exemplare'),'0','1','C','0');
|
|
$summe2=$summe1/$norm;
|
|
$summe2=floor($summe2);
|
|
$summe3=($summe2*$norm);
|
|
$summe4=$summe1-$summe3;
|
|
$summe4=sprintf("%02d",$summe4);
|
|
$pdf->Write(18,"\n");
|
|
$pdf->SetFont('Helvetica','B',100); $pdf->Cell(270,8,((int)$summe2.'-'.$summe4),'0','1','C','0');
|
|
$pdf->Write(8,"\n"); $pdf->SetTextColor(100,100,100);
|
|
$pdf->SetFont('Helvetica','B',10); $pdf->Cell(270,8,('Vollpaket(e) - Spitze'),'0','1','C','0');
|
|
//}
|
|
}
|
|
//------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
$key++;
|
|
}
|
|
}
|
|
//------------------------------------
|
|
//------------------------------------ Norm
|
|
//------------------------------------
|
|
//echo "<pre>"; print_r($daten); echo "</pre>";
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
//------------------- Seite 1
|
|
$pdf = new PDF('L','mm','A4'); $pdf->AddPage();
|
|
|
|
$pdf->SetFont('Helvetica','B',40);
|
|
$pdf->Cell(24,8,($summe1),'0','0','C','0');
|
|
|
|
// $pdf->SetTextColor(0,160,230);
|
|
$pdf->SetFillColor(240,150,0);
|
|
$pdf->Cell(24,8,".KW",'0','0','L','0');
|
|
$pdf->Write(8,"\n");
|
|
$pdf->SetFont('Helvetica','BI',20);
|
|
// $i++;
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$pdf->Output('FAZ_Rampe_'.($kw_aktuell).'_'.($jahr).'.pdf','I');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|