init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
333
scripts/a_firma2.php
Normal file
333
scripts/a_firma2.php
Normal file
|
|
@ -0,0 +1,333 @@
|
|||
<?php
|
||||
|
||||
$monat = (int)date('n');
|
||||
$jahr = (int)date('Y');
|
||||
$kw_aktuell = (int)date('W');
|
||||
|
||||
|
||||
//--------------------------------
|
||||
//-------------------- pdf starten
|
||||
//--------------------------------
|
||||
|
||||
|
||||
|
||||
class PDF extends FPDF {
|
||||
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('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
// blau (0,160,230)
|
||||
// Orange (240,150, 0)
|
||||
// grau (200,200,200)
|
||||
|
||||
$pdf->SetFont('Helvetica','B',20);
|
||||
$pdf->SetTextColor(0,160,230);
|
||||
$pdf->SetFillColor(240,150,0);
|
||||
$pdf->Cell(24,8,($kw_aktuell).".KW",'1','0','L','1');
|
||||
$pdf->Write(8,"\n");
|
||||
$pdf->SetFont('Helvetica','BI',20);
|
||||
$pdf->SetFillColor(0,0,140);
|
||||
$pdf->SetTextColor(240,150,0);
|
||||
$pdf->Cell(110,8,"Werbung am Freitag",'1','0','C','1');
|
||||
// $pdf->Image('Image3.png', 125, 7);
|
||||
$pdf->Write(8,"\n\n");
|
||||
|
||||
/*
|
||||
$pdf->SetFont('Helvetica','B',12);
|
||||
$pdf->SetTextColor(0,0,140);
|
||||
$pdf->SetFillColor(240,150,0);
|
||||
$pdf->Cell(140,6,"Auswertung PVL ".(sprintf("%02d",$monat).".".$jahr),'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");
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//--------------- neu 1. touren auslesen zu arbeitgeber , danach mit option die tourenliste
|
||||
$keyfirma=0; $keytour=0; $firmapreis=0;
|
||||
$firmatouren = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE afirma='".$_POST['ma1']."'") ;
|
||||
while($rowfirma = $firmatouren->fetch_assoc()) {
|
||||
$a_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and tour='".$rowfirma['tour']."'") ;
|
||||
$tourmenge=0; $tourpreis=0;
|
||||
while($row = $a_tour->fetch_assoc()) {
|
||||
$tourmenge++;
|
||||
$tour1[$keytour]['menge']=$tourmenge;
|
||||
$tour1[$keytour]['tour']=$firmatouren['tour'];
|
||||
$tour1[$keytour]['epreis']=$firmatouren['preis'];
|
||||
$tourpreis=$tourpreis+$firmatouren['preis']; $firmapreis=$firmapreis+$firmatouren['preis'];
|
||||
$tour1[$keytour]['tpreis']=$tourpreis;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$keytour++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$pdf->Output('rechnung_'.($datum).'.pdf','I');
|
||||
// exit();
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
//------------------ GH
|
||||
$key=0; $s_gh=0;
|
||||
$gh_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and afirma='".$_POST['ma1']."' and typ=3") ;
|
||||
while($row = $gh_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour1[$key]['tour']=$row_tour1['tour'];
|
||||
$tour1[$key]['id']=$row['id'];
|
||||
$tour1[$key]['tag']=$row['tag'];
|
||||
$tour1[$key]['monat']=$row['monat'];
|
||||
$tour1[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour1[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour1[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_gh++;
|
||||
}
|
||||
}
|
||||
//------------------ LVZ
|
||||
$key=0; $s_lvz=0;
|
||||
$lvz_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=4") ;
|
||||
while($row = $lvz_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour2[$key]['tour']=$row_tour1['tour'];
|
||||
$tour2[$key]['id']=$row['id'];
|
||||
$tour2[$key]['tag']=$row['tag'];
|
||||
$tour2[$key]['monat']=$row['monat'];
|
||||
$tour2[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour2[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour2[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour2[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_lvz++;
|
||||
}
|
||||
}
|
||||
//------------------ PIN
|
||||
$key=0; $s_pin=0;
|
||||
$pin_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=2") ;
|
||||
while($row = $pin_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour3[$key]['tour']=$row_tour1['tour'];
|
||||
$tour3[$key]['id']=$row['id'];
|
||||
$tour3[$key]['tag']=$row['tag'];
|
||||
$tour3[$key]['monat']=$row['monat'];
|
||||
$tour3[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour3[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour3[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour3[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_pin++;
|
||||
}
|
||||
}
|
||||
//------------------ mp
|
||||
$key=0; $s_mp=0;
|
||||
$mp_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=10") ;
|
||||
while($row = $mp_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour4[$key]['tour']=$row_tour1['tour'];
|
||||
$tour4[$key]['id']=$row['id'];
|
||||
$tour4[$key]['tag']=$row['tag'];
|
||||
$tour4[$key]['monat']=$row['monat'];
|
||||
$tour4[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour4[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour4[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour4[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_mp++;
|
||||
}
|
||||
}
|
||||
//------------------ RS
|
||||
$key=0; $s_rs=0;
|
||||
$rs_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=7") ;
|
||||
while($row = $rs_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour5[$key]['tour']=$row_tour1['tour'];
|
||||
$tour5[$key]['id']=$row['id'];
|
||||
$tour5[$key]['tag']=$row['tag'];
|
||||
$tour5[$key]['monat']=$row['monat'];
|
||||
$tour5[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour5[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour5[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour5[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_rs++;
|
||||
} }
|
||||
//------------------ markt
|
||||
$key=0; $s_mb=0;
|
||||
$ma_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=12") ;
|
||||
while($row = $ma_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour6[$key]['tour']=$row_tour1['tour'];
|
||||
$tour6[$key]['id']=$row['id'];
|
||||
$tour6[$key]['tag']=$row['tag'];
|
||||
$tour6[$key]['monat']=$row['monat'];
|
||||
$tour6[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour6[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour6[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour6[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_mb++;
|
||||
}
|
||||
}
|
||||
//------------------ TIP
|
||||
$key=0; $s_tip=0;
|
||||
$lvz_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=13") ;
|
||||
while($row = $lvz_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour7[$key]['tour']=$row_tour1['tour'];
|
||||
$tour7[$key]['id']=$row['id'];
|
||||
$tour7[$key]['tag']=$row['tag'];
|
||||
$tour7[$key]['monat']=$row['monat'];
|
||||
$tour7[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour7[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour7[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour7[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_tip++;
|
||||
}
|
||||
}
|
||||
//------------------ werbung
|
||||
$key=0; $s_werb=0;
|
||||
$lvz_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=11") ;
|
||||
while($row = $lvz_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour8[$key]['tour']=$row_tour1['tour'];
|
||||
$tour8[$key]['id']=$row['id'];
|
||||
$tour8[$key]['tag']=$row['tag'];
|
||||
$tour8[$key]['monat']=$row['monat'];
|
||||
$tour8[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour8[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour8[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour8[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_werb++;
|
||||
}
|
||||
}
|
||||
//------------------ saso
|
||||
$key=0; $s_saso=0;
|
||||
$saso_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=8") ;
|
||||
while($row = $saso_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
if ($row_tour1['afirma']==$maid) {
|
||||
$tour9[$key]['tour']=$row_tour1['tour'];
|
||||
$tour9[$key]['id']=$row['id'];
|
||||
$tour9[$key]['tag']=$row['tag'];
|
||||
$tour9[$key]['monat']=$row['monat'];
|
||||
$tour9[$key]['jahr']=$row['jahr'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$tour9[$key]['kennz']=$row_autox['kz'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour9[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour9[$key]['infotext']=$row['infotext'];
|
||||
$key++; $s_saso++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//} else {
|
||||
$ma1 = $GLOBALS['mysql']->query_array("SELECT * FROM firmen ORDER BY name");
|
||||
$ma2['id']= array(1,2,3,4,5,6,7,8,9,10,11,12);
|
||||
$ma2['name']=array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
|
||||
$ma2['monat']=$monat;
|
||||
$ma3['id']= array(2012,2013,2014,2015,2016,2017,2018,2019,2020);
|
||||
$ma3['name']=array(2012,2013,2014,2015,2016,2017,2018,2019,2020);
|
||||
$ma3['jahr']=$jahr;
|
||||
|
||||
$ma4['id']= array(0,1);
|
||||
$ma4['name']=array("anzeigen","PDF");
|
||||
$ma4['wahl']=0;
|
||||
|
||||
|
||||
$template->assign('s_gh', $s_gh);
|
||||
$template->assign('s_lvz', $s_lvz);
|
||||
$template->assign('s_mp', $s_mp);
|
||||
$template->assign('s_rs', $s_rs);
|
||||
$template->assign('s_mb', $s_mb);
|
||||
$template->assign('s_pin', $s_pin);
|
||||
$template->assign('s_tip', $s_tip);
|
||||
$template->assign('s_werb', $s_werb);
|
||||
$template->assign('s_saso', $s_saso);
|
||||
|
||||
$template->assign('ma1', $ma1);
|
||||
$template->assign('ma2', $ma2);
|
||||
$template->assign('ma3', $ma3);
|
||||
$template->assign('ma4', $ma4);
|
||||
$template->assign('a_name', $a_name);
|
||||
$template->assign('a_monat', $a_monat);
|
||||
$template->assign('a_jahr', $a_jahr);
|
||||
$template->assign('tour1', $tour1);
|
||||
$template->assign('tour2', $tour2);
|
||||
$template->assign('tour3', $tour3);
|
||||
$template->assign('tour4', $tour4);
|
||||
$template->assign('tour5', $tour5);
|
||||
$template->assign('tour6', $tour6);
|
||||
$template->assign('tour7', $tour7);
|
||||
$template->assign('tour8', $tour8);
|
||||
$template->assign('tour9', $tour9);
|
||||
$template->assign('content', 'tpl/a_firma1.tpl'); //_list
|
||||
*/
|
||||
//}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue