init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
300
scripts/11_gkal.php
Normal file
300
scripts/11_gkal.php
Normal file
|
|
@ -0,0 +1,300 @@
|
|||
<?
|
||||
$_SESSION['m1']=11; $_SESSION['m2']=2;
|
||||
|
||||
if($_GET['wahl']==1) { $jahr=$_GET['jahr']-1; }
|
||||
if($_GET['wahl']==2) { $jahr=$_GET['jahr']+1; }
|
||||
if($_GET['wahl']==0) { $jahr = (int)date('Y'); }
|
||||
|
||||
// error_reporting(E_ALL);
|
||||
// ini_set('display_errors', 1);
|
||||
|
||||
|
||||
// $kw_format=sprintf("%02d",$kw_anzeige1); //////////// zweistelige anzeige
|
||||
//----------------------------- Monat 1 Januar
|
||||
$key=0;
|
||||
$monat01_tage=date("t",mktime(0, 0, 0, 1, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat01_tage; $tag++) {
|
||||
$monat01[$key]['tag']=$tag; // tag übergeben
|
||||
$monat01[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=1 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat01[$key]['wt']=date('w', mktime(0, 0, 0,1, $tag, $jahr)); }else{$monat01[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=1 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat01[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat01[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat01[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat01[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat01[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat01[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat01[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat01[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 2 Februar
|
||||
$key=0;
|
||||
$monat02_tage=date("t",mktime(0, 0, 0, 2, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat02_tage; $tag++) {
|
||||
$monat02[$key]['tag']=$tag; // tag übergeben
|
||||
$monat02[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=2 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat02[$key]['wt']=date('w', mktime(0, 0, 0,2, $tag, $jahr)); }else{$monat02[$key]['wt']=9;}//wochentag
|
||||
$tmp2 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=2 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp2->fetch_assoc()) {
|
||||
$monat02[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat02[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat02[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat02[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat02[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat02[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat02[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat02[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 3 märz
|
||||
$monat03_tage=date("t",mktime(0, 0, 0,3, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat03_tage; $tag++) {
|
||||
$monat03[$key]['tag']=$tag; // tag übergeben
|
||||
$monat03[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=3 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat03[$key]['wt']=date('w', mktime(0, 0, 0,3, $tag, $jahr)); }else{$monat03[$key]['wt']=9;}//wochentag
|
||||
$tmp3 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=3 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp3->fetch_assoc()) {
|
||||
$monat03[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat03[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat03[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat03[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat03[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat03[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat03[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat03[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 4 april
|
||||
$key=0;
|
||||
$monat04_tage=date("t",mktime(0, 0, 0, 4, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat04_tage; $tag++) {
|
||||
$monat04[$key]['tag']=$tag; // tag übergeben
|
||||
$monat04[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=4 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat04[$key]['wt']=date('w', mktime(0, 0, 0,4, $tag, $jahr)); }else{$monat04[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=4 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat04[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat04[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat04[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat04[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat04[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat04[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat04[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat04[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 5 mai
|
||||
$key=0;
|
||||
$monat05_tage=date("t",mktime(0, 0, 0, 5, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat05_tage; $tag++) {
|
||||
$monat05[$key]['tag']=$tag; // tag übergeben
|
||||
$monat05[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=5 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat05[$key]['wt']=date('w', mktime(0, 0, 0,5, $tag, $jahr)); }else{$monat05[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=5 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat05[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat05[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat05[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat05[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat05[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat05[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat05[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat05[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 6
|
||||
$key=0;
|
||||
$monat06_tage=date("t",mktime(0, 0, 0, 6, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat06_tage; $tag++) {
|
||||
$monat06[$key]['tag']=$tag; // tag übergeben
|
||||
$monat06[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=6 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat06[$key]['wt']=date('w', mktime(0, 0, 0,6, $tag, $jahr)); }else{$monat06[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=6 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat06[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat06[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat06[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat06[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat06[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat06[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat06[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat06[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 7
|
||||
$key=0;
|
||||
$monat07_tage=date("t",mktime(0, 0, 0, 7, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat07_tage; $tag++) {
|
||||
$monat07[$key]['tag']=$tag; // tag übergeben
|
||||
$monat07[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=7 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat07[$key]['wt']=date('w', mktime(0, 0, 0,7, $tag, $jahr)); }else{$monat07[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=7 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat07[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat07[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat07[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat07[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat07[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat07[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat07[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat07[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 8
|
||||
$key=0;
|
||||
$monat08_tage=date("t",mktime(0, 0, 0, 8, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat08_tage; $tag++) {
|
||||
$monat08[$key]['tag']=$tag; // tag übergeben
|
||||
$monat08[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=8 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat08[$key]['wt']=date('w', mktime(0, 0, 0,8, $tag, $jahr)); }else{$monat08[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=8 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat08[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat08[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat08[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat08[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat08[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat08[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat08[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat08[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 9
|
||||
$key=0;
|
||||
$monat09_tage=date("t",mktime(0, 0, 0, 9, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat09_tage; $tag++) {
|
||||
$monat09[$key]['tag']=$tag; // tag übergeben
|
||||
$monat09[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=9 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat09[$key]['wt']=date('w', mktime(0, 0, 0,9, $tag, $jahr)); }else{$monat09[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=9 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat09[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat09[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat09[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat09[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat09[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat09[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat09[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat09[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 10
|
||||
$key=0;
|
||||
$monat10_tage=date("t",mktime(0, 0, 0,10, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat10_tage; $tag++) {
|
||||
$monat10[$key]['tag']=$tag; // tag übergeben
|
||||
$monat10[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=10 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat10[$key]['wt']=date('w', mktime(0, 0, 0,10, $tag, $jahr)); }else{$monat10[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=10 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat10[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat10[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat10[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat10[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat10[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat10[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat10[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat10[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 11
|
||||
$key=0;
|
||||
$monat11_tage=date("t",mktime(0, 0, 0,11, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat11_tage; $tag++) {
|
||||
$monat11[$key]['tag']=$tag; // tag übergeben
|
||||
$monat11[$key]['wert']=0;
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=11 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat11[$key]['wt']=date('w', mktime(0, 0, 0,11, $tag, $jahr)); }else{$monat11[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=11 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat11[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat11[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat11[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat11[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat11[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat11[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat11[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat11[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
//----------------------------- Monat 12
|
||||
$key=0;
|
||||
$monat12_tage=date("t",mktime(0, 0, 0,12, 1, $jahr));
|
||||
for ($tag=1; $tag <= $monat12_tage; $tag++) {
|
||||
$monat12[$key]['wert']=0;
|
||||
$monat12[$key]['tag']=$tag; // tag übergeben
|
||||
$feiertag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$tag."' AND monat=12 AND jahr='".$jahr."'");
|
||||
if($feiertag['num_rows'] == 0) { $monat12[$key]['wt']=date('w', mktime(0, 0, 0,12, $tag, $jahr)); }else{$monat12[$key]['wt']=9;}//wochentag
|
||||
$tmp1 = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat=12 AND jahr='".$jahr."' order by tag"); //eintrag prüfen
|
||||
while($row = $tmp1->fetch_assoc()) {
|
||||
$monat12[$key]['wert']++;
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
if($row_fahrer['lvz']==1) { $monat12[$key]['lvz']=1; }
|
||||
if($row_fahrer['gh']==1) { $monat12[$key]['gh']=1; }
|
||||
if($row_fahrer['pin']==1) { $monat12[$key]['pin']=1; }
|
||||
if($row_fahrer['post']==1) { $monat12[$key]['post']=1; }
|
||||
if($row_fahrer['rs']==1) { $monat12[$key]['rs']=1; }
|
||||
if($row_fahrer['werb']==1) { $monat12[$key]['werb']=1; }
|
||||
if($row_fahrer['saso']==1) { $monat12[$key]['saso']=1; }
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$template->assign('monat01', $monat01);
|
||||
$template->assign('monat02', $monat02);
|
||||
$template->assign('monat03', $monat03);
|
||||
$template->assign('monat04', $monat04);
|
||||
$template->assign('monat05', $monat05);
|
||||
$template->assign('monat06', $monat06);
|
||||
$template->assign('monat07', $monat07);
|
||||
$template->assign('monat08', $monat08);
|
||||
$template->assign('monat09', $monat09);
|
||||
$template->assign('monat10', $monat10);
|
||||
$template->assign('monat11', $monat11);
|
||||
$template->assign('monat12', $monat12);
|
||||
|
||||
$template->assign('jahr', $jahr);
|
||||
|
||||
$template->assign('content', 'tpl/11_gkal.tpl');
|
||||
?>
|
||||
112
scripts/11_index.php
Normal file
112
scripts/11_index.php
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<?php
|
||||
$_SESSION['m1']=11; $_SESSION['m2']=0;
|
||||
|
||||
// error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
|
||||
|
||||
|
||||
$tagname = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
|
||||
|
||||
$wtag = date("w");//// wochentag als zahl
|
||||
|
||||
$ma_info = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_SESSION['benutzer']."'");
|
||||
|
||||
$tp1 = strtotime("+0 day"); $tag1_tag = date("d",$tp1); $tag1_monat = date("m",$tp1); $tag1_jahr = date("Y",$tp1); $tag1=$tagname[date("w",$tp1)].", den ".$tag1_tag.".".$tag1_monat.".".$tag1_jahr;
|
||||
$tp2 = strtotime("+1 day"); $tag2_tag = date("d",$tp2); $tag2_monat = date("m",$tp2); $tag2_jahr = date("Y",$tp2); $tag2=$tagname[date("w",$tp2)].", den ".$tag2_tag.".".$tag2_monat.".".$tag2_jahr;
|
||||
$tp3 = strtotime("+2 day"); $tag3_tag = date("d",$tp3); $tag3_monat = date("m",$tp3); $tag3_jahr = date("Y",$tp3); $tag3=$tagname[date("w",$tp3)].", den ".$tag3_tag.".".$tag3_monat.".".$tag3_jahr;
|
||||
$tp4 = strtotime("+3 day"); $tag4_tag = date("d",$tp4); $tag4_monat = date("m",$tp4); $tag4_jahr = date("Y",$tp4); $tag4=$tagname[date("w",$tp4)].", den ".$tag4_tag.".".$tag4_monat.".".$tag4_jahr;
|
||||
$tp5 = strtotime("+4 day"); $tag5_tag = date("d",$tp5); $tag5_monat = date("m",$tp5); $tag5_jahr = date("Y",$tp5); $tag5=$tagname[date("w",$tp5)].", den ".$tag5_tag.".".$tag5_monat.".".$tag5_jahr;
|
||||
$tp6 = strtotime("+5 day"); $tag6_tag = date("d",$tp6); $tag6_monat = date("m",$tp6); $tag6_jahr = date("Y",$tp6); $tag6=$tagname[date("w",$tp6)].", den ".$tag6_tag.".".$tag6_monat.".".$tag6_jahr;
|
||||
$tp7 = strtotime("+6 day"); $tag7_tag = date("d",$tp7); $tag7_monat = date("m",$tp7); $tag7_jahr = date("Y",$tp7); $tag7=$tagname[date("w",$tp7)].", den ".$tag7_tag.".".$tag7_monat.".".$tag7_jahr;
|
||||
$tp8 = strtotime("+7 day"); $tag8_tag = date("d",$tp8); $tag8_monat = date("m",$tp8); $tag8_jahr = date("Y",$tp8); $tag8=$tagname[date("w",$tp8)].", den ".$tag8_tag.".".$tag8_monat.".".$tag8_jahr;
|
||||
$tp9 = strtotime("+8 day"); $tag9_tag = date("d",$tp9); $tag9_monat = date("m",$tp9); $tag9_jahr = date("Y",$tp9); $tag9=$tagname[date("w",$tp9)].", den ".$tag9_tag.".".$tag9_monat.".".$tag9_jahr;
|
||||
|
||||
$key=0;
|
||||
//-------------- 1. Tag
|
||||
$tour_array = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag1_tag."' AND monat='".$tag1_monat."' AND jahr='".$tag1_jahr."' and fahrer='".$_SESSION['benutzer']."'");
|
||||
while($row = $tour_array->fetch_assoc()) {
|
||||
$row_tourn = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$ma_tour1[$key]['tour']=$row_tourn['tour'];
|
||||
$ma_tour1[$key]['zeit']=$row['zeit']; if($row['zeit']='') { $ma_tour1[$key]['zeit']="00:00"; }
|
||||
$ma_tour1[$key]['gewicht']=$row['gewicht']; if($row['gewicht']='') { $ma_tour1[$key]['gewicht']="0"; }
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$ma_tour1[$key]['auto']=$row_autox['kz'];
|
||||
$ma_tour1[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
$normp1 = $GLOBALS['mysql']->query_single("SELECT * FROM normplan WHERE tag='".$tag1_tag."' AND monat='".$tag1_monat."' AND jahr='".$tag1_jahr."'");
|
||||
//-------------- 2. Tag
|
||||
$tour_array = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag2_tag."' AND monat='".$tag2_monat."' AND jahr='".$tag2_jahr."' and fahrer='".$_SESSION['benutzer']."'");
|
||||
while($row = $tour_array->fetch_assoc()) {
|
||||
$row_tourn = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$ma_tour2[$key]['tour']=$row_tourn['tour'];
|
||||
$ma_tour2[$key]['zeit']=$row['zeit']; if($row['zeit']='') { $ma_tour2[$key]['zeit']="00:00"; }
|
||||
$ma_tour2[$key]['gewicht']=$row['gewicht']; if($row['gewicht']='') { $ma_tour2[$key]['gewicht']="0"; }
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$ma_tour2[$key]['auto']=$row_autox['kz'];
|
||||
$ma_tour2[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
$normp2 = $GLOBALS['mysql']->query_single("SELECT * FROM normplan WHERE tag='".$tag2_tag."' AND monat='".$tag2_monat."' AND jahr='".$tag2_jahr."'");
|
||||
//-------------- 3. Tag
|
||||
$tour_array = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag3_tag."' AND monat='".$tag3_monat."' AND jahr='".$tag3_jahr."' and fahrer='".$_SESSION['benutzer']."'");
|
||||
while($row = $tour_array->fetch_assoc()) {
|
||||
$row_tourn = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$ma_tour3[$key]['tour']=$row_tourn['tour'];
|
||||
$ma_tour3[$key]['zeit']=$row['zeit']; if($row['zeit']='') { $ma_tour3[$key]['zeit']="00:00"; }
|
||||
$ma_tour3[$key]['gewicht']=$row['gewicht']; if($row['gewicht']='') { $ma_tour3[$key]['gewicht']="0"; }
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$ma_tour3[$key]['auto']=$row_autox['kz'];
|
||||
$ma_tour3[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
//-------------- 4. Tag
|
||||
$tour_array = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag4_tag."' AND monat='".$tag4_monat."' AND jahr='".$tag4_jahr."' and fahrer='".$_SESSION['benutzer']."'");
|
||||
while($row = $tour_array->fetch_assoc()) {
|
||||
$row_tourn = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$ma_tour4[$key]['tour']=$row_tourn['tour'];
|
||||
$ma_tour4[$key]['zeit']=$row['zeit']; if($row['zeit']='') { $ma_tour4[$key]['zeit']="00:00"; }
|
||||
$ma_tour4[$key]['gewicht']=$row['gewicht']; if($row['gewicht']='') { $ma_tour4[$key]['gewicht']="0"; }
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$ma_tour4[$key]['auto']=$row_autox['kz'];
|
||||
$ma_tour4[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
//------------------------------ kalende pro mitarbeiter pro Monat
|
||||
$key=0;
|
||||
$kal_array = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE jahr='".$tag1_jahr."' AND monat='".$tag1_monat."' and mid='".$_SESSION['benutzer']."'");
|
||||
while($row = $kal_array->fetch_assoc()) {
|
||||
$kal[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$row_kal = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$kal[$key]['grund']=$row_kal['bez'];
|
||||
$kal[$key]['icon']=$row_kal['icon'];
|
||||
$key++;
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
$template->assign('normp1', $normp1);
|
||||
$template->assign('normp2', $normp2);
|
||||
|
||||
$template->assign('monat', $tag1_monat);
|
||||
$template->assign('jahr', $tag1_jahr);
|
||||
|
||||
$template->assign('kal', $kal);
|
||||
|
||||
$template->assign('tag1', $tag1);
|
||||
$template->assign('tag2', $tag2);
|
||||
$template->assign('tag3', $tag3);
|
||||
$template->assign('tag4', $tag4);
|
||||
|
||||
$template->assign('ma_tour1', $ma_tour1);
|
||||
$template->assign('ma_tour2', $ma_tour2);
|
||||
$template->assign('ma_tour3', $ma_tour3);
|
||||
$template->assign('ma_tour4', $ma_tour4);
|
||||
|
||||
$template->assign('ma_info', $ma_info);
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/11_index.tpl');
|
||||
?>
|
||||
3
scripts/404.php
Normal file
3
scripts/404.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
$template->assign('content', 'tpl/404.tpl');
|
||||
?>
|
||||
42
scripts/PDF_Javascript.php
Normal file
42
scripts/PDF_Javascript.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
require('fpdf.php');
|
||||
|
||||
class PDF_Javascript extends FPDF {
|
||||
|
||||
var $javascript;
|
||||
var $n_js;
|
||||
|
||||
function IncludeJS($script) {
|
||||
$this->javascript=$script;
|
||||
}
|
||||
|
||||
function _putjavascript() {
|
||||
$this->_newobj();
|
||||
$this->n_js=$this->n;
|
||||
$this->_out('<<');
|
||||
$this->_out('/Names [(EmbeddedJS) '.($this->n+1).' 0 R ]');
|
||||
$this->_out('>>');
|
||||
$this->_out('endobj');
|
||||
$this->_newobj();
|
||||
$this->_out('<<');
|
||||
$this->_out('/S /JavaScript');
|
||||
$this->_out('/JS '.$this->_textstring($this->javascript));
|
||||
$this->_out('>>');
|
||||
$this->_out('endobj');
|
||||
}
|
||||
|
||||
function _putresources() {
|
||||
parent::_putresources();
|
||||
if (!empty($this->javascript)) {
|
||||
$this->_putjavascript();
|
||||
}
|
||||
}
|
||||
|
||||
function _putcatalog() {
|
||||
parent::_putcatalog();
|
||||
if (isset($this->javascript)) {
|
||||
$this->_out('/Names <</JavaScript '.($this->n_js).' 0 R>>');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
207
scripts/__re1.php
Normal file
207
scripts/__re1.php
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
<?
|
||||
require('fpdf.php');
|
||||
error_reporting(1);
|
||||
|
||||
|
||||
|
||||
//--------------------------------
|
||||
//-------------------- Variablen -
|
||||
//--------------------------------
|
||||
$adr['a1']="Max Mustermann";
|
||||
$adr['a2']="Musterverkaufstelle";
|
||||
$adr['a3']="Musterstr. 123";
|
||||
$adr['a4']="12345";
|
||||
$adr['a5']="Musterstadt";
|
||||
$renr="SR-10001";
|
||||
$lagernr="PLX-0815";
|
||||
$re_tag=2;
|
||||
$re_monat=2;
|
||||
$re_jahr=2015;
|
||||
|
||||
// 1. Demo-Datensatz
|
||||
$adata['1']['pos']="1";
|
||||
$adata['1']['Beschreibung1']="bunt,rund und hässlich";
|
||||
$adata['1']['Beschreibung2']="stinkend verpackt in Papier";
|
||||
$adata['1']['Beschreibung3']="bla bla";
|
||||
$adata['1']['Beschreibung4']="";
|
||||
$adata['1']['mwst']="19";
|
||||
$adata['1']['menge']="4";
|
||||
$adata['1']['epreis']="1.99";
|
||||
// $adata['1']['gpreis']="1";
|
||||
|
||||
//--------------------------------
|
||||
//-------------------- pdf starten
|
||||
//--------------------------------
|
||||
|
||||
class PDF extends FPDF {
|
||||
function Footer() { //Fusszeile(n)
|
||||
$this->SetY(-20);
|
||||
$this->SetFont('Helvetica','',8);
|
||||
|
||||
$this->Cell(7,2," ",'0','0','L','0');
|
||||
$this->Cell(190,2," ",'T','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,"OnlineDeals Hainichen",'0','0','0','0');
|
||||
$this->Cell(45,3,"Tel.: 037207/579181",'0','0','0','0');
|
||||
$this->Cell(50,3,"Volksbank Mittweida",'0','0','0','0');
|
||||
$this->Cell(40,3,"USt-IdNr. ",'0','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,"Inh. Sven Nestler",'0','0','0','0');
|
||||
$this->Cell(45,3,"E-Mail: onlinedeals@online.de",'0','0','0','0');
|
||||
$this->Cell(50,3,"BIC:GENODEF1MIW",'0','0','0','0');
|
||||
$this->Cell(40,3,"222/466/00140G28/1",'0','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,utf8_decode("Käthe- Kollwitz- Str. 34a"),'0','0','0','0');
|
||||
$this->Cell(45,3," ",'0','0','0','0');
|
||||
$this->Cell(50,3,"IBAN: DE04870961240197061596",'0','0','0','0');
|
||||
$this->Cell(40,3,"Finanzamt Mittweida",'0','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,"09661 Hainichen",'0','0','0','0');
|
||||
$this->Cell(45,3," ",'0','0','0','0');
|
||||
$this->Cell(50,3,"KTO Inh.: Sven Nestler",'0','0','0','0');
|
||||
$this->Cell(40,3," ",'0','1','0','0');
|
||||
}
|
||||
}
|
||||
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
|
||||
$pdf->Image('Image5.png', 100,15,120,20);
|
||||
$pdf->Write(14,"\n\n");
|
||||
|
||||
$pdf->SetFont('Helvetica','U',7); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,3,utf8_decode("OnlineDeals Hainichen Käthe-Kollwitz-Str.34a 09661Hainichen"),'0','1','L','1');
|
||||
|
||||
$pdf->SetFont(''); $pdf->Cell(110,3," ",'0','1','L','1');
|
||||
|
||||
$pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a1']),'0','0','L','0'); $pdf->Cell(70,5,utf8_decode("OnlineDeals Hainichen"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a2']),'0','0','L','0'); $pdf->Cell(70,5,utf8_decode("Käthe-Kollwitz-Str. 34a"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a3']),'0','0','L','0'); $pdf->Cell(70,5,utf8_decode("09661 Hainichen"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($adr['a4'])." ".($adr['a5']),'0','0','L','1'); $pdf->Cell(70,5,utf8_decode(" "),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5," ",'0','0','L','1'); $pdf->Cell(70,5,utf8_decode("Tel.: 037207/579181"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5," ",'0','0','L','1'); $pdf->Cell(70,5,utf8_decode("E-Mail: onlinedeals@online.de"),'0','1','R','1');
|
||||
|
||||
$pdf->Write(8,"\n"); $pdf->SetFont('Helvetica','BI',20);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0');$pdf->Cell(110,8,"Storno-Rechnung",'0','1','L','1');
|
||||
$pdf->Write(4,"\n");
|
||||
$pdf->SetFont('Helvetica','B',10);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(60,5,"Rechnung Nr.: ".($renr),'0','0','L','1');
|
||||
$pdf->Cell(50,5,"Lager Nr.: ".($lagernr),'0','0','L','1');
|
||||
$pdf->Cell(70,5,"Datum: ".(sprintf("%02d",$re_tag)).".".(sprintf("%02d",$re_monat)).".".($re_jahr),'0','1','R','1');
|
||||
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');$pdf->Cell(178,5," ",'B','1','L','1');
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');$pdf->Cell(178,5," ",'0','1','L','1');
|
||||
|
||||
//- Tabellenkopf -
|
||||
$pdf->SetFillColor(90,90,90); $pdf->SetTextColor(255,255,255); $pdf->SetFont('Helvetica','B',10);
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5,"Pos",'1','0','L','1');
|
||||
$pdf->Cell(70,5,"Artikelbeschreibung",'1','0','L','1');
|
||||
$pdf->Cell(20,5,"MwSt.",'1','0','R','1');
|
||||
$pdf->Cell(18,5,"Anzahl",'1','0','R','1');
|
||||
$pdf->Cell(30,5,"Einzelpreis",'1','0','R','1');
|
||||
$pdf->Cell(30,5,"Gesamtpreis",'1','1','R','1');
|
||||
|
||||
//- Tabelle -
|
||||
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',10);
|
||||
//------------------------------------------------------------------------------------------------- Schleife Anfang
|
||||
if($adata['1']['Beschreibung2']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5,$adata['1']['pos'],'LR','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung1']),'LR','0','L','0');
|
||||
$pdf->Cell(20,5,$adata['1']['mwst']." %",'LR','0','R','0');
|
||||
$pdf->Cell(18,5,$adata['1']['menge'],'LR','0','R','0');
|
||||
$pdf->Cell(30,5,$adata['1']['epreis']." EUR",'LR','0','R','0');
|
||||
/*** Preisberechnung ***/ $tmpgpreis=$adata['1']['menge']*$adata['1']['epreis']; $endpreis=$endpreis+$tmpgpreis;
|
||||
$pdf->Cell(30,5,$tmpgpreis." EUR",'LR','1','R','0');
|
||||
} else {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5,$adata['1']['pos'],'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung1']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5,$adata['1']['mwst']." %",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5,$adata['1']['menge'],'BRL','0','R','0');
|
||||
$pdf->Cell(30,5,$adata['1']['epreis']." EUR",'BRL','0','R','0');
|
||||
/*** Preisberechnung ***/ $tmpgpreis=$adata['1']['menge']*$adata['1']['epreis']; $endpreis=$endpreis+$tmpgpreis;
|
||||
$pdf->Cell(30,5,$tmpgpreis." EUR",'BRL','1','R','0');
|
||||
}
|
||||
|
||||
if($adata['1']['Beschreibung2']!="") {
|
||||
if($adata['1']['Beschreibung3']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'LR','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung2']),'LR','0','L','0');
|
||||
$pdf->Cell(20,5," ",'LR','0','R','0');
|
||||
$pdf->Cell(18,5," ",'LR','0','R','0');
|
||||
$pdf->Cell(30,5," ",'LR','0','R','0');
|
||||
$pdf->Cell(30,5," ",'LR','1','R','0');
|
||||
} else {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung2']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','1','R','0');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if($adata['1']['Beschreibung3']!="") {
|
||||
if($adata['1']['Beschreibung4']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'RL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung3']),'RL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'RL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'RL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'RL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'RL','1','R','0');
|
||||
} else {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung3']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','1','R','0');
|
||||
}
|
||||
}
|
||||
if($adata['1']['Beschreibung4']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung4']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','1','R','0');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//gesamtsumme
|
||||
// $pdf->Cell(25,8," ",'0','1','R','1');
|
||||
$pdf->Cell(8,5," ",'0','0','L','0'); $pdf->Cell(178,4," ",'T','1','R','0');
|
||||
$pdf->Cell(8,5," ",'0','0','L','0'); $pdf->Cell(178,4," ",'B','1','R','0');
|
||||
$pdf->Cell(141,4," ",'0','1','L','0');
|
||||
$pdf->Cell(151,4,"Zwischensumme:",'0','0','R','1'); $pdf->Cell(37,4,(sprintf("%01.2f",$firmapreis))." EUR",'0','1','R','1');
|
||||
$steuer=$firmapreis*19/100;
|
||||
|
||||
$pdf->Cell(151,4,"zzgl. 19% MwSt.",'0','0','R','1'); $pdf->Cell(37,4,(sprintf("%01.2f",$steuer))." EUR",'0','1','R','1');
|
||||
$betrag=$firmapreis+$steuer;
|
||||
|
||||
$pdf->Cell(151,4,"Gesamtbetrag:",'0','0','R','1'); $pdf->Cell(37,4,(sprintf("%01.2f",$betrag))." EUR",'0','1','R','1');
|
||||
if($betrag>9999) {
|
||||
$pdf->Cell(188,4,"===========",'0','1','R','1');
|
||||
} else {
|
||||
$pdf->Cell(188,4,"============",'0','1','R','1');
|
||||
}
|
||||
//---------
|
||||
|
||||
$pdf->Output('stornorechnung_'.($renr).'.pdf','I');
|
||||
exit();
|
||||
?>
|
||||
221
scripts/__re_test.php
Normal file
221
scripts/__re_test.php
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1); // Wenn fertig auf 0!
|
||||
|
||||
require('lib/config.php');
|
||||
require('lib/mysql.class.php');
|
||||
$GLOBALS['mysql'] = new mysql(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
||||
$_GET['rID']=1;
|
||||
|
||||
$firmendaten = $GLOBALS['mysql']->query_single("SELECT * FROM firmendaten WHERE id = 1");
|
||||
//echo "<pre>";
|
||||
//print_r($firmendaten);
|
||||
//echo "</pre>";
|
||||
|
||||
$check_rechnung = $GLOBALS['mysql']->query_single("SELECT * FROM rechnung WHERE rID = '".$_GET['rID']."'");
|
||||
if($check_rechnung['num_rows'] != 0) {
|
||||
$check_rechnung['posArray'] = unserialize(base64_decode($check_rechnung['posArray']));
|
||||
|
||||
|
||||
echo "<pre>";
|
||||
print_r($check_rechnung);
|
||||
echo "</pre>";
|
||||
}
|
||||
require('lib/fpdf.php');
|
||||
|
||||
//--------------------------------
|
||||
//-------------------- Variablen -
|
||||
//--------------------------------
|
||||
|
||||
$renr="SR-10001";
|
||||
$lagernr="PLX-0815";
|
||||
$re_tag=2;
|
||||
$re_monat=2;
|
||||
$re_jahr=2015;
|
||||
|
||||
// 1. Demo-Datensatz
|
||||
$adata['1']['pos']="1";
|
||||
$adata['1']['Beschreibung1']="bunt,rund und hässlich";
|
||||
$adata['1']['Beschreibung2']="stinkend verpackt in Papier";
|
||||
$adata['1']['Beschreibung3']="bla bla";
|
||||
$adata['1']['Beschreibung4']="";
|
||||
$adata['1']['mwst']="19";
|
||||
$adata['1']['menge']="4";
|
||||
$adata['1']['epreis']="1.99";
|
||||
// $adata['1']['gpreis']="1";
|
||||
|
||||
//--------------------------------
|
||||
//-------------------- pdf starten
|
||||
//--------------------------------
|
||||
|
||||
class PDF extends FPDF {
|
||||
function Footer() { //Fusszeile(n)
|
||||
$this->SetY(-20);
|
||||
$this->SetFont('Helvetica','',8);
|
||||
|
||||
$this->Cell(7,2," ",'0','0','L','0');
|
||||
$this->Cell(190,2," ",'T','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,"OnlineDeals Hainichen",'0','0','0','0');
|
||||
$this->Cell(45,3,"Tel.: 037207/579181",'0','0','0','0');
|
||||
$this->Cell(50,3,"Volksbank Mittweida",'0','0','0','0');
|
||||
$this->Cell(40,3,"USt-IdNr. ",'0','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,"Inh. Sven Nestler",'0','0','0','0');
|
||||
$this->Cell(45,3,"E-Mail: onlinedeals@online.de",'0','0','0','0');
|
||||
$this->Cell(50,3,"BIC:GENODEF1MIW",'0','0','0','0');
|
||||
$this->Cell(40,3,"222/466/00140G28/1",'0','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,utf8_decode("Käthe- Kollwitz- Str. 34a"),'0','0','0','0');
|
||||
$this->Cell(45,3," ",'0','0','0','0');
|
||||
$this->Cell(50,3,"IBAN: DE04870961240197061596",'0','0','0','0');
|
||||
$this->Cell(40,3,"Finanzamt Mittweida",'0','1','0','0');
|
||||
|
||||
$this->Cell(7,3," ",'0','0','L','0');
|
||||
$this->Cell(45,3,"09661 Hainichen",'0','0','0','0');
|
||||
$this->Cell(45,3," ",'0','0','0','0');
|
||||
$this->Cell(50,3,"KTO Inh.: Sven Nestler",'0','0','0','0');
|
||||
$this->Cell(40,3," ",'0','1','0','0');
|
||||
}
|
||||
}
|
||||
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
|
||||
$pdf->Image('public/images/od_logo.png', 100,15,120,20);
|
||||
$pdf->Write(14,"\n\n");
|
||||
|
||||
$pdf->SetFont('Helvetica','U',7); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,3,utf8_decode("OnlineDeals Hainichen Käthe-Kollwitz-Str.34a 09661Hainichen"),'0','1','L','1');
|
||||
|
||||
$pdf->SetFont(''); $pdf->Cell(110,3," ",'0','1','L','1');
|
||||
|
||||
$pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($check_rechnung['empfz1']),'0','0','L','0'); $pdf->Cell(70,5,utf8_decode("OnlineDeals Hainichen"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($check_rechnung['empfz2']),'0','0','L','0'); $pdf->Cell(70,5,utf8_decode("Käthe-Kollwitz-Str. 34a"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($check_rechnung['empfz3']),'0','0','L','0'); $pdf->Cell(70,5,utf8_decode("09661 Hainichen"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5,utf8_decode($check_rechnung['empfz4']),'0','0','L','1'); $pdf->Cell(70,5,utf8_decode(" "),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5," ",'0','0','L','1'); $pdf->Cell(70,5,utf8_decode("Tel.: 037207/579181"),'0','1','R','1');
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(110,5," ",'0','0','L','1'); $pdf->Cell(70,5,utf8_decode("E-Mail: onlinedeals@online.de"),'0','1','R','1');
|
||||
|
||||
$pdf->Write(8,"\n"); $pdf->SetFont('Helvetica','BI',20);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0');$pdf->Cell(110,8,"Storno-Rechnung",'0','1','L','1');
|
||||
$pdf->Write(4,"\n");
|
||||
$pdf->SetFont('Helvetica','B',10);
|
||||
$pdf->Cell(7,5," ",'0','0','L','0'); $pdf->Cell(60,5,"Rechnung Nr.: ".($check_rechnung['rNr']),'0','0','L','1');
|
||||
$pdf->Cell(50,5,"Lager Nr.: ".($check_rechnung['lagerNr']),'0','0','L','1');
|
||||
$pdf->Cell(70,5,"Datum: ".(sprintf("%02d",$re_tag)).".".(sprintf("%02d",$re_monat)).".".($re_jahr),'0','1','R','1');
|
||||
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');$pdf->Cell(178,5," ",'B','1','L','1');
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');$pdf->Cell(178,5," ",'0','1','L','1');
|
||||
|
||||
//- Tabellenkopf -
|
||||
$pdf->SetFillColor(90,90,90); $pdf->SetTextColor(255,255,255); $pdf->SetFont('Helvetica','B',10);
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5,"Pos",'1','0','L','1');
|
||||
$pdf->Cell(70,5,"Artikelbeschreibung",'1','0','L','1');
|
||||
$pdf->Cell(20,5,"MwSt.",'1','0','R','1');
|
||||
$pdf->Cell(18,5,"Anzahl",'1','0','R','1');
|
||||
$pdf->Cell(30,5,"Einzelpreis",'1','0','R','1');
|
||||
$pdf->Cell(30,5,"Gesamtpreis",'1','1','R','1');
|
||||
$tmpgpreis=0; $endpreis=0;
|
||||
//- Tabelle -
|
||||
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',10);
|
||||
//------------------------------------------------------------------------------------------------- Schleife Anfang
|
||||
if($adata['1']['Beschreibung2']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5,$adata['1']['pos'],'LR','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung1']),'LR','0','L','0');
|
||||
$pdf->Cell(20,5,$adata['1']['mwst']." %",'LR','0','R','0');
|
||||
$pdf->Cell(18,5,$adata['1']['menge'],'LR','0','R','0');
|
||||
$pdf->Cell(30,5,$adata['1']['epreis']." EUR",'LR','0','R','0');
|
||||
/*** Preisberechnung ***/ $tmpgpreis=$adata['1']['menge']*$adata['1']['epreis']; $endpreis=$endpreis+$tmpgpreis;
|
||||
$pdf->Cell(30,5,$tmpgpreis." EUR",'LR','1','R','0');
|
||||
} else {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5,$adata['1']['pos'],'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung1']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5,$adata['1']['mwst']." %",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5,$adata['1']['menge'],'BRL','0','R','0');
|
||||
$pdf->Cell(30,5,$adata['1']['epreis']." EUR",'BRL','0','R','0');
|
||||
/*** Preisberechnung ***/ $tmpgpreis=$adata['1']['menge']*$adata['1']['epreis']; $endpreis=$endpreis+$tmpgpreis;
|
||||
$pdf->Cell(30,5,$tmpgpreis." EUR",'BRL','1','R','0');
|
||||
}
|
||||
|
||||
if($adata['1']['Beschreibung2']!="") {
|
||||
if($adata['1']['Beschreibung3']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'LR','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung2']),'LR','0','L','0');
|
||||
$pdf->Cell(20,5," ",'LR','0','R','0');
|
||||
$pdf->Cell(18,5," ",'LR','0','R','0');
|
||||
$pdf->Cell(30,5," ",'LR','0','R','0');
|
||||
$pdf->Cell(30,5," ",'LR','1','R','0');
|
||||
} else {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung2']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','1','R','0');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if($adata['1']['Beschreibung3']!="") {
|
||||
if($adata['1']['Beschreibung4']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'RL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung3']),'RL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'RL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'RL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'RL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'RL','1','R','0');
|
||||
} else {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung3']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','1','R','0');
|
||||
}
|
||||
}
|
||||
if($adata['1']['Beschreibung4']!="") {
|
||||
$pdf->Cell(8,5," ",'0','0','L','0');
|
||||
$pdf->Cell(10,5," ",'BRL','0','L','0');
|
||||
$pdf->Cell(70,5,utf8_decode($adata['1']['Beschreibung4']),'BRL','0','L','0');
|
||||
$pdf->Cell(20,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(18,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','0','R','0');
|
||||
$pdf->Cell(30,5," ",'BRL','1','R','0');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//gesamtsumme
|
||||
// $pdf->Cell(25,8," ",'0','1','R','1');
|
||||
$pdf->Cell(8,5," ",'0','0','L','0'); $pdf->Cell(178,4," ",'T','1','R','0');
|
||||
$pdf->Cell(8,5," ",'0','0','L','0'); $pdf->Cell(178,4," ",'B','1','R','0');
|
||||
$pdf->Cell(141,4," ",'0','1','L','0');
|
||||
$pdf->Cell(151,4,"Zwischensumme:",'0','0','R','1'); $pdf->Cell(37,4,(sprintf("%01.2f",$check_rechnung['ges_netto']))." EUR",'0','1','R','1');
|
||||
|
||||
$pdf->Cell(151,4,"zzgl. 19% MwSt.",'0','0','R','1'); $pdf->Cell(37,4,(sprintf("%01.2f",$check_rechnung['ges_mwst']))." EUR",'0','1','R','1');
|
||||
|
||||
$pdf->Cell(151,4,"Gesamtbetrag:",'0','0','R','1'); $pdf->Cell(37,4,(sprintf("%01.2f",$check_rechnung['ges_brutto']))." EUR",'0','1','R','1');
|
||||
if($check_rechnung['ges_brutto']>9999) {
|
||||
$pdf->Cell(188,4,"===========",'0','1','R','1');
|
||||
} else {
|
||||
$pdf->Cell(188,4,"============",'0','1','R','1');
|
||||
}
|
||||
//---------
|
||||
|
||||
$pdf->Output('rechnung_'.($check_rechnung['rNr']).'.pdf','I');
|
||||
exit();
|
||||
?>
|
||||
62
scripts/_aenderday.php
Normal file
62
scripts/_aenderday.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?
|
||||
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
|
||||
|
||||
$key=0;
|
||||
$touren = $GLOBALS['mysql']->query_array("SELECT * FROM tourenliste WHERE typ='1' AND kw='".$kw_aktuell."'");
|
||||
echo "$row->url <br>";
|
||||
while($row = $touren->fetch_assoc()){
|
||||
$touren2[$key]['id']=$row['id'];
|
||||
/*
|
||||
$touren2[$key]['jahr']=$row['jahr'];
|
||||
$touren2[$key]['monat']=$row['monat'];
|
||||
$touren2[$key]['tag']=$row['tag'];
|
||||
*/
|
||||
$wochentag=date('l',mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']));
|
||||
$touren2[$key]['wt']=$wochentag=$GLOBALS['core']->translateDate($wochentag);
|
||||
$touren2[$key]['kw']=date('W', mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']));
|
||||
$touren2[$key]['tag']=date('d.m.Y', mktime(0,0,0,$row['monat'],$row['tag'],$row['jahr']));
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$touren2[$key]['fahrer']=$row_fahrer['name'];
|
||||
$touren2[$key]['fahrer_id']=$row_fahrer['id'];
|
||||
$row_fahrer_array = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter");
|
||||
$touren2[$key]['fahrer_array']=$row_fahrer_array;
|
||||
|
||||
$touren2[$key]['zeit']=$row['zeit'];
|
||||
/*
|
||||
$touren2[$key]['gewicht1']=$row['gewicht1'];
|
||||
$touren2[$key]['gewicht2']=$row['gewicht2'];
|
||||
$touren2[$key]['gewicht3']=$row['gewicht3'];
|
||||
$touren2[$key]['gewicht4']=$row['gewicht4'];
|
||||
$touren2[$key]['gewicht5']=$row['gewicht5'];
|
||||
$touren2[$key]['gesammtgewicht']=$row['gewicht1']+$row['gewicht2']+$row['gewicht3']+$row['gewicht4']+$row['gewicht5'];
|
||||
*/
|
||||
|
||||
$row_auto = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$touren2[$key]['kennz']=$row_auto['kz'];
|
||||
$touren2[$key]['auto_id']=$row['auto'];
|
||||
$row_auto_array = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge");
|
||||
$touren2[$key]['auto_array']=$row_auto_array;
|
||||
|
||||
|
||||
// $touren2[$key]['auto']=$row['auto'];
|
||||
$touren2[$key]['infotext']=$row['infotext'];
|
||||
// $touren2[$key]['afirma']=$row['afirma'];
|
||||
// $touren2[$key]['erl']=$row['erl'];
|
||||
$key++;
|
||||
|
||||
}
|
||||
|
||||
// Vorabanzeige resultat
|
||||
// echo "<pre>";
|
||||
// print_r($touren2);
|
||||
// echo "</pre>";
|
||||
|
||||
$template->assign('touren2', $touren2);
|
||||
$template->assign('content', 'tpl/aender1.tpl');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
32
scripts/_pdf_lohn_data.php
Normal file
32
scripts/_pdf_lohn_data.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
$za++;
|
||||
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']!=0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
} else {
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
}
|
||||
$pdf->Cell(45,4,(utf8_decode($tmp[$za]['x'])),'0','0','R','1');
|
||||
//$pdf->Cell(20,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(25,4,(utf8_decode($tmp[$za]['c'])),'0','0','R','1');
|
||||
}else{
|
||||
$pdf->Cell(45,4,(" "),'0','0','R','0');
|
||||
}
|
||||
|
||||
//**********************************************************************************************************************************
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
//**********************************************************************************************************************************
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']!=0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
} else {
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
}
|
||||
$pdf->Cell(45,4,(utf8_decode($tmp[$za]['x'])),'0','0','R','1');
|
||||
//$pdf->Cell(20,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(25,4,(utf8_decode($tmp[$za]['c'])),'0','0','R','1');
|
||||
}else{
|
||||
$pdf->Cell(45,4,(" "),'0','0','R','0');
|
||||
}
|
||||
?>
|
||||
13
scripts/_pdf_lohn_extra.php
Normal file
13
scripts/_pdf_lohn_extra.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
//**********************************************************************************************************************************
|
||||
//$za++;
|
||||
if (isset($etour[$ze]['datum'])) {
|
||||
$pdf->Cell(23,4,(utf8_decode($etour[$ze]['datum'])),'0','0','R','0');
|
||||
$pdf->Cell(22,4,(utf8_decode(" ".$etour[$ze]['tour'])),'0','0','L','0');
|
||||
$pdf->Cell(35,4,(utf8_decode($etour[$ze]['tarif']." EUR")),'0','1','R','0');
|
||||
}else{
|
||||
$pdf->Cell(40,4,(" "),'0','1','R','0');
|
||||
}
|
||||
$ze++;
|
||||
?>
|
||||
26
scripts/_temp.php
Normal file
26
scripts/_temp.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?
|
||||
|
||||
|
||||
|
||||
|
||||
$saso_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE typ=8"); $key=0;
|
||||
while($row = $saso_tour->fetch_assoc()) {
|
||||
$saso_tour2[$key]['gewicht']=$row['gewicht'];
|
||||
$saso_tour2[$key]['gewicht2']=$row['gewicht2'];
|
||||
$saso_tour2[$key]['gewicht4']=$row['gewicht4'];
|
||||
$saso_tour2[$key]['pakete']=$row['Pakete'];
|
||||
$saso_tour2[$key]['pakete2']=$row['pakete2'];
|
||||
|
||||
if($saso_tour2[$key]['pakete']!=$saso_tour2[$key]['pakete2']) {
|
||||
echo $row['tour']."< /br>";
|
||||
$agewicht=$row['gewicht2']*$row['pakete2'];
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht3='".$agewicht."' WHERE id='".$row['id']."'");
|
||||
} else {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht3='".$row['gewicht2']."' WHERE id='".$row['id']."'");
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
echo "< /br>".$key. "Änderungen durcheführt";
|
||||
|
||||
|
||||
?>
|
||||
86
scripts/a_abr.php
Normal file
86
scripts/a_abr.php
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=5;
|
||||
|
||||
// Melde alle PHP Fehler (siehe Changelog)
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
// echo'<pre>'; print_r($row2); echo'</pre>'; // BUGAnzeige
|
||||
|
||||
if($_SESSION['benutzer']==12) { $planer="T. Muerbe"; }
|
||||
else if($_SESSION['benutzer']==13) { $planer="Anett"; }
|
||||
else if($_SESSION['benutzer']==18) { $planer="Joerg Basse"; }
|
||||
else if($_SESSION['benutzer']==44) { $planer="I. Steinmacher"; }
|
||||
else $planer="Frank";
|
||||
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1){
|
||||
if($_GET['monat']==1) {
|
||||
$monat=12; $jahr=$_GET['jahr']-1;
|
||||
} else {
|
||||
$monat=$_GET['monat']-1; $jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
if($_GET['wahl']==2) {
|
||||
if($_GET['monat']==12) {
|
||||
$monat=1; $jahr=$_GET['jahr']+1;
|
||||
} else {
|
||||
$monat=$_GET['monat']+1; $jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif(isset($_GET['id'])) {
|
||||
if($_GET['id']>0) {
|
||||
$monat=$_GET['monat']; $jahr=$_GET['jahr'];
|
||||
}
|
||||
} else {
|
||||
$jahr = (int)date('Y');
|
||||
$monat = (int)date('m');
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
|
||||
// alle firmendaten für auswahlmenue
|
||||
$firmen = $GLOBALS['mysql']->query_array("SELECT * FROM firmen ORDER BY name");
|
||||
$template->assign('firmen', $firmen);
|
||||
|
||||
|
||||
// Komplettabfrage
|
||||
if(isset($_GET['id'])) {
|
||||
$keytour=0;
|
||||
$firmatouren = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE afirma='".$_GET['id']."' and clear<1 ORDER BY typ,id"); // Tourendaten vom ausgewählten Auftraggeber
|
||||
while($rowfirma = $firmatouren->fetch_assoc()) {
|
||||
$tour3[$keytour]['id']=$rowfirma['id'];
|
||||
$tour3[$keytour]['tourname']=$rowfirma['tour'];
|
||||
$tour3[$keytour]['infotitel']=$rowfirma['infotitel'];
|
||||
$keytour++;
|
||||
}
|
||||
}
|
||||
|
||||
/* abfrage alt mit fehler 504
|
||||
if(isset($_GET['id'])) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM firmen WHERE id='".$_GET['id']."'"); // firmendaten ach ID
|
||||
$keyfirma=0; $keytour=0;
|
||||
$firmatouren = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE afirma='".$_GET['id']."' ORDER BY id"); // Tourendaten vom ausgewählten Auftraggeber
|
||||
while($rowfirma = $firmatouren->fetch_assoc()) {
|
||||
$tourx = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND tour='".$rowfirma['id']."' ORDER BY time"); $key=0;
|
||||
if($tourx['num_rows'] != 0) {
|
||||
$tour3[$keytour]['id']=$rowfirma['id'];
|
||||
$tour3[$keytour]['tourmenge']=$tourx['num_rows'];
|
||||
$tour3[$keytour]['tourname']=$rowfirma['tour'];
|
||||
$tour3[$keytour]['infotitel']=$rowfirma['infotitel'];
|
||||
}
|
||||
$keytour++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
//------------------ ?
|
||||
if(isset($_GET['id'])) {
|
||||
$template->assign('tour3', $tour3);
|
||||
$template->assign('anzeige', $_GET['id']);
|
||||
}
|
||||
$template->assign('firmen', $firmen);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('content', 'tpl/a_abr.tpl'); //_list
|
||||
|
||||
?>
|
||||
52
scripts/a_auto.php
Normal file
52
scripts/a_auto.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=0;
|
||||
error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
|
||||
$heute_jahr = date("Y");
|
||||
$heute_monat = date("m");
|
||||
$heute_tag = date("d");
|
||||
$fahrzeug = 0;
|
||||
$auto="unklar"
|
||||
;
|
||||
if(isset($_POST['dasdatum'])) {
|
||||
$datum_arr = explode('-',$_POST['dasdatum']);
|
||||
$timestamp1 = mktime(0,0,0, $datum_arr[1] , $datum_arr[0] ,$datum_arr[2]);
|
||||
|
||||
$heute_jahr = $datum_arr[0];
|
||||
$heute_monat = $datum_arr[1];
|
||||
$heute_tag = $datum_arr[2];
|
||||
$fahrzeug=$_POST['ma1'];
|
||||
$row_auto = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$fahrzeug."'");
|
||||
$auto=$row_auto['kz'];
|
||||
|
||||
|
||||
}
|
||||
//------------------ Auto auslesen
|
||||
$key=0;
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$heute_tag."' and monat='".$heute_monat."' and jahr='".$heute_jahr."' and auto='".$fahrzeug."'") ;
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$wwa[$key]['tag']=$row['tag'];
|
||||
$wwa[$key]['monat']=$row['monat'];
|
||||
$wwa[$key]['jahr']=$row['jahr'];
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$wwa[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$wwa[$key]['fahrer']=$row_fahrerx['name'];
|
||||
if($row['typ']<5) {
|
||||
$wwa[$key]['infotext']=$row['infotext'];
|
||||
} else {
|
||||
$wwa[$key]['infotext']=$row_tour['infotitel'];
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
|
||||
//---------------------------
|
||||
$ma1 = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge WHERE aktiv!=0 ORDER BY kz"); // ORDER BY kz
|
||||
$ma1['iauto']=$fahrzeug;
|
||||
$heute = "$heute_tag.$heute_monat.$heute_jahr";
|
||||
$template->assign('ma1', $ma1);
|
||||
$template->assign('auto', $auto);
|
||||
$template->assign('datum', $heute);
|
||||
$template->assign('wwa', $wwa);
|
||||
$template->assign('content', 'tpl/a_auto.tpl');
|
||||
?>
|
||||
78
scripts/a_fahrz.php
Normal file
78
scripts/a_fahrz.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=9.19;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=2;
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {
|
||||
if($_GET['monat']==1) {
|
||||
$monat=12; $jahr=$_GET['jahr']-1;
|
||||
} else {
|
||||
$monat=$_GET['monat']-1; $jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
if($_GET['wahl']==2) {
|
||||
if($_GET['monat']==12) {
|
||||
$monat=1; $jahr=$_GET['jahr']+1;
|
||||
} else {
|
||||
$monat=$_GET['monat']+1;
|
||||
$jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$jahr = date('Y');
|
||||
$monat = date('m');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------- Fahrzeuge
|
||||
$mitarbeiterlist = $GLOBALS['mysql']->query_array("SELECT * FROM fahrzeuge WHERE aktiv>0 ORDER BY kz");
|
||||
|
||||
//-------------------------------- Mitarbeiter
|
||||
if(isset($_GET['id'])) {
|
||||
if($_GET['id']>0) {
|
||||
$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_name', $ma_daten['name']);
|
||||
$template->assign('ma_kz', $ma_daten['kz']);
|
||||
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND auto='".$ma_id."' ORDER BY tag"); $key=0; $senddata= array();
|
||||
while($row = $tdaten->fetch_assoc()) {
|
||||
//$senddata[$key]['tid']=$row['id'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$senddata[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$senddata[$key]['tname']=$tmpd['tour'];
|
||||
$tmpt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid='".$row['typ']."'");
|
||||
$senddata[$key]['typ']=$tmpt['tname'];
|
||||
$tfahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$senddata[$key]['fahrer']=$tfahrer['name'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
}
|
||||
$template->assign('senddata', $senddata);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('content', 'tpl/a_fahrz.tpl'); //_list
|
||||
|
||||
?>
|
||||
75
scripts/a_faz.php
Normal file
75
scripts/a_faz.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
|
||||
|
||||
$monat = (int)date('n');
|
||||
$jahr = (int)date('Y');
|
||||
$kw_aktuell = (int)date('W');
|
||||
|
||||
|
||||
if(isset($_POST['save'])) {
|
||||
$monat=$_POST['ma2'];
|
||||
$jahr=$_POST['ma3'];
|
||||
}
|
||||
//------------------ FAZ
|
||||
$i=0; $stag=0; $key=0;
|
||||
for($i = 0; $i < date("t", $monat); $i++) {
|
||||
$monat2 = mktime(0, 0, 0, $monat,$i, $jahr);
|
||||
if(date("w", $monat2)==0) {
|
||||
$faz_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$i."' and monat='".$_POST['ma2']."' and jahr='".$_POST['ma3']."' and typ=15") ;
|
||||
while($row = $faz_tour->fetch_assoc()) {
|
||||
$row_tour1 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$tour1[$key]['tour']=$row_tour1['tour'];
|
||||
$afirma=$row_tour1['afirma'];
|
||||
$stammf=$row_tour1['s_fahrer'];
|
||||
if($stammf == $row['fahrer']) { $tour1[$key]['fremd']=1; } else { $tour1[$key]['fremd']=0; }
|
||||
$tour1[$key]['id']=$row['id'];
|
||||
$tour1[$key]['tag']=$row['tag'];
|
||||
$tour1[$key]['monat']=$row['monat'];
|
||||
$tour1[$key]['jahr']=$row['jahr'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$tour1[$key]['infotext']=$row['infotext'];
|
||||
$tour1[$key]['exemplare']=$row['exemplare'];
|
||||
$summe[$afirma]['menge']=$summe[$afirma]['menge']+$row['exemplare'];
|
||||
$row_tour2 = $GLOBALS['mysql']->query_single("SELECT * FROM firmen WHERE id='".$afirma."'");
|
||||
$summe[$afirma]['firma']=$row_tour2['name'];
|
||||
$key++;
|
||||
}
|
||||
$stag++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$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;
|
||||
|
||||
$template->assign('summe', $summe);
|
||||
$template->assign('ma2', $ma2);
|
||||
$template->assign('ma3', $ma3);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('tour1', $tour1);
|
||||
$template->assign('content', 'tpl/a_faz.tpl'); //_list
|
||||
|
||||
?>
|
||||
174
scripts/a_firma.php
Normal file
174
scripts/a_firma.php
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<?php
|
||||
require('fpdf.php');
|
||||
error_reporting(1);
|
||||
$monat = (int)date('n');
|
||||
$jahr = (int)date('Y');
|
||||
$kw_aktuell = (int)date('W');
|
||||
|
||||
if(isset($_POST['save'])) {
|
||||
if($_POST['ma5']=="0147025803") { //passwort
|
||||
|
||||
$maid=$_POST['ma1'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM firmen WHERE id='".$_POST['ma1']."'");
|
||||
$a_name=$row_fahrerx['name'];
|
||||
$a_monat=$_POST['ma2'];
|
||||
$a_jahr=$_POST['ma3'];
|
||||
|
||||
//--------------------------------
|
||||
//-------------------- 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->Image('Image5.png', 0, 5,230,30);
|
||||
$pdf->Write(20,"\n\n");
|
||||
|
||||
$pdf->SetFont('Helvetica','BU',7); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255);
|
||||
$pdf->Cell(110,3,"JB-Transport - Bautzner Str. 76 - 04347 Leipzig",'0','1','L','1');
|
||||
$pdf->SetFont('');
|
||||
$pdf->Cell(110,3," ",'0','1','L','1');
|
||||
|
||||
$adr = $GLOBALS['mysql']->query_single("SELECT * FROM firmen WHERE id='".$_POST['ma1']."'");
|
||||
|
||||
$pdf->SetFont('Helvetica','B',10); $pdf->SetTextColor(0,0,0); $pdf->SetFillColor(255,255,255);
|
||||
$pdf->Cell(110,5,($adr['a1']),'0','1','L','0');
|
||||
$pdf->Cell(110,5,($adr['a2']),'0','1','L','0');
|
||||
$pdf->Cell(110,5,($adr['a3']),'0','1','L','0');
|
||||
$pdf->Cell(110,5,($adr['a4']),'0','1','L','1');
|
||||
|
||||
$pdf->Write(8,"\n");
|
||||
$pdf->SetFont('Helvetica','BI',20);
|
||||
$pdf->Cell(110,8,"Monatsansicht ".($a_monat)."/".($a_jahr),'0','1','L','1');
|
||||
$pdf->SetFont('');
|
||||
$pdf->Write(4,"\n");
|
||||
|
||||
$pdf->SetFont('Helvetica','B',10);
|
||||
$pdf->Cell(25,5,"Tour",'B','0','L','1');
|
||||
$pdf->Cell(90,5,"Bezeichnung",'B','0','L','1');
|
||||
$pdf->Cell(20,5,"Anzahl",'B','0','R','1');
|
||||
$pdf->Cell(30,5,"E.-Preis",'B','0','R','1');
|
||||
$pdf->Cell(30,5,"G.-Preis",'B','1','R','1');
|
||||
|
||||
$pdf->Write(2,"\n");
|
||||
|
||||
//--------------- neu 1. touren auslesen zu arbeitgeber , danach mit option die tourenliste
|
||||
$keyfirma=0; $keytour=0; $firmapreis=0; $tourmenge=0;
|
||||
$firmatouren = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE afirma='".$_POST['ma1']."' ORDER BY typ");
|
||||
while($rowfirma = $firmatouren->fetch_assoc()) {
|
||||
$tour1[$keytour]['id']=$rowfirma['id'];
|
||||
$tour1[$keytour]['tour']=$rowfirma['tour'];
|
||||
$tour1[$keytour]['retyp']=$rowfirma['retyp'];
|
||||
$tour1[$keytour]['infotitel']=$rowfirma['infotitel'];
|
||||
$tour1[$keytour]['preis']=$rowfirma['preis'];
|
||||
|
||||
$keytour++;
|
||||
}
|
||||
for($key = 0; $key < $keytour; $key++) {
|
||||
$tourx = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' AND jahr='".$_POST['ma3']."' AND tour='".$tour1[$key]['id']."' ") ;
|
||||
while($row2 = $tourx->fetch_assoc()) {
|
||||
if($tour1[$key]['retyp']==5) {
|
||||
$tourmenge=$tourmenge+$row2['exemplare'];
|
||||
$tmppreis=$tour1[$key]['preis']*$row2['exemplare'];
|
||||
$tourpreis=$tourpreis+$tmppreis;
|
||||
$firmapreis=$firmapreis+$tmppreis;
|
||||
}
|
||||
elseif($tour1[$key]['retyp']==4) {
|
||||
$tourmenge++;
|
||||
if ($tourmenge==1) {
|
||||
$tourpreis=$tourpreis+$tour1[$key]['preis'];
|
||||
$firmapreis=$firmapreis+$tour1[$key]['preis'];
|
||||
}
|
||||
} else {
|
||||
$tourmenge++;
|
||||
$tourpreis=$tourpreis+$tour1[$key]['preis'];
|
||||
$firmapreis=$firmapreis+$tour1[$key]['preis'];
|
||||
}
|
||||
}
|
||||
|
||||
if($tourmenge>0) {
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetFont('');
|
||||
$pdf->Cell(25,4,($tour1[$key]['tour']),'0','0','L','1');
|
||||
$pdf->Cell(90,4,($tour1[$key]['infotitel']),'0','0','L','1');
|
||||
|
||||
if($tour1[$key]['retyp']==4) {
|
||||
$pdf->Cell(20,4," ",'0','0','R','1');
|
||||
$pdf->Cell(30,4," ",'0','0','R','1');
|
||||
} else {
|
||||
$pdf->Cell(20,4,($tourmenge)." x",'0','0','R','1');
|
||||
$pdf->Cell(30,4,"a. ".(sprintf("%01.2f",$tour1[$key]['preis']))." Euro",'0','0','R','1');
|
||||
}
|
||||
$pdf->Cell(30,4,(sprintf("%01.2f",$tourpreis))." Euro",'0','1','R','1');
|
||||
}
|
||||
$tourpreis=0; $tourmenge=0;
|
||||
}
|
||||
//gesamtsumme
|
||||
// $pdf->Cell(25,8," ",'0','1','R','1');
|
||||
$pdf->Cell(195,4," ",'0','1','R','1');
|
||||
$pdf->Cell(195,4,"------------",'0','1','R','1');
|
||||
$pdf->Cell(108,4," ",'0','0','L','1');
|
||||
$pdf->Cell(50,4,"Zwischensumme:",'0','0','R','1');
|
||||
$pdf->Cell(37,4,(sprintf("%01.2f",$firmapreis))." Euro",'0','1','R','1');
|
||||
$steuer=$firmapreis*19/100;
|
||||
$pdf->Cell(108,4," ",'0','0','L','1');
|
||||
$pdf->Cell(50,4,"+19% MwSt.",'0','0','R','1');
|
||||
$pdf->Cell(37,4,(sprintf("%01.2f",$steuer))." Euro",'0','1','R','1');
|
||||
$betrag=$firmapreis+$steuer;
|
||||
$pdf->Cell(108,4," ",'0','0','L','1');
|
||||
$pdf->Cell(50,4,"Gesamtbetrag:",'0','0','R','1');
|
||||
$pdf->Cell(37,4,(sprintf("%01.2f",$betrag))." Euro",'0','1','R','1');
|
||||
if($betrag>9999) {
|
||||
$pdf->Cell(195,4,"===========",'0','1','R','1');
|
||||
} else {
|
||||
$pdf->Cell(195,4,"============",'0','1','R','1');
|
||||
}
|
||||
//---------
|
||||
|
||||
$pdf->Output('rechnung_'.($datum).'.pdf','I');
|
||||
exit();
|
||||
} else {
|
||||
$template->assign('error', "falsches Passwort");
|
||||
$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;
|
||||
$template->assign('ma1', $ma1);
|
||||
$template->assign('ma2', $ma2);
|
||||
$template->assign('ma3', $ma3);
|
||||
$template->assign('a_name', $a_name);
|
||||
$template->assign('a_monat', $a_monat);
|
||||
$template->assign('a_jahr', $a_jahr);
|
||||
$template->assign('content', 'tpl/a_firma1.tpl'); //_list
|
||||
|
||||
|
||||
}
|
||||
|
||||
} 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;
|
||||
$template->assign('ma1', $ma1);
|
||||
$template->assign('ma2', $ma2);
|
||||
$template->assign('ma3', $ma3);
|
||||
$template->assign('a_name', $a_name);
|
||||
$template->assign('a_monat', $a_monat);
|
||||
$template->assign('a_jahr', $a_jahr);
|
||||
$template->assign('content', 'tpl/a_firma1.tpl'); //_list
|
||||
}
|
||||
?>
|
||||
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
|
||||
*/
|
||||
//}
|
||||
?>
|
||||
218
scripts/a_lohn.php
Normal file
218
scripts/a_lohn.php
Normal file
|
|
@ -0,0 +1,218 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=9.50;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
|
||||
if($_GET['wahl']==1){if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr'];
|
||||
} else {
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']>0) {
|
||||
$_GET['vs']=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$ma_geheim= $row_ma['geheim'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
|
||||
$tdaten15t = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ=15");
|
||||
if($tdaten15t['num_rows']>0) {
|
||||
$tdaten15 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ=15");
|
||||
while($row_tliste = $tdaten15->fetch_assoc()) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$row_tliste['exemplare']."' WHERE id='".$row_tliste['id']."'");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// $tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ!=19");
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ!=15");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
if($_GET['id']>0) {
|
||||
$lohn=0; $key=0; $kei=0;
|
||||
//------------------------------------------------
|
||||
$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_name=$ma_daten['name']; // name für anzeige
|
||||
//--------------- Grundlohn laden
|
||||
$ma_gldaten = $GLOBALS['mysql']->query_single("SELECT * FROM ma_glohn WHERE monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($ma_gldaten['num_rows']==0) {
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_glohn (mid,monat,jahr,glohn)
|
||||
VALUES(
|
||||
'".$_GET['id']."',
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_daten['tarifg']."')
|
||||
");
|
||||
$ma_g_lohn=$ma_daten['tarifg']; //grundlohn aus Mitarbeiterdaten !!!!
|
||||
//------------------------------------------------------------------------------
|
||||
//----------- erstmaliges berechnen nach Vorgaben aus Tourdaten ----------------
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
$ds=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $ma_daten['id'];
|
||||
$ma_tk= $ma_daten['tarif'];
|
||||
//---------------------------------
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
$sonder1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND typ='".$row_td['typ']."'");
|
||||
if($sonder1['num_rows']>0) { $tourlohn=$sonder1['geld']; $tourh=$sonder1['stunden']; }
|
||||
$sonder2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND tour='".$row_td['tour']."'");
|
||||
if($sonder2['num_rows']>0) { $tourlohn=$sonder2['geld']; $tourh=$sonder2['stunden']; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
$ds++;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
} else {
|
||||
$ma_g_lohn=$ma_gldaten['glohn']; //grundlohn aus History !!!!
|
||||
}
|
||||
//------------------------------------------------ letzten 3 Grundlöhne -----------------------
|
||||
$ma_glohn = $GLOBALS['mysql']->query_array("SELECT * FROM ma_glohn WHERE mid='".$_GET['id']."' ORDER BY id DESC LIMIT 4");
|
||||
$template->assign('ma_glohn', $ma_glohn); //echo'<pre>'; print_r($ma_glohn); echo'</pre>';
|
||||
//------------------------------------------------------------------------------------------
|
||||
$ma_g_lohntyp=$ma_daten['tarifgtyp']; //grundlohn typ mindestlohn für pauschalkräfte
|
||||
$ma_g_lohn=$ma_daten['tarifg'];
|
||||
$ma_lohntyp=$ma_daten['tarif']; // lohntyp
|
||||
// $lohn=$row_td['tarif'];
|
||||
$typen = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row_tt = $typen->fetch_assoc()) {
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
$ldata[$kei]['wert']=$zaehler['num_rows']; // anzahl zeilen
|
||||
$ldata[$kei]['tt_tid']=$row_tt['tid'];
|
||||
$ldata[$kei]['name1']=$row_tt['tname'];
|
||||
$ldata[$kei]['name2']=$row_tt['tinfotitel'];
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0; $senddata= array();
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name2']=$tmpd['tour3'];
|
||||
|
||||
$tarif_daten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$ma_daten['tarifgtyp']."'"); //ma-tariftyp
|
||||
if($tarif_daten['stunden']>0) {
|
||||
$zwischenlohn=$row_td['tarifh']*$_SESSION['slohn'];
|
||||
$senddata[$key]['lohn']=$zwischenlohn;
|
||||
$lohn=$lohn+($row_td['tarifh']*$_SESSION['slohn']);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$zwischenlohn."' WHERE id='".$row_td['id']."'"); ///////////////////////////////
|
||||
} else {
|
||||
$senddata[$key]['lohn']=$row_td['tarif'];
|
||||
$lohn=$lohn+$row_td['tarif'];
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
$ldata[$kei]['sdata']=$senddata;
|
||||
$kei++;
|
||||
}
|
||||
$template->assign('ma_daten', $ma_daten);
|
||||
|
||||
$template->assign('tarif_daten', $tarif_daten);
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//--------------- zusammenfassung Planer
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $zz=0;
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$ma_id."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
// $zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=$row['bez'];
|
||||
$zz++;
|
||||
}
|
||||
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
$template->assign('tmp', $tmp);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$mitarbeiterlist = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<90 ORDER BY name");
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_g_lohn', $ma_g_lohn);
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_name);
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('ldata', $ldata);
|
||||
$template->assign('senddata', $senddata);
|
||||
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn.tpl'); //_list
|
||||
|
||||
?>
|
||||
230
scripts/a_lohn2018.php
Normal file
230
scripts/a_lohn2018.php
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=9.19;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',1);
|
||||
|
||||
if($_GET['wahl']==1){if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr'];
|
||||
} else {
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
//---------------------------------------------- Abzug Strafgelder etc. -------------------------------
|
||||
if(isset($_POST['abz_summe'])) {
|
||||
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_abzahlung (monat,jahr,grund,summe,mid)
|
||||
VALUES(
|
||||
'".$_POST['abz_monat']."',
|
||||
'".$_POST['abz_jahr']."',
|
||||
'".$_POST['abz_grund']."',
|
||||
'".$_POST['abz_summe']."',
|
||||
'".$_POST['mid']."'
|
||||
)
|
||||
");
|
||||
|
||||
$ma_id=$_POST['mid'];
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']>0) {
|
||||
$_GET['vs']=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
if($_GET['id']>0) {
|
||||
$lohn=0; $key=0; $kei=0;
|
||||
//------------------------------------------------
|
||||
$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_name=$ma_daten['name']; // name für anzeige
|
||||
$lgeheim=$ma_daten['lohngeheim'];
|
||||
//--------------- Grundlohn laden
|
||||
$ma_gldaten = $GLOBALS['mysql']->query_single("SELECT * FROM ma_glohn WHERE monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($ma_gldaten['num_rows']==0) {
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_glohn (mid,monat,jahr,glohn)
|
||||
VALUES(
|
||||
'".$_GET['id']."',
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_daten['tarifg']."')
|
||||
");
|
||||
$ma_g_lohn=$ma_daten['tarifg']; //grundlohn aus Mitarbeiterdaten !!!!
|
||||
//------------------------------------------------------------------------------
|
||||
//----------- erstmaliges berechnen nach Vorgaben aus Tourdaten ----------------
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
$ds=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $ma_daten['id'];
|
||||
$ma_tk= $ma_daten['tarif'];
|
||||
//---------------------------------
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
$sonder1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND typ='".$row_td['typ']."'");
|
||||
if($sonder1['num_rows']>0) { $tourlohn=$sonder1['geld']; $tourh=$sonder1['stunden']; }
|
||||
$sonder2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND tour='".$row_td['tour']."'");
|
||||
if($sonder2['num_rows']>0) { $tourlohn=$sonder2['geld']; $tourh=$sonder2['stunden']; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
$ds++;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
} else {
|
||||
$ma_g_lohn=$ma_gldaten['glohn']; //grundlohn aus History !!!!
|
||||
}
|
||||
//------------------------------------------------ letzten 3 Grundlöhne -----------------------
|
||||
$ma_glohn = $GLOBALS['mysql']->query_array("SELECT * FROM ma_glohn WHERE mid='".$_GET['id']."' ORDER BY id DESC LIMIT 4");
|
||||
$template->assign('ma_glohn', $ma_glohn); //echo'<pre>'; print_r($ma_glohn); echo'</pre>';
|
||||
//------------------------------------------------------------------------------------------
|
||||
$ma_g_lohntyp=$ma_daten['tarifgtyp']; //grundlohn typ mindestlohn für pauschalkräfte
|
||||
$ma_g_lohn=$ma_daten['tarifg'];
|
||||
$ma_lohntyp=$ma_daten['tarif']; // lohntyp
|
||||
// $lohn=$row_td['tarif'];
|
||||
$typen = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row_tt = $typen->fetch_assoc()) {
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
$ldata[$kei]['wert']=$zaehler['num_rows']; // anzahl zeilen
|
||||
$ldata[$kei]['tt_tid']=$row_tt['tid'];
|
||||
$ldata[$kei]['name1']=$row_tt['tname'];
|
||||
$ldata[$kei]['name2']=$row_tt['tinfotitel'];
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0; $senddata= array();
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name2']=$tmpd['tour3'];
|
||||
|
||||
|
||||
$tarif_daten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$ma_daten['tarifgtyp']."'"); //ma-tariftyp
|
||||
if($tarif_daten['stunden']>0) {
|
||||
$zwischenlohn=$row_td['tarifh']*$_SESSION['slohn'];
|
||||
$senddata[$key]['lohn']=$zwischenlohn;
|
||||
$lohn=$lohn+($row_td['tarifh']*$_SESSION['slohn']);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$zwischenlohn."' WHERE id='".$row_td['id']."'"); ///////////////////////////////
|
||||
} else {
|
||||
$senddata[$key]['lohn']=$row_td['tarif'];
|
||||
$lohn=$lohn+$row_td['tarif'];
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
$ldata[$kei]['sdata']=$senddata;
|
||||
$kei++;
|
||||
}
|
||||
$template->assign('ma_daten', $ma_daten);
|
||||
|
||||
$template->assign('tarif_daten', $tarif_daten);
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//--------------- zusammenfassung Planer
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $zz=0;
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$ma_id."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
// $zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=$row['bez'];
|
||||
$zz++;
|
||||
}
|
||||
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
$template->assign('tmp', $tmp);
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$mitarbeiterlist = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND lohnabr =0 ORDER BY name");
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$ma_abz = $GLOBALS['mysql']->query_array("SELECT * FROM ma_abzahlung WHERE mid='".$ma_id."' ORDER BY jahr,monat");
|
||||
$template->assign('ma_abz', $ma_abz);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_g_lohn', $ma_g_lohn);
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_name);
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('ldata', $ldata);
|
||||
$template->assign('senddata', $senddata);
|
||||
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn2018.tpl'); //_list
|
||||
|
||||
?>
|
||||
354
scripts/a_lohn2019.php
Normal file
354
scripts/a_lohn2019.php
Normal file
|
|
@ -0,0 +1,354 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=9.50;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
/*
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr']; }
|
||||
} else {
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
*/
|
||||
$kw_aktuell =52;
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------- Abzug Strafgelder etc. -------------------------------
|
||||
if(isset($_POST['abz_summe'])) {
|
||||
$nachzahlung=0;
|
||||
if(isset($_POST['nachzahlung'])) { $nachzahlung=1; }
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_abzahlung (monat,jahr,grund,summe,zuschlag,mid)
|
||||
VALUES(
|
||||
'".$_POST['abz_monat']."',
|
||||
'".$_POST['abz_jahr']."',
|
||||
'".$_POST['abz_grund']."',
|
||||
'".$_POST['abz_summe']."',
|
||||
'".$nachzahlung."',
|
||||
'".$_POST['mid']."'
|
||||
)
|
||||
");
|
||||
|
||||
$ma_id=$_POST['mid'];
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']==1) {
|
||||
$_GET['vs']=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------- fertig setzten ---------------------------------
|
||||
if($_GET['vs']==5) {
|
||||
$savesumme=0;
|
||||
//------------------------- Grundlohn rechnen
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$savesumme=$savesumme+$row_ma['tarifg'];
|
||||
//------------------------- Tourlohn rechnen bei Tourpreis
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$row_ma['id']."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$savesumme=$savesumme+$row_td['tarif'];
|
||||
}
|
||||
//------------------------- Vorauszahlungen wieder abziehen - Nachzahlungen aufrechnen
|
||||
$nzahltest = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
if($nzahltest['num_rows']>0) {
|
||||
$nzahldaten = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
while($nzdaten = $nzahldaten->fetch_assoc()) {
|
||||
if($nzdaten['zuschlag']==1) {
|
||||
$savesumme=$savesumme+$nzdaten['summe'];
|
||||
} else {
|
||||
$savesumme=$savesumme-$nzdaten['summe'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- Kalenderstring erstellen.
|
||||
$tempx = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $kaldata=''; $dd=0;
|
||||
while($row = $tempx->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row_ma['id']."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
if($dd==0) {
|
||||
$kaldata=$kd['num_rows']." x ".$row['bez']; $dd++;
|
||||
} else {
|
||||
$kaldata=$kaldata.' ** '.$kd['num_rows']." x ".$row['bez'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- ist netto oder brutto
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$row_ma['tarifgtyp']."'");
|
||||
$netto= $tarifdaten['netto'];
|
||||
//------------------------- Infodata
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET glohn='".$savesumme."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET netto='".$netto."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET kaldata='".$kaldata."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=1 WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET geheim='".$row_ma['lohngeheim']."' WHERE id='".$testabfrage['id']."'");
|
||||
$fertig=1;
|
||||
}
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//---------------------------------------------- fertig löschen zurücksetzten ---------------------------------
|
||||
if($_GET['vs']==9) {
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=0 WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$_GET['id']."'");
|
||||
$fertig=9;
|
||||
}
|
||||
} // ende vs code GET
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
if(isset($_GET['id'])) {
|
||||
if($_GET['id']>0) {
|
||||
$lohn=0; $key=0; $kei=0; $fertig=0;
|
||||
//------------------------------------------------
|
||||
//------------------------------- Grundlohndaten -
|
||||
//------------------------------------------------
|
||||
$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_name=$ma_daten['name']; // name für anzeige
|
||||
$lgeheim=$ma_daten['lohngeheim'];
|
||||
//------------------------------------------------
|
||||
//------------------------ Gesamtlohspeicherung
|
||||
//------------------------------------------------
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$ma_id."'");
|
||||
if($testabfrage['num_rows']==0) { $fertig=9;
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$ma_daten['tarifgtyp']."'");
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_ges_lohn (monat,jahr,mid,netto,fertig)
|
||||
VALUES(
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_id."',
|
||||
'".$tarifdaten['netto']."',
|
||||
'".$fertig."'
|
||||
)
|
||||
");
|
||||
} else {
|
||||
if($testabfrage['fertig']==1) {
|
||||
$fertig=1;
|
||||
} else {
|
||||
$fertig=9;
|
||||
}
|
||||
$lohnanzeige=$testabfrage['glohn'];
|
||||
}
|
||||
|
||||
//--------------- Grundlohn laden
|
||||
$ma_gldaten = $GLOBALS['mysql']->query_single("SELECT * FROM ma_glohn WHERE monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($ma_gldaten['num_rows']==0) {
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_glohn (mid,monat,jahr,glohn)
|
||||
VALUES(
|
||||
'".$_GET['id']."',
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_daten['tarifg']."')
|
||||
");
|
||||
$ma_g_lohn=$ma_daten['tarifg']; //grundlohn aus Mitarbeiterdaten !!!!
|
||||
//------------------------------------------------------------------------------
|
||||
//----------- erstmaliges berechnen nach Vorgaben aus Tourdaten ----------------
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
$ds=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $ma_daten['id'];
|
||||
$ma_tk= $ma_daten['tarif'];
|
||||
//---------------------------------
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
$sonder1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND typ='".$row_td['typ']."'");
|
||||
if($sonder1['num_rows']>0) { $tourlohn=$sonder1['geld']; $tourh=$sonder1['stunden']; }
|
||||
$sonder2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND tour='".$row_td['tour']."'");
|
||||
if($sonder2['num_rows']>0) { $tourlohn=$sonder2['geld']; $tourh=$sonder2['stunden']; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
$ds++;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
} else {
|
||||
$ma_g_lohn=$ma_gldaten['glohn']; //grundlohn aus History !!!!
|
||||
}
|
||||
//------------------------------------------------ letzten 3 Grundlöhne -----------------------
|
||||
$ma_glohn = $GLOBALS['mysql']->query_array("SELECT * FROM ma_glohn WHERE mid='".$_GET['id']."' ORDER BY id DESC LIMIT 4");
|
||||
$template->assign('ma_glohn', $ma_glohn); //echo'<pre>'; print_r($ma_glohn); echo'</pre>';
|
||||
//------------------------------------------------------------------------------------------
|
||||
$ma_g_lohntyp=$ma_daten['tarifgtyp']; //grundlohn typ mindestlohn für pauschalkräfte
|
||||
$ma_g_lohn=$ma_daten['tarifg'];
|
||||
$ma_lohntyp=$ma_daten['tarif']; // lohntyp
|
||||
// $lohn=$row_td['tarif'];
|
||||
$typen = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row_tt = $typen->fetch_assoc()) {
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
$ldata[$kei]['wert']=$zaehler['num_rows']; // anzahl zeilen
|
||||
$ldata[$kei]['tt_tid']=$row_tt['tid'];
|
||||
$ldata[$kei]['name1']=$row_tt['tname'];
|
||||
$ldata[$kei]['name2']=$row_tt['tinfotitel'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0; $senddata= array();
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name2']=$tmpd['tour3'];
|
||||
|
||||
|
||||
$tarif_daten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$ma_daten['tarifgtyp']."'"); //ma-tariftyp
|
||||
if($tarif_daten['stunden']>0) {
|
||||
$zwischenlohn=$row_td['tarifh']*$_SESSION['slohn'];
|
||||
$senddata[$key]['lohn']=$zwischenlohn;
|
||||
$lohn=$lohn+($row_td['tarifh']*$_SESSION['slohn']);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$zwischenlohn."' WHERE id='".$row_td['id']."'"); ///////////////////////////////
|
||||
} else {
|
||||
$senddata[$key]['lohn']=$row_td['tarif'];
|
||||
$lohn=$lohn+$row_td['tarif'];
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
$ldata[$kei]['sdata']=$senddata;
|
||||
$kei++;
|
||||
}
|
||||
$template->assign('ma_daten', $ma_daten);
|
||||
|
||||
if(isset($tarif_daten)) { $template->assign('tarif_daten', $tarif_daten); }
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//--------------- zusammenfassung Planer
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $zz=0;
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$ma_id."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
// $zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=$row['bez'];
|
||||
$zz++;
|
||||
}
|
||||
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
if(isset($tmp)) { $template->assign('tmp', $tmp); }
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$ma_abz = $GLOBALS['mysql']->query_array("SELECT * FROM ma_abzahlung WHERE mid='".$ma_id."' ORDER BY jahr,monat");
|
||||
$template->assign('ma_abz', $ma_abz);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_g_lohn', $ma_g_lohn);
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_name);
|
||||
$template->assign('ldata', $ldata);
|
||||
$template->assign('lgeheim', $lgeheim);
|
||||
$template->assign('fertig', $fertig);
|
||||
$template->assign('senddata', $senddata);
|
||||
$template->assign('lohnanzeige', $lohnanzeige);
|
||||
|
||||
}
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND tarifgtyp!=99 ORDER BY name"); $key=0;
|
||||
while($rowdata = $temp1->fetch_assoc()) {
|
||||
$mitarbeiterlist[$key]['name']=$rowdata['name'];
|
||||
$mitarbeiterlist[$key]['id']=$rowdata['id'];
|
||||
$mitarbeiterlist[$key]['lohngeheim']=$rowdata['lohngeheim'];
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$rowdata['id']."'");
|
||||
if($testabfrage['num_rows']>0) { $mitarbeiterlist[$key]['fertig']=$testabfrage['fertig']; } else { $mitarbeiterlist[$key]['fertig']=0; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn2020.tpl'); //_list
|
||||
|
||||
?>
|
||||
350
scripts/a_lohn2020.php
Normal file
350
scripts/a_lohn2020.php
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=9.82;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
|
||||
if(isset($_GET['monat'])) {
|
||||
$monat=$_GET['monat'];
|
||||
$jahr=$_GET['jahr'];
|
||||
} else {
|
||||
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
//---------------------------------------------- Abzug Strafgelder etc. -------------------------------
|
||||
if(isset($_POST['abz_summe'])) {
|
||||
$nachzahlung=0;
|
||||
if(isset($_POST['nachzahlung'])) { $nachzahlung=1; }
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_abzahlung (monat,jahr,grund,summe,zuschlag,mid)
|
||||
VALUES(
|
||||
'".$_POST['abz_monat']."',
|
||||
'".$_POST['abz_jahr']."',
|
||||
'".$_POST['abz_grund']."',
|
||||
'".$_POST['abz_summe']."',
|
||||
'".$nachzahlung."',
|
||||
'".$_POST['mid']."'
|
||||
)
|
||||
");
|
||||
|
||||
$ma_id=$_POST['mid'];
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']==1) {
|
||||
$_GET['vs']=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------- fertig setzten ---------------------------------
|
||||
if($_GET['vs']==5) {
|
||||
$savesumme=0;
|
||||
//------------------------- Grundlohn rechnen
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$savesumme=$savesumme+$row_ma['tarifg'];
|
||||
//------------------------- Tourlohn rechnen bei Tourpreis
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$row_ma['id']."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$savesumme=$savesumme+$row_td['tarif'];
|
||||
}
|
||||
//------------------------- Vorauszahlungen wieder abziehen - Nachzahlungen aufrechnen
|
||||
$nzahltest = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
if($nzahltest['num_rows']>0) {
|
||||
$nzahldaten = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
while($nzdaten = $nzahldaten->fetch_assoc()) {
|
||||
if($nzdaten['zuschlag']==1) {
|
||||
$savesumme=$savesumme+$nzdaten['summe'];
|
||||
} else {
|
||||
$savesumme=$savesumme-$nzdaten['summe'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- Kalenderstring erstellen.
|
||||
$tempx = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $kaldata=''; $dd=0;
|
||||
while($row = $tempx->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row_ma['id']."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
if($dd==0) {
|
||||
$kaldata=$kd['num_rows']." x ".$row['bez']; $dd++;
|
||||
} else {
|
||||
$kaldata=$kaldata.' ** '.$kd['num_rows']." x ".$row['bez'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- ist netto oder brutto
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$row_ma['tarifgtyp']."'");
|
||||
$netto= $tarifdaten['netto'];
|
||||
//------------------------- Infodata
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET glohn='".$savesumme."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET netto='".$netto."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET kaldata='".$kaldata."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=1 WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET geheim='".$row_ma['lohngeheim']."' WHERE id='".$testabfrage['id']."'");
|
||||
$fertig=1;
|
||||
}
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//---------------------------------------------- fertig löschen zurücksetzten ---------------------------------
|
||||
if($_GET['vs']==9) {
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=0 WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$_GET['id']."'");
|
||||
$fertig=9;
|
||||
}
|
||||
} // ende vs code GET
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
if(isset($_GET['id'])) {
|
||||
if($_GET['id']>0) {
|
||||
$lohn=0; $key=0; $kei=0; $fertig=0;
|
||||
//------------------------------------------------
|
||||
//------------------------------- Grundlohndaten -
|
||||
//------------------------------------------------
|
||||
$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_name=$ma_daten['name']; // name für anzeige
|
||||
$lgeheim=$ma_daten['lohngeheim'];
|
||||
//------------------------------------------------
|
||||
//------------------------ Gesamtlohspeicherung
|
||||
//------------------------------------------------
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$ma_id."'");
|
||||
if($testabfrage['num_rows']==0) { $fertig=9;
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$ma_daten['tarifgtyp']."'");
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_ges_lohn (monat,jahr,mid,netto,fertig)
|
||||
VALUES(
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_id."',
|
||||
'".$tarifdaten['netto']."',
|
||||
'".$fertig."'
|
||||
)
|
||||
");
|
||||
} else {
|
||||
if($testabfrage['fertig']==1) {
|
||||
$fertig=1;
|
||||
} else {
|
||||
$fertig=9;
|
||||
}
|
||||
$lohnanzeige=$testabfrage['glohn'];
|
||||
}
|
||||
|
||||
//--------------- Grundlohn laden
|
||||
$ma_gldaten = $GLOBALS['mysql']->query_single("SELECT * FROM ma_glohn WHERE monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($ma_gldaten['num_rows']==0) {
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_glohn (mid,monat,jahr,glohn)
|
||||
VALUES(
|
||||
'".$_GET['id']."',
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_daten['tarifg']."')
|
||||
");
|
||||
$ma_g_lohn=$ma_daten['tarifg']; //grundlohn aus Mitarbeiterdaten !!!!
|
||||
//------------------------------------------------------------------------------
|
||||
//----------- erstmaliges berechnen nach Vorgaben aus Tourdaten ----------------
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
$ds=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $ma_daten['id'];
|
||||
$ma_tk= $ma_daten['tarif'];
|
||||
//---------------------------------
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
$sonder1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND typ='".$row_td['typ']."'");
|
||||
if($sonder1['num_rows']>0) { $tourlohn=$sonder1['geld']; $tourh=$sonder1['stunden']; }
|
||||
$sonder2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND tour='".$row_td['tour']."'");
|
||||
if($sonder2['num_rows']>0) { $tourlohn=$sonder2['geld']; $tourh=$sonder2['stunden']; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
$ds++;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
} else {
|
||||
$ma_g_lohn=$ma_gldaten['glohn']; //grundlohn aus History !!!!
|
||||
}
|
||||
//------------------------------------------------ letzten 3 Grundlöhne -----------------------
|
||||
$ma_glohn = $GLOBALS['mysql']->query_array("SELECT * FROM ma_glohn WHERE mid='".$_GET['id']."' ORDER BY id DESC LIMIT 4");
|
||||
$template->assign('ma_glohn', $ma_glohn); //echo'<pre>'; print_r($ma_glohn); echo'</pre>';
|
||||
//------------------------------------------------------------------------------------------
|
||||
$ma_g_lohntyp=$ma_daten['tarifgtyp']; //grundlohn typ mindestlohn für pauschalkräfte
|
||||
$ma_g_lohn=$ma_daten['tarifg'];
|
||||
$ma_lohntyp=$ma_daten['tarif']; // lohntyp
|
||||
// $lohn=$row_td['tarif'];
|
||||
$typen = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row_tt = $typen->fetch_assoc()) {
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
$ldata[$kei]['wert']=$zaehler['num_rows']; // anzahl zeilen
|
||||
$ldata[$kei]['tt_tid']=$row_tt['tid'];
|
||||
$ldata[$kei]['name1']=$row_tt['tname'];
|
||||
$ldata[$kei]['name2']=$row_tt['tinfotitel'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0; $senddata= array();
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name2']=$tmpd['tour3'];
|
||||
|
||||
|
||||
$tarif_daten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$ma_daten['tarifgtyp']."'"); //ma-tariftyp
|
||||
if($tarif_daten['stunden']>0) {
|
||||
$zwischenlohn=$row_td['tarifh']*$_SESSION['slohn'];
|
||||
$senddata[$key]['lohn']=$zwischenlohn;
|
||||
$lohn=$lohn+($row_td['tarifh']*$_SESSION['slohn']);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$zwischenlohn."' WHERE id='".$row_td['id']."'"); ///////////////////////////////
|
||||
} else {
|
||||
$senddata[$key]['lohn']=$row_td['tarif'];
|
||||
$lohn=$lohn+$row_td['tarif'];
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
$ldata[$kei]['sdata']=$senddata;
|
||||
$kei++;
|
||||
}
|
||||
$template->assign('ma_daten', $ma_daten);
|
||||
|
||||
if(isset($tarif_daten)) { $template->assign('tarif_daten', $tarif_daten); }
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//--------------- zusammenfassung Planer
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $zz=0;
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$ma_id."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
// $zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=$row['bez'];
|
||||
$zz++;
|
||||
}
|
||||
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
if(isset($tmp)) { $template->assign('tmp', $tmp); }
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$ma_abz = $GLOBALS['mysql']->query_array("SELECT * FROM ma_abzahlung WHERE mid='".$ma_id."' ORDER BY jahr,monat");
|
||||
$template->assign('ma_abz', $ma_abz);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_g_lohn', $ma_g_lohn);
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_name);
|
||||
$template->assign('ldata', $ldata);
|
||||
$template->assign('lgeheim', $lgeheim);
|
||||
$template->assign('fertig', $fertig);
|
||||
$template->assign('senddata', $senddata);
|
||||
$template->assign('lohnanzeige', $lohnanzeige);
|
||||
|
||||
}
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND tarifgtyp!=99 ORDER BY name"); $key=0;
|
||||
while($rowdata = $temp1->fetch_assoc()) {
|
||||
$mitarbeiterlist[$key]['name']=$rowdata['name'];
|
||||
$mitarbeiterlist[$key]['id']=$rowdata['id'];
|
||||
$mitarbeiterlist[$key]['lohngeheim']=$rowdata['lohngeheim'];
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$rowdata['id']."'");
|
||||
if($testabfrage['num_rows']>0) { $mitarbeiterlist[$key]['fertig']=$testabfrage['fertig']; } else { $mitarbeiterlist[$key]['fertig']=0; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn2020.tpl'); //_list
|
||||
|
||||
?>
|
||||
332
scripts/a_lohn2022.php
Normal file
332
scripts/a_lohn2022.php
Normal file
|
|
@ -0,0 +1,332 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=12.00;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr']; }
|
||||
} else {
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
//---------------------------------------------- Abzug Strafgelder etc. -------------------------------
|
||||
if(isset($_POST['abz_summe'])) {
|
||||
$nachzahlung=0;
|
||||
if(isset($_POST['nachzahlung'])) { $nachzahlung=1; }
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_abzahlung (monat,jahr,grund,summe,zuschlag,mid)
|
||||
VALUES(
|
||||
'".$_POST['abz_monat']."',
|
||||
'".$_POST['abz_jahr']."',
|
||||
'".$_POST['abz_grund']."',
|
||||
'".$_POST['abz_summe']."',
|
||||
'".$nachzahlung."',
|
||||
'".$_POST['mid']."'
|
||||
)
|
||||
");
|
||||
|
||||
$ma_id=$_POST['mid'];
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']==1) {
|
||||
$_GET['vs']=0;
|
||||
/*
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
*/
|
||||
|
||||
//$status[$key]['fahrer'] = $_SESSION['ma_all'][$row_anlage['user']]['name'];
|
||||
$ma_id= $_GET['id'];
|
||||
$ma_tk= $_SESSION['ma_all'][$_GET['id']]['tarif'];
|
||||
$inc_typ1= $_SESSION['ma_all'][$_GET['id']]['inc_typ1'];
|
||||
$inc_typ2= $_SESSION['ma_all'][$_GET['id']]['inc_typ2'];
|
||||
$inc_tour1= $_SESSION['ma_all'][$_GET['id']]['inc_tour1'];
|
||||
$inc_tour2= $_SESSION['ma_all'][$_GET['id']]['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' ORDER BY tag");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
//echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------- fertig setzten ---------------------------------
|
||||
if($_GET['vs']==5) {
|
||||
$savesumme=0;
|
||||
//------------------------- Grundlohn rechnen
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$savesumme=$savesumme+$row_ma['tarifg'];
|
||||
//------------------------- Tourlohn rechnen bei Tourpreis
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$row_ma['id']."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$savesumme=$savesumme+$row_td['tarif'];
|
||||
}
|
||||
//------------------------- Vorauszahlungen wieder abziehen - Nachzahlungen aufrechnen
|
||||
$nzahltest = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
if($nzahltest['num_rows']>0) {
|
||||
$nzahldaten = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
while($nzdaten = $nzahldaten->fetch_assoc()) {
|
||||
if($nzdaten['zuschlag']==1) {
|
||||
$savesumme=$savesumme+$nzdaten['summe'];
|
||||
} else {
|
||||
$savesumme=$savesumme-$nzdaten['summe'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- Kalenderstring erstellen.
|
||||
$tempx = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $kaldata=''; $dd=0;
|
||||
while($row = $tempx->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row_ma['id']."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
if($dd==0) {
|
||||
$kaldata=$kd['num_rows']." x ".$row['bez']; $dd++;
|
||||
} else {
|
||||
$kaldata=$kaldata.' ** '.$kd['num_rows']." x ".$row['bez'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- ist netto oder brutto
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$row_ma['tarifgtyp']."'");
|
||||
$netto= $tarifdaten['netto'];
|
||||
//------------------------- Infodata
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET glohn='".$savesumme."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET netto='".$netto."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET kaldata='".$kaldata."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=1 WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET geheim='".$row_ma['lohngeheim']."' WHERE id='".$testabfrage['id']."'");
|
||||
$fertig=1;
|
||||
}
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//---------------------------------------------- fertig löschen zurücksetzten ---------------------------------
|
||||
if($_GET['vs']==9) {
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=0 WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$_GET['id']."'");
|
||||
$fertig=9;
|
||||
}
|
||||
} // ende vs code GET
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// ********* Auslesen ****************************************************************************
|
||||
if(isset($_GET['id'])) {
|
||||
$lohn=0; $key=0; $kei=0; $fertig=0; $id=$_GET['id'];
|
||||
// --- Grunddaten
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_data['name'] = $_SESSION['ma_all'][$id]['name']; // name für anzeige
|
||||
$ma_data['geheim'] = $_SESSION['ma_all'][$id]['lohngeheim']; // geheim 1 / 0
|
||||
$ma_data['ttyp'] = $_SESSION['ma_all'][$id]['tariftyp']; // geheim 1 / 0
|
||||
|
||||
$monatstage = date("t",mktime(0, 0, 0,$monat,1,$jahr));
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
// $ts=mktime(0, 0, 0,$monat,$i,$jahr);
|
||||
$wt =date("w",mktime(8,8,8,$monat,$i,$jahr));
|
||||
$data[$i]['wt'] =$wt;
|
||||
$data[$i]['tag']=$i;
|
||||
if ($wt==0) { $data[$i]['tagbez']="So."; $data[$i]['taginfo']="Sonntag"; }
|
||||
if ($wt==1) { $data[$i]['tagbez']="Mo."; $data[$i]['taginfo']="Montag"; }
|
||||
if ($wt==2) { $data[$i]['tagbez']="Di."; $data[$i]['taginfo']="Dienstag"; }
|
||||
if ($wt==3) { $data[$i]['tagbez']="Mi."; $data[$i]['taginfo']="Mittwoch"; }
|
||||
if ($wt==4) { $data[$i]['tagbez']="Do."; $data[$i]['taginfo']="Donnerstag"; }
|
||||
if ($wt==5) { $data[$i]['tagbez']="Fr."; $data[$i]['taginfo']="Freitag"; }
|
||||
if ($wt==6) { $data[$i]['tagbez']="Sa."; $data[$i]['taginfo']="Samstag"; }
|
||||
|
||||
$ftag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' and monat='".$monat."' and jahr='".$jahr."' ");
|
||||
if($ftag['num_rows'] != 0) { $data[$i]['ft']=1; $data[$i]['taginfo']=$data[$i]['taginfo']." ".$ftag['info']; }
|
||||
|
||||
//--- GH --- 6 Tage
|
||||
// if ($ma_data['ttyp']==3) { }
|
||||
}
|
||||
// --- Tourdaten
|
||||
$tourx = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$id."' ORDER BY tag");
|
||||
$key=0; $day=1;
|
||||
while($row_td = $tourx->fetch_assoc()) {
|
||||
//$tdata[$key]['ws']=1;
|
||||
if ($row_td['tag']!=$day) {
|
||||
//$tdata[$key]['ws']=1;
|
||||
$data[$day]['tdata']=$tdata;
|
||||
$day=$row_td['tag'];
|
||||
$tdata=array(); $key=0;
|
||||
} else { $tdata[$key]['ws']=0; }
|
||||
if ($key==0) { $tdata[$key]['ws']=2; }
|
||||
$ztemp=0;
|
||||
$tdata[$key]['key'] =$key;
|
||||
$tdata[$key]['t_id']=$row_td['id'];
|
||||
$tdata[$key]['name']=$_SESSION['tour'][$row_td['tour']]['tour'];
|
||||
$wt2 =date("t",mktime(8,8,8,$monat,$day,$jahr));
|
||||
if ($wt2==0) { $ztemp=$row_td['lohn_h_0']; }
|
||||
if ($wt2==1) { $ztemp=$row_td['lohn_h_1']; }
|
||||
if ($wt2==2) { $ztemp=$row_td['lohn_h_2']; }
|
||||
if ($wt2==3) { $ztemp=$row_td['lohn_h_3']; }
|
||||
if ($wt2==4) { $ztemp=$row_td['lohn_h_4']; }
|
||||
if ($wt2==5) { $ztemp=$row_td['lohn_h_5']; }
|
||||
if ($wt2==6) { $ztemp=$row_td['lohn_h_6']; }
|
||||
if ($ztemp<1) { $ztemp=$_SESSION['tour'][$row_td['tour']]['tarifh']; }
|
||||
$tdata[$key]['tourh']=$ztemp;
|
||||
// stammtourprüfung
|
||||
if ($_SESSION['tour'][$row_td['tour']]['s_fahrer']==$id) { $tdata[$key]['stamm']=1; }
|
||||
// Tourentyp prüfung
|
||||
//echo "<pre>"; print_r($tdata); echo "</pre>";
|
||||
|
||||
$data[$day]['tdata']=$tdata;
|
||||
|
||||
|
||||
$key++;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
//------------------------
|
||||
$tt1=$row_td['time']-10000;
|
||||
$tt2=$row_td['time']+5000;
|
||||
$kl = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$ma_id."' and zeit>'".$tt1."' and zeit<'".$tt2."'");
|
||||
if($kl['num_rows']!=0) { $senddata[$key]['stime']=$kl['zeit']; }
|
||||
|
||||
$tt3=$row_td['time']+5000;
|
||||
$tt4=$row_td['time']+30000;
|
||||
$kl = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$ma_id."' and zeit>'".$tt3."' and zeit<'".$tt4."'");
|
||||
$senddata[$key]['etime']=$kl['zeit'];
|
||||
|
||||
$senddata[$key]['ezeit']=$row_td['time']+$_SESSION['tour'][$row_td['tour']]['zeit'];
|
||||
// echo $kl['zeit']."</br>";
|
||||
//-----------------------
|
||||
//$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name1']=$_SESSION['tour'][$row_td['tour']]['tour'];
|
||||
$senddata[$key]['name2']=$_SESSION['tour'][$row_td['tour']]['tour3'];
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if ($wt==1) { }
|
||||
|
||||
|
||||
if ($_SESSION['tour'][$id]['tariftyp']) { }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$template->assign('data', $data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
if(isset($tmp)) { $template->assign('tmp', $tmp); }
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$ma_abz = $GLOBALS['mysql']->query_array("SELECT * FROM ma_abzahlung WHERE mid='".$id."' ORDER BY jahr,monat");
|
||||
$template->assign('ma_abz', $ma_abz);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
|
||||
$template->assign('ma_id', $id);
|
||||
$template->assign('ma_g_lohn', $ma_g_lohn);
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_data['name']);
|
||||
$template->assign('ldata', $data); //ldata
|
||||
// echo "<pre>"; print_r($data); echo "</pre>";
|
||||
|
||||
$template->assign('lgeheim', $lgeheim);
|
||||
$template->assign('fertig', $fertig);
|
||||
$template->assign('senddata', $senddata);
|
||||
$template->assign('lohnanzeige', $lohnanzeige);
|
||||
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND tarifgtyp!=99 ORDER BY name"); $key=0;
|
||||
while($rowdata = $temp1->fetch_assoc()) {
|
||||
$mitarbeiterlist[$key]['name']=$rowdata['name'];
|
||||
$mitarbeiterlist[$key]['id']=$rowdata['id'];
|
||||
$mitarbeiterlist[$key]['lohngeheim']=$rowdata['lohngeheim'];
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$rowdata['id']."'");
|
||||
if($testabfrage['num_rows']>0) { $mitarbeiterlist[$key]['fertig']=$testabfrage['fertig']; } else { $mitarbeiterlist[$key]['fertig']=0; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn2022.tpl'); //_list
|
||||
|
||||
?>
|
||||
392
scripts/a_lohn2023.php
Normal file
392
scripts/a_lohn2023.php
Normal file
|
|
@ -0,0 +1,392 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=12.00;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
|
||||
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr']; }
|
||||
} else {
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
//---------------------------------------------- Abzug Strafgelder etc. -------------------------------
|
||||
if(isset($_POST['abz_summe'])) {
|
||||
$nachzahlung=0;
|
||||
if(isset($_POST['nachzahlung'])) { $nachzahlung=1; }
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_abzahlung (monat,jahr,grund,summe,zuschlag,mid)
|
||||
VALUES(
|
||||
'".$_POST['abz_monat']."',
|
||||
'".$_POST['abz_jahr']."',
|
||||
'".$_POST['abz_grund']."',
|
||||
'".$_POST['abz_summe']."',
|
||||
'".$nachzahlung."',
|
||||
'".$_POST['mid']."'
|
||||
)
|
||||
");
|
||||
|
||||
$ma_id=$_POST['mid'];
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']==1) {
|
||||
$_GET['vs']=0;
|
||||
/*
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
*/
|
||||
|
||||
//$status[$key]['fahrer'] = $_SESSION['ma_all'][$row_anlage['user']]['name'];
|
||||
$ma_id= $_GET['id'];
|
||||
$ma_tk= $_SESSION['ma_all'][$_GET['id']]['tarif'];
|
||||
$inc_typ1= $_SESSION['ma_all'][$_GET['id']]['inc_typ1'];
|
||||
$inc_typ2= $_SESSION['ma_all'][$_GET['id']]['inc_typ2'];
|
||||
$inc_tour1= $_SESSION['ma_all'][$_GET['id']]['inc_tour1'];
|
||||
$inc_tour2= $_SESSION['ma_all'][$_GET['id']]['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' ORDER BY tag");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
//echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------- fertig setzten ---------------------------------
|
||||
if($_GET['vs']==5) {
|
||||
$savesumme=0;
|
||||
//------------------------- Grundlohn rechnen
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$savesumme=$savesumme+$row_ma['tarifg'];
|
||||
//------------------------- Tourlohn rechnen bei Tourpreis
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$row_ma['id']."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$savesumme=$savesumme+$row_td['tarif'];
|
||||
}
|
||||
//------------------------- Vorauszahlungen wieder abziehen - Nachzahlungen aufrechnen
|
||||
$nzahltest = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
if($nzahltest['num_rows']>0) {
|
||||
$nzahldaten = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
while($nzdaten = $nzahldaten->fetch_assoc()) {
|
||||
if($nzdaten['zuschlag']==1) {
|
||||
$savesumme=$savesumme+$nzdaten['summe'];
|
||||
} else {
|
||||
$savesumme=$savesumme-$nzdaten['summe'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- Kalenderstring erstellen.
|
||||
$tempx = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $kaldata=''; $dd=0;
|
||||
while($row = $tempx->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row_ma['id']."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
if($dd==0) {
|
||||
$kaldata=$kd['num_rows']." x ".$row['bez']; $dd++;
|
||||
} else {
|
||||
$kaldata=$kaldata.' ** '.$kd['num_rows']." x ".$row['bez'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- ist netto oder brutto
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$row_ma['tarifgtyp']."'");
|
||||
$netto= $tarifdaten['netto'];
|
||||
//------------------------- Infodata
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET glohn='".$savesumme."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET netto='".$netto."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET kaldata='".$kaldata."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=1 WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET geheim='".$row_ma['lohngeheim']."' WHERE id='".$testabfrage['id']."'");
|
||||
$fertig=1;
|
||||
}
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//---------------------------------------------- fertig löschen zurücksetzten ---------------------------------
|
||||
if($_GET['vs']==9) {
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=0 WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$_GET['id']."'");
|
||||
$fertig=9;
|
||||
}
|
||||
} // ende vs code GET
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// ********* Auslesen ****************************************************************************
|
||||
if(isset($_GET['id'])) {
|
||||
$lohn=0; $key=0; $kei=0; $fertig=0;
|
||||
$id=$_GET['id'];
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$id."'");
|
||||
// --- Grunddaten ************************** überarteiten bzw löschen
|
||||
$ma_data['name'] = $_SESSION['ma_all'][$id]['name']; // name für anzeige
|
||||
$ma_data['geheim'] = $_SESSION['ma_all'][$id]['lohngeheim'];// geheim 1 / 0
|
||||
$ma_data['ttyp'] = $_SESSION['ma_all'][$id]['tariftyp']; // geheim 1 / 0
|
||||
$ma_data['wnlohn'] = $_SESSION['ma_all'][$id]['tarifg']; // geheim 1 / 0
|
||||
//$ma_data['kirche'] = $_SESSION['ma_all'][$id]['konfessionen']; // Kirchensteuer
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
// $z = $GLOBALS['mysql']->query_single("SELECT SUM(tarifh) As tarifh FROM tourenliste WHERE monat='".$monat."' and jahr='".$jahr."' and fahrer='".$id."' and typ in(3,4,5,17,18)");
|
||||
//$lkopf=
|
||||
|
||||
// echo "--------".$z['tarifh'];
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
||||
// *** Grundlohn auslesen und speichern *** nur einmal pro Monat
|
||||
$gl = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn_ges WHERE mid='".$id."' and monat='".$monat."' and jahr='".$jahr."'");
|
||||
if($gl['num_rows'] == 0) {
|
||||
$alter=$jahr-$ma['gebjahr'];
|
||||
if($ma_data['konfessionen']<1) { $kirche=$ma_data['konfessionen']; } else { $kirche=0; }
|
||||
// status &fertig fehlt noch
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_lohn_ges (mid,monat,jahr,glohn,kinder,kinderfb,kkzuschlag,steuerkl,jgang,kirche,grund_h,grund_n1,grund_n2)
|
||||
VALUES(
|
||||
'".$id."',
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma['tarifg']."',
|
||||
'".$ma['kinder']."',
|
||||
'".$ma['kinderfb']."',
|
||||
'".$ma['kkbeitrag']."',
|
||||
'".$ma['steuerkl']."',
|
||||
'".$alter."',
|
||||
'".$kirche."',
|
||||
'".$ma['grund_h']."',
|
||||
'".$ma['grund_n1']."',
|
||||
'".$ma['grund_n2']."')
|
||||
");
|
||||
$gldata['grund_h'] =$ma['grund_h'];
|
||||
$gldata['grund_n1']=$ma['grund_n1'];
|
||||
$gldata['grund_n2']=$ma['grund_n2'];
|
||||
//--------------------------------------
|
||||
//------- Stunden und Touren umschreiben in Tourenliste
|
||||
$gtd = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$id."'"); $key=0;
|
||||
while($row = $gtd->fetch_assoc()) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$_SESSION['tour'][$row['tour']]['tarifh']."' WHERE id='".$row['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifn1='".$_SESSION['tour'][$row['tour']]['tarifn1']."' WHERE id='".$row['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifn2='".$_SESSION['tour'][$row['tour']]['tarifn2']."' WHERE id='".$row['id']."'");
|
||||
// echo $_SESSION['tour'][$row['tour']]['tarifh']."</br>";
|
||||
|
||||
}
|
||||
//---------------------------------------
|
||||
} else {
|
||||
$gldata['grund_h'] =$gl['grund_h'];
|
||||
$gldata['grund_n1']=$gl['grund_n1'];
|
||||
$gldata['grund_n2']=$gl['grund_n2'];
|
||||
}
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$monatstage = date("t",mktime(0, 0, 0,$monat,1,$jahr));
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
// $ts=mktime(0, 0, 0,$monat,$i,$jahr);
|
||||
$wt =date("w",mktime(8,8,8,$monat,$i,$jahr));
|
||||
$data[$i]['wt'] =$wt;
|
||||
$data[$i]['tag']=$i;
|
||||
if ($wt==0) { $data[$i]['tagbez']="So."; $data[$i]['taginfo']="Sonntag"; }
|
||||
if ($wt==1) { $data[$i]['tagbez']="Mo."; $data[$i]['taginfo']="Montag"; }
|
||||
if ($wt==2) { $data[$i]['tagbez']="Di."; $data[$i]['taginfo']="Dienstag"; }
|
||||
if ($wt==3) { $data[$i]['tagbez']="Mi."; $data[$i]['taginfo']="Mittwoch"; }
|
||||
if ($wt==4) { $data[$i]['tagbez']="Do."; $data[$i]['taginfo']="Donnerstag"; }
|
||||
if ($wt==5) { $data[$i]['tagbez']="Fr."; $data[$i]['taginfo']="Freitag"; }
|
||||
if ($wt==6) { $data[$i]['tagbez']="Sa."; $data[$i]['taginfo']="Samstag"; }
|
||||
|
||||
$ftag = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' and monat='".$monat."' and jahr='".$jahr."' ");
|
||||
if($ftag['num_rows'] != 0) { $data[$i]['ft']=1; $data[$i]['taginfo']=$data[$i]['taginfo']." ".$ftag['info']; }
|
||||
|
||||
//--- GH --- 6 Tage
|
||||
// if ($ma_data['ttyp']==3) { }
|
||||
}
|
||||
// --- Tourdaten
|
||||
$tourx = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$id."' ORDER BY tag");
|
||||
$key=0; $day=1;
|
||||
while($row_td = $tourx->fetch_assoc()) {
|
||||
//$tdata[$key]['ws']=1;
|
||||
if ($row_td['tag']!=$day) {
|
||||
//$tdata[$key]['ws']=1;
|
||||
$data[$day]['tdata']=$tdata;
|
||||
$day=$row_td['tag'];
|
||||
$tdata=array(); $key=0;
|
||||
} else { $tdata[$key]['ws']=0; }
|
||||
if ($key==0) { $tdata[$key]['ws']=2; }
|
||||
$ztemp=0;
|
||||
$tdata[$key]['key'] =$key;
|
||||
$tdata[$key]['t_id']=$row_td['id'];
|
||||
$tdata[$key]['name']=$_SESSION['tour'][$row_td['tour']]['tour'];
|
||||
$wt2 =date("t",mktime(8,8,8,$monat,$day,$jahr));
|
||||
if ($wt2==0) { $ztemp=$row_td['lohn_h_0']; }
|
||||
if ($wt2==1) { $ztemp=$row_td['lohn_h_1']; }
|
||||
if ($wt2==2) { $ztemp=$row_td['lohn_h_2']; }
|
||||
if ($wt2==3) { $ztemp=$row_td['lohn_h_3']; }
|
||||
if ($wt2==4) { $ztemp=$row_td['lohn_h_4']; }
|
||||
if ($wt2==5) { $ztemp=$row_td['lohn_h_5']; }
|
||||
if ($wt2==6) { $ztemp=$row_td['lohn_h_6']; }
|
||||
if ($ztemp<1) { $ztemp=$_SESSION['tour'][$row_td['tour']]['tarifh']; }
|
||||
$tdata[$key]['tourh']=$ztemp;
|
||||
// stammtourprüfung
|
||||
if ($_SESSION['tour'][$row_td['tour']]['s_fahrer']==$id) { $tdata[$key]['stamm']=1; }
|
||||
// Tourentyp prüfung
|
||||
//echo "<pre>"; print_r($tdata); echo "</pre>";
|
||||
|
||||
$data[$day]['tdata']=$tdata;
|
||||
|
||||
|
||||
$key++;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
//------------------------
|
||||
$tt1=$row_td['time']-10000;
|
||||
$tt2=$row_td['time']+5000;
|
||||
$kl = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$ma_id."' and zeit>'".$tt1."' and zeit<'".$tt2."'");
|
||||
if($kl['num_rows']!=0) { $senddata[$key]['stime']=$kl['zeit']; }
|
||||
|
||||
$tt3=$row_td['time']+5000;
|
||||
$tt4=$row_td['time']+30000;
|
||||
$kl = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$ma_id."' and zeit>'".$tt3."' and zeit<'".$tt4."'");
|
||||
$senddata[$key]['etime']=$kl['zeit'];
|
||||
|
||||
$senddata[$key]['ezeit']=$row_td['time']+$_SESSION['tour'][$row_td['tour']]['zeit'];
|
||||
// echo $kl['zeit']."</br>";
|
||||
//-----------------------
|
||||
//$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name1']=$_SESSION['tour'][$row_td['tour']]['tour'];
|
||||
$senddata[$key]['name2']=$_SESSION['tour'][$row_td['tour']]['tour3'];
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if ($wt==1) { }
|
||||
|
||||
|
||||
if ($_SESSION['tour'][$id]['tariftyp']) { }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$template->assign('data', $data);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($gldata); echo "</pre>";
|
||||
if(isset($tmp)) { $template->assign('tmp', $tmp); }
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$ma_abz = $GLOBALS['mysql']->query_array("SELECT * FROM ma_abzahlung WHERE mid='".$id."' ORDER BY jahr,monat");
|
||||
$template->assign('ma_abz', $ma_abz);
|
||||
$template->assign('ma', $ma);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
|
||||
$template->assign('ma_id', $id);
|
||||
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_data['name']);
|
||||
$template->assign('ma_g_lohn', $ma_data['wnlohn']);
|
||||
$template->assign('ldata', $data); //ldata
|
||||
$template->assign('gdata', $gldata); //ldata
|
||||
// echo "<pre>"; print_r($data); echo "</pre>";
|
||||
|
||||
$template->assign('lgeheim', $lgeheim);
|
||||
$template->assign('fertig', $fertig);
|
||||
$template->assign('senddata', $senddata);
|
||||
$template->assign('lohnanzeige', $lohnanzeige);
|
||||
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND tarifgtyp!=99 ORDER BY name"); $key=0;
|
||||
while($rowdata = $temp1->fetch_assoc()) {
|
||||
$mitarbeiterlist[$key]['name']=$rowdata['name'];
|
||||
$mitarbeiterlist[$key]['id']=$rowdata['id'];
|
||||
$mitarbeiterlist[$key]['lohngeheim']=$rowdata['lohngeheim'];
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$rowdata['id']."'");
|
||||
if($testabfrage['num_rows']>0) { $mitarbeiterlist[$key]['fertig']=$testabfrage['fertig']; } else { $mitarbeiterlist[$key]['fertig']=0; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn2023.tpl'); //_list
|
||||
|
||||
?>
|
||||
381
scripts/a_lohn2023_loeschen.php
Normal file
381
scripts/a_lohn2023_loeschen.php
Normal file
|
|
@ -0,0 +1,381 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=12.00;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr']; }
|
||||
} else {
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
//---------------------------------------------- Abzug Strafgelder etc. -------------------------------
|
||||
if(isset($_POST['abz_summe'])) {
|
||||
$nachzahlung=0;
|
||||
if(isset($_POST['nachzahlung'])) { $nachzahlung=1; }
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_abzahlung (monat,jahr,grund,summe,zuschlag,mid)
|
||||
VALUES(
|
||||
'".$_POST['abz_monat']."',
|
||||
'".$_POST['abz_jahr']."',
|
||||
'".$_POST['abz_grund']."',
|
||||
'".$_POST['abz_summe']."',
|
||||
'".$nachzahlung."',
|
||||
'".$_POST['mid']."'
|
||||
)
|
||||
");
|
||||
|
||||
$ma_id=$_POST['mid'];
|
||||
}
|
||||
|
||||
//---------------------------------------------- berechnung lohnlauf ---------------------------------
|
||||
if(isset($_GET['vs'])) {
|
||||
if($_GET['vs']==1) {
|
||||
$_GET['vs']=0;
|
||||
/*
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
*/
|
||||
|
||||
//$status[$key]['fahrer'] = $_SESSION['ma_all'][$row_anlage['user']]['name'];
|
||||
$ma_id= $_GET['id'];
|
||||
$ma_tk= $_SESSION['ma_all'][$_GET['id']]['tarif'];
|
||||
$inc_typ1= $_SESSION['ma_all'][$_GET['id']]['inc_typ1'];
|
||||
$inc_typ2= $_SESSION['ma_all'][$_GET['id']]['inc_typ2'];
|
||||
$inc_tour1= $_SESSION['ma_all'][$_GET['id']]['inc_tour1'];
|
||||
$inc_tour2= $_SESSION['ma_all'][$_GET['id']]['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' ORDER BY tag");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND tour='".$row_td['tour']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['id']."' AND typ='".$row_td['typ']."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------- fertig setzten ---------------------------------
|
||||
if($_GET['vs']==5) {
|
||||
$savesumme=0;
|
||||
//------------------------- Grundlohn rechnen
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$savesumme=$savesumme+$row_ma['tarifg'];
|
||||
//------------------------- Tourlohn rechnen bei Tourpreis
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$row_ma['id']."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$savesumme=$savesumme+$row_td['tarif'];
|
||||
}
|
||||
//------------------------- Vorauszahlungen wieder abziehen - Nachzahlungen aufrechnen
|
||||
$nzahltest = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
if($nzahltest['num_rows']>0) {
|
||||
$nzahldaten = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
while($nzdaten = $nzahldaten->fetch_assoc()) {
|
||||
if($nzdaten['zuschlag']==1) {
|
||||
$savesumme=$savesumme+$nzdaten['summe'];
|
||||
} else {
|
||||
$savesumme=$savesumme-$nzdaten['summe'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- Kalenderstring erstellen.
|
||||
$tempx = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $kaldata=''; $dd=0;
|
||||
while($row = $tempx->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row_ma['id']."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
if($dd==0) {
|
||||
$kaldata=$kd['num_rows']." x ".$row['bez']; $dd++;
|
||||
} else {
|
||||
$kaldata=$kaldata.' ** '.$kd['num_rows']." x ".$row['bez'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//------------------------- ist netto oder brutto
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$row_ma['tarifgtyp']."'");
|
||||
$netto= $tarifdaten['netto'];
|
||||
//------------------------- Infodata
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row_ma['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET glohn='".$savesumme."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET netto='".$netto."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET kaldata='".$kaldata."' WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=1 WHERE id='".$testabfrage['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET geheim='".$row_ma['lohngeheim']."' WHERE id='".$testabfrage['id']."'");
|
||||
$fertig=1;
|
||||
}
|
||||
|
||||
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//---------------------------------------------- fertig löschen zurücksetzten ---------------------------------
|
||||
if($_GET['vs']==9) {
|
||||
$GLOBALS['mysql']->insert("UPDATE ma_ges_lohn SET fertig=0 WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$_GET['id']."'");
|
||||
$fertig=9;
|
||||
}
|
||||
} // ende vs code GET
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
if(isset($_GET['id'])) {
|
||||
if($_GET['id']>0) {
|
||||
$lohn=0; $key=0; $kei=0; $fertig=0;
|
||||
//------------------------------------------------
|
||||
//------------------------------- Grundlohndaten -
|
||||
//------------------------------------------------
|
||||
//$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_name=$_SESSION['ma_all'][$_GET['id']]['name']; // name für anzeige
|
||||
$lgeheim=$_SESSION['ma_all'][$_GET['id']]['lohngeheim'];
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
//------------------------ Gesamtlohspeicherung
|
||||
//------------------------------------------------
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$ma_id."'");
|
||||
if($testabfrage['num_rows']==0) { $fertig=9;
|
||||
$tarifdaten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$_SESSION['ma_all'][$_GET['id']]['tarifgtyp']."'");
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_ges_lohn (monat,jahr,mid,netto,fertig)
|
||||
VALUES(
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$ma_id."',
|
||||
'".$tarifdaten['netto']."',
|
||||
'".$fertig."'
|
||||
)
|
||||
");
|
||||
} else {
|
||||
if($testabfrage['fertig']==1) {
|
||||
$fertig=1;
|
||||
} else {
|
||||
$fertig=9;
|
||||
}
|
||||
$lohnanzeige=$testabfrage['glohn'];
|
||||
}
|
||||
|
||||
//--------------- Grundlohn laden
|
||||
$ma_gldaten = $GLOBALS['mysql']->query_single("SELECT * FROM ma_glohn WHERE monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($ma_gldaten['num_rows']==0) {
|
||||
$GLOBALS['mysql']->insert("INSERT INTO ma_glohn (mid,monat,jahr,glohn)
|
||||
VALUES(
|
||||
'".$_GET['id']."',
|
||||
'".$monat."',
|
||||
'".$jahr."',
|
||||
'".$_SESSION['ma_all'][$_GET['id']]['tarifg']."')
|
||||
");
|
||||
$ma_g_lohn=$_SESSION['ma_all'][$_GET['id']]['tarifg']; //grundlohn aus Mitarbeiterdaten !!!!
|
||||
//------------------------------------------------------------------------------
|
||||
//----------- erstmaliges berechnen nach Vorgaben aus Tourdaten ----------------
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
$ds=0;
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id= $ma_daten['id'];
|
||||
$ma_tk= $ma_daten['tarif'];
|
||||
//---------------------------------
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
$sonder1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND typ='".$row_td['typ']."'");
|
||||
if($sonder1['num_rows']>0) { $tourlohn=$sonder1['geld']; $tourh=$sonder1['stunden']; }
|
||||
$sonder2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$ma_id."' AND tour='".$row_td['tour']."'");
|
||||
if($sonder2['num_rows']>0) { $tourlohn=$sonder2['geld']; $tourh=$sonder2['stunden']; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
$ds++;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
} else {
|
||||
$ma_g_lohn=$ma_gldaten['glohn']; //grundlohn aus History !!!!
|
||||
}
|
||||
//------------------------------------------------ letzten 3 Grundlöhne -----------------------
|
||||
$ma_glohn = $GLOBALS['mysql']->query_array("SELECT * FROM ma_glohn WHERE mid='".$_GET['id']."' ORDER BY id DESC LIMIT 4");
|
||||
$template->assign('ma_glohn', $ma_glohn); //echo'<pre>'; print_r($ma_glohn); echo'</pre>';
|
||||
//------------------------------------------------------------------------------------------
|
||||
$ma_g_lohntyp=$_SESSION['ma_all'][$_GET['id']]['tarifgtyp']; //grundlohn typ mindestlohn für pauschalkräfte
|
||||
$ma_g_lohn=$_SESSION['ma_all'][$_GET['id']]['tarifg'];
|
||||
$ma_lohntyp=$_SESSION['ma_all'][$_GET['id']]['tarif']; // lohntyp
|
||||
// $lohn=$row_td['tarif'];
|
||||
$typen = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row_tt = $typen->fetch_assoc()) {
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
|
||||
|
||||
|
||||
$ldata[$kei]['wert']=$zaehler['num_rows']; // anzahl zeilen
|
||||
$ldata[$kei]['tt_tid']=$row_tt['tid'];
|
||||
$ldata[$kei]['name1']=$row_tt['tname'];
|
||||
$ldata[$kei]['name2']=$row_tt['tinfotitel'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$_GET['id']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0; $senddata= array();
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$senddata[$key]['tid']=$row_td['id'];
|
||||
$senddata[$key]['astunden']=$row_td['tarifh'];
|
||||
$senddata[$key]['time']=$row_td['time'];
|
||||
//------------------------
|
||||
$tt1=$row_td['time']-10000;
|
||||
$tt2=$row_td['time']+5000;
|
||||
$kl = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$ma_id."' and zeit>'".$tt1."' and zeit<'".$tt2."'");
|
||||
if($kl['num_rows']!=0) { $senddata[$key]['stime']=$kl['zeit']; }
|
||||
|
||||
$tt3=$row_td['time']+5000;
|
||||
$tt4=$row_td['time']+30000;
|
||||
$kl = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$ma_id."' and zeit>'".$tt3."' and zeit<'".$tt4."'");
|
||||
$senddata[$key]['etime']=$kl['zeit'];
|
||||
|
||||
$senddata[$key]['ezeit']=$row_td['time']+$_SESSION['tour'][$row_td['tour']]['zeit'];
|
||||
// echo $kl['zeit']."</br>";
|
||||
//-----------------------
|
||||
//$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//$senddata[$key]['name1']=$tmpd['tour'];
|
||||
$senddata[$key]['name1']=$_SESSION['tour'][$row_td['tour']]['tour'];
|
||||
$senddata[$key]['name2']=$_SESSION['tour'][$row_td['tour']]['tour3'];
|
||||
//$senddata[$key]['name2']=$tmpd['tour3'];
|
||||
|
||||
|
||||
$tarif_daten = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$_SESSION[$_GET['id']]['tarifgtyp']."'"); //ma-tariftyp
|
||||
if($tarif_daten['stunden']>0) {
|
||||
$zwischenlohn=$row_td['tarifh']*$_SESSION['slohn'];
|
||||
$senddata[$key]['lohn']=$zwischenlohn;
|
||||
$lohn=$lohn+($row_td['tarifh']*$_SESSION['slohn']);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$zwischenlohn."' WHERE id='".$row_td['id']."'"); ///////////////////////////////
|
||||
} else {
|
||||
$senddata[$key]['lohn']=$row_td['tarif'];
|
||||
$lohn=$lohn+$row_td['tarif'];
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
$ldata[$kei]['sdata']=$senddata;
|
||||
$kei++;
|
||||
}
|
||||
//$template->assign('ma_daten', $ma_daten);
|
||||
|
||||
if(isset($tarif_daten)) { $template->assign('tarif_daten', $tarif_daten); }
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//--------------- zusammenfassung Planer
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $zz=0;
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$ma_id."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
// $zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=$row['bez'];
|
||||
$zz++;
|
||||
}
|
||||
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
if(isset($tmp)) { $template->assign('tmp', $tmp); }
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$tariftyp = $GLOBALS['mysql']->query_array("SELECT * FROM tariftyp WHERE aktiv>0 ORDER BY id");
|
||||
$template->assign('tariftyp', $tariftyp);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$ma_abz = $GLOBALS['mysql']->query_array("SELECT * FROM ma_abzahlung WHERE mid='".$ma_id."' ORDER BY jahr,monat");
|
||||
$template->assign('ma_abz', $ma_abz);
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
$template->assign('ma_lohntyp', $ma_lohntyp);
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_g_lohn', $ma_g_lohn);
|
||||
$template->assign('ma_g_lohntyp', $ma_g_lohntyp);
|
||||
$template->assign('ma_name', $ma_name);
|
||||
$template->assign('ldata', $ldata);
|
||||
$template->assign('lgeheim', $lgeheim);
|
||||
$template->assign('fertig', $fertig);
|
||||
$template->assign('senddata', $senddata);
|
||||
$template->assign('lohnanzeige', $lohnanzeige);
|
||||
|
||||
}
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND tarifgtyp!=99 ORDER BY name"); $key=0;
|
||||
while($rowdata = $temp1->fetch_assoc()) {
|
||||
$mitarbeiterlist[$key]['name']=$rowdata['name'];
|
||||
$mitarbeiterlist[$key]['id']=$rowdata['id'];
|
||||
$mitarbeiterlist[$key]['lohngeheim']=$rowdata['lohngeheim'];
|
||||
$testabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$rowdata['id']."'");
|
||||
if($testabfrage['num_rows']>0) { $mitarbeiterlist[$key]['fertig']=$testabfrage['fertig']; } else { $mitarbeiterlist[$key]['fertig']=0; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
|
||||
//$template->assign('ma_lohn', $ma_lohn);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
|
||||
$template->assign('content', 'tpl/a_lohn2023.tpl'); //_list
|
||||
|
||||
?>
|
||||
56
scripts/a_lohnlauf.php
Normal file
56
scripts/a_lohnlauf.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
// error_reporting(E_ALL);
|
||||
// ini_set('display_errors', 1);
|
||||
|
||||
// echo "<pre>";
|
||||
// print_r($tour_id);
|
||||
// echo "</pre>";
|
||||
|
||||
$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
$ds=0;
|
||||
|
||||
|
||||
|
||||
$madaten = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter");
|
||||
while($row_ma = $madaten->fetch_assoc()) {
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
$ds++;
|
||||
}
|
||||
}
|
||||
$mitarbeiterlist = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<90 ORDER BY name");
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('ds', $ds);
|
||||
$template->assign('content', 'tpl/a_lohn.tpl'); //_list
|
||||
|
||||
?>
|
||||
78
scripts/a_lohnlauf2.php
Normal file
78
scripts/a_lohnlauf2.php
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
|
||||
//--------------------------------------------- lohnlauf einzelner Mitarbeiter
|
||||
|
||||
// error_reporting(E_ALL);
|
||||
// ini_set('display_errors', 1);
|
||||
|
||||
// echo "<pre>";
|
||||
// print_r($tour_id);
|
||||
// echo "</pre>";
|
||||
|
||||
//$tjahr = (int)date('Y'); $tmonat = (int)date('m');
|
||||
//if($tmonat==1) { $monat=12; $jahr=$tjahr-1;} else { $monat=$tmonat-1; $jahr=$tjahr;}
|
||||
|
||||
$monat=$_GET['monat'];
|
||||
$jahr=$_GET['jahr'];
|
||||
|
||||
$ds=0;
|
||||
|
||||
|
||||
$row_ma = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$ma_id= $row_ma['id'];
|
||||
$ma_tk= $row_ma['tarif'];
|
||||
$inc_typ1= $row_ma['inc_typ1'];
|
||||
$inc_typ2= $row_ma['inc_typ2'];
|
||||
$inc_tour1= $row_ma['inc_tour1'];
|
||||
$inc_tour2= $row_ma['inc_tour2'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."'");
|
||||
while($row_td = $tdaten->fetch_assoc()) {
|
||||
$tour_id=$row_td['id'];
|
||||
$leer=$row_td['tarif'];
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_td['tour']."'");
|
||||
//---------- bug
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET utyp='".$tmpd['utyp']."' WHERE id='".$tour_id."'");
|
||||
//----------
|
||||
echo $row_id; //------------------------------- test anzeige
|
||||
|
||||
$tmpx1 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['ma']."' AND typ='".$row_td['typ']."' ");
|
||||
$tmpx2 = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn WHERE mid='".$_GET['ma']."' AND tour='".$tour_id."' ");
|
||||
if($tmpx1['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx1['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx1['stunden']."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
elseif($tmpx2['num_rows']>0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpx2['geld']."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tmpx2['stunden']."' WHERE id='".$tour_id."'");
|
||||
echo $row_id;
|
||||
} else {
|
||||
//---------- bug ende
|
||||
if ($ma_tk==0) { $tourlohn=$tmpd['tarif0']; }
|
||||
if ($ma_tk==1) { $tourlohn=$tmpd['tarif1']; }
|
||||
if ($ma_tk==2) { $tourlohn=$tmpd['tarif2']; }
|
||||
if ($ma_tk==3) { $tourlohn=$tmpd['tarif3']; }
|
||||
if ($ma_tk==4) { $tourlohn=$tmpd['tarif4']; }
|
||||
$tourh=$tmpd['tarifh'];
|
||||
if ($inc_typ1 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_typ2 ==$row_td['typ']) { $tourlohn=0; }
|
||||
if ($inc_tour1==$row_td['tour']) { $tourlohn=0; }
|
||||
if ($inc_tour2==$row_td['tour']) { $tourlohn=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tourlohn."' WHERE id='".$tour_id."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarifh='".$tourh."' WHERE id='".$tour_id."'");
|
||||
}
|
||||
$ds++;
|
||||
}
|
||||
$mitarbeiterlist = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<90 ORDER BY name");
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('ds', $ds);
|
||||
$template->assign('content', 'tpl/a_lohn.tpl'); //_list
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
796
scripts/a_lohnpdf.php
Normal file
796
scripts/a_lohnpdf.php
Normal file
|
|
@ -0,0 +1,796 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,utf8_decode($fahrer['name']),'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Write(3,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(3,"\n"); $summe=0;
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Mitarbeiterdaten",'1','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0');
|
||||
$pdf->Cell(80,5,"Festvertrag Fahrdaten",'1','1','L','1'); $pdf->Write(3,"\n");
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 1 // Festdaten !!!!!!!!!! Anzahl Nachttage
|
||||
$pdf->Cell(40,4,("Name:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['name'])),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($nachttage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Nachttage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 2 // Festdaten !!!!!!!!!! Anzahl post
|
||||
$pdf->Cell(40,4,("Strasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['strasse'])),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($pintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Post-Tage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Di.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 3 // Festdaten !!!!!!!!!! Anzahl rtour
|
||||
$pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');$pdf->SetFont('Courier','B',10);$pdf->Cell(60,4,(utf8_decode($fahrer['plz'])." ".utf8_decode($fahrer['ort'])),'0','0','L','0');$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($rpintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" RTourtage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Fr.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 4 feiertage
|
||||
$pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['handy']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($aft." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Feiertage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 5 - 2. spalte leer !!!!!!!!!!
|
||||
$pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['festnetz']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 6
|
||||
$pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Typrechnung soll / ist",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 7
|
||||
$pdf->Cell(40,4,("Eintritt:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-----------
|
||||
|
||||
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//-------- zeile 8
|
||||
$pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerid']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($zaehler." x"),'0','0','R','0'); $pdf->Cell(50,4,(" gefahren - soll Touren: "),'0','0','L','0'); $pdf->Cell(20,4,($solltage." x"),'0','1','R','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 9
|
||||
$pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['svnummer']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 10
|
||||
$pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kkasse']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Eintrag im Kalender",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 11
|
||||
$pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kkassennr']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez']." x";
|
||||
$tmp[$zz]['m']=1;
|
||||
}
|
||||
}
|
||||
//---------------------------- leerzeile
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=$kg['bez'];
|
||||
$tmp[$zz]['c']=$row['info'];
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0;
|
||||
//-------- zeile 12
|
||||
$pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerkl']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(50,4,(utf8_decode($tmp[$za]['b'])),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,(utf8_decode($tmp[$za]['b'])),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 13
|
||||
$pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kinderfb']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 14
|
||||
$pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['iban']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 15
|
||||
$pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['BIC']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 16
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 17
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnzusammenfassung",'1','0','L','1'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 18
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-----------------------
|
||||
//--------------- Lohn
|
||||
//-----------------------
|
||||
|
||||
//-------- zeile 19 ** Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$gtage=27-$fahrer['eintag']; $glohn=($fahrer['tarifg']/26); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($gtage." Tage"),'0','0','L','0'); $pdf->Cell(30,5,($glohn.".00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
} else { $glohn=$fahrer['tarifg'];
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
}
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($fahrer['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
|
||||
//-------- zeile 20
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 21
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 22
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 23
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 25
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 26
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 42 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 43 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 44 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 45 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 46 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 47 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 48 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 49 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 50 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}/*
|
||||
//-------- zeile 51 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++; ;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 52 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 53 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']==0) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 53 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}}
|
||||
if($ma_minus['num_rows']==1) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
if($ma_minus['num_rows']==2) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------- zeile summe ** Gesamtsumme
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnvorschlag",'1','1','L','1');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
// $pdf->Cell(100,5," ",'0','1','L','0');
|
||||
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
|
||||
//if($stundenanzeige>0) {
|
||||
// $pdf->Cell(10,4,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0');
|
||||
// $pdf->Cell(70,5,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
//}
|
||||
//zwischensumme
|
||||
$pdf->Cell(70,5,("Zwischenumme: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0'); $glohn=$glohn-$minuslohn;
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
// $glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe: "),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
766
scripts/a_lohnpdf2018.php
Normal file
766
scripts/a_lohnpdf2018.php
Normal file
|
|
@ -0,0 +1,766 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',1);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',10);
|
||||
$this->SetFillColor(70,130,180);
|
||||
$this->SetTextColor(255,255,250);
|
||||
$this->Cell(100,5,utf8_decode("Lohnvorschläge aus EDV"),'0','0','L','1');
|
||||
$this->Cell(10,5," ",'0','0','L','0');
|
||||
$this->Cell(15,5,$_GET['monat']."/".$_GET['jahr'],'0','1','R','1');
|
||||
$this->Image('template/images/jb_transparent.png', 135, 5);
|
||||
$this->Write(3,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(3,"\n"); $summe=0;
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Mitarbeiterdaten",'1','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0');
|
||||
$pdf->Cell(80,5,"Festvertrag Fahrdaten",'1','1','L','1'); $pdf->Write(3,"\n");
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
//$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
|
||||
//$pdf->Cell(85,8,$fahrer['name'],'0','0','L','0');
|
||||
|
||||
|
||||
|
||||
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 1 // Festdaten !!!!!!!!!! Anzahl Nachttage
|
||||
$pdf->Cell(40,4,("Name:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['name']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($nachttage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Nachttage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 2 // Festdaten !!!!!!!!!! Anzahl post
|
||||
$pdf->Cell(40,4,("Strasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['strasse']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($pintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Post-Tage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Di.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 3 // Festdaten !!!!!!!!!! Anzahl rtour
|
||||
$pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');$pdf->SetFont('Courier','B',10);$pdf->Cell(60,4,($fahrer['plz']." ".$fahrer['ort']),'0','0','L','0');$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($rpintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" RTourtage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Fr.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 4 feiertage
|
||||
$pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['handy']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($aft." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Feiertage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 5 - 2. spalte leer !!!!!!!!!!
|
||||
$pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['festnetz']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 6
|
||||
$pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Typrechnung soll / ist",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 7
|
||||
$pdf->Cell(40,4,("Eintritt:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-----------
|
||||
|
||||
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//-------- zeile 8
|
||||
$pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerid']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($zaehler." x"),'0','0','R','0'); $pdf->Cell(50,4,(" gefahren - soll Touren: "),'0','0','L','0'); $pdf->Cell(20,4,($solltage." x"),'0','1','R','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 9
|
||||
$pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['svnummer']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 10
|
||||
$pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kkasse']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Eintrag im Kalender",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 11
|
||||
$pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kkassennr']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez']." x";
|
||||
}
|
||||
}
|
||||
//---------------------------- leerzeile
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'"); $tmp[$zz]['b']=$kg['bez'];
|
||||
$tmp[$zz]['c']=$row['info'];
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0;
|
||||
//-------- zeile 12
|
||||
$pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerkl']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 13
|
||||
$pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kinderfb']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 14
|
||||
$pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['iban']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 15
|
||||
$pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['BIC']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 16
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 17
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnzusammenfassung",'1','0','L','1'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 18
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-----------------------
|
||||
//--------------- Lohn
|
||||
//-----------------------
|
||||
|
||||
//-------- zeile 19 ** Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$gtage=27-$fahrer['eintag']; $glohn=($fahrer['tarifg']/26); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($gtage." Tage"),'0','0','L','0'); $pdf->Cell(30,5,($glohn.".00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
} else { $glohn=$fahrer['tarifg'];
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
}
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($fahrer['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
|
||||
//-------- zeile 20
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 21
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 22
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 23
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 25
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 26
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 42 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 43 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 44 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 45 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 46 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 47 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 48 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 49 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 50 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}/*
|
||||
//-------- zeile 51 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++; ;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 52 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 53 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']==0) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 53 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}}
|
||||
if($ma_minus['num_rows']==1) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
if($ma_minus['num_rows']==2) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------- zeile summe ** Gesamtsumme
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnvorschlag",'1','1','L','1');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
// $pdf->Cell(100,5," ",'0','1','L','0');
|
||||
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
|
||||
//if($stundenanzeige>0) {
|
||||
// $pdf->Cell(10,4,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0');
|
||||
// $pdf->Cell(70,5,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
//}
|
||||
//zwischensumme
|
||||
$pdf->Cell(70,5,("Zwischenumme: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0'); $glohn=$glohn-$minuslohn;
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
// $glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->Cell(70,5,("Brutto-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
721
scripts/a_lohnpdf2020.php
Normal file
721
scripts/a_lohnpdf2020.php
Normal file
|
|
@ -0,0 +1,721 @@
|
|||
<?php
|
||||
//error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,utf8_decode($fahrer['name']),'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Write(1,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(1,"\n"); $summe=0;
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
//--------------------------------------------------------------------- Daten auslesen -----------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------------ Fahrerdaten
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
//------------------------------------------------------------------------------------- Tage ist/soll
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------- Berechnung soll ist tage nach tourentyp
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
$tmp=[];
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez'];
|
||||
$tmp[$zz]['x']=$kd['num_rows']." x ".$row['bez']; // neu !!!
|
||||
$tmp[$zz]['m']=1;
|
||||
}
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//---------------------------- leerzeile ????????????????????????????????????????????????
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$kg['bez'];
|
||||
$tmp[$zz]['x']=$row['tag'].".".$row['monat']." ".$kg['bez']; // neu !!!
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0; $key=0; $ze=0;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************* Einzelanzeige Zusatzarbeit *******************
|
||||
$temp7=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND tarif>0 ORDER BY typ,time");
|
||||
while($row = $temp7->fetch_assoc()) {
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$etour[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$etour[$key]['tour']=$tour['tour'];
|
||||
$etour[$key]['tarif']=$row['tarif'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
// _pdf_lohn_extra.php
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//----------------------------------------------------------------------------------------------------- Zwischentabellenüberschrift
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,4,"Mitarbeiterdaten",'0','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->Write(3,"\n"); $pdf->SetTextColor(0,0,0);
|
||||
// Lohnzusammenfassung
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 1 Name
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Name:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['name'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 1 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Nachttage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($nachttage." x (Mo.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 2 Adresse - Strasse
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Strasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['strasse'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 2 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Post-Tage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($pintage." x (Di.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 3 PLZ+Ort
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['plz'])." ".utf8_decode($fahrer['ort'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 3 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("RTourtage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($rpintage." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 4 links telefonnummer
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['handy']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 4 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Feiertage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,(" ".$aft." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 5
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['festnetz']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 5 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 6
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 6 rechts
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(20,4,("soll Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(20,4,($solltage." x"),'0','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(28,4,("ist Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(27,4,($zaehler." x"),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 7
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Eintritt:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 7 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 8
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerid']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 8 rechts
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 9
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['svnummer']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 9 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 10
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkasse']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 10 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 11
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkassennr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 11 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 12
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerkl']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 12 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 13
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kinderfb']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 13 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 14
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['iban']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 14 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 15
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['BIC']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 15 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 27 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 27 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 28 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Eintrag im Kalender",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 28 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 29 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 29 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 30
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 30 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 31
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 31 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 32
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 32 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 33
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 33 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 34
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 34 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 35
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 35 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 36
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 36 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 37
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 37 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 38
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 38 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 39
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 39 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 40
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 40 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 41
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 41 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 42
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 42 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 43
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 43 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 44
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 44 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 45
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 45 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 46
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 46 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 47
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 47 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 48
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 48 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//**************************************************************************
|
||||
//************************************************************************** Kalender ende
|
||||
//**************************************************************************
|
||||
// ausgleichszeilen Abzüge !!
|
||||
$pdf->SetFont('Courier','B',10);
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']<1) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<2) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<3) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<4) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<5) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<6) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<7) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<8) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 49 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Lohnvorschlag",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 49 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 50 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 50 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
// Lohnzusammenfassung
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//****************************************************************** else als Zeile wenn neu eingestellt - leer zeile später
|
||||
//-------- zeile 51 Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$monatstage= date( 't', mktime ( 0, 0, 0, $_GET['monat'], 1, $_GET['jahr'] ));
|
||||
$gtage=$monatstage-$fahrer['eintag']+1; $glohn=($fahrer['tarifg']/$monatstage); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("anteil. Grundlohn - ".$gtage." Tage - ".$fahrer['tarifg'].",00 EUR"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("monatl. Grundlohn:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['tarifg'].",00 EUR"),'0','0','R','0');
|
||||
$glohn=$fahrer['tarifg'];
|
||||
}
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 51 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($fahrer['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 52
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 52 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 53
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 53 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 54
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 54 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 55
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 55 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 56
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 56 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 57
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 57 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 58
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 58 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 59
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 59 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 60
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 60 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 61 **
|
||||
$glohn=number_format($glohn, 2, ',', '');
|
||||
$pdf->Cell(70,5,("Zwischenumme:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
if ($row['zuschlag']>0) {
|
||||
$pdf->Cell(70,5,utf8_decode("(Zuzahlung) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,($minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn+$minuslohn;
|
||||
} else {
|
||||
$pdf->Cell(70,5,utf8_decode("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn-$minuslohn;
|
||||
}
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe:"),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
730
scripts/a_lohnpdf2020a.php
Normal file
730
scripts/a_lohnpdf2020a.php
Normal file
|
|
@ -0,0 +1,730 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,utf8_decode($fahrer['name']),'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Write(1,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
//------------------------------------------------------------------------------------------------
|
||||
$matempxx = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 AND lohnabr!=1 AND lohngeheim=0");
|
||||
while($row_ma = $matempxx->fetch_assoc()) {
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(1,"\n"); $summe=0;
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
//--------------------------------------------------------------------- Daten auslesen -----------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------ Fahrerdaten
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row_ma['fahrer']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
//------------------------------------------------------------------------------------- Tage ist/soll
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------- Berechnung soll ist tage nach tourentyp
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez'];
|
||||
$tmp[$zz]['m']=1;
|
||||
}
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//---------------------------- leerzeile ????????????????????????????????????????????????
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$kg['bez'];
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0; $key=0; $ze=0;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************* Einzelanzeige Zusatzarbeit *******************
|
||||
$temp7=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND tarif>0 ORDER BY typ,time");
|
||||
while($row = $temp7->fetch_assoc()) {
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$etour[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$etour[$key]['tour']=$tour['tour'];
|
||||
$etour[$key]['tarif']=$row['tarif'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
// _pdf_lohn_extra.php
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//----------------------------------------------------------------------------------------------------- Zwischentabellenüberschrift
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,4,"Mitarbeiterdaten",'0','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->Write(3,"\n"); $pdf->SetTextColor(0,0,0);
|
||||
// Lohnzusammenfassung
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 1 Name
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Name:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['name'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 1 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Nachttage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($nachttage." x (Mo.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 2 Adresse - Strasse
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Strasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['strasse'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 2 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Post-Tage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($pintage." x (Di.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 3 PLZ+Ort
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['plz'])." ".utf8_decode($fahrer['ort'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 3 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("RTourtage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($rpintage." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 4 links telefonnummer
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['handy']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 4 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Feiertage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,(" ".$aft." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 5
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['festnetz']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 5 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 6
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 6 rechts
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(20,4,("soll Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(20,4,($solltage." x"),'0','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(28,4,("ist Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(27,4,($zaehler." x"),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 7
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Eintritt:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 7 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 8
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerid']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 8 rechts
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 9
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['svnummer']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 9 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 10
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkasse']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 10 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 11
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkassennr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 11 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 12
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerkl']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 12 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 13
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kinderfb']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 13 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 14
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['iban']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 14 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 15
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['BIC']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 15 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 27 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 27 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 28 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Eintrag im Kalender",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 28 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 29 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 29 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 30
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 30 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 31
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 31 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 32
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 32 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 33
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 33 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 34
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 34 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 35
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 35 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 36
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 36 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 37
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 37 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 38
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 38 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 39
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 39 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 40
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 40 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 41
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 41 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 42
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 42 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 43
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 43 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 44
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 44 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 45
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 45 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 46
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 46 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 47
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 47 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 48
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 48 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//**************************************************************************
|
||||
//************************************************************************** Kalender ende
|
||||
//**************************************************************************
|
||||
// ausgleichszeilen Abzüge !!
|
||||
$pdf->SetFont('Courier','B',10);
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']<1) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<2) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<3) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<4) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<5) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<6) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<7) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<8) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 49 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Lohnvorschlag",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 49 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 50 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 50 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
// Lohnzusammenfassung
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//****************************************************************** else als Zeile wenn neu eingestellt - leer zeile später
|
||||
//-------- zeile 51 Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$monatstage= date( 't', mktime ( 0, 0, 0, $_GET['monat'], 1, $_GET['jahr'] ));
|
||||
$gtage=$monatstage-$fahrer['eintag']+1; $glohn=($fahrer['tarifg']/$monatstage); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("anteil. Grundlohn - ".$gtage." Tage - ".$fahrer['tarifg'].",00 EUR"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("monatl. Grundlohn:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['tarifg'].",00 EUR"),'0','0','R','0');
|
||||
$glohn=$fahrer['tarifg'];
|
||||
}
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 51 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($fahrer['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 52
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 52 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 53
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 53 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 54
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 54 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 55
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 55 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 56
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 56 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 57
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 57 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 58
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 58 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 59
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 59 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 60
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 60 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 61 **
|
||||
$glohn=number_format($glohn, 2, ',', '');
|
||||
$pdf->Cell(70,5,("Zwischenumme:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
if ($row['zuschlag']>0) {
|
||||
$pdf->Cell(70,5,("(Zuzahlung) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,($minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn+$minuslohn;
|
||||
} else {
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn-$minuslohn;
|
||||
}
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe:"),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
|
||||
}
|
||||
|
||||
$datumsave=$monat.".".$jahr;
|
||||
$pdf->Output('Lohnvorschlag_'.($datumsave).'.pdf','I');
|
||||
|
||||
?>
|
||||
745
scripts/a_lohnpdf2020all.php
Normal file
745
scripts/a_lohnpdf2020all.php
Normal file
|
|
@ -0,0 +1,745 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,utf8_decode($_SESSION['nnn']),'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Write(1,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
|
||||
$frowarray = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv=1 and lohngeheim=0 and lohnabr=0 and typ<94 ORDER by name");
|
||||
while($frow = $frowarray->fetch_assoc()) {
|
||||
|
||||
$_SESSION['nnn']=$frow['name'];
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(1,"\n"); $summe=0;
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
//--------------------------------------------------------------------- Daten auslesen -----------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------------ Fahrerdaten
|
||||
unset ($planer);
|
||||
unset ($tarifi);
|
||||
unset ($monatstage);
|
||||
unset ($abfrage);
|
||||
unset ($temp1);
|
||||
unset ($temp7);
|
||||
unset ($tmp);
|
||||
unset ($tmp);
|
||||
unset ($kdata);
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$frow['tarifgtyp']."'");
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
//------------------------------------------------------------------------------------- Tage ist/soll
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------- Berechnung soll ist tage nach tourentyp
|
||||
if($frow['typ']==3 || $frow['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($frow['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($frow['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez'];
|
||||
$tmp[$zz]['x']=$kd['num_rows']." x ".$row['bez']; // neu !!!
|
||||
$tmp[$zz]['m']=1;
|
||||
} else {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=" ";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=" ";
|
||||
$tmp[$zz]['x']=" ";
|
||||
$tmp[$zz]['m']=0;
|
||||
}
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//---------------------------- leerzeile ????????????????????????????????????????????????
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$kg['bez'];
|
||||
$tmp[$zz]['x']=$row['tag'].".".$row['monat']." ".$kg['bez']; // neu !!!
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0; $key=0; $ze=0;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************* Einzelanzeige Zusatzarbeit *******************
|
||||
$temp7=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND tarif>0 ORDER BY typ,time");
|
||||
while($row = $temp7->fetch_assoc()) {
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$etour[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$etour[$key]['tour']=$tour['tour'];
|
||||
$etour[$key]['tarif']=$row['tarif'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
// _pdf_lohn_extra.php
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//----------------------------------------------------------------------------------------------------- Zwischentabellenüberschrift
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,4,"Mitarbeiterdaten",'0','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->Write(3,"\n"); $pdf->SetTextColor(0,0,0);
|
||||
// Lohnzusammenfassung
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 1 Name
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Name:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($frow['name'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 1 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Nachttage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($nachttage." x (Mo.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 2 Adresse - Strasse
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Strasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($frow['strasse'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 2 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Post-Tage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($pintage." x (Di.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 3 PLZ+Ort
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($frow['plz'])." ".utf8_decode($frow['ort'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 3 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("RTourtage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($rpintage." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 4 links telefonnummer
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['handy']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 4 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Feiertage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,(" ".$aft." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 5
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['festnetz']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 5 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 6
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['gebtag'].".".$frow['gebmonat'].".".$frow['gebjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 6 rechts
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(20,4,("soll Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(20,4,($solltage." x"),'0','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(28,4,("ist Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(27,4,($zaehler." x"),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 7
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Eintritt:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['eintag'].".".$frow['einmonat'].".".$frow['einjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 7 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 8
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['steuerid']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 8 rechts
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 9
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['svnummer']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 9 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 10
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($frow['kkasse']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 10 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 11
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($frow['kkassennr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 11 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 12
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['steuerkl']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 12 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 13
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['kinderfb']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 13 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 14
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['iban']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 14 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 15
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['BIC']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 15 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 27 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 27 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 28 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Eintrag im Kalender",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 28 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 29 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 29 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 30
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 30 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 31
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 31 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 32
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 32 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 33
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 33 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 34
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 34 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 35
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 35 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 36
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 36 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 37
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 37 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 38
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 38 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 39
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 39 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 40
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 40 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 41
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 41 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 42
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 42 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 43
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 43 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 44
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 44 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 45
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 45 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 46
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 46 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 47
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 47 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 48
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 48 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//**************************************************************************
|
||||
//************************************************************************** Kalender ende
|
||||
//**************************************************************************
|
||||
// ausgleichszeilen Abzüge !!
|
||||
$pdf->SetFont('Courier','B',10);
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']<1) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<2) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<3) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<4) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<5) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<6) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<7) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<8) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 49 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Lohnvorschlag",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 49 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 50 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 50 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
// Lohnzusammenfassung
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//****************************************************************** else als Zeile wenn neu eingestellt - leer zeile später
|
||||
//-------- zeile 51 Grundlohn
|
||||
if ($frow['einmonat']==$_GET['monat'] && $frow['einjahr']==$_GET['jahr']) {
|
||||
$monatstage= date( 't', mktime ( 0, 0, 0, $_GET['monat'], 1, $_GET['jahr'] ));
|
||||
$gtage=$monatstage-$frow['eintag']+1; $glohn=($frow['tarifg']/$monatstage); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("anteil. Grundlohn - ".$gtage." Tage - ".$frow['tarifg'].",00 EUR"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("monatl. Grundlohn:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['tarifg'].",00 EUR"),'0','0','R','0');
|
||||
$glohn=$frow['tarifg'];
|
||||
}
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 51 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($frow['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 52
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 52 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 53
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 53 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 54
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 54 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 55
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 55 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 56
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 56 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 57
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 57 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 58
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 58 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 59
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 59 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 60
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 60 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 61 **
|
||||
$glohn=number_format($glohn, 2, ',', '');
|
||||
$pdf->Cell(70,5,("Zwischenumme:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
if ($row['zuschlag']>0) {
|
||||
$pdf->Cell(70,5,("(Zuzahlung) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,($minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn+$minuslohn;
|
||||
} else {
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn-$minuslohn;
|
||||
}
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe:"),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
|
||||
}
|
||||
|
||||
//$frow = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$frow['id']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($frow['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
776
scripts/a_lohnpdf2020x.php
Normal file
776
scripts/a_lohnpdf2020x.php
Normal file
|
|
@ -0,0 +1,776 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
// $fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlagsliste ".$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
//$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Image('template/images/jb_transparent.png', 125, 4);
|
||||
$this->Write(1,"\n");
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------
|
||||
$monat=$_GET['monat'];
|
||||
$jahr=$_GET['jahr'];
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(1,"\n"); $summe=0;
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
|
||||
//--------------------------------------------------------------------- Daten auslesen -----------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
$ma_data = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv=1 AND typ<97 AND tarifgtyp!=99 ORDER BY name");
|
||||
while($row = $ma_data->fetch_assoc()) {
|
||||
$ldata = $GLOBALS['mysql']->query_single("SELECT * FROM ma_ges_lohn WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row['id']."'");
|
||||
|
||||
$pdf->SetFont('Courier','B',11);
|
||||
|
||||
$pdf->Cell(55,4,(utf8_decode($row['name'])),'1','0','L','0');
|
||||
|
||||
|
||||
|
||||
//------------------------------------ Netto - Brutto - Mini - selbsttändig
|
||||
$pdf->SetFillColor(255,229,120);
|
||||
if ($row['lohnabr']==1) { $pdf->Cell(20,4,('Rechnung'),'1','0','C','1');
|
||||
} elseif ($row['lohngeheim']==1) { $pdf->SetFillColor(200,200,200); $pdf->Cell(20,4,(' '),'1','0','C','1'); $pdf->SetFillColor(255,229,120);
|
||||
} elseif ($ldata['tarifgtyp']==10) { $pdf->Cell(20,4,('Pauschal'),'1','0','C','1');
|
||||
} elseif ($ldata['tarifgtyp']==88) { $pdf->Cell(20,4,('Mini-Job'),'1','0','C','1');
|
||||
} elseif ($ldata['netto']==1) { $pdf->Cell(20,4,('netto'),'1','0','C','0');
|
||||
} else { $pdf->Cell(20,4,('brutto'),'1','0','C','1');
|
||||
}
|
||||
|
||||
//------------------------------------ Summe
|
||||
$glohn=str_replace('.', ',', $ldata['glohn']);
|
||||
if ($row['lohngeheim']==1) { $pdf->Cell(30,4,('vormonat'),'1','0','C','1');
|
||||
} elseif ($row['lohnabr']==1) { $pdf->SetFillColor(200,200,200); $pdf->Cell(30,4,(' '),'1','0','C','1'); $pdf->SetFillColor(255,229,120);
|
||||
} else { $pdf->Cell(30,4,($glohn.' EUR'),'1','0','R','0'); }
|
||||
|
||||
//------------------------------------ text
|
||||
if ($ldata['kaldata']>0) {
|
||||
$pdf->Cell(88,4,(utf8_decode($ldata['kaldata'])),'1','0','L','1');
|
||||
} else {
|
||||
$pdf->Cell(88,4,(utf8_decode($ldata['kaldata'])),'1','0','L','0');
|
||||
}
|
||||
//--------- umbruch
|
||||
$pdf->Cell(1,4,(' '),'0','1','L','0');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
//------------------------------------------------------------------------------------ Fahrerdaten
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
//------------------------------------------------------------------------------------- Tage ist/soll
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------- Berechnung soll ist tage nach tourentyp
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez'];
|
||||
$tmp[$zz]['m']=1;
|
||||
}
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//---------------------------- leerzeile ????????????????????????????????????????????????
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$kg['bez'];
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0; $key=0; $ze=0;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************* Einzelanzeige Zusatzarbeit *******************
|
||||
$temp7=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND tarif>0 ORDER BY typ,time");
|
||||
while($row = $temp7->fetch_assoc()) {
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$etour[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$etour[$key]['tour']=$tour['tour'];
|
||||
$etour[$key]['tarif']=$row['tarif'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
// _pdf_lohn_extra.php
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//----------------------------------------------------------------------------------------------------- Zwischentabellenüberschrift
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,4,"Mitarbeiterdaten",'0','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->Write(3,"\n"); $pdf->SetTextColor(0,0,0);
|
||||
// Lohnzusammenfassung
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 1 Name
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Name:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['name'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 1 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Nachttage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($nachttage." x (Mo.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 2 Adresse - Strasse
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Strasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['strasse'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 2 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Post-Tage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($pintage." x (Di.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 3 PLZ+Ort
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['plz'])." ".utf8_decode($fahrer['ort'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 3 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("RTourtage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($rpintage." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 4 links telefonnummer
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['handy']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 4 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Feiertage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,(" ".$aft." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 5
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['festnetz']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 5 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 6
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 6 rechts
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(20,4,("soll Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(20,4,($solltage." x"),'0','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(28,4,("ist Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(27,4,($zaehler." x"),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 7
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Eintritt:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 7 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 8
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerid']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 8 rechts
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 9
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['svnummer']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 9 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 10
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkasse']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 10 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 11
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkassennr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 11 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 12
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerkl']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 12 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 13
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kinderfb']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 13 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 14
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['iban']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 14 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 15
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['BIC']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 15 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 27 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 27 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 28 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Eintrag im Kalender",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 28 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 29 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 29 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 30
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 30 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 31
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 31 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 32
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 32 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 33
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 33 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 34
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 34 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 35
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 35 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 36
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 36 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 37
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 37 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 38
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 38 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 39
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 39 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 40
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 40 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 41
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 41 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 42
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 42 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 43
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 43 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 44
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 44 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 45
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 45 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 46
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 46 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 47
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 47 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 48
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 48 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//**************************************************************************
|
||||
//************************************************************************** Kalender ende
|
||||
//**************************************************************************
|
||||
// ausgleichszeilen Abzüge !!
|
||||
$pdf->SetFont('Courier','B',10);
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']<1) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<2) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<3) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<4) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<5) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<6) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<7) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<8) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 49 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Lohnvorschlag",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 49 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 50 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 50 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
// Lohnzusammenfassung
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//****************************************************************** else als Zeile wenn neu eingestellt - leer zeile später
|
||||
//-------- zeile 51 Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$monatstage= date( 't', mktime ( 0, 0, 0, $_GET['monat'], 1, $_GET['jahr'] ));
|
||||
$gtage=$monatstage-$fahrer['eintag']+1; $glohn=($fahrer['tarifg']/$monatstage); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("anteil. Grundlohn - ".$gtage." Tage - ".$fahrer['tarifg'].",00 EUR"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("monatl. Grundlohn:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['tarifg'].",00 EUR"),'0','0','R','0');
|
||||
$glohn=$fahrer['tarifg'];
|
||||
}
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 51 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($fahrer['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 52
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 52 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 53
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 53 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 54
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 54 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 55
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 55 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 56
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 56 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 57
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 57 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 58
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 58 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 59
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 59 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 60
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 60 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 61 **
|
||||
$glohn=number_format($glohn, 2, ',', '');
|
||||
$pdf->Cell(70,5,("Zwischenumme:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
if ($row['zuschlag']>0) {
|
||||
$pdf->Cell(70,5,("(Zuzahlung) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,($minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn+$minuslohn;
|
||||
} else {
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn-$minuslohn;
|
||||
}
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe:"),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//--------------------------------------------- ausgabe
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
721
scripts/a_lohnpdf2023.php
Normal file
721
scripts/a_lohnpdf2023.php
Normal file
|
|
@ -0,0 +1,721 @@
|
|||
<?php
|
||||
//error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,utf8_decode($fahrer['name']),'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Write(1,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(1,"\n"); $summe=0;
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
//--------------------------------------------------------------------- Daten auslesen -----------
|
||||
//------------------------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------------ Fahrerdaten
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
//------------------------------------------------------------------------------------- Tage ist/soll
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------- Berechnung soll ist tage nach tourentyp
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
$tmp=[];
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez'];
|
||||
$tmp[$zz]['x']=$kd['num_rows']." x ".$row['bez']; // neu !!!
|
||||
$tmp[$zz]['m']=1;
|
||||
}
|
||||
}
|
||||
//******************************************************************************************************************************************************
|
||||
//---------------------------- leerzeile ????????????????????????????????????????????????
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$kg['bez'];
|
||||
$tmp[$zz]['x']=$row['tag'].".".$row['monat']." ".$kg['bez']; // neu !!!
|
||||
}
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0; $key=0; $ze=0;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************* Einzelanzeige Zusatzarbeit *******************
|
||||
$temp7=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND tarif>0 ORDER BY typ,time");
|
||||
while($row = $temp7->fetch_assoc()) {
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$etour[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$etour[$key]['tour']=$tour['tour'];
|
||||
$etour[$key]['tarif']=$row['tarif'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
// _pdf_lohn_extra.php
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//----------------------------------------------------------------------------------------------------- Zwischentabellenüberschrift
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,4,"Mitarbeiterdaten",'0','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->Write(3,"\n"); $pdf->SetTextColor(0,0,0);
|
||||
// Lohnzusammenfassung
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 1 Name
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Name:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['name'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 1 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Nachttage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($nachttage." x (Mo.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 2 Adresse - Strasse
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Strasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['strasse'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 2 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Post-Tage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($pintage." x (Di.-Sa.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 3 PLZ+Ort
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($fahrer['plz'])." ".utf8_decode($fahrer['ort'])),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 3 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("RTourtage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,($rpintage." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 4 links telefonnummer
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['handy']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 4 rechts
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(25,4,("Feiertage "),'0','0','L','0');
|
||||
$pdf->Cell(25,4,($_GET['monat']."/".$_GET['jahr']),'0','0','L','0');
|
||||
$pdf->Cell(30,4,(" ".$aft." x (Mo.-Fr.)"),'0','1','R','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 5
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['festnetz']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 5 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 6
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 6 rechts
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(20,4,("soll Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(20,4,($solltage." x"),'0','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(28,4,("ist Touren: "),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(27,4,($zaehler." x"),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 7
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Eintritt:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 7 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 8
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerid']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 8 rechts
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,4,"Festvertrag Fahrdaten",'0','1','L','1'); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 9
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['svnummer']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 9 rechts
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0');
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 10
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkasse']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 10 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 11
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,utf8_decode($fahrer['kkassennr']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 11 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 12
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['steuerkl']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 12 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 13
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['kinderfb']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 13 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 14
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['iban']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 14 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 15
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['BIC']),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 15 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 27 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 27 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 28 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Eintrag im Kalender",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 28 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 29 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 29 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 30
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 30 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 31
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 31 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 32
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 32 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 33
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 33 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 34
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 34 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 35
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 35 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 36
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 36 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 37
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 37 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 38
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 38 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 39
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 39 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 40
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 40 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 41
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 41 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 42
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 42 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 43
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 43 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 44
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 44 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 45
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 45 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 46
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 46 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 47
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 47 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 48
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_data.php';
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 48 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//**************************************************************************
|
||||
//************************************************************************** Kalender ende
|
||||
//**************************************************************************
|
||||
// ausgleichszeilen Abzüge !!
|
||||
$pdf->SetFont('Courier','B',10);
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']<1) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<2) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<3) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<4) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<5) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<6) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<7) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
if($ma_minus['num_rows']<8) { include '_pdf_lohn_data.php'; $pdf->Cell(10,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php'; }
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 49 links
|
||||
$pdf->SetFillColor(120,120,120); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->SetFont('Helvetica','BI',10); $pdf->Cell(100,4,"Lohnvorschlag",'0','0','L','1');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//-------- zeile 49 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 50 Links leerzeile // platzhalter
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(100,4,(" "),'0','0','L','0');
|
||||
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 50 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
// Lohnzusammenfassung
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//****************************************************************** else als Zeile wenn neu eingestellt - leer zeile später
|
||||
//-------- zeile 51 Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$monatstage= date( 't', mktime ( 0, 0, 0, $_GET['monat'], 1, $_GET['jahr'] ));
|
||||
$gtage=$monatstage-$fahrer['eintag']+1; $glohn=($fahrer['tarifg']/$monatstage); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("anteil. Grundlohn - ".$gtage." Tage - ".$fahrer['tarifg'].",00 EUR"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,("monatl. Grundlohn:"),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($fahrer['tarifg'].",00 EUR"),'0','0','R','0');
|
||||
$glohn=$fahrer['tarifg'];
|
||||
}
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 51 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($fahrer['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 52
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 52 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 53
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 53 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 54
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 54 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 55
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 55 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 56
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 56 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 57
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 57 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 58
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 58 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 59
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 59 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 60
|
||||
$pdf->SetFont('Helvetica','',10); $pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0');
|
||||
$pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','R','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0');
|
||||
$za++; $zb++;
|
||||
$pdf->Cell(10,4," ",'0','0','L','0'); //---------------------- Mittelstreifen ----------------------
|
||||
|
||||
//------- zeile 60 rechts
|
||||
$pdf->SetFont('Courier','B',10); include '_pdf_lohn_extra.php';
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//******************************************************************************************************************************************************
|
||||
//-------- zeile 61 **
|
||||
$glohn=number_format($glohn, 2, ',', '');
|
||||
$pdf->Cell(70,5,("Zwischenumme:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
if ($row['zuschlag']>0) {
|
||||
$pdf->Cell(70,5,utf8_decode("(Zuzahlung) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,($minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn+$minuslohn;
|
||||
} else {
|
||||
$pdf->Cell(70,5,utf8_decode("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0');
|
||||
$glohn=$glohn-$minuslohn;
|
||||
}
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe:"),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe:"),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
808
scripts/a_lohnpdf_all.php
Normal file
808
scripts/a_lohnpdf_all.php
Normal file
|
|
@ -0,0 +1,808 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
//$frow = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$frow['id']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,utf8_decode($_SESSION['nnn']),'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('jb_logo2.png', 125, 7);
|
||||
$this->Write(3,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
|
||||
$frowarray = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv=1 and lohngeheim=0 and lohnabr=0 ORDER by name");
|
||||
while($frow = $frowarray->fetch_assoc()) {
|
||||
|
||||
$_SESSION['nnn']=$frow['name'];
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(3,"\n"); $summe=0;
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Mitarbeiterdaten",'1','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0');
|
||||
$pdf->Cell(80,5,"Festvertrag Fahrdaten",'1','1','L','1'); $pdf->Write(3,"\n");
|
||||
|
||||
|
||||
|
||||
|
||||
//$frow = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$frow['id']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$frow['tarifgtyp']."'");
|
||||
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 1 // Festdaten !!!!!!!!!! Anzahl Nachttage
|
||||
$pdf->Cell(40,4,("Name:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($frow['name'])),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($nachttage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Nachttage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 2 // Festdaten !!!!!!!!!! Anzahl post
|
||||
$pdf->Cell(40,4,("Strasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(utf8_decode($frow['strasse'])),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($pintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Post-Tage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Di.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 3 // Festdaten !!!!!!!!!! Anzahl rtour
|
||||
$pdf->Cell(40,4,("Wohnort:"),'0','0','L','0');$pdf->SetFont('Courier','B',10);$pdf->Cell(60,4,(utf8_decode($frow['plz'])." ".utf8_decode($frow['ort'])),'0','0','L','0');$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($rpintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" RTourtage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Fr.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 4 feiertage
|
||||
$pdf->Cell(40,4,("Telefon 1:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['handy']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($aft." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Feiertage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 5 - 2. spalte leer !!!!!!!!!!
|
||||
$pdf->Cell(40,4,("Telefon 2:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['festnetz']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 6
|
||||
$pdf->Cell(40,4,("Geb.-tag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['gebtag'].".".$frow['gebmonat'].".".$frow['gebjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Typrechnung soll / ist",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 7
|
||||
$pdf->Cell(40,4,("Eintritt:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['eintag'].".".$frow['einmonat'].".".$frow['einjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-----------
|
||||
|
||||
|
||||
if($frow['typ']==3 || $frow['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($frow['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($frow['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$frow['id']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//-------- zeile 8
|
||||
$pdf->Cell(40,4,("Steuer Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['steuerid']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($zaehler." x"),'0','0','R','0'); $pdf->Cell(50,4,(" gefahren - soll Touren: "),'0','0','L','0'); $pdf->Cell(20,4,($solltage." x"),'0','1','R','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 9
|
||||
$pdf->Cell(40,4,("S.V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['svnummer']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 10
|
||||
$pdf->Cell(40,4,("Krankenkasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['kkasse']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Eintrag im Kalender",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 11
|
||||
$pdf->Cell(40,4,("KK V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['kkassennr']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0; $mark=1;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez']." x";
|
||||
$tmp[$zz]['m']=1;
|
||||
}
|
||||
}
|
||||
//---------------------------- leerzeile
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 ORDER BY tag"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$tmp[$zz]['b']=$kg['bez'];
|
||||
$tmp[$zz]['c']=$row['info'];
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0;
|
||||
//-------- zeile 12
|
||||
$pdf->Cell(40,4,("Steuerklasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['steuerkl']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(50,4,(utf8_decode($tmp[$za]['b'])),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,(utf8_decode($tmp[$za]['b'])),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 13
|
||||
$pdf->Cell(40,4,("Freibetrag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['kinderfb']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 14
|
||||
$pdf->Cell(40,4,("Bank-Iban:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['iban']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,(utf8_decode($tmp[$za]['a'])),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 15
|
||||
$pdf->Cell(40,4,("Bank-BIC:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($frow['BIC']),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 16
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
if ($tmp[$za]['m']>0) {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','1'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','1'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','1'); $pdf->SetFont('Helvetica','',9); $pdf->SetFillColor(180,180,180);
|
||||
} else {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 17
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnzusammenfassung",'1','0','L','1'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,(utf8_decode($tmp[$za]['c'])),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 18
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-----------------------
|
||||
//--------------- Lohn
|
||||
//-----------------------
|
||||
|
||||
//-------- zeile 19 ** Grundlohn
|
||||
if ($frow['einmonat']==$_GET['monat'] && $frow['einjahr']==$_GET['jahr']) {
|
||||
$gtage=27-$frow['eintag']; $glohn=($frow['tarifg']/26); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($gtage." Tage"),'0','0','L','0'); $pdf->Cell(30,5,($glohn.".00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
} else { $glohn=$frow['tarifg'];
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
}
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
if($frow['tarifgtyp']!=88) {
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999");
|
||||
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour<8001 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 AND tour>8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 || fahrer='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND tour>8001 AND tour<8999 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
|
||||
//-------- zeile 20
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 21
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 22
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 23
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 25
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 26
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 42 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 43 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 44 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 45 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 46 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 47 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 48 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 49 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 50 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}/*
|
||||
//-------- zeile 51 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++; ;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 52 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 53 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']==0) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 53 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}}
|
||||
if($ma_minus['num_rows']==1) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
if($ma_minus['num_rows']==2) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------- zeile summe ** Gesamtsumme
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnvorschlag",'1','1','L','1');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
// $pdf->Cell(100,5," ",'0','1','L','0');
|
||||
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
|
||||
//if($stundenanzeige>0) {
|
||||
// $pdf->Cell(10,4,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0');
|
||||
// $pdf->Cell(70,5,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
//}
|
||||
//zwischensumme
|
||||
$pdf->Cell(70,5,("Zwischenumme: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$frow['id']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0'); $glohn=$glohn-$minuslohn;
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
// $glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->SetFillColor(255,211,155);
|
||||
$pdf->Cell(70,5,("Brutto-Summe: "),'0','0','R','1'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
$pdf->SetFillColor(180,180,180);
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
|
||||
}
|
||||
//$frow = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$frow['id']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($frow['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
782
scripts/a_lohnpdf_mini.php
Normal file
782
scripts/a_lohnpdf_mini.php
Normal file
|
|
@ -0,0 +1,782 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors',0);
|
||||
require('lib/fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Plan/Vorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(85,8,$fahrer['name'],'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('intern.jpg', 125,-6);
|
||||
$this->Write(3,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(3,"\n"); $summe=0;
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Handschriftliche Informationen",'1','0','L','1');
|
||||
$pdf->Cell(10,4," ",'0','0','L','0');
|
||||
$pdf->Cell(80,5,"Festvertrag Fahrdaten",'1','1','L','1'); $pdf->Write(3,"\n");
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$tarifi = $GLOBALS['mysql']->query_single("SELECT * FROM tariftyp WHERE id='".$fahrer['tarifgtyp']."'");
|
||||
|
||||
|
||||
// echo "<pre>"; print_r($tarifi); echo "</pre>";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
//---------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
$monatstage = date("t",mktime(0, 0, 0,$_GET['monat'], 1,$_GET['jahr'])); $nachttage=0; $pintage=0; $rpintage=0; $aft=0;
|
||||
for ($i = 1; $i <= $monatstage; $i++) {
|
||||
$ft = $GLOBALS['mysql']->query_single("SELECT * FROM feiertage WHERE tag='".$i."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ft['num_rows']>0) {
|
||||
$aft++;
|
||||
} else {
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7) { $nachttage++; } // 6 Tage Mo-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<7 && date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))>1 ) { $pintage++; } // 5 Tage Di-Sa.
|
||||
if (date("N",mktime(0, 0, 0,$_GET['monat'],$i,$_GET['jahr']))<6) { $rpintage++; } // 5 Tage Mo-Fr.
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 1 // Festdaten !!!!!!!!!! Anzahl Nachttage
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4," ",'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($nachttage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Nachttage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 2 // Festdaten !!!!!!!!!! Anzahl post
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4," ",'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($pintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Post-Tage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Di.-Sa.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 3 // Festdaten !!!!!!!!!! Anzahl rtour
|
||||
$pdf->Cell(40,4," ",'0','0','L','0');$pdf->SetFont('Courier','B',10);$pdf->Cell(60,4," ",'0','0','L','0');$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($rpintage." x"),'0','0','R','0'); $pdf->Cell(50,4,(" RTourtage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,("(Mo.-Fr.)"),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 4 feiertage
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4," ",'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($aft." x"),'0','0','R','0'); $pdf->Cell(50,4,(" Feiertage ".$_GET['monat']."/".$_GET['jahr']),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 5 - 2. spalte leer !!!!!!!!!!
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4," ",'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 6
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4," ",'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Typrechnung soll / ist",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 7
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4," ",'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-----------
|
||||
|
||||
|
||||
if($fahrer['typ']==3 || $fahrer['typ']==4) {
|
||||
//-------- Nachtfahrer Zeitung
|
||||
$zaehler=0; $solltage=$nachttage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=3");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=4");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==5) {
|
||||
//-------- postfahrer Zeitung
|
||||
$zaehler=0; $solltage=$pintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=5");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
if($fahrer['typ']==6) {
|
||||
//-------- rtourfahrer Zeitung
|
||||
$zaehler=0; $solltage=$rpintage;
|
||||
$abfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ=6");
|
||||
$zaehler=$zaehler+$abfrage['num_rows'];
|
||||
}
|
||||
//-------- zeile 8
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,($zaehler." x"),'0','0','R','0'); $pdf->Cell(50,4,(" gefahren - soll Touren: "),'0','0','L','0'); $pdf->Cell(20,4,($solltage." x"),'0','1','R','0');
|
||||
$pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 9
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 10
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(80,5,"Eintrag im Kalender",'1','1','L','1'); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 11
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->Cell(10,4,(" "),'0','0','L','0'); $pdf->Cell(80,4,(" "),'0','1','L','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
//-------------------------------------
|
||||
//-------------- kalender ausrechnen
|
||||
//-------------------------------------
|
||||
$zz=0;
|
||||
//------------- neu Kalendereinträge zusammengefasst
|
||||
|
||||
|
||||
//--------------- zusammenfassung
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80");
|
||||
while($row = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund='".$row['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['b']=" ";
|
||||
$tmp[$zz]['c']=$row['bez']." x";
|
||||
}
|
||||
}
|
||||
//---------------------------- leerzeile
|
||||
$zz++; $tmp[$zz]['a']=" "; $tmp[$zz]['b']=" "; $tmp[$zz]['c']=" ";
|
||||
//---------------------------------------- Einzelanzeige
|
||||
$kdata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0"); $key=0;
|
||||
while($row = $kdata->fetch_assoc()) {
|
||||
$zz++;
|
||||
$tmp[$zz]['a']=$row['tag'].".".$row['monat'];
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'"); $tmp[$zz]['b']=$kg['bez'];
|
||||
$tmp[$zz]['c']=$row['info'];
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------ kalenderrechnung ende
|
||||
$za=0;
|
||||
//-------- zeile 12
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 13
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 14
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 15
|
||||
$pdf->Cell(40,4," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 16
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------- zeile 17
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnzusammenfassung",'1','0','L','1'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 18
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,(" "),'0','0','L','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
$za++;
|
||||
//-----------------------------
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-----------------------
|
||||
//--------------- Lohn
|
||||
//-----------------------
|
||||
|
||||
//-------- zeile 19 ** Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$gtage=27-$fahrer['eintag']; $glohn=($fahrer['tarifg']/26); $glohn=$glohn*$gtage; $glohn=0-round($glohn,0);
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($gtage." Tage"),'0','0','L','0'); $pdf->Cell(30,5,($glohn.".00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
} else { $glohn=0-$fahrer['tarifg'];
|
||||
$pdf->Cell(40,4,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,4,($glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0');
|
||||
}
|
||||
$za++;
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else{
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//------------- Zählerausrechnung
|
||||
$zz=0;
|
||||
$temp2 = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row = $temp2->fetch_assoc()) {
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp!=9 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname'];
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, '.', '')." EUR";
|
||||
}
|
||||
$tl=$GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9");
|
||||
if($tl['num_rows']>0) { $tmpl=0;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE fahrer='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND typ='".$row['tid']."' AND utyp=9 ORDER BY tag");
|
||||
while($rowl = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$rowl['tarif']; } $glohn=$glohn+$tmpl; $zz++;
|
||||
$tml[$zz]['a']=$row['tname']." -Abn.";
|
||||
$tml[$zz]['b']=$tl['num_rows']." Touren";
|
||||
$tml[$zz]['c']=number_format($tmpl, 2, ',', '')." EUR";
|
||||
}
|
||||
}
|
||||
$zb=1;
|
||||
|
||||
//-------- zeile 20
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 21
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 22
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 23
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 25
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
//-------- zeile 26
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 42 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 43 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 44 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 45 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 46 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 47 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 48 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 49 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 50 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}/*
|
||||
//-------- zeile 51 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++; ;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 52 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//-------- zeile 53 **
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
//lohnabzug
|
||||
$ma_minus = $GLOBALS['mysql']->query_single("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
if($ma_minus['num_rows']==0) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 53 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}}
|
||||
if($ma_minus['num_rows']==1) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}//-------- zeile 52 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
if($ma_minus['num_rows']==2) {
|
||||
//-------- zeile 51 **
|
||||
if (isset($tml[$zb]['a'])) {
|
||||
$pdf->Cell(40,4,($tml[$zb]['a']),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($tml[$zb]['b']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($tml[$zb]['c']),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}else {
|
||||
$pdf->Cell(40,4,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,(" "),'0','0','L','0');
|
||||
$pdf->Cell(30,5,(" "),'0','0','R','0'); $pdf->Cell(10,4,(" "),'0','0','L','0'); $za++; $zb++;
|
||||
}
|
||||
if (isset($tmp[$za]['a'])) {
|
||||
$pdf->Cell(10,4,($tmp[$za]['a']),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}else {
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-------- zeile summe ** Gesamtsumme
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnvorschlag",'1','1','L','1');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
|
||||
// $pdf->Cell(100,5," ",'0','1','L','0');
|
||||
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
|
||||
//if($stundenanzeige>0) {
|
||||
// $pdf->Cell(10,4,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(50,4,($tmp[$za]['b']),'0','0','L','0'); $pdf->Cell(20,4,($tmp[$za]['c']),'0','1','R','0');
|
||||
// $pdf->Cell(70,5,("Stunden-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
//}
|
||||
//zwischensumme
|
||||
$pdf->Cell(70,5,("Zwischenumme: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','1','R','0');
|
||||
|
||||
if($ma_minus['num_rows']>0) {
|
||||
$temp8 = $GLOBALS['mysql']->query("SELECT * FROM ma_abzahlung WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $temp8->fetch_assoc()) {
|
||||
$minuslohn=number_format($row['summe'], 2, ',', ''); // 2 nachkommastellen
|
||||
$pdf->Cell(70,5,("(Abzug) ".$row['grund'].": "),'0','0','R','0'); $pdf->Cell(30,5,("-".$minuslohn." EUR"),'0','1','R','0'); $glohn=$glohn-$minuslohn;
|
||||
}
|
||||
$glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
}
|
||||
// $glohn=number_format($glohn, 2, ',', ''); // 2 nachkommastellen
|
||||
if($tarifi['netto']>0) {
|
||||
$pdf->Cell(70,5,("NETTO-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
} else {
|
||||
$pdf->Cell(70,5,("Brutto-Summe: "),'0','0','R','0'); $pdf->Cell(30,5,($glohn." EUR"),'0','0','R','0');
|
||||
}
|
||||
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0'); $za++;
|
||||
$pdf->Cell(10,4,(" "),'0','0','R','0');
|
||||
$pdf->Cell(50,4,(" "),'0','0','L','0'); $pdf->Cell(20,4,(" "),'0','1','R','0'); $pdf->SetFont('Helvetica','',9);
|
||||
//--------------------------------------------- ausgabe
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
480
scripts/a_lohnpdf_v1.php
Normal file
480
scripts/a_lohnpdf_v1.php
Normal file
|
|
@ -0,0 +1,480 @@
|
|||
<?php
|
||||
// error_reporting(E_ALL);
|
||||
// ini_set('display_errors', 1);
|
||||
require('fpdf.php');
|
||||
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 ***** F.Teichert 2016','1','0','C','1');
|
||||
}
|
||||
function Header() {
|
||||
$this->SetFont('Helvetica','B',20);
|
||||
$this->SetTextColor(70,130,180);
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Cell(54,8,"Lohnvorschlag aus EDV",'0','1','L','1');
|
||||
$this->Cell(90,8,$fahrer['name'],'0','0','L','0'); $this->Cell(28,8,$_GET['monat']."/".$_GET['jahr'],'0','1','L','1');
|
||||
$this->SetFont('Helvetica','BI',20);
|
||||
$this->Image('Image3.png', 125, 7);
|
||||
$this->Write(3,"\n");
|
||||
}
|
||||
}
|
||||
$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
$pdf->Write(3,"\n"); $summe=0;
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Mitarbeiterdaten",'1','0','L','1');
|
||||
$pdf->Cell(10,5," ",'0','0','L','0');
|
||||
$pdf->Cell(80,5,"Eintrag im Kalender",'1','1','L','1'); $pdf->Write(3,"\n");
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$planer = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
/*
|
||||
if($planer['num_rows']>0) { $kalender=$planer['num_rows']; $key=0;
|
||||
$planer = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."'");
|
||||
while($row = $planer->fetch_assoc()) {
|
||||
$kal[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$grund = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$kal[$key]['grund']=$grund['bez'];
|
||||
$kal[$key]['pinfo']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$key=0;
|
||||
*/
|
||||
$pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 1
|
||||
$pdf->Cell(40,5,("Name:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['name']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 0, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 2
|
||||
$pdf->Cell(40,5,("Strasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['strasse']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 1, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 3
|
||||
$pdf->Cell(40,5,("Wohnort:"),'0','0','L','0');$pdf->SetFont('Courier','B',10);$pdf->Cell(60,5,($fahrer['plz']." ".$fahrer['ort']),'0','0','L','0');$pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 2, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 4
|
||||
$pdf->Cell(40,5,("Telefon 1:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['handy']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 3, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 5
|
||||
$pdf->Cell(40,5,("Telefon 2:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['tel']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 4, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 6
|
||||
$pdf->Cell(40,5,("Geb.-tag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['gebtag'].".".$fahrer['gebmonat'].".".$fahrer['gebjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 5, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 7
|
||||
$pdf->Cell(40,5,("Eintritt:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['eintag'].".".$fahrer['einmonat'].".".$fahrer['einjahr']),'0','0','L','0');
|
||||
$pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 6, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 8
|
||||
$pdf->Cell(40,5,("Steuer Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['steuernr']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 7, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 9
|
||||
$pdf->Cell(40,5,("S.V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['svnr']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 8, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 10
|
||||
$pdf->Cell(40,5,("Krankenkasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['kk']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 9, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 11
|
||||
$pdf->Cell(40,5,("KK V.Nr.:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['kkvnr']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 10, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 12
|
||||
$pdf->Cell(40,5,("Steuerklasse:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['stkl']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 11, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 13
|
||||
$pdf->Cell(40,5,("Freibetrag:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['stfb']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 12, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 14
|
||||
$pdf->Cell(40,5,("Bank-Iban:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['iban']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 13, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 15
|
||||
$pdf->Cell(40,5,("Bank-BIC:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($fahrer['bic']),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 14, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 16
|
||||
$pdf->Cell(40,5,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,(" "),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 15, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 17
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(100,5,"Lohnzusammenfassung",'1','0','L','1'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Courier','B',10); $pdf->SetTextColor(0,0,0);
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 16, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 18
|
||||
$pdf->Cell(40,5,(" "),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,(" "),'0','0','L','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 17, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//--------------- Lohn
|
||||
//-------- zeile 19 ** Grundlohn
|
||||
if ($fahrer['einmonat']==$_GET['monat'] && $fahrer['einjahr']==$_GET['jahr']) {
|
||||
$gtage=27-$fahrer['eintag']; $glohn=($fahrer['tarifg']/26); $glohn=$glohn*$gtage; $glohn=round($glohn,0);
|
||||
$pdf->Cell(40,5,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($gtage." Tage"),'0','0','L','0'); $pdf->Cell(30,5,($glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
} else { $glohn=$fahrer['tarifg'];
|
||||
$pdf->Cell(40,5,("Grundlohn:"),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,($glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
}
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 18, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
|
||||
|
||||
|
||||
//-------- zeile 20
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=1"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 19, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 21
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=2"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 20, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 22
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=3"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 21, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 23
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=4"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 22, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 24
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=5"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 23, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 25
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=6"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 24, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 26
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=7"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 25, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 27
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=8"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 26, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 28
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=9"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 27, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 29
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=10"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 28, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 30
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=11"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 29, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 31
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=12"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 30, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 32
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=13"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 31, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 33
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=14"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 32, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 34
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=15"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 33, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 35
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=16"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 34, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 36
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=17"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 35, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 37
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=18"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 36, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 38
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=19"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 37, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
//-------- zeile 39
|
||||
$row_tt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid=20"); $tmpl=0; $tname=$row_tt['tname'];
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag");
|
||||
if($zaehler['num_rows']>0) { $ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); while($row = $ldaten->fetch_assoc()) { $tmpl=$tmpl+$row['tarif']; }} $glohn=$glohn+$tmpl;
|
||||
$pdf->Cell(40,5,($tname),'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(30,5,($zaehler['num_rows']." Touren"),'0','0','L','0'); $pdf->Cell(30,5,($tmpl.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 38, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
|
||||
|
||||
//-------- zeile 40 ** leerzeile
|
||||
$pdf->Cell(40,5," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,(" "),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 39, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
|
||||
//-------- zeile 41 ** Gesamtsumme
|
||||
$pdf->Cell(40,5," ",'0','0','L','0'); $pdf->SetFont('Courier','B',10); $pdf->Cell(60,5,("Gesamt: ".$glohn.",00 EUR"),'0','0','R','0'); $pdf->Cell(10,5,(" "),'0','0','L','0');
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_GET['ma']."' AND monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND grund>0 LIMIT 39, 1");
|
||||
if($kd['num_rows']>0) {
|
||||
$kg = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kd['grund']."'");
|
||||
$pdf->Cell(20,5,($kd['tag'].".".$kd['monat'].".".$kd['jahr']),'0','0','R','0'); $pdf->Cell(25,5,($kg['bez']),'0','0','L','0'); $pdf->Cell(35,5,($info['pinfo']),'0','1','L','0');
|
||||
}else{$pdf->Cell(40,5,(" "),'0','1','L','0'); } $pdf->SetFont('Helvetica','',10);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------- Einzelnachweis -------------------------------------------------
|
||||
//$pdf = new PDF('P','mm','A4');
|
||||
$pdf->AddPage();
|
||||
// blau (0,160,230)
|
||||
// Orange (240,150, 0)
|
||||
// grau (200,200,200)
|
||||
$pdf->Write(3,"\n"); $summe=0;
|
||||
$pdf->SetFillColor(180,180,180); $pdf->SetFont('Helvetica','BI',10); $pdf->SetTextColor(255,255,255);
|
||||
$pdf->Cell(30,5,"Tourtyp",'1','0','L','1');
|
||||
$pdf->Cell(37,5,"Datum/Zeit",'1','0','L','1');
|
||||
$pdf->Cell(32,5,"Tour",'1','0','L','1');
|
||||
$pdf->Cell(20,5,"Lohnv.",'1','0','L','1');
|
||||
$pdf->Cell(5,5,"X",'1','0','L','1');
|
||||
$pdf->Cell(10,5," ",'0','0','L','0');
|
||||
$pdf->Cell(60,5,"Mitarbeiterdaten",'1','1','L','1');
|
||||
// $pdf->Write(8,"\n");
|
||||
$pdf->SetFillColor(255,255,255); $pdf->SetTextColor(0,0,0); $pdf->SetFont('Helvetica','',10);
|
||||
$zeilen=25;
|
||||
$typen = $GLOBALS['mysql']->query("SELECT * FROM tourentyp");
|
||||
while($row_tt = $typen->fetch_assoc()) {
|
||||
$zaehler = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' AND jahr='".$_GET['jahr']."' AND fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
if($zaehler['num_rows']>0) { //prüfen ob eintrag bei aktuellen tourentyp
|
||||
$pdf->SetFont('Helvetica','B',10);
|
||||
// $pdf->Cell(104,5,($row_tt['tname']." - ".$row_tt['tinfotitel']),'0','0','L','0');
|
||||
$pdf->Cell(30,5,($row_tt['tname']),'T','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10);
|
||||
$noscreen=1;
|
||||
$ldaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_GET['monat']."' and jahr='".$_GET['jahr']."' and fahrer='".$_GET['ma']."' AND typ='".$row_tt['tid']."' ORDER BY tag"); $key=0;
|
||||
while($row = $ldaten->fetch_assoc()) {
|
||||
if($noscreen==1) { $noscreen=0; } else { $pdf->Cell(30,5,(" "),'0','0','L','0'); }
|
||||
$pdf->Cell(37,5,($row['tag'].".".$row['monat'].".".$row['jahr']." - ".$row['zeit']." Uhr"),'1','0','R','1');
|
||||
$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$pdf->Cell(32,5,($tmpd['tour']),'1','0','L','1');
|
||||
$pdf->Cell(20,5,($row['tarif'].",00 EUR"),'1','0','R','1'); $summe=$summe+$row['tarif'];
|
||||
$pdf->Cell(5,5,($row['tarifz']),'1','0','R','1');
|
||||
//---------------------------------------------------------------- 2 Spalte
|
||||
if($zeilen>1) {
|
||||
$pdf->Cell(10,5,(" "),'0','0','L','0'); $pdf->Cell(20,5,("x"),'1','0','L','1'); $pdf->Cell(40,5,("xxx"),'1','1','L','1');
|
||||
$zeilen--;
|
||||
} else {
|
||||
$pdf->Cell(70,5,(" "),'0','1','L','0');
|
||||
}
|
||||
}
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
// if 2. spalte null
|
||||
$pdf->Cell(10,5,(" "),'0','1','L','0');
|
||||
$pdf->SetFont('Helvetica','B',10);
|
||||
$pdf->Cell(30,5,("Summe:"),'T','0','L','0');
|
||||
$pdf->SetFont('Helvetica','',10);
|
||||
$pdf->Cell(89,5,($summe.",00 EUR"),'1','0','R','1');
|
||||
$pdf->Cell(5,5,($row['tarifz']),'1','0','R','1');
|
||||
|
||||
|
||||
$fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['ma']."'");
|
||||
$pdf->Output('Lohnvorschlag_'.($fahrer['name']).'.pdf','I');
|
||||
|
||||
?>
|
||||
150
scripts/a_ma.php
Normal file
150
scripts/a_ma.php
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?php
|
||||
$_SESSION['slohn']=12.40;
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=0;
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {
|
||||
if($_GET['monat']==1) {
|
||||
$monat=12; $jahr=$_GET['jahr']-1;
|
||||
} else {
|
||||
$monat=$_GET['monat']-1; $jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
if($_GET['wahl']==2) {
|
||||
if($_GET['monat']==12) {
|
||||
$monat=1; $jahr=$_GET['jahr']+1;
|
||||
} else {
|
||||
$monat=$_GET['monat']+1;
|
||||
$jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$jahr = date('Y');
|
||||
$monat = date('m');
|
||||
}
|
||||
|
||||
//-------------------------------- Touren all data
|
||||
// echo'<pre>'; print_r($_SESSION['tour']['19120']); echo'</pre>';
|
||||
//-------------------------------- Mitarbeiter
|
||||
$mitarbeiterlist = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv>0 AND typ<97 AND tarifgtyp!=99 ORDER BY name");
|
||||
|
||||
//-------------------------------- Mitarbeiter
|
||||
if(isset($_GET['id'])) {
|
||||
if($_GET['id']>0) {
|
||||
$ma_daten = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_GET['id']."'");
|
||||
$ma_id=$_GET['id']; // id für anzeige
|
||||
$ma_name=$ma_daten['name']; // name für anzeige
|
||||
$template->assign('ma_id', $ma_id);
|
||||
$template->assign('ma_name', $ma_name);
|
||||
$matyp=$ma_daten['typ'];
|
||||
|
||||
$tdaten = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ!=19 ORDER BY tag,typ"); $key=0; $senddata= array();
|
||||
while($row = $tdaten->fetch_assoc()) {
|
||||
//$senddata[$key]['tid']=$row['id'];
|
||||
$senddata[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$senddata[$key]['tname']=$_SESSION['tour'][$row['tour']]['tour'];
|
||||
if($_SESSION['tour'][$row['tour']]['s_fahrer']!=$ma_id) { $senddata[$key]['t_col']=2; }else{ $senddata[$key]['t_col']=1; }
|
||||
if($_SESSION['tour'][$row['tour']]['s_auto']!=$row['auto']) { $senddata[$key]['c_col']=2; }else{ $senddata[$key]['c_col']=1; }
|
||||
if($row['typ']!=$matyp) { $senddata[$key]['y_col']=2; }else{ $senddata[$key]['y_col']=1; }
|
||||
if($matyp==4 && $row['typ']==5 OR $matyp==4 && $row['typ']==17) { $senddata[$key]['y_col']=1; }
|
||||
|
||||
$tmpt = $GLOBALS['mysql']->query_single("SELECT * FROM tourentyp WHERE tid='".$row['typ']."'");
|
||||
$senddata[$key]['typ']=$tmpt['tname'];
|
||||
|
||||
|
||||
$senddata[$key]['auto']=$_SESSION['car'][$row['auto']]['kz'];
|
||||
|
||||
$key++;
|
||||
}
|
||||
|
||||
}
|
||||
$template->assign('senddata', $senddata);
|
||||
}
|
||||
//-------------------------------- Sondertouren
|
||||
|
||||
$somenge=$GLOBALS['mysql']->summe("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ not in(19,'".$ma_daten['typ']."') ORDER BY tag"); $key=0; $stgeld=0; $lastdate=0;
|
||||
$template->assign('sonderdaten', $somenge);
|
||||
if ($somenge!=0) {
|
||||
$st2=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ not in(19,'".$ma_daten['typ']."') ORDER BY tag,tour"); $typtest=0; $key=0;
|
||||
while($row = $st2->fetch_assoc()) {
|
||||
if($matyp==4 && $row['typ']==5 OR $matyp==4 && $row['typ']==17) { $typtest=1; }
|
||||
if($typtest!=1) {
|
||||
$datum=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$stx[$key]['datum']=$datum;
|
||||
$stx[$key]['tname']=$_SESSION['tour'][$row['tour']]['tour'];
|
||||
if (strlen($row['tarif'])!=0) {
|
||||
$stx[$key]['summe']=$row['tarif'];
|
||||
} else {
|
||||
|
||||
$stx[$key]['summe']=$_SESSION['tour'][$row['tour']]['tarif0'];
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$tmpd['tarif0']."' WHERE id='".$row['id']."'");
|
||||
}
|
||||
$stgeld=$stgeld+$stx[$key]['summe'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('stgeld', $stgeld);
|
||||
$template->assign('st_f', $ma_daten['sasof']);
|
||||
$template->assign('stumh', $stgeld/$ma_daten['sasof']);
|
||||
|
||||
//echo'<pre>'; print_r($stx); echo'</pre>';
|
||||
$template->assign('stdaten', $stx);
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
//-------------------------------- SaSo Ausrechnung
|
||||
$smenge=$GLOBALS['mysql']->summe("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ=19 ORDER BY tag"); $key=0; $sgeld=0; $lastdate=0;
|
||||
$template->assign('sasodaten', $smenge);
|
||||
if ($smenge!=0) {
|
||||
$st=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' AND fahrer='".$ma_id."' AND typ=19 ORDER BY tag,tour");
|
||||
while($row = $st->fetch_assoc()) {
|
||||
|
||||
$datum=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
if ($key==0) { $lastdate=$datum; }
|
||||
$sd[$key]['datum']=$datum;
|
||||
if ($datum!=$lastdate) { $sd[$key]['linie']=1; } else { $sd[$key]['linie']=8; }
|
||||
$lastdate=$datum;
|
||||
|
||||
//$tmpd = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$sd[$key]['tname']=$_SESSION['tour'][$row['tour']]['tour'];
|
||||
if (strlen($row['tarif'])!=0) {
|
||||
$sd[$key]['summe']=$row['tarif'];
|
||||
} else {
|
||||
$sd[$key]['summe']=$_SESSION['tour'][$row['tour']]['tarif0'];
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET tarif='".$_SESSION['tour'][$row['tour']]['tarif0']."' WHERE id='".$row['id']."'");
|
||||
}
|
||||
$sgeld=$sgeld+$sd[$key]['summe'];
|
||||
|
||||
// echo'<pre>'; print_r($row); echo'</pre>';
|
||||
$key++;
|
||||
}
|
||||
$template->assign('geld', $sgeld);
|
||||
$template->assign('ss_f', $ma_daten['sasof']);
|
||||
$template->assign('sumh', $sgeld/$ma_daten['sasof']);
|
||||
|
||||
|
||||
$template->assign('sdaten', $sd);
|
||||
}
|
||||
//-------------------------------- Kalender
|
||||
$kmenge=$GLOBALS['mysql']->summe("SELECT * FROM planer WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$ma_id."'");
|
||||
//print_r($kmenge); echo'</pre>';
|
||||
$template->assign('kalmenge', $kmenge);
|
||||
if ($kmenge!=0) {
|
||||
$kald=$GLOBALS['mysql']->query("SELECT * FROM planer WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$ma_id."' ORDER BY tag"); $key=0;
|
||||
while($row = $kald->fetch_assoc()) {
|
||||
$kd[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$kd[$key]['bez']=$_SESSION['pbz'][$row['grund']]['bez'];
|
||||
if($_SESSION['pbz'][$row['grund']]['nichtda']!=0) { $kd[$key]['farbe']=1; } else { $kd[$key]['farbe']=2; }
|
||||
$key++;
|
||||
}
|
||||
$template->assign('kdata', $kd);
|
||||
}
|
||||
//--------------------------------
|
||||
|
||||
$template->assign('mitarbeiterlist', $mitarbeiterlist);
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('content', 'tpl/a_ma.tpl'); //_list
|
||||
|
||||
?>
|
||||
99
scripts/a_makal.php
Normal file
99
scripts/a_makal.php
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=6;
|
||||
error_reporting(E_ALL); ini_set('display_errors', 1);
|
||||
|
||||
// echo "<pre>"; print_r($data); echo "</pre>";
|
||||
if(isset($_GET['wahl'])) {
|
||||
if($_GET['wahl']==1) {
|
||||
if($_GET['monat']==1) {
|
||||
$monat=12; $jahr=$_GET['jahr']-1; } else { $monat=$_GET['monat']-1; if($monat<10) { $monat="0".$monat; } $jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
if($_GET['wahl']==2) {
|
||||
if($_GET['monat']==12) {
|
||||
$monat=1; $jahr=$_GET['jahr']+1; } else { $monat=$_GET['monat']+1; if($monat<10) { $monat="0".$monat; } $jahr=$_GET['jahr'];
|
||||
}
|
||||
}
|
||||
if($_GET['wahl']==3) {
|
||||
$monat=1; $jahr=$_GET['jahr']-1; if($monat<10) { $monat="0".$monat; }
|
||||
}
|
||||
if($_GET['wahl']==4) {
|
||||
$monat=1; $jahr=$_GET['jahr']+1; if($monat<10) { $monat="0".$monat; }
|
||||
}
|
||||
} else {
|
||||
$jahr = date('Y');
|
||||
$monat = date('m')-1;
|
||||
}
|
||||
|
||||
|
||||
//$tagname = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
|
||||
$makal = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter ORDER by name"); $key=0;
|
||||
while($row = $makal->fetch_assoc()) {
|
||||
$kalender = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row['id']."' ORDER by tag");
|
||||
if ($kalender['num_rows']!=0) {
|
||||
$kaldata = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE monat='".$monat."' AND jahr='".$jahr."' AND mid='".$row['id']."' ORDER by tag");
|
||||
while($kdata = $kaldata->fetch_assoc()) {
|
||||
$data[$key]['wechsel'] = 0;
|
||||
$data[$key]['name'] = $row['name'];
|
||||
$data[$key]['info'] = $kdata['info'];
|
||||
$data[$key]['time'] = mktime(0, 0, 0,$kdata['monat'],$kdata['tag'],$kdata['jahr']);
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$kdata['grund']."'");
|
||||
$data[$key]['grund'] = $row_icon['bez'];
|
||||
$key++;
|
||||
}
|
||||
$data[$key]['wechsel'] = 1; $key++;
|
||||
//----------------------------------------------
|
||||
$temp1 = $GLOBALS['mysql']->query("SELECT * FROM planer_bez WHERE id<80"); $zz=0;
|
||||
while($row2 = $temp1->fetch_assoc()) {
|
||||
$kd = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row['id']."' AND monat='".$monat."' AND jahr='".$jahr."' AND grund='".$row2['id']."'");
|
||||
if($kd['num_rows']>0) {
|
||||
$tmp[$zz]['a']=$kd['num_rows']." x";
|
||||
$tmp[$zz]['c']=$row2['bez'];
|
||||
$tmp[$zz]['wechsel'] = 0;
|
||||
$zz++;
|
||||
$template->assign('data2', $tmp);
|
||||
}
|
||||
}
|
||||
$tmp[$zz]['wechsel'] = 1; $zz++;
|
||||
//echo "<pre>"; print_r($tmp); echo "</pre>";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//echo "<pre>"; print_r($data); echo "</pre>";
|
||||
|
||||
$template->assign('data', $data);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('monat', $monat);
|
||||
|
||||
$template->assign('content', 'tpl/a_makal.tpl');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
69
scripts/a_tour.php
Normal file
69
scripts/a_tour.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
// error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
$monat = (int)date('n');
|
||||
$jahr = (int)date('Y');
|
||||
//$mitarbeiter=1;
|
||||
$kw_aktuell = (int)date('W');
|
||||
|
||||
if(isset($_POST['save'])) {
|
||||
|
||||
$row_firmax = $GLOBALS['mysql']->query_single("SELECT * FROM firmen WHERE id='".$_POST['ma1']."'");
|
||||
$a_name=$row_firmax['name'];
|
||||
$a_monat=$_POST['ma2'];
|
||||
$a_jahr=$_POST['ma3'];
|
||||
|
||||
|
||||
//------------------ GH
|
||||
$key=0; $keytour=0; $zahl=0;
|
||||
$firmatouren = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE afirma='".$_POST['ma1']."' ORDER BY tour");
|
||||
while($rowfirma = $firmatouren->fetch_assoc()) {
|
||||
$tour[$keytour]['id']=$rowfirma['id'];
|
||||
$tour[$keytour]['tour']=$rowfirma['tour'];
|
||||
$tour[$keytour]['stammf']=$rowfirma['s_fahrer'];
|
||||
$tour[$keytour]['infotitel']=$rowfirma['infotitel'];
|
||||
|
||||
$keytour++;
|
||||
}
|
||||
for($zahl = 0; $zahl < $keytour; $zahl++) {
|
||||
$tmptour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$_POST['ma2']."' AND jahr='".$_POST['ma3']."' AND tour='".$tour[$zahl]['id']."' ORDER BY tag");
|
||||
while($row = $tmptour->fetch_assoc()) {
|
||||
$tour1[$key]['tour']=$tour[$zahl]['tour'];
|
||||
if($tour[$zahl]['stammf'] == $row['fahrer']) { $tour1[$key]['fremd']=1; } else { $tour1[$key]['fremd']=0; }
|
||||
$tour1[$key]['id']=$row['id'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$tour1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$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'];
|
||||
$tour1[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$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;
|
||||
|
||||
$template->assign('ma1', $ma1);
|
||||
$template->assign('ma2', $ma2);
|
||||
$template->assign('ma3', $ma3);
|
||||
$template->assign('a_name', $a_name);
|
||||
$template->assign('a_monat', $a_monat);
|
||||
$template->assign('a_jahr', $a_jahr);
|
||||
$template->assign('tour1', $tour1);
|
||||
$template->assign('keytour', $keytour);
|
||||
|
||||
$template->assign('content', 'tpl/a_tour.tpl'); //_list
|
||||
|
||||
?>
|
||||
177
scripts/a_zeitk.php
Normal file
177
scripts/a_zeitk.php
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=4;
|
||||
// Melde alle PHP Fehler (siehe Changelog)
|
||||
error_reporting(E_ALL); ini_set('display_errors', 1);
|
||||
|
||||
if($_SESSION['benutzer']==12) { $planer="T. Muerbe"; }
|
||||
else if($_SESSION['benutzer']==13) { $planer="Anett"; }
|
||||
else if($_SESSION['benutzer']==18) { $planer="Joerg Basse"; }
|
||||
else if($_SESSION['benutzer']==44) { $planer="I. Steinmacher"; }
|
||||
else $planer="Frank";
|
||||
|
||||
|
||||
if($_GET['wahl']==1){if($_GET['monat']==1) { $monat=12; $jahr=$_GET['jahr']-1;} else { $monat=$_GET['monat']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2) {if($_GET['monat']==12) { $monat=1; $jahr=$_GET['jahr']+1;} else { $monat=$_GET['monat']+1; $jahr=$_GET['jahr']; }}
|
||||
elseif($_GET['id']>0 && $_GET['wahl']==0) { $monat=$_GET['monat']; $jahr=$_GET['jahr'];
|
||||
} else {
|
||||
$jahr = (int)date('Y');
|
||||
$monat = (int)date('m');
|
||||
$kw_aktuell = (int)date('W');
|
||||
}
|
||||
|
||||
if($_GET['id']>0 OR $_POST['mid']>0) {
|
||||
if($_GET['id']>0) { $lmid=$_GET['id']; }
|
||||
if($_POST['mid']>0) { $lmid=$_POST['mid']; }
|
||||
$anzeige=1;
|
||||
$mitarbeiter = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$lmid."'");
|
||||
$istjahr = (int)date('Y'); $lastjahr=$istjahr-1;
|
||||
|
||||
//----------- zeitkonto
|
||||
$tmpkonto=$mitarbeiter['zeitkonto'];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//---------------------------
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$lmid."'");
|
||||
|
||||
$ma_tmp = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv>0 ORDER by name"); $key=0;
|
||||
while($row = $ma_tmp->fetch_assoc()) {
|
||||
$ma[$key]['zkonto']=$row['zeitkonto']; $tmpkonto=$row['zeitkonto'];
|
||||
//------------------------
|
||||
if($row['zlvz']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=4 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
//echo "<pre>"; print_r($trow); echo "</pre>";
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zgh']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=3 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zpin']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=5 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zpost']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=6 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zrs']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=7 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zsaso']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=8 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zgrm']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=9 ");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zwerb']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=11");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zmb']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=12");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zfaz']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=15");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zpleer']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=16");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zlvzz']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=17");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zsasoz']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=18");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
if($row['zsonstige']==1) {
|
||||
$tl_tmp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE monat='".$monat."' AND jahr='".$jahr."' and fahrer='".$row['id']."' and typ=99");
|
||||
while($trow = $tl_tmp->fetch_assoc()) {
|
||||
$tour_data = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$trow['tour']."'");
|
||||
$tmpkonto=$tmpkonto-$tour_data['zeit'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------
|
||||
$ma[$key]['aktuell']=$tmpkonto;
|
||||
$ma[$key]['name']=$row['name'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
|
||||
// $tmpkonto=$mitarbeiter['zeitkonto'];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//echo $monat."-".$jahr;
|
||||
//---------------------------
|
||||
$mitarbeiterlist_a = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv>0 ORDER by name");
|
||||
$mitarbeiterlist_d = $GLOBALS['mysql']->query_array("SELECT * FROM mitarbeiter WHERE aktiv<1 ORDER by name");
|
||||
$template->assign('mitarbeiterlist_a', $mitarbeiterlist_a);
|
||||
$template->assign('mitarbeiterlist_d', $mitarbeiterlist_d);
|
||||
|
||||
|
||||
$template->assign('monat', $monat);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('anzeige', $_GET['id']);
|
||||
$template->assign('ma', $ma);
|
||||
|
||||
$template->assign('content', 'tpl/a_zeitk.tpl');
|
||||
?>
|
||||
28
scripts/aenderday.php
Normal file
28
scripts/aenderday.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?
|
||||
$heute_jahr = date("Y");
|
||||
$heute_monat = date("m");
|
||||
$heute_tag = date("d");
|
||||
$heute = "$heute_tag.$heute_monat.$heute_jahr";
|
||||
$wtag = date("w");
|
||||
if($_wtag == "6") {
|
||||
$tagp = strtotime("+2 day");
|
||||
echo $wtag;
|
||||
} else {
|
||||
$tagp = strtotime("+1 day");
|
||||
}
|
||||
$morgen = date("d.m.Y", $tagp);
|
||||
$morgen_tag = date("d",$tagp);
|
||||
$morgen_monat = date("m",$tagp);
|
||||
$morgen_jahr = date("Y",$tagp);
|
||||
|
||||
|
||||
$aender1 = $GLOBALS['mysql']->query_array("SELECT * FROM tourenliste WHERE tag='".$heute_tag."' AND monat='".$heute_monat."' AND jahr='".$heute_jahr."' ");
|
||||
$template->assign('aender1', $aender1);
|
||||
$template->assign('heute', $heute);
|
||||
//$template->assign('content', 'tpl/aenderday_list.tpl');
|
||||
$aender2 = $GLOBALS['mysql']->query_array("SELECT * FROM tourenliste WHERE tag='".$morgen_tag."' AND monat='".$morgen_monat."' AND '".$morgen_jahr."'");
|
||||
$template->assign('morgen', $morgen);
|
||||
$template->assign('aender2', $aender2);
|
||||
$template->assign('content', 'tpl/aenderday_list.tpl');
|
||||
|
||||
?>
|
||||
204
scripts/aenderkw.php
Normal file
204
scripts/aenderkw.php
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
<?php
|
||||
|
||||
$_SESSION['m1']=0; $_SESSION['m2']=3;
|
||||
$tag1_jahr = date("Y");
|
||||
$tag1_monat = date("m");
|
||||
$tag1_tag = date("d");
|
||||
//$tag1 = "$heute_tag.$heute_monat.$heute_jahr";
|
||||
$wtag = date("w");
|
||||
if($wtag == "0") {
|
||||
$tp1 = strtotime("+1 day");
|
||||
$tp2 = strtotime("+2 day");
|
||||
$tp3 = strtotime("+3 day");
|
||||
$tp4 = strtotime("+4 day");
|
||||
$tp5 = strtotime("+5 day");
|
||||
$tp6 = strtotime("+6 day");
|
||||
} else if($wtag == "1") {
|
||||
$tp1 = strtotime("+0 day");
|
||||
$tp2 = strtotime("+1 day");
|
||||
$tp3 = strtotime("+2 day");
|
||||
$tp4 = strtotime("+3 day");
|
||||
$tp5 = strtotime("+4 day");
|
||||
$tp6 = strtotime("+5 day");
|
||||
} else if($wtag == "2") {
|
||||
$tp1 = strtotime("+0 day");
|
||||
$tp2 = strtotime("+1 day");
|
||||
$tp3 = strtotime("+2 day");
|
||||
$tp4 = strtotime("+3 day");
|
||||
$tp5 = strtotime("+4 day");
|
||||
$tp6 = strtotime("+6 day");
|
||||
} else if($wtag == "3") {
|
||||
$tp1 = strtotime("+0 day");
|
||||
$tp2 = strtotime("+1 day");
|
||||
$tp3 = strtotime("+2 day");
|
||||
$tp4 = strtotime("+3 day");
|
||||
$tp5 = strtotime("+5 day");
|
||||
$tp6 = strtotime("+6 day");
|
||||
} else if($wtag == "4") {
|
||||
$tp1 = strtotime("+0 day");
|
||||
$tp2 = strtotime("+1 day");
|
||||
$tp3 = strtotime("+2 day");
|
||||
$tp4 = strtotime("+4 day");
|
||||
$tp5 = strtotime("+5 day");
|
||||
$tp6 = strtotime("+6 day");
|
||||
} else if($wtag == "5") {
|
||||
$tp1 = strtotime("+0 day");
|
||||
$tp2 = strtotime("+1 day");
|
||||
$tp3 = strtotime("+3 day");
|
||||
$tp4 = strtotime("+4 day");
|
||||
$tp5 = strtotime("+5 day");
|
||||
$tp6 = strtotime("+6 day");
|
||||
} else {
|
||||
$tp1 = strtotime("+0 day");
|
||||
$tp2 = strtotime("+2 day");
|
||||
$tp3 = strtotime("+3 day");
|
||||
$tp4 = strtotime("+4 day");
|
||||
$tp5 = strtotime("+5 day");
|
||||
$tp6 = strtotime("+6 day");
|
||||
}
|
||||
|
||||
$tag1 = date("d.m.Y", $tp1); $tag1_tag = date("d",$tp1); $tag1_monat = date("m",$tp1); $tag1_jahr = date("Y",$tp1);
|
||||
$tag2 = date("d.m.Y", $tp2); $tag2_tag = date("d",$tp2); $tag2_monat = date("m",$tp2); $tag2_jahr = date("Y",$tp2);
|
||||
$tag3 = date("d.m.Y", $tp3); $tag3_tag = date("d",$tp3); $tag3_monat = date("m",$tp3); $tag3_jahr = date("Y",$tp3);
|
||||
$tag4 = date("d.m.Y", $tp4); $tag4_tag = date("d",$tp4); $tag4_monat = date("m",$tp4); $tag4_jahr = date("Y",$tp4);
|
||||
$tag5 = date("d.m.Y", $tp5); $tag5_tag = date("d",$tp5); $tag5_monat = date("m",$tp5); $tag5_jahr = date("Y",$tp5);
|
||||
$tag6 = date("d.m.Y", $tp6); $tag6_tag = date("d",$tp6); $tag6_monat = date("m",$tp6); $tag6_jahr = date("Y",$tp6);
|
||||
|
||||
|
||||
//-------------- TAG 1
|
||||
$tour1 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag1_tag."' AND monat='".$tag1_monat."' AND jahr='".$tag1_jahr."' AND typ=3 OR tag='".$tag1_tag."' AND monat='".$tag1_monat."' AND jahr='".$tag1_jahr."' AND typ=4 OR tag='".$tag1_tag."' AND monat='".$tag1_monat."' AND jahr='".$tag1_jahr."' AND typ=5"); $key=0;
|
||||
while($row = $tour1->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$stamma=$row_tour['s_auto'];
|
||||
$stammf=$row_tour['s_fahrer'];
|
||||
$gleich=0;
|
||||
if($stamma == $row['auto']) { $gleich++; }
|
||||
if ($stammf == $row['fahrer']) { $gleich++; }
|
||||
if ($gleich<2) {
|
||||
$aender1[$key]['id']=$row['id'];
|
||||
$aender1[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer1 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$aender1[$key]['fahrer']=$row_fahrer1['name'];
|
||||
$row_auto1 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$aender1[$key]['kennz']=$row_auto1['kz'];
|
||||
$aender1[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//-------------- TAG 2
|
||||
$tour2 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag2_tag."' AND monat='".$tag2_monat."' AND jahr='".$tag2_jahr."' AND typ=3 OR tag='".$tag2_tag."' AND monat='".$tag2_monat."' AND jahr='".$tag2_jahr."' AND typ=4 OR tag='".$tag2_tag."' AND monat='".$tag2_monat."' AND jahr='".$tag2_jahr."' AND typ=5"); $key=0;
|
||||
while($row = $tour2->fetch_assoc()) {
|
||||
$row_tour2 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$stamma=$row_tour2['s_auto'];
|
||||
$stammf=$row_tour2['s_fahrer'];
|
||||
$gleich=0;
|
||||
if($stamma == $row['auto']) { $gleich++; }
|
||||
if ($stammf == $row['fahrer']) { $gleich++; }
|
||||
if ($gleich<2) {
|
||||
$aender2[$key]['id']=$row['id'];
|
||||
$aender2[$key]['tour']=$row_tour2['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$aender2[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$aender2[$key]['kennz']=$row_auto2['kz'];
|
||||
$aender2[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//-------------- TAG 3
|
||||
$tour3 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag3_tag."' AND monat='".$tag3_monat."' AND jahr='".$tag3_jahr."' AND typ=3 OR tag='".$tag3_tag."' AND monat='".$tag3_monat."' AND jahr='".$tag3_jahr."' AND typ=4 OR tag='".$tag3_tag."' AND monat='".$tag3_monat."' AND jahr='".$tag3_jahr."' AND typ=5"); $key=0;
|
||||
while($row = $tour3->fetch_assoc()) {
|
||||
$row_tour3 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$stamma=$row_tour3['s_auto'];
|
||||
$stammf=$row_tour3['s_fahrer'];
|
||||
$gleich=0;
|
||||
if($stamma == $row['auto']) { $gleich++; }
|
||||
if ($stammf == $row['fahrer']) { $gleich++; }
|
||||
if ($gleich<2) {
|
||||
$aender3[$key]['id']=$row['id'];
|
||||
$aender3[$key]['tour']=$row_tour3['tour'];
|
||||
$row_fahrer3 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$aender3[$key]['fahrer']=$row_fahrer3['name'];
|
||||
$row_auto3 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$aender3[$key]['kennz']=$row_auto3['kz'];
|
||||
$aender3[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//-------------- TAG 4
|
||||
$tour4 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag4_tag."' AND monat='".$tag4_monat."' AND jahr='".$tag4_jahr."' AND typ=3 OR tag='".$tag4_tag."' AND monat='".$tag4_monat."' AND jahr='".$tag4_jahr."' AND typ=4 OR tag='".$tag4_tag."' AND monat='".$tag4_monat."' AND jahr='".$tag4_jahr."' AND typ=5"); $key=0;
|
||||
while($row = $tour4->fetch_assoc()) {
|
||||
$row_tour4 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$stamma=$row_tour4['s_auto'];
|
||||
$stammf=$row_tour4['s_fahrer'];
|
||||
$gleich=0;
|
||||
if($stamma == $row['auto']) { $gleich++; }
|
||||
if ($stammf == $row['fahrer']) { $gleich++; }
|
||||
if ($gleich<2) {
|
||||
$aender4[$key]['id']=$row['id'];
|
||||
$aender4[$key]['tour']=$row_tour4['tour'];
|
||||
$row_fahrer4 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$aender4[$key]['fahrer']=$row_fahrer4['name'];
|
||||
$row_auto4 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$aender4[$key]['kennz']=$row_auto4['kz'];
|
||||
$aender4[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//-------------- TAG 5
|
||||
$tour5 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag5_tag."' AND monat='".$tag5_monat."' AND jahr='".$tag5_jahr."' AND typ=3 OR tag='".$tag5_tag."' AND monat='".$tag5_monat."' AND jahr='".$tag5_jahr."' AND typ=4 OR tag='".$tag5_tag."' AND monat='".$tag5_monat."' AND jahr='".$tag5_jahr."' AND typ=5"); $key=0;
|
||||
while($row = $tour5->fetch_assoc()) {
|
||||
$row_tour5 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$stamma=$row_tour5['s_auto'];
|
||||
$stammf=$row_tour5['s_fahrer'];
|
||||
$gleich=0;
|
||||
if($stamma == $row['auto']) { $gleich++; }
|
||||
if ($stammf == $row['fahrer']) { $gleich++; }
|
||||
if ($gleich<2) {
|
||||
$aender5[$key]['id']=$row['id'];
|
||||
$aender5[$key]['tour']=$row_tour5['tour'];
|
||||
$row_fahrer5 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$aender5[$key]['fahrer']=$row_fahrer5['name'];
|
||||
$row_auto5 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$aender5[$key]['kennz']=$row_auto5['kz'];
|
||||
$aender5[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//-------------- TAG 6
|
||||
$tour6 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag6_tag."' AND monat='".$tag6_monat."' AND jahr='".$tag6_jahr."' AND typ=3 OR tag='".$tag6_tag."' AND monat='".$tag6_monat."' AND jahr='".$tag6_jahr."' AND typ=4 OR tag='".$tag6_tag."' AND monat='".$tag6_monat."' AND jahr='".$tag6_jahr."' AND typ=5"); $key=0;
|
||||
while($row = $tour6->fetch_assoc()) {
|
||||
$row_tour6 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$stamma=$row_tour6['s_auto'];
|
||||
$stammf=$row_tour6['s_fahrer'];
|
||||
$gleich=0;
|
||||
if($stamma == $row['auto']) { $gleich++; }
|
||||
if ($stammf == $row['fahrer']) { $gleich++; }
|
||||
if ($gleich<2) {
|
||||
$aender6[$key]['id']=$row['id'];
|
||||
$aender6[$key]['tour']=$row_tour6['tour'];
|
||||
$row_fahrer6 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$aender6[$key]['fahrer']=$row_fahrer6['name'];
|
||||
$row_auto6 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$aender6[$key]['kennz']=$row_auto6['kz'];
|
||||
$aender6[$key]['infotext']=$row['infotext'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign('aender1', $aender1);
|
||||
$template->assign('aender2', $aender2);
|
||||
$template->assign('aender3', $aender3);
|
||||
$template->assign('aender4', $aender4);
|
||||
$template->assign('aender5', $aender5);
|
||||
$template->assign('aender6', $aender6);
|
||||
$template->assign('tag1', $tag1);
|
||||
$template->assign('tag2', $tag2);
|
||||
$template->assign('tag3', $tag3);
|
||||
$template->assign('tag4', $tag4);
|
||||
$template->assign('tag5', $tag5);
|
||||
$template->assign('tag6', $tag6);
|
||||
|
||||
$template->assign('content', 'tpl/aenderkw_list.tpl');
|
||||
|
||||
?>
|
||||
234
scripts/ainfo.php
Normal file
234
scripts/ainfo.php
Normal file
|
|
@ -0,0 +1,234 @@
|
|||
<?php
|
||||
$_SESSION['m1']=6; $_SESSION['m2']=1;
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
$tagname = array("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag");
|
||||
|
||||
$tagp = strtotime("+0 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day1=$tag.".".$monat.".".$jahr; $tna1=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf1[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf1[$key]['bez']=$jahre.". Geburtstag"; $maf1[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$tagp = strtotime("+1 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day2=$tag.".".$monat.".".$jahr; $tna2=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$maf2[$key]['tag']=$tag;
|
||||
$maf2[$key]['monat']=$row['monat'];
|
||||
$maf2[$key]['jahr']=$row['jahr'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf2[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf2[$key]['bez']=$row_icon['bez'];
|
||||
$maf2[$key]['icon']=$row_icon['icon'];
|
||||
$maf2[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf2[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf2[$key]['bez']=$jahre.". Geburtstag"; $maf2[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf2[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf2[$key]['bez']=$row_icon['bez'];
|
||||
$maf2[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$tagp = strtotime("+2 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day3=$tag.".".$monat.".".$jahr; $tna3=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$maf3[$key]['tag']=$tag;
|
||||
$maf3[$key]['monat']=$row['monat'];
|
||||
$maf3[$key]['jahr']=$row['jahr'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf3[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf3[$key]['bez']=$row_icon['bez'];
|
||||
$maf3[$key]['icon']=$row_icon['icon'];
|
||||
$maf3[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf3[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf3[$key]['bez']=$jahre.". Geburtstag"; $maf3[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf3[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf3[$key]['bez']=$row_icon['bez'];
|
||||
$maf3[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$tagp = strtotime("+3 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day4=$tag.".".$monat.".".$jahr; $tna4=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$maf4[$key]['tag']=$tag;
|
||||
$maf4[$key]['monat']=$row['monat'];
|
||||
$maf4[$key]['jahr']=$row['jahr'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf4[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf4[$key]['bez']=$row_icon['bez'];
|
||||
$maf4[$key]['icon']=$row_icon['icon'];
|
||||
$maf4[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf4[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf4[$key]['bez']=$jahre.". Geburtstag"; $maf4[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf4[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf4[$key]['bez']=$row_icon['bez'];
|
||||
$maf4[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$tagp = strtotime("+4 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day5=$tag.".".$monat.".".$jahr; $tna5=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$maf5[$key]['tag']=$tag;
|
||||
$maf5[$key]['monat']=$row['monat'];
|
||||
$maf5[$key]['jahr']=$row['jahr'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf5[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf5[$key]['bez']=$row_icon['bez'];
|
||||
$maf5[$key]['icon']=$row_icon['icon'];
|
||||
$maf5[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf5[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf5[$key]['bez']=$jahre.". Geburtstag"; $maf5[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf5[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf5[$key]['bez']=$row_icon['bez'];
|
||||
$maf5[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$tagp = strtotime("+5 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day6=$tag.".".$monat.".".$jahr; $tna6=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$maf6[$key]['tag']=$tag;
|
||||
$maf6[$key]['monat']=$row['monat'];
|
||||
$maf6[$key]['jahr']=$row['jahr'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf6[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf6[$key]['bez']=$row_icon['bez'];
|
||||
$maf6[$key]['icon']=$row_icon['icon'];
|
||||
$maf6[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf6[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf6[$key]['bez']=$jahre.". Geburtstag"; $maf6[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf6[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf6[$key]['bez']=$row_icon['bez'];
|
||||
$maf6[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
$tagp = strtotime("+6 day"); $tag = date("d",$tagp); $monat = date("m",$tagp); $jahr = date("Y",$tagp); $day7=$tag.".".$monat.".".$jahr; $tna7=$tagname[date("w",$tagp)];
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf7[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf7[$key]['bez']=$row_icon['bez'];
|
||||
$maf7[$key]['icon']=$row_icon['icon'];
|
||||
$maf7[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf7[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf7[$key]['bez']=$jahre.". Geburtstag"; $maf7[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf7[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf7[$key]['bez']=$row_icon['bez'];
|
||||
$maf7[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$template->assign('maf1', $maf1);
|
||||
$template->assign('maf2', $maf2);
|
||||
$template->assign('maf3', $maf3);
|
||||
$template->assign('maf4', $maf4);
|
||||
$template->assign('maf5', $maf5);
|
||||
$template->assign('maf6', $maf6);
|
||||
$template->assign('maf7', $maf7);
|
||||
$template->assign('day1', $day1);
|
||||
$template->assign('day2', $day2);
|
||||
$template->assign('day3', $day3);
|
||||
$template->assign('day4', $day4);
|
||||
$template->assign('day5', $day5);
|
||||
$template->assign('day6', $day6);
|
||||
$template->assign('day7', $day7);
|
||||
|
||||
$template->assign('tna1', $tna1);
|
||||
$template->assign('tna2', $tna2);
|
||||
$template->assign('tna3', $tna3);
|
||||
$template->assign('tna4', $tna4);
|
||||
$template->assign('tna5', $tna5);
|
||||
$template->assign('tna6', $tna6);
|
||||
$template->assign('tna7', $tna7);
|
||||
|
||||
|
||||
|
||||
// $template->assign('content', 'tpl/kalender99.tpl');
|
||||
$template->assign('content', 'tpl/ue_hm.tpl');
|
||||
?>
|
||||
24
scripts/ajax/a_abr.php
Normal file
24
scripts/ajax/a_abr.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
|
||||
//echo'<pre>'; print_r($row); echo'</pre>';
|
||||
|
||||
|
||||
|
||||
$tourx = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tour='".$_POST['tid']."' and monat='".$_POST['monat']."' and jahr='".$_POST['jahr']."'");
|
||||
$template->assign('tdata', $tourx['num_rows']);
|
||||
if($tourx['num_rows']!=0) {
|
||||
$ta_id= array_search($_POST['tid'], array_column($a_touren, 'id'));
|
||||
$template->assign('tname',$a_touren[$ta_id]['tour']);
|
||||
$template->assign('tinfo',$a_touren[$ta_id]['infotitel']);
|
||||
$template->assign('tid',$_POST['tid']);
|
||||
$template->assign('monat',$_POST['monat']);
|
||||
$template->assign('jahr',$_POST['jahr']);
|
||||
|
||||
|
||||
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/a_abr.tpl');
|
||||
?>
|
||||
|
||||
|
||||
174
scripts/ajax/a_tour.php
Normal file
174
scripts/ajax/a_tour.php
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<?php
|
||||
$a_zeit=time();
|
||||
$tag = date("d");
|
||||
$monat= date("m");
|
||||
$jahr = date("Y");
|
||||
$jahrk= date("y");
|
||||
|
||||
$diff=0;
|
||||
$auslesezeit =$a_zeit+28800; // +nächsten 10 Stunden
|
||||
$kontrollzeit=$a_zeit-28800; // +nächsten 10 Stunden
|
||||
$laufend = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE time>'".$kontrollzeit."' and time<'".$auslesezeit."' ORDER BY time"); $key=0;
|
||||
while($row = $laufend->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$row_auto = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
if($row_fahrer['uewach']>0) {
|
||||
$kartenlog = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$row['fahrer']."' ORDER BY zeit DESC LIMIT 0,1");
|
||||
if($kartenlog['zeit']>$kontrollzeit) {
|
||||
$gelbzeit=$row['time']+$row_tour['zeit']; //echo "<pre>"; print_r($gelbzeit); echo "</pre>";
|
||||
$rotzeit=$gelbzeit+3600;
|
||||
if($gelbzeit<time()) {
|
||||
$atour2[$key]['tour']=$row_tour['tour'];
|
||||
$atour2[$key]['name']=$row_fahrer['name'];
|
||||
$atour2[$key]['kennz']=$row_auto['kz'];
|
||||
}
|
||||
elseif($rotzeit<$a_zeit) {
|
||||
$atour3[$key]['tour']=$row_tour['tour'];
|
||||
$atour3[$key]['name']=$row_fahrer['name'];
|
||||
$atour3[$key]['kennz']=$row_auto['kz'];
|
||||
}
|
||||
else {
|
||||
$atour1[$key]['tour']=$row_tour['tour'];
|
||||
$atour1[$key]['name']=$row_fahrer['name'];
|
||||
$atour1[$key]['kennz']=$row_auto['kz'];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if($a_zeit>$row['time']) {
|
||||
$gelbzeit=$row['time']+$row_tour['zeit'];
|
||||
$rotzeit=$gelbzeit+3600;
|
||||
if($gelbzeit<time() and time()<$rotzeit) {
|
||||
$atour2[$key]['tour']=$row_tour['tour'];
|
||||
$atour2[$key]['name']=$row_fahrer['name'];
|
||||
$atour2[$key]['kennz']=$row_auto['kz'];
|
||||
} elseif (time()<$rotzeit) {
|
||||
$atour1[$key]['tour']=$row_tour['tour'];
|
||||
$atour1[$key]['name']=$row_fahrer['name'];
|
||||
$atour1[$key]['kennz']=$row_auto['kz'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// $zeit_eins=$a_zeit-18000; //echo "<pre>"; print_r($klog); echo "</pre>";
|
||||
if($klog>$zeit_eins & $klog<$ezeit) {
|
||||
|
||||
//tour ist los gefahren und noch unterwegs
|
||||
$atour2[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour2[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour2[$key]['kennz']=$row_auto2['kz'];
|
||||
}
|
||||
if($klog>$ezeit and $ezeit2<$a_zeit) {
|
||||
|
||||
//tour ist fertig - Fahrer hat sich ausgelogt
|
||||
$atour3[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour3[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour3[$key]['kennz']=$row_auto2['kz'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$startzeit=mktime($teile[0],$teile[1], 0, $monat,$tag,$jahrk);
|
||||
$kannzeit = strtotime("-5 hours", $startzeit);
|
||||
// $zeit_ts=strtotime("now");
|
||||
|
||||
$zeit_eins=$zeit_ts-18000;
|
||||
$tourzeit=($row_tour['zeit']/2);
|
||||
|
||||
$ezeit=$a_zeit+$tourzeit; //endzeit
|
||||
$ezeit2=$row_tour['zeit']+$zeit_ts+7200; //endzeit
|
||||
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
|
||||
// echo "<pre>"; print_r($row_fahrer); echo "</pre>";
|
||||
if($row_fahrer['uewach']>0) {
|
||||
$kartenlog = $GLOBALS['mysql']->query_single("SELECT * FROM kartenlog WHERE user='".$row['fahrer']."' LIMIT 0,1");
|
||||
$klog=$kartenlog['zeit'];
|
||||
$zeit_eins=$a_zeit-18000; //echo "<pre>"; print_r($klog); echo "</pre>";
|
||||
if($klog>$zeit_eins & $klog<$ezeit) {
|
||||
|
||||
//tour ist los gefahren und noch unterwegs
|
||||
$atour2[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour2[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour2[$key]['kennz']=$row_auto2['kz'];
|
||||
}
|
||||
if($klog>$ezeit and $ezeit2<$a_zeit) {
|
||||
|
||||
//tour ist fertig - Fahrer hat sich ausgelogt
|
||||
$atour3[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour3[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour3[$key]['kennz']=$row_auto2['kz'];
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
//keine ueberwachung auto zu Hause !!!!!!
|
||||
$zeit_eins=$a_zeit-3600; //startzeit -1h
|
||||
if($a_zeit>$zeit_eins and $a_zeit<$ezeit ) { // Tour unterwechs - ohne Überwachung
|
||||
$atour2[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour2[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour2[$key]['kennz']=$row_auto2['kz'];
|
||||
}
|
||||
if($a_zeit>$zeit_eins and $a_zeit>$ezeit & $a_zeit<$ezeit2) { // Tour fertig - ohne Überwachung
|
||||
$atour3[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour3[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour3[$key]['kennz']=$row_auto2['kz'];
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
$key++;
|
||||
|
||||
}
|
||||
|
||||
$template->assign('atour1', $atour1);
|
||||
$template->assign('atour2', $atour2);
|
||||
$template->assign('atour3', $atour3);
|
||||
$template->assign('zeit_online',time()-(1800));
|
||||
$template->assign('zeit_live',time()-(300));
|
||||
|
||||
$template->assign('content', 'tpl/ajax/a_tour.tpl');
|
||||
53
scripts/ajax/a_tuer.php
Normal file
53
scripts/ajax/a_tuer.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$a_zeit=time();
|
||||
$tag = date("d");
|
||||
$monat= date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
$laufend = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'"); $key=0;
|
||||
while($row = $laufend->fetch_assoc()) {
|
||||
|
||||
$status[$key]['zeit']=$row['zeit'];
|
||||
$teile = explode(":", $row['zeit']);
|
||||
|
||||
$zeit_ts=mktime($teile[0],$teile[1], 0, $monat,$tag,$jahr);
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
|
||||
if($row_fahre['uewach']>0) {
|
||||
$kartenlog = $GLOBALS['mysql']->query("SELECT * FROM kartenlog WHERE id='".$row['fahrer']."' DESC LIMIT 0,1"); $key=0;
|
||||
$klog=$kartenlog['zeit'];
|
||||
$zeit_eins=$zeit_ts-18000;
|
||||
if($klog>$zeit_eins) {
|
||||
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$atour[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrer2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$atour[$key]['fahrer']=$row_fahrer2['name'];
|
||||
$row_auto2 = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$atour[$key]['kennz']=$row_auto2['kz']; $key++; $wert10a++;
|
||||
|
||||
|
||||
}
|
||||
//tour unterwegs
|
||||
|
||||
|
||||
// databankabfrage türlog maximal 1 ergebnis ...... timstring auslesen
|
||||
//timstring mit tür vergleichen - 4 stunden
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
//keine ueberwachung
|
||||
$zeit_eins=$zeit_ts-3600;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$key++;
|
||||
}
|
||||
$template->assign('atour', $atour);
|
||||
$template->assign('zeit_online',time()-(1800));
|
||||
$template->assign('zeit_live',time()-(300));
|
||||
|
||||
$template->assign('content', 'tpl/ajax/a_tour.tpl');
|
||||
17
scripts/ajax/abr_list.php
Normal file
17
scripts/ajax/abr_list.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
//-------------------- wiederkehrende abfragen -------------------------------------------------
|
||||
//$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
//$a_planbz = $GLOBALS['a_planbz'];
|
||||
//$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
//echo'<pre>'; print_r($row); echo'</pre>';
|
||||
|
||||
|
||||
$tourx = $GLOBALS['mysql']->query_single("SELECT * FROM tliste WHERE id='".$_POST['id']."'");
|
||||
$template->assign('tour', $tourx);
|
||||
$template->assign('content', 'tpl/ajax/itour.tpl');
|
||||
?>
|
||||
|
||||
|
||||
34
scripts/ajax/backend-search.php
Normal file
34
scripts/ajax/backend-search.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
//Including Database configuration file.
|
||||
if (isset($_POST['search'])) {
|
||||
//Search box value assigning to $Name variable.
|
||||
$Name = $_POST['search'];
|
||||
//Search query.
|
||||
$Query = $GLOBALS['mysql']->query("SELECT * FROM fazs WHERE name LIKE '%$Name%' OR name2 LIKE '%$Name%'LIMIT 40");
|
||||
//print_r( $Query);
|
||||
echo $con;
|
||||
//Query execution
|
||||
$ExecQuery = MySQLi_query($con, $Query);
|
||||
//Creating unordered list to display result.
|
||||
echo '
|
||||
<ul>
|
||||
';
|
||||
//Fetching result from database.
|
||||
//while ($Result = MySQLi_fetch_array($ExecQuery)) {
|
||||
//while ($Result = MySQLi_fetch_array($Query)) {
|
||||
while($Result = $Query->fetch_assoc()) {
|
||||
?>
|
||||
<!-- Creating unordered list items.
|
||||
Calling javascript function named as "fill" found in "script.js" file.
|
||||
By passing fetched result as parameter. -->
|
||||
<li onclick='fill("<?php echo $Result['name2'].' '.$Result['name']; ?>")'>
|
||||
<a>
|
||||
<!-- Assigning searched result in "Search box" in "search.php" file. -->
|
||||
<?php echo $Result['name2'].' '.$Result['name']; ?>
|
||||
</li></a>
|
||||
<!-- Below php code is just for closing parenthesis. Don't be confused. -->
|
||||
<?php
|
||||
}}
|
||||
?>
|
||||
</ul>
|
||||
49
scripts/ajax/blitzer.php
Normal file
49
scripts/ajax/blitzer.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------- Polizeimeldungen
|
||||
/*
|
||||
$tmpdata = $GLOBALS['mysql']->query_single("SELECT * FROM verkehr_polizei");
|
||||
$datapol=$tmpdata['num_rows'];
|
||||
if($tmpdata['num_rows'] != 0) {
|
||||
$tempdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr_polizei"); $key=0;
|
||||
while($row = $tempdata->fetch_assoc()) {
|
||||
$pdata[$key]['adresse1']=$row['adresse1'];
|
||||
$pdata[$key]['adresse2']=$row['adresse2'];
|
||||
$pdata[$key]['reason']=$row['reason'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 23-behinderung
|
||||
// 21-Unfall
|
||||
// 20-Stau
|
||||
// 0-6 mobile blitzer
|
||||
// 22
|
||||
// 24-Glätte
|
||||
// 25-Nebel
|
||||
// 26- Baustellen 2
|
||||
|
||||
$tmpdata = $GLOBALS['mysql']->query_single("SELECT * FROM verkehr");
|
||||
$dataanz=$tmpdata['num_rows'];
|
||||
if($tmpdata['num_rows'] != 0) {
|
||||
$tmpdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr ORDER BY type DESC"); $key=0;
|
||||
while($row = $tmpdata->fetch_assoc()) {
|
||||
$bdata[$key]['typ']=$row['type'];
|
||||
$bdata[$key]['vmax']=$row['vmax'];
|
||||
$bdata[$key]['adresse1']=$row['adresse1'];
|
||||
$bdata[$key]['adresse2']=$row['adresse2'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('dataanz', $dataanz);
|
||||
// $template->assign('datapol', $datapol);
|
||||
$template->assign('time', time());
|
||||
if(isset($bdata)) { $template->assign('bdata', $bdata); }
|
||||
// if(isset($pdata)) { $template->assign('pdata', $pdata); }
|
||||
$template->assign('content', 'tpl/ajax/blitzer1.tpl');
|
||||
120
scripts/ajax/blitzer1.php
Normal file
120
scripts/ajax/blitzer1.php
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
/*
|
||||
stdClass Object
|
||||
(
|
||||
[id] => 5940062167
|
||||
[lat] => 51.644040
|
||||
[lat_s] => 51.6
|
||||
[lng] => 12.258422
|
||||
[lng_s] => 12.3
|
||||
[street] => B183
|
||||
[content] => 5645289063
|
||||
[backend] => 0-12993403
|
||||
[type] => 1
|
||||
[vmax] => 100
|
||||
[counter] => 0
|
||||
[create_date] => 2020-02-03 03:36:38
|
||||
[confirm_date] => 0000-00-00 00:00:00
|
||||
[gps_status] => -
|
||||
[info] => {"count_180d":"0"}
|
||||
[polyline] =>
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
stdClass Object
|
||||
(
|
||||
[place_id] => 92100685
|
||||
[licence] => Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright
|
||||
[osm_type] => way
|
||||
[osm_id] => 25815620
|
||||
[lat] => 51.64401147390837
|
||||
[lon] => 12.25841893049767
|
||||
[display_name] => B 183, Sandersdorf, Bitterfeld-Wolfen, Anhalt-Bitterfeld, Sachsen-Anhalt, 06803, Deutschland
|
||||
[address] => stdClass Object
|
||||
(
|
||||
[road] => B 183
|
||||
[city_district] => Sandersdorf
|
||||
[town] => Bitterfeld-Wolfen
|
||||
[county] => Anhalt-Bitterfeld
|
||||
[state] => Sachsen-Anhalt
|
||||
[postcode] => 06803
|
||||
[country] => Deutschland
|
||||
[country_code] => de
|
||||
)
|
||||
|
||||
[boundingbox] => Array
|
||||
(
|
||||
[0] => 51.6374534
|
||||
[1] => 51.6444531
|
||||
[2] => 12.2521345
|
||||
[3] => 12.27533
|
||||
)
|
||||
|
||||
)
|
||||
*/
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 23-behinderung
|
||||
// 21-Unfall
|
||||
// 20-Stau
|
||||
// 0-6 mobile blitzer
|
||||
// 22
|
||||
// 24-Glätte
|
||||
// 25-Nebel
|
||||
// 26- Baustellen 2
|
||||
$key=0;
|
||||
$page='https://cdn2.atudo.net/api/1.0/vl.php?type=0,1,2,3,4,5,6,20,21,23,24,25&box=51.276736290728685,12.058525085449217,51.383995224782886,12.711868286132812';
|
||||
|
||||
$html = file_get_contents($page);
|
||||
$jsonrow=json_decode($html);
|
||||
for($i=0; $i < 100; $i++) {
|
||||
if(isset($jsonrow->pois[$i])) {
|
||||
$lat=($jsonrow->pois[$i]->lat);
|
||||
$lng=($jsonrow->pois[$i]->lng);
|
||||
$bdata[$key]['typ']=($jsonrow->pois[$i]->type);
|
||||
$bdata[$key]['street']=($jsonrow->pois[$i]->street);
|
||||
$bdata[$key]['vmax']=($jsonrow->pois[$i]->vmax);
|
||||
$bdata[$key]['create_date']=($jsonrow->pois[$i]->create_date);
|
||||
/*
|
||||
$page1='http://nominatim.openstreetmap.org/reverse?format=json&lat='.$lat.'&lon='.$lng.'&email=frank@first-mp.de';
|
||||
$html2 = file_get_contents($page1);
|
||||
$jsonrow2=json_decode($html2);
|
||||
$bdata[$key]['road']=($jsonrow2->address->road);
|
||||
if(isset($jsonrow2->address->city_district)) {
|
||||
$bdata[$key]['ort']=($jsonrow2->address->city_district);
|
||||
} else {
|
||||
if(isset($jsonrow2->address->suburb)) { $bdata[$key]['ort']=($jsonrow2->address->suburb); }
|
||||
}
|
||||
if(isset($jsonrow2->address->town)) {
|
||||
$bdata[$key]['town']=($jsonrow2->address->town);
|
||||
} else {
|
||||
if(isset($jsonrow2->address->city)) { $bdata[$key]['town']=($jsonrow2->address->city); }
|
||||
}
|
||||
if(isset($jsonrow2->address->house_number)) {
|
||||
$bdata[$key]['hnr']=($jsonrow2->address->house_number);
|
||||
} else {
|
||||
$bdata[$key]['hnr']=" ";
|
||||
}
|
||||
*/
|
||||
|
||||
$key++;
|
||||
|
||||
//echo'<pre>'; print_r($jsonrow2->address->road); echo'</pre>';
|
||||
//$bdata[$key]['typ']=($jsonrow->pois[$i]->type);
|
||||
//echo'<pre>'; print_r($jsonrow->pois[0]); echo'</pre>';
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
$template->assign('time', time());
|
||||
$template->assign('bdata', $bdata);
|
||||
$template->assign('content', 'tpl/ajax/blitzer1.tpl');
|
||||
31
scripts/ajax/blitzer2.php
Normal file
31
scripts/ajax/blitzer2.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',1);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 23-behinderung
|
||||
// 21-Unfall
|
||||
// 20-Stau
|
||||
// 0-6 mobile blitzer
|
||||
// 22
|
||||
// 24-Glätte
|
||||
// 25-Nebel
|
||||
// 26- Baustellen 2
|
||||
|
||||
$tmpdata = $GLOBALS['mysql']->query("SELECT * FROM verkehr ORDER BY type"); $key=0;
|
||||
while($row = $tmpdata->fetch_assoc()) {
|
||||
$bdata[$key]['typ']=$row['type'];
|
||||
$bdata[$key]['street']=$row['street'];
|
||||
|
||||
|
||||
$bdata[$key]['vmax']=$row['vmax'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('time', time());
|
||||
if(isset($bdata)) { $template->assign('bdata', $bdata); }
|
||||
$template->assign('content', 'tpl/ajax/blitzer1.tpl');
|
||||
68
scripts/ajax/car_plan.php
Normal file
68
scripts/ajax/car_plan.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
ini_set('display_errors', 0);
|
||||
date_default_timezone_set('Europe/Berlin'); // Default Time Zone
|
||||
$a_zeit=time()+3600;
|
||||
$tag = date("d");
|
||||
$monat= date("m");
|
||||
$jahr = date("Y");
|
||||
$jahrk= date("y");
|
||||
|
||||
$laufend = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE typ>3 AND aktiv>0 ORDER BY kz"); $key=0;
|
||||
while($row = $laufend->fetch_assoc()) {
|
||||
$car[$key]['kz']=$row['kz'];
|
||||
$car[$key]['nhof']=$row['nhof'];
|
||||
|
||||
|
||||
$tlist = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."' AND auto='".$row['id']."'"); $tkey=0;
|
||||
while($row_tlist = $tlist->fetch_assoc()) {
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row_tlist['tour']."'");
|
||||
|
||||
$start=0;
|
||||
$start= date("G", $row_tlist['time']);
|
||||
$multi=$row_tour['zeit']/3600;
|
||||
|
||||
$start--;
|
||||
$i=0; while ($i <= $multi) {
|
||||
$start++;
|
||||
|
||||
if($start== 1) { $car[$key]['time1']++; }
|
||||
if($start== 2) { $car[$key]['time2']++; }
|
||||
if($start== 3) { $car[$key]['time3']++; }
|
||||
if($start== 4) { $car[$key]['time4']++; }
|
||||
if($start== 5) { $car[$key]['time5']++; }
|
||||
if($start== 6) { $car[$key]['time6']++; }
|
||||
if($start== 7) { $car[$key]['time7']++; }
|
||||
if($start== 8) { $car[$key]['time8']++; }
|
||||
if($start== 9) { $car[$key]['time9']++; }
|
||||
if($start==10) { $car[$key]['time10']++; }
|
||||
if($start==11) { $car[$key]['time11']++; }
|
||||
if($start==12) { $car[$key]['time12']++; }
|
||||
if($start==13) { $car[$key]['time13']++; }
|
||||
if($start==14) { $car[$key]['time14']++; }
|
||||
if($start==15) { $car[$key]['time15']++; }
|
||||
if($start==16) { $car[$key]['time16']++; }
|
||||
if($start==17) { $car[$key]['time17']++; }
|
||||
if($start==18) { $car[$key]['time18']++; }
|
||||
if($start==19) { $car[$key]['time19']++; }
|
||||
if($start==20) { $car[$key]['time20']++; }
|
||||
if($start==21) { $car[$key]['time21']++; }
|
||||
if($start==22) { $car[$key]['time22']++; }
|
||||
if($start==23) { $car[$key]['time23']++; }
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$row_fahrer = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
|
||||
|
||||
$key++;
|
||||
}
|
||||
$template->assign('car', $car);
|
||||
$template->assign('content', 'tpl/ajax/car_plan.tpl');
|
||||
6
scripts/ajax/cmsstatus.php
Normal file
6
scripts/ajax/cmsstatus.php
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE id='".$_POST['id']."'");
|
||||
$template->assign('test', $tour);
|
||||
$template->assign('content', 'tpl/ajax/smsstatus.tpl');
|
||||
?>
|
||||
19
scripts/ajax/conline.php
Normal file
19
scripts/ajax/conline.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
$abfrage_conline = $GLOBALS['mysql']->query("SELECT * FROM karten WHERE status <9 AND status >1 ORDER BY status ASC LIMIT 0,5"); $key=0;
|
||||
while($row = $abfrage_conline->fetch_assoc()) {
|
||||
$abfrage_c[$key]['name'] = $_SESSION['ma_all'][$row['user']]['name'];
|
||||
$abfrage_c[$key]['status']=$row['status'];
|
||||
$abfrage_c[$key]['etime']=$row['edittime'];
|
||||
$abfrage_c[$key]['lastlog']=$row['lastlog'];
|
||||
$abfrage_c[$key]['grund']=$row['grund'];
|
||||
if($row['lastlog']>=$row['edittime']) {
|
||||
$abfrage_c[$key]['ontour']=1;
|
||||
} else {
|
||||
$abfrage_c[$key]['ontour']=0;
|
||||
}
|
||||
$key++;
|
||||
}
|
||||
$template->assign('abfrage_c', $abfrage_c);
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
$template->assign('content', 'tpl/ajax/conline.tpl');
|
||||
?>
|
||||
21
scripts/ajax/corona.php
Normal file
21
scripts/ajax/corona.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata1', $corona1);
|
||||
// 1- Leipzig Stadt
|
||||
$corona3 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata3', $corona3);
|
||||
// 1- Leipzig Stadt
|
||||
$corona5 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata5', $corona5);
|
||||
// 1- Leipzig Stadt
|
||||
$corona6 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata6', $corona6);
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/ajax/corona.tpl');
|
||||
21
scripts/ajax/corona2022.php
Normal file
21
scripts/ajax/corona2022.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata', $corona1);
|
||||
// 1- Leipzig Stadt
|
||||
//$corona3 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata3', $corona3);
|
||||
// 1- Leipzig Stadt
|
||||
//$corona5 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata5', $corona5);
|
||||
// 1- Leipzig Stadt
|
||||
//$corona6 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata6', $corona6);
|
||||
|
||||
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
scripts/ajax/corona2022_1.php
Normal file
8
scripts/ajax/corona2022_1.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 1- Leipzig Stadt
|
||||
$corona1 = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=1"); $template->assign('cdata', $corona1);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
scripts/ajax/corona2022_3.php
Normal file
8
scripts/ajax/corona2022_3.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// 3- Halle Stadt
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=3"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
scripts/ajax/corona2022_5.php
Normal file
8
scripts/ajax/corona2022_5.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// LK Leipzig
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=5"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
8
scripts/ajax/corona2022_6.php
Normal file
8
scripts/ajax/corona2022_6.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
// echo'<pre>'; print_r($tag_tour5); echo'</pre>';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
// LK Nordsachsen
|
||||
$corona = $GLOBALS['mysql']->query_single("SELECT * FROM corona WHERE id=6"); $template->assign('cdata', $corona);
|
||||
$template->assign('content', 'tpl/ajax/corona2022.tpl');
|
||||
34
scripts/ajax/covid.php
Normal file
34
scripts/ajax/covid.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
$page='https://hotspotornot.de/s/Leipzig'; $child=''; $node=''; $html= '';
|
||||
$tag='Header__Wrapper-sc-1lkmh1x-1 bdBQKM';
|
||||
$html3 = file_get_contents($page);
|
||||
mb_convert_encoding($html,"UTF-8","auto");
|
||||
$xp3 = new DOMDocument();
|
||||
$xp3->loadHTML($html3);
|
||||
$xp3 = new DOMXPath($xp3);
|
||||
foreach($xp3->query("//div[@class='".$tag."']") as $node) {
|
||||
$node->nodeValue;
|
||||
break;
|
||||
};
|
||||
$children = $node->childNodes;
|
||||
foreach ($children as $child) {
|
||||
$tanke1 .= $child->ownerDocument->saveXML( $child );
|
||||
}
|
||||
|
||||
// Einlesen der gesamten Seite in ein Array
|
||||
$lines = file ("http://www.spiegel.de/schlagzeilen/");
|
||||
for ($i = 227; $i <= 327; $i++) {
|
||||
$bereinigt = strip_tags($lines[$i],"");
|
||||
echo $bereinigt."
|
||||
\n";
|
||||
}
|
||||
?>
|
||||
|
||||
// $template->assign('tanke', $tanke1);
|
||||
// $template->assign('content', 'tpl/ajax/covid.tpl');
|
||||
|
||||
?>
|
||||
146
scripts/ajax/dwd.php
Normal file
146
scripts/ajax/dwd.php
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
<?php
|
||||
/*
|
||||
114713000 Stadt Leipzig Leipzig (Stadt) LXX
|
||||
114729000 Kreis Leipzig Leipzig LLK
|
||||
114730000 Kreis Nordsachsen Nordsachsen TOX
|
||||
115002000 Stadt Halle (Saale) Halle/Saale HAL
|
||||
116077000 Kreis Altenburger Land Altenburg. Land ABG
|
||||
*/
|
||||
$key=0;
|
||||
|
||||
$jsonp = file_get_contents("https://www.dwd.de/DWD/warnungen/warnapp/json/warnings.json");
|
||||
$json = extract_unit($jsonp, 'warnWetter.loadWarnings(', ');');
|
||||
$alert_list1 = json_decode($json, true);
|
||||
$alert_list2 = json_decode($json, true);
|
||||
//$alert_list3 = json_decode($json, true);
|
||||
//$alert_list4 = json_decode($json, true);
|
||||
//$alert_list5 = json_decode($json, true);
|
||||
|
||||
$relevant_alerts = $alert_list1["warnings"]["114713000"]; // leipzig Stadt
|
||||
if($relevant_alerts == null) $relevant_alerts = array();
|
||||
$relevant_alerts = array_merge($relevant_prealerts, $relevant_alerts);
|
||||
|
||||
if (isset($alert_list1["vorabInformation"]["114713000"])) {
|
||||
$relevant_prealerts = $alert_list1["vorabInformation"]["114713000"];
|
||||
}
|
||||
if($relevant_prealerts == null) $relevant_prealerts = array();
|
||||
//-------------------------------------------------------------------------------------
|
||||
foreach($relevant_alerts as $alert) {
|
||||
if ($alert['level']>1) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
$relevant_alerts2 = $alert_list2["warnings"]["114729000"]; // Kreis Leipzig
|
||||
$relevant_prealerts2 = $alert_list2["vorabInformation"]["114729000"];
|
||||
if($relevant_alerts2 == null) $relevant_alerts2 = array();
|
||||
if($relevant_prealerts2 == null) $relevant_prealerts2 = array();
|
||||
$relevant_alerts2 = array_merge($relevant_prealerts2, $relevant_alerts2);
|
||||
foreach($relevant_alerts2 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
/*
|
||||
//------------------------------------------------
|
||||
$relevant_alerts3 = $alert_list3["warnings"]["115002000"]; // Halle
|
||||
$relevant_prealerts3 = $alert_list3["vorabInformation"]["115002000"];
|
||||
if($relevant_alerts3 == null) $relevant_alerts3 = array();
|
||||
if($relevant_prealerts3 == null) $relevant_prealerts3 = array();
|
||||
$relevant_alerts3 = array_merge($relevant_prealerts3, $relevant_alerts3);
|
||||
foreach($relevant_alerts3 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------
|
||||
$relevant_alerts4 = $alert_list4["warnings"]["114730000"]; //Nordsachsen
|
||||
$relevant_prealerts4 = $alert_list4["vorabInformation"]["114730000"];
|
||||
if($relevant_alerts4 == null) $relevant_alerts4 = array();
|
||||
if($relevant_prealerts4 == null) $relevant_prealerts4 = array();
|
||||
$relevant_alerts4 = array_merge($relevant_prealerts4, $relevant_alerts4);
|
||||
foreach($relevant_alerts4 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
//------------------------------------------------
|
||||
$relevant_alerts5 = $alert_list5["warnings"]["116077000"]; //116077000 Altenburg
|
||||
$relevant_prealerts5 = $alert_list5["vorabInformation"]["116077000"];
|
||||
if($relevant_alerts5 == null) $relevant_alerts5 = array();
|
||||
if($relevant_prealerts5 == null) $relevant_prealerts5 = array();
|
||||
$relevant_alerts5 = array_merge($relevant_prealerts5, $relevant_alerts5);
|
||||
foreach($relevant_alerts5 as $alert) {
|
||||
if ($alert['level']>2) {
|
||||
$uww[$key]['name']=$alert['event'];
|
||||
$uww[$key]['text']=$alert['headline'];
|
||||
$uww[$key]['info']=$alert['description'];
|
||||
$uww[$key]['stadt']=$alert['regionName'];
|
||||
$uww[$key]['level']=$alert['level'];
|
||||
$uww[$key]['start']=utf8_decode(date('d.m.Y H:i', substr($alert['start'], 0, 10)));
|
||||
$uww[$key]['ende']=utf8_decode(date('d.m.Y H:i', substr($alert['end'], 0, 10)));
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------
|
||||
if ($key>0) { $template->assign('uww', $uww); }
|
||||
$template->assign('wert', $key);
|
||||
$template->assign('time', time());
|
||||
//------------------------------------------------
|
||||
|
||||
function extract_unit($string, $start, $end) {
|
||||
$pos = stripos($string, $start);
|
||||
$str = substr($string, $pos);
|
||||
$str_two = substr($str, strlen($start));
|
||||
$second_pos = stripos($str_two, $end);
|
||||
$str_three = substr($str_two, 0, $second_pos);
|
||||
$unit = trim($str_three); // remove whitespaces
|
||||
|
||||
return $unit;
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/dwd.tpl');
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
327
scripts/ajax/faz_save.php
Normal file
327
scripts/ajax/faz_save.php
Normal file
|
|
@ -0,0 +1,327 @@
|
|||
<?php
|
||||
if(isset($_GET['a']))
|
||||
$action=$_GET['a'];
|
||||
else
|
||||
$action='load_minfo';
|
||||
switch($action):
|
||||
|
||||
case 'abk_save';
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM fazs WHERE id='".$_POST['fazID']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE fazs SET meldung='ABK' WHERE id='".$_POST['fazID']."'");
|
||||
|
||||
|
||||
$back['htmlresult']=' <td nowrap style="color:black;width:330px;font-size:10pt" align="left" id="meldung'.$_POST['fazID'].'">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="abk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="ABK" checked="checked">
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="ibk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="IBK">
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="bk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="BK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="tuer_save('.$_POST['fazID'].')" data-toggle="tooltip" title="tuer">
|
||||
|
||||
|
||||
|
||||
<input type="text" value="ABK" id="info"
|
||||
style="width:210px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext['.$_POST['fazID'].']"
|
||||
onChange="save_info('.$_POST['fazID'].')">
|
||||
</td>';
|
||||
|
||||
$back['tour'] = $tour;
|
||||
$back['lastnote']="Information Außenbriefkasten für ".$tour['name2']." ".$tour['name']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
case 'ibk_save';
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM fazs WHERE id='".$_POST['fazID']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE fazs SET meldung='IBK' WHERE id='".$_POST['fazID']."'");
|
||||
$back['htmlresult']=' <td nowrap style="color:black;width:330px;font-size:10pt" align="left" id="meldung'.$_POST['fazID'].'">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="abk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="ABK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="ibk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="IBK" checked="checked">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="bk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="BK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="tuer_save('.$_POST['fazID'].')" data-toggle="tooltip" title="tuer">
|
||||
|
||||
|
||||
|
||||
<input type="text" value="IBK" id="info"
|
||||
style="width:210px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext['.$tour['plz'].']"
|
||||
onChange="save_info('.$_POST['fazID'].')">
|
||||
</td>';
|
||||
|
||||
$back['tour'] = $tour;
|
||||
$back['lastnote']="Information Innenbriefkasten für ".$tour['name2']." ".$tour['name']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
case 'bk_save';
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM fazs WHERE id='".$_POST['fazID']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE fazs SET meldung='BK' WHERE id='".$_POST['fazID']."'");
|
||||
$back['htmlresult']=' <td nowrap style="color:black;width:330px;font-size:10pt" align="left" id="meldung'.$_POST['fazID'].'">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="abk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="ABK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="ibk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="IBK">
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="bk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="BK" checked="checked">
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="tuer_save('.$_POST['fazID'].')" data-toggle="tooltip" title="tuer">
|
||||
|
||||
|
||||
|
||||
<input type="text" value="BK" id="info"
|
||||
style="width:210px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext['.$tour['plz'].']"
|
||||
onChange="save_info('.$_POST['fazID'].')">
|
||||
</td>';
|
||||
|
||||
$back['tour'] = $tour;
|
||||
$back['lastnote']="Information Briefkasten für ".$tour['name2']." ".$tour['name']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
case 'tuer_save';
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM fazs WHERE id='".$_POST['fazID']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE fazs SET meldung='TÜR' WHERE id='".$_POST['fazID']."'");
|
||||
$back['htmlresult']=' <td nowrap style="color:black;width:330px;font-size:10pt" align="left" id="meldung'.$_POST['fazID'].'">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="abk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="ABK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="ibk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="IBK">
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="bk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="BK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="tuer_save('.$_POST['fazID'].')" data-toggle="tooltip" title="tuer" checked="checked">
|
||||
|
||||
|
||||
|
||||
<input type="text" value="Tür" id="info"
|
||||
style="width:210px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext['.$tour['plz'].']"
|
||||
onChange="save_info('.$_POST['fazID'].')">
|
||||
</td>';
|
||||
|
||||
$back['tour'] = $tour;
|
||||
$back['lastnote']="Information TÜR für ".$tour['name2']." ".$tour['name']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
case 'info_save';
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM fazs WHERE id='".$_POST['fazID']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE fazs SET meldung='".$_POST['texti']."' WHERE id='".$_POST['fazID']."'");
|
||||
$back['htmlresult']=' <td nowrap style="color:black;width:330px;font-size:10pt" align="left" id="meldung'.$_POST['fazID'].'">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="abk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="ABK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="ibk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="IBK">
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="bk_save('.$_POST['fazID'].')" data-toggle="tooltip" title="BK">
|
||||
|
||||
<input type="checkbox" value="'.$_POST['fazID'].'" onChange="tuer_save('.$_POST['fazID'].')" data-toggle="tooltip" title="tuer">
|
||||
|
||||
<input type="text" value='.$_POST['texti'].' id="info"
|
||||
style="width:210px;border-color:#dcdcdc;border:none;border-bottom: 1px solid #dcdcdc;" name="infotext['.$_POST['fazID'].']"
|
||||
onChange="save_info('.$_POST['fazID'].')">
|
||||
</td>';
|
||||
|
||||
$back['tour'] = $tour;
|
||||
$back['lastnote']="Information ".$_POST['texti']." für ".$tour['name2']." ".$tour['name']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
break;
|
||||
case 'rekla_save';
|
||||
$rekla=0;
|
||||
$tour = $GLOBALS['mysql']->query_single("SELECT * FROM fazs WHERE id='".$_POST['fazID']."'");
|
||||
|
||||
|
||||
if($tour['rekla']==1) {
|
||||
$rekla=0;
|
||||
} else {
|
||||
$rekla=1;
|
||||
}
|
||||
$GLOBALS['mysql']->insert("UPDATE fazs SET rekla=".$rekla." WHERE id='".$_POST['fazID']."'");
|
||||
$back['abonr'] = $_POST['fazID'];
|
||||
$back['lastnote']="Reklamation für Abonummer: ".$_POST['abonr']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
|
||||
case 'ubk_save';
|
||||
$ubk=1;
|
||||
$infotest = $GLOBALS['mysql']->query_single("SELECT * FROM fazinfo WHERE abonr='".$_POST['fazID']."'");
|
||||
if($infotest['num_rows']==0) {
|
||||
$GLOBALS['mysql']->insert("INSERT INTO fazinfo (abonr,unbekannt)
|
||||
VALUES(
|
||||
'".$_POST['fazID']."',
|
||||
'".$ubk."')
|
||||
");
|
||||
|
||||
} else {
|
||||
if($infotest['unbekannt']==1) { $ubk=0; }
|
||||
$GLOBALS['mysql']->insert("UPDATE fazinfo SET unbekannt='".$ubk."' WHERE abonr='".$_POST['fazID']."'");
|
||||
}
|
||||
|
||||
$back['abonr'] = $_POST['fazID'];
|
||||
$back['lastnote']="Information UNBEKANNT für Abonummer: ".$_POST['fazID']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['fazID'];
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case 'user_save';
|
||||
// $ttemp=$row['tour']; $ta_id= array_search($ttemp, array_column($a_touren, 'id'));
|
||||
// $atemp=$row['auto']; $aa_id= array_search($atemp, array_column($a_fahrzg, 'id'));
|
||||
// $mtemp=$row['fahrer']; $ma_id= array_search($mtemp, array_column($a_fahrer, 'id'));
|
||||
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET fahrer='".$_POST['user']."' WHERE id='".$_POST['tourID']."'");
|
||||
$row_tourl = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE id='".$_POST['tourID']."'");
|
||||
$ttemp=$row_tourl['tour']; $ta_id= array_search($ttemp, array_column($a_touren, 'id'));
|
||||
$atemp=$_POST['car']; $aa_id= array_search($atemp, array_column($a_fahrzg, 'id'));
|
||||
|
||||
$back['lastnote']="Fahrer ".$a_fahrer[$ma_id]['name']." für Tour ".$row_tourx['tour']." gespeichert.";
|
||||
$back['success'] = true;
|
||||
$back['zeile'] = $_POST['tourID'];
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
case 'load_car_icon';
|
||||
//echo $_POST['tourID'];
|
||||
$touri = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE id='".$_POST['tourID']."'");
|
||||
//$unixdate=mktime(0,0,0, $touri['monat'],$touri['tag'],$touri['jahr']);
|
||||
if($touri['auto']==0) { $anzeige=1;
|
||||
} else {
|
||||
$cari = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$touri['auto']."'");
|
||||
if($cari['aktiv']==0) { $anzeige=1;
|
||||
} else {
|
||||
//$plani = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE timestamp LIKE '".$unixdate." %' and fid='".$touri['auto']."'");
|
||||
$plani = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE
|
||||
tag='".$touri['tag']."' and
|
||||
monat='".$touri['monat']."' and
|
||||
jahr='".$touri['jahr']."' and
|
||||
fid='".$touri['auto']."'");
|
||||
if($plani['num_rows']== 0) {
|
||||
if($cari['besitz']<3) { $anzeige=3; } else { $anzeige=5; } // auswahl fremdes Fahrzeug
|
||||
} else {
|
||||
$fplani = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$plani['grund']."'");
|
||||
if($fplani['aktiv']== 0) { $anzeige=1; }
|
||||
if($fplani['aktiv']== 1) { $anzeige=2; }
|
||||
if($fplani['aktiv']== 2) { $anzeige=4; }
|
||||
}
|
||||
}
|
||||
}
|
||||
if($anzeige==0) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:gray">
|
||||
<i class="fa fa-truck" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==1) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:red">
|
||||
<i class="fa fa-truck" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==2) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:orange">
|
||||
<i class="fa fa-truck" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==3) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:green">
|
||||
<i class="fa fa-truck" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==4) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:#045FB4">
|
||||
<i class="fa fa-truck" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==5) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:#A5DF00">
|
||||
<i class="fa fa-truck" id="caricon"></i></td>';
|
||||
}
|
||||
|
||||
$back['zeile'] = $_POST['tourID'];
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//--------------------- user icon nachladen
|
||||
case 'load_user_icon';
|
||||
//echo $_POST['tourID'];
|
||||
$touri2 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE id='".$_POST['tourID']."'");
|
||||
if($touri2['fahrer']==0) { $anzeige=1;
|
||||
} else {
|
||||
$useri2 = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$touri2['fahrer']."'");
|
||||
if($useri2['aktiv']==0) { $anzeige=1; //Fahrer nicht aktiv / ausgeschieden
|
||||
} else {
|
||||
$plani = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE
|
||||
tag='".$touri2['tag']."' and
|
||||
monat='".$touri2['monat']."' and
|
||||
jahr='".$touri2['jahr']."' and
|
||||
mid='".$touri2['fahrer']."'");
|
||||
if($plani['num_rows']== 0) {
|
||||
if($useri2['saso']>0) { $anzeige=3; } else { $anzeige=2; } // auswahl fremdes Fahrzeug
|
||||
} else {
|
||||
$plani = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$plani['grund']."'");
|
||||
if($plani['nichtda']== 1) { $anzeige=1; }
|
||||
elseif($plani['nichtda']== 8) { $anzeige=1; }
|
||||
elseif($plani['nichtda']==19) { $anzeige=1; }
|
||||
else { $anzeige=2; }
|
||||
}
|
||||
}
|
||||
}
|
||||
if($anzeige==0) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:gray">
|
||||
<i class="fa fa-user" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==1) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:red">
|
||||
<i class="fa fa-user" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==2) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:orange">
|
||||
<i class="fa fa-user" id="caricon"></i></td>';
|
||||
}
|
||||
if($anzeige==3) {
|
||||
$back['htmlresult']='<td nowrap id="caricon" style="width:20px;font-size:11pt;text-align:right;color:green">
|
||||
<i class="fa fa-user" id="caricon"></i></td>';
|
||||
}
|
||||
|
||||
$back['zeile'] = $_POST['tourID'];
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
case 'load_free_cars';
|
||||
default:
|
||||
|
||||
//--------------------- freie Fahrzeuge Nachts
|
||||
$key=0;
|
||||
//-- trp nachts
|
||||
|
||||
$tempcar = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE aktiv=1 and besitz<3 and typ>2 ORDER BY id");
|
||||
while($row = $tempcar->fetch_assoc()) {
|
||||
$istabfrage = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE timestamp LIKE '".$_POST['date']." %' AND auto='".$row['id']."' and typ>5 and typ!=18");
|
||||
$pauto = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE timestamp LIKE '".$_POST['date']." %' and fid='".$row['id']."'");
|
||||
if($istabfrage['num_rows']== 0) {
|
||||
if($pauto['num_rows']== 0) {
|
||||
$seite['trp'][$key]=$row['kz']." (".$row['hersteller']." ".$row['name'].")"; $key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo json_encode($seite);
|
||||
|
||||
|
||||
endswitch;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
52
scripts/ajax/fetch.php
Normal file
52
scripts/ajax/fetch.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
$connect = mysqli_connect(CONFIG_MYSQL_HOST,CONFIG_MYSQL_USER,CONFIG_MYSQL_PW,CONFIG_MYSQL_DB);
|
||||
mysqli_set_charset($connect, 'utf8');
|
||||
$output = ''; $testnr = 0; $ausgabe = 0;
|
||||
if(isset($_POST["query"]))
|
||||
{
|
||||
$search = mysqli_real_escape_string($connect, $_POST["query"]);
|
||||
$query = "
|
||||
SELECT * FROM fazs
|
||||
WHERE name LIKE '%".$search."%'
|
||||
OR name2 LIKE '%".$search."%'
|
||||
OR strasse LIKE '%".$search."%'
|
||||
OR ort LIKE '%".$search."%'
|
||||
OR plz LIKE '%".$search."%'
|
||||
OR auftragnr LIKE '%".$search."%'
|
||||
OR kdnr LIKE '%".$search."%'
|
||||
ORDER BY auftragnr";
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = "
|
||||
SELECT * FROM fazs ORDER BY auftragnr";
|
||||
}
|
||||
$result = mysqli_query($connect, $query);
|
||||
if(mysqli_num_rows($result) > 0)
|
||||
{
|
||||
$output .= '<table class="table-hover" style="font-size:10pt">
|
||||
';
|
||||
while($row = mysqli_fetch_array($result))
|
||||
{
|
||||
if($ausgabe<30) {
|
||||
if($testnr!=$row["auftragnr"]) {
|
||||
$testnr=$row["auftragnr"]; $ausgabe++;
|
||||
$output .='
|
||||
<tr>
|
||||
<td nowrap align="left" style="width: 60px">
|
||||
<a href="https://jb-data.de/index.php?s=ifazs&edit=3&iabo='.$row["auftragnr"].'">'.$row["auftragnr"].'</td>
|
||||
<td nowrap align="left" style="width:235px">'.$row["name2"].' '.$row["name"].'</td>
|
||||
<td nowrap align="right" style="width:225px">'.$row["strasse"].' '.$row["hnr"].' '.$row["hnrz"].' '.$row["plz"].' '.$row["ort"].'</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo $output;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'keine Abonnenten gefunden';
|
||||
}
|
||||
?>
|
||||
38
scripts/ajax/free_car.php
Normal file
38
scripts/ajax/free_car.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
//error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$mon=(int)$_POST['monat'];
|
||||
//--------------------
|
||||
$p_auto = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$_POST['tag']."' AND monat='".$mon."'AND jahr='".$_POST['jahr']."'");
|
||||
//--------------------- freie Fahrzeuge Nachts
|
||||
$key=0;
|
||||
// nachts
|
||||
$tempcar = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE aktiv=1 and besitz<3 ORDER BY typ,kz");
|
||||
while($row = $tempcar->fetch_assoc()) {
|
||||
$tliste = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$_POST['tag']."' AND monat='".$_POST['monat']."'AND jahr='".$_POST['jahr']."' and auto='".$row['id']."' and typ in (3,4,5,17)");
|
||||
|
||||
if($tliste['num_rows'] == 0) {
|
||||
//$ta_id= array_search($row['id'], array_column($tliste, 'auto'));
|
||||
//if (!is_numeric($ta_id)) {
|
||||
$pa_id= array_search($row['id'], array_column($p_auto, 'fid'));
|
||||
if (!is_numeric($pa_id)) {
|
||||
$seite[$key]['car']= $row['kz'];
|
||||
$seite[$key]['info']= $row['hersteller']." ".$row['name'];
|
||||
$seite[$key]['typ']= $row['typ'];
|
||||
//echo $seite['info'][$key];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//echo json_encode($seite);
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
$template->assign('data',$seite);
|
||||
$template->assign('content', 'tpl/ajax/free_car.tpl');
|
||||
|
||||
|
||||
?>
|
||||
36
scripts/ajax/free_ma.php
Normal file
36
scripts/ajax/free_ma.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
//echo'<pre>'; print_r($row); echo'</pre>';
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
$tliste = $GLOBALS['mysql']->query_array("SELECT DISTINCT tourenliste.id, tourenliste.fahrer FROM tourenliste WHERE tag='".$_POST['tag']."' AND monat='".$_POST['monat']."'AND jahr='".$_POST['jahr']."' and typ in (3,4,5,17)");
|
||||
|
||||
//$tliste = $GLOBALS['mysql']->query_array("SELECT DISTINCT tourenliste.id, tourenliste.fahrer FROM tourenliste JOIN ma_ttyp WHERE ma_ttyp.maid=tourenliste.fahrer AND ma_ttyp.ttyp tourenliste.typ in (3,4,5,17) AND tourenliste.tag='".$_POST['tag']."' AND tourenliste.monat='".$_POST['monat']."'AND tourenliste.jahr='".$_POST['jahr']."'");
|
||||
|
||||
$p_fahrer = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$_POST['tag']."' AND monat='".$_POST['monat']."'AND jahr='".$_POST['jahr']."'");
|
||||
//--------------------- freie MA Nachts
|
||||
$key=0;
|
||||
// nachts
|
||||
$tempma = $GLOBALS['mysql']->sql("SELECT DISTINCT mitarbeiter.id, mitarbeiter.name, mitarbeiter.lohnabr, mitarbeiter.tarifgtyp FROM mitarbeiter
|
||||
JOIN ma_ttyp WHERE ma_ttyp.maid=mitarbeiter.id AND ma_ttyp.ttyp in (3,4,5,17) AND mitarbeiter.typ<6 AND mitarbeiter.aktiv>0 ORDER BY mitarbeiter.name");
|
||||
|
||||
|
||||
//$tempma = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE aktiv=1 and typ<6 ORDER BY name");
|
||||
while($row = $tempma->fetch_assoc()) {
|
||||
$ta_id= array_search($row['id'], array_column($tliste, 'fahrer'));
|
||||
if (!is_numeric($ta_id)) { echo $ta_id;
|
||||
$pa_id= array_search($row['id'], array_column($p_fahrer, 'mid'));
|
||||
if (!is_numeric($pa_id)) {
|
||||
$seite[$key]['name']=" ".$row['name'];
|
||||
if($row['lohnabr']==1) { $seite[$key]['icon']= 1; /* $seite[$key]['name'] = "*Fa. ".$row['name'];*/ } // Selbständig
|
||||
elseif ($row['tarifgtyp']==99) { $seite[$key]['icon']= 2; /* $seite[$key]['name'] = "**** ".$row['name'];*/ } // Sonderzahlung
|
||||
else { $seite[$key]['icon']= 0; /* $seite[$key]['name'] = $row['name'];*/ }
|
||||
//echo $seite['info'][$key];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign('data', $seite);
|
||||
$template->assign('content', 'tpl/ajax/free_ma.tpl');
|
||||
|
||||
|
||||
?>
|
||||
49
scripts/ajax/fstatus.php
Normal file
49
scripts/ajax/fstatus.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//------------------ sanikasten
|
||||
$key=0; $anzeige=0;
|
||||
$tempcar2 = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE aktiv>0 and besitz<3 and sanidate>1 ORDER BY kz");
|
||||
while($row = $tempcar2->fetch_assoc()) {
|
||||
$temptime=time(); $temptime=$temptime+2678400;
|
||||
if($row['sanidate']<=time()) {
|
||||
$anzeige=1;
|
||||
$sanidata[$key]['typ']=1;
|
||||
$sanidata[$key]['kz']=$row['kz'];
|
||||
$sanidata[$key]['sanidate']=$row['sanidate'];
|
||||
$key++;
|
||||
}
|
||||
elseif($row['sanidate']<=$temptime) {
|
||||
$anzeige=1;
|
||||
$sanidata[$key]['typ']=2;
|
||||
$sanidata[$key]['kz']=$row['kz'];
|
||||
$sanidata[$key]['sanidate']=$row['sanidate'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$key=0;
|
||||
$tempcar1 = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE aktiv>0 and besitz<3 and hudate>1 ORDER BY kz");
|
||||
while($row = $tempcar1->fetch_assoc()) {
|
||||
$temptime=time(); $temptime=$temptime+2678400;
|
||||
if($row['hudate']<=time()) {
|
||||
$anzeige=1;
|
||||
$hudata[$key]['typ']=1;
|
||||
$hudata[$key]['kz']=$row['kz'];
|
||||
$hudata[$key]['hudate']=$row['hudate'];
|
||||
$key++;
|
||||
}
|
||||
elseif($row['hudate']<=$temptime) {
|
||||
$anzeige=1;
|
||||
$hudata[$key]['typ']=2;
|
||||
$hudata[$key]['kz']=$row['kz'];
|
||||
$hudata[$key]['hudate']=$row['hudate'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('anzeige', $anzeige);
|
||||
$template->assign('hudata', $hudata);
|
||||
$template->assign('anzeige', $anzeige);
|
||||
$template->assign('sanidata', $sanidata);
|
||||
$template->assign('content', 'tpl/ajax/fstatus.tpl');
|
||||
?>
|
||||
89
scripts/ajax/glrechner.php
Normal file
89
scripts/ajax/glrechner.php
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
|
||||
// echo"-----";
|
||||
$mid = $_POST['maID'];
|
||||
$monat= $_POST['monat'];
|
||||
$jahr = $_POST['jahr'];
|
||||
$gl = $GLOBALS['mysql']->query_single("SELECT * FROM ma_lohn_ges WHERE mid='".$mid."' and monat='".$monat."' and jahr='".$jahr."'");
|
||||
$brutto=$gl['grund_h']*12;
|
||||
$bruttox=$brutto*100;
|
||||
|
||||
$apiurl='https://www.bmf-steuerrechner.de/interface/2023Version1.xhtml?code=ext2023';
|
||||
$apiurl=$apiurl.'&LZZ=2';
|
||||
if ($gl['kinder']==0 && $gl['alter']<24) { // ab 24 Jahren Kinderloszuschlag
|
||||
$apiurl=$apiurl.'&PVZ=1';
|
||||
}
|
||||
$apiurl=$apiurl."&RE4=".$bruttox; //Brutto
|
||||
$apiurl=$apiurl."&STKL=".$gl['steuerkl']; //Steuerklasse
|
||||
if($gl['steuerkl']==4) { $apiurl=$apiurl.'&F=1'; } //Faktor bei STKL 4
|
||||
$apiurl=$apiurl.'&PVS=1'; //Pfeleversicherung Sachsen
|
||||
$apiurl=$apiurl."&ZKF=".$gl['kinderfb']; //Kinderfreibeträge
|
||||
|
||||
if($gl['kirche']==20) { $gl['kirche']=0; }
|
||||
$apiurl=$apiurl."&R=".$gl['kirche']; //Religionszugehörigkeit
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
function xml_attribute($object, $attribute)
|
||||
{
|
||||
if(isset($object[$attribute]))
|
||||
return (string) $object[$attribute];
|
||||
}
|
||||
//--------------------------------------------------------------------------------
|
||||
//echo $apiurl."</br>";
|
||||
|
||||
$url = $apiurl;
|
||||
$xml = simplexml_load_file($url);
|
||||
|
||||
|
||||
$data['brutto']=$brutto;
|
||||
|
||||
// $xml_object = simplexml_load_string($xml);
|
||||
$test1=$xml->ausgaben; // $test=$xml->ausgaben->ausgabe[3];
|
||||
|
||||
foreach($test1->ausgabe as $key => $vdata)
|
||||
{
|
||||
// echo "<pre>"; print_r($value); echo "</pre>";
|
||||
if (xml_attribute($value, 'name')=='LSTLZZ') {
|
||||
$data['lsteuer']=xml_attribute($vdata, 'value');
|
||||
} else {
|
||||
$data['lsteuer']=0;
|
||||
}
|
||||
|
||||
|
||||
if (xml_attribute($value, 'name')=='BK') {
|
||||
$data['ksteuer']=xml_attribute($vdata, 'value');
|
||||
$data['ksteuer']*0.0009;
|
||||
} else {
|
||||
$data['ksteuer']=0;
|
||||
}
|
||||
}
|
||||
|
||||
$data['netto1']=$data['brutto']-$data['ksteuer']-$data['lsteuer'];
|
||||
|
||||
$template->assign('ld', $data);
|
||||
$template->assign('content', 'tpl/ajax/glrechner.tpl');
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
https://www.bmf-steuerrechner.de/interface/2023Version1.xhtml?code=ext2023
|
||||
&LZZ=2
|
||||
&JRE4ENT=0&JVBEZ=0&KRV=0&KVZ=0.9&LZZ=2&PKPV=0&PVS=0&PVZ=0&PKV=0&R=1&RE4=200000&JRE4=2400000&SONSTB=0&SONSTENT=0&JRE4ENT=0&STERBE=0&STKL=1&VBEZ=0&VBEZM=0&VBEZS=0&VBS=0&VKAPA=0&VMT=0&ZKF=0&ZMVB=12
|
||||
KVZ=1,6
|
||||
LZZ 1 jahr 2 Monat
|
||||
PKV 0 = gesetzlich krankenversicherte Arbeitnehmer
|
||||
1 = ausschließlich privat krankenversicherte Arbeitnehmer ohne
|
||||
Arbeitgeberzuschuss
|
||||
2 = ausschließlich privat krankenversicherte Arbeitnehmer mit
|
||||
Arbeitgeberzuschuss
|
||||
PVS 1, wenn bei der sozialen Pflegeversicherung die Besonderheiten in
|
||||
Sachsen zu berücksichtigen sind bzw. zu berücksichtigen wären
|
||||
PVZ 1, wenn der Arbeitnehmer den Zuschlag zur sozialen
|
||||
Pflegeversicherung zu zahlen hat ab 24 Jahren Kinderlos
|
||||
RE4 Steuerpflichtiger Arbeitslohn für den Lohnzahlungszeitraum
|
||||
*/
|
||||
|
||||
|
||||
?>
|
||||
7
scripts/ajax/gpstag.php
Normal file
7
scripts/ajax/gpstag.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
$gpsdata = $GLOBALS['mysql']->query_array("SELECT * FROM gps ORDER BY id");
|
||||
$template->assign('gpsdata', $gpsdata);
|
||||
//echo "<pre>"; print_r($gpsdata); echo "</pre>";
|
||||
$template->assign('content', 'tpl/ajax/gpstag.tpl');
|
||||
?>
|
||||
70
scripts/ajax/h1.php
Normal file
70
scripts/ajax/h1.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a1 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (3,4,5,17)");
|
||||
if($a1['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (3,4,5,17) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a1['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m1.tpl');
|
||||
|
||||
70
scripts/ajax/h16.php
Normal file
70
scripts/ajax/h16.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a16 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (6,16)");
|
||||
if($a16['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (6,16) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a16['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m16.tpl');
|
||||
|
||||
70
scripts/ajax/h17.php
Normal file
70
scripts/ajax/h17.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a17 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (17,18)");
|
||||
if($a17['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (17,18) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a17['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m17.tpl');
|
||||
|
||||
70
scripts/ajax/h19.php
Normal file
70
scripts/ajax/h19.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a19 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (12,19)");
|
||||
if($a19['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (12,19) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a19['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m19.tpl');
|
||||
|
||||
70
scripts/ajax/h1i.php
Normal file
70
scripts/ajax/h1i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a3 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=3");
|
||||
if($a3['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=3 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $summe);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m1i.tpl');
|
||||
|
||||
70
scripts/ajax/h2.php
Normal file
70
scripts/ajax/h2.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a2 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (6,16,20,21,22,23)");
|
||||
if($a2['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (6,16,20,21,22,23) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a2['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m2.tpl');
|
||||
|
||||
70
scripts/ajax/h22.php
Normal file
70
scripts/ajax/h22.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a22 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=22");
|
||||
if($a22['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=22 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a22['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m22.tpl');
|
||||
|
||||
70
scripts/ajax/h2i.php
Normal file
70
scripts/ajax/h2i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a2 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=4");
|
||||
if($a2['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=4 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a2['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m2i.tpl');
|
||||
|
||||
70
scripts/ajax/h3.php
Normal file
70
scripts/ajax/h3.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a3 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=3");
|
||||
if($a3['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=3 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a3['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m3.tpl');
|
||||
|
||||
70
scripts/ajax/h3i.php
Normal file
70
scripts/ajax/h3i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a3 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=5");
|
||||
if($a3['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=5 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $summe);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m3i.tpl');
|
||||
|
||||
70
scripts/ajax/h4.php
Normal file
70
scripts/ajax/h4.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a4 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=4");
|
||||
if($a4['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=4 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a4['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m4.tpl');
|
||||
|
||||
70
scripts/ajax/h4i.php
Normal file
70
scripts/ajax/h4i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a4 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and in (5,6,16)");
|
||||
if($a4['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (5,6,16) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a4['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m4i.tpl');
|
||||
|
||||
70
scripts/ajax/h5.php
Normal file
70
scripts/ajax/h5.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a5 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=5");
|
||||
if($a5['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=5 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a5['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m5.tpl');
|
||||
|
||||
70
scripts/ajax/h5i.php
Normal file
70
scripts/ajax/h5i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a5 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and in(20,99)");
|
||||
if($a5['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and in(20,99) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a5['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m5i.tpl');
|
||||
|
||||
70
scripts/ajax/h6.php
Normal file
70
scripts/ajax/h6.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a6 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=6");
|
||||
if($a6['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ=6 ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a6['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m6.tpl');
|
||||
|
||||
70
scripts/ajax/h6i.php
Normal file
70
scripts/ajax/h6i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a3 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (12,19)");
|
||||
if($a3['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (12,19) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $summe);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m6i.tpl');
|
||||
|
||||
70
scripts/ajax/h7i.php
Normal file
70
scripts/ajax/h7i.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a7 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (12,19)");
|
||||
if($a7['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (12,19) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a7['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m7i.tpl');
|
||||
|
||||
70
scripts/ajax/h99.php
Normal file
70
scripts/ajax/h99.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tag = date("d");
|
||||
$monat = date("m");
|
||||
$jahr = date("Y");
|
||||
|
||||
//-- wiederkehrende abfragen
|
||||
$a_touren = $GLOBALS['a_touren'];
|
||||
$a_fahrzg = $GLOBALS['a_fahrzg'];
|
||||
$a_fahrer = $GLOBALS['a_fahrer'];
|
||||
$a_planbz = $GLOBALS['a_planbz'];
|
||||
$a_planbf = $GLOBALS['a_planbf'];
|
||||
|
||||
$a_planb_m = $GLOBALS['mysql']->query_array("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$a_planb_f = $GLOBALS['mysql']->query_array("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
|
||||
$a99 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (20,99)");
|
||||
if($a99['num_rows'] != 0) {
|
||||
$key=0; $noplan=0; $fertig=0; $sms=0; $summe=0; $aktiv=0; $anzeige=0;
|
||||
$db=$GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$tag."' and monat='".$monat."' and jahr='".$jahr."' and typ in (20,99) ORDER BY id");
|
||||
while($row = $db->fetch_assoc()) {
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
|
||||
//-------------------- Fahrer prüfen
|
||||
if($row['fahrer']==0) { // kein Fahrer geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
// Fahrer auf Kalender prüfen
|
||||
if (in_array($row['fahrer'], $a_planb_m)) {
|
||||
$ma_pid = array_search($row['fahrer'], array_column($a_planb_m, 'mid'));
|
||||
if (is_numeric($ma_pid)) {
|
||||
$grund=$a_planb_m[$ma_pid]['grund'];
|
||||
$pa_id= array_search($grund, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']== 1) { $noplan=1; } //nicht da
|
||||
if($a_planbz[$pa_id]['nichtda']==88) { $noplan=1; } //keine N8-Tour
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------- Fahrzeug prüfen
|
||||
if($row['auto']==0) { // kein Fahrzeug geplant
|
||||
$noplan=1;
|
||||
} else {
|
||||
$temp_p_f = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($temp_p_f['num_rows'] != 0) {
|
||||
$fgrund=$temp_p_f['grund'];
|
||||
$fa_id= array_search($temp_p_f['grund'], array_column($a_planbf, 'id'));
|
||||
if($a_planbf[$fa_id]['aktiv']<2) { $noplan=1; }
|
||||
}
|
||||
}
|
||||
//-------------------- sonder touren bzw nicht aktive Touren
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
if ($a_touren[$ta_id]['aktiv']==0 ) {$aktiv++; }
|
||||
//-------------------- Übergabe
|
||||
$anzeige=0;
|
||||
if ($noplan>0) { $anzeige=1; } //rot
|
||||
elseif ($fertig==0) { $anzeige=2; } // gelb/orange
|
||||
elseif ($fertig==$sms && $aktiv==0) { $anzeige=3; } // grün komplett fertig
|
||||
elseif ($fertig==$sms && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv
|
||||
elseif ($fertig>0 && $aktiv==0) { $anzeige=3; } // grün komplett sms fehler
|
||||
elseif ($fertig>0 && $aktiv> 0) { $anzeige=4; } // blau -- fertig Fremdtouren aktiv sms fehler
|
||||
}
|
||||
} else { $anzeige=0; }
|
||||
|
||||
$template->assign('menge', $a99['num_rows']);
|
||||
$template->assign('butten', $anzeige);
|
||||
$template->assign('content', 'tpl/ajax/m99.tpl');
|
||||
|
||||
40
scripts/ajax/hkal_1.php
Normal file
40
scripts/ajax/hkal_1.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tagp = strtotime("+0 day");
|
||||
$tag = date("d",$tagp);
|
||||
$monat = date("m",$tagp);
|
||||
$jahr = date("Y",$tagp);
|
||||
$datum=$tag.".".$monat.".".$jahr;
|
||||
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$maf1[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf1[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf1[$key]['bez']=$jahre.". Geburtstag"; $maf1[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$maf1[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('datum', $datum);
|
||||
$template->assign('kal', $maf1);
|
||||
$template->assign('content', 'tpl/ajax/hkal_1.tpl');
|
||||
?>
|
||||
40
scripts/ajax/hkal_2.php
Normal file
40
scripts/ajax/hkal_2.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tagp = strtotime("+1 day");
|
||||
$tag = date("d",$tagp);
|
||||
$monat = date("m",$tagp);
|
||||
$jahr = date("Y",$tagp);
|
||||
$datum=$tag.".".$monat.".".$jahr;
|
||||
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$maf1[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf1[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf1[$key]['bez']=$jahre.". Geburtstag"; $maf1[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$maf1[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('datum', $datum);
|
||||
$template->assign('kal', $maf1);
|
||||
$template->assign('content', 'tpl/ajax/hkal_2.tpl');
|
||||
?>
|
||||
40
scripts/ajax/hkal_3.php
Normal file
40
scripts/ajax/hkal_3.php
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tagp = strtotime("+2 day");
|
||||
$tag = date("d",$tagp);
|
||||
$monat = date("m",$tagp);
|
||||
$jahr = date("Y",$tagp);
|
||||
$datum=$tag.".".$monat.".".$jahr;
|
||||
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM planer WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM planer_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$maf1[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$bday = $GLOBALS['mysql']->query("SELECT * FROM mitarbeiter WHERE gebtag='".$tag."' AND gebmonat='".$monat."'");
|
||||
while($row = $bday->fetch_assoc()) {
|
||||
$maf1[$key]['fahrer']=$row['name']; $jahre=$jahr-$row['gebjahr']; $maf1[$key]['bez']=$jahre.". Geburtstag"; $maf1[$key]['icon']="bday.png";
|
||||
$key++;
|
||||
}
|
||||
$auto = $GLOBALS['mysql']->query("SELECT * FROM fplaner WHERE tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
while($row = $auto->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['fid']."'");
|
||||
$maf1[$key]['fahrer']=$row_fahrerx['kz'];
|
||||
$row_icon = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$row['grund']."'");
|
||||
$maf1[$key]['bez']=$row_icon['bez'];
|
||||
$maf1[$key]['icon']=$row_icon['icon'];
|
||||
$maf1[$key]['info']=$row['info'];
|
||||
$key++;
|
||||
}
|
||||
$template->assign('datum', $datum);
|
||||
$template->assign('kal', $maf1);
|
||||
$template->assign('content', 'tpl/ajax/hkal_3.tpl');
|
||||
?>
|
||||
28
scripts/ajax/huau.php
Normal file
28
scripts/ajax/huau.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//-------------- hu
|
||||
$key=0;
|
||||
$tempcar1 = $GLOBALS['mysql']->query("SELECT * FROM fahrzeuge WHERE aktiv>0 and besitz<3 and hudate>1 ORDER BY kz");
|
||||
while($row = $tempcar1->fetch_assoc()) {
|
||||
$temptime=time(); $temptime=$temptime+2678400;
|
||||
if($row['hudate']<=time()) {
|
||||
$anzeige=1;
|
||||
$hudata[$key]['typ']=1;
|
||||
$hudata[$key]['kz']=$row['kz'];
|
||||
$hudata[$key]['hudate']=$row['hudate'];
|
||||
$key++;
|
||||
}
|
||||
elseif($row['hudate']<=$temptime) {
|
||||
$anzeige=1;
|
||||
$hudata[$key]['typ']=2;
|
||||
$hudata[$key]['kz']=$row['kz'];
|
||||
$hudata[$key]['hudate']=$row['hudate'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
$template->assign('anzeige', $anzeige);
|
||||
$template->assign('hudata', $hudata);
|
||||
$template->assign('content', 'tpl/ajax/huau.tpl');
|
||||
?>
|
||||
29
scripts/ajax/i_tour.php
Normal file
29
scripts/ajax/i_tour.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
$tt = $GLOBALS['mysql']->query("SELECT * FROM touren WHERE aktiv=1 ORDER BY typ,id"); $key=0;
|
||||
while($row = $tt->fetch_assoc()) {
|
||||
$tour=0; $tour=[$row['tour']];
|
||||
|
||||
$tmp2 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' and jahr='".$jahr."' and tour='".$row['id']."'");
|
||||
$touraktiv[$key]['wert']=$tmp2['num_rows'];
|
||||
|
||||
|
||||
$stat=" "; $stat=[$row['status']];
|
||||
|
||||
if($row['smsstatus']==0) { $stat="<i class='fal fa-comment-alt fa-1x' style='color:gray' ></i>"; }
|
||||
if($row['smsstatus']==1) { $stat="<i class='fas fa-comment-alt-exclamation fa-1x' style='color:orange' ></i>"; }
|
||||
if($row['smsstatus']==2) { $stat="<i class='fas fa-comment-alt-check fa-1x' style='color:green' ></i>"; }
|
||||
if($row['smsstatus']==8) { $stat="<i class='fas fa-comment-alt-dots fa-1x' style='color:gray' ></i>"; }
|
||||
if($row['smsstatus']==20){ $stat="<i class='fas fa-spinner fa-spin fa-1x' style='color:gray' ></i>"; }
|
||||
if($row['smsstatus']==3) { $stat="<i class='fas fa-comment-alt-times fa-1x' style='color:red' ></i>"; }
|
||||
if($row['smsstatus']==4) { $stat="<i class='fas fa-comment-alt-times fa-1x' style='color:red' ></i>"; }
|
||||
if($row['smsstatus']==5) { $stat="<i class='fas fa-comment-alt-times fa-1x' style='color:red' ></i>"; }
|
||||
$t[]=$tour;
|
||||
$s[]=$stat;
|
||||
$key++;
|
||||
}
|
||||
$back['t'] = $t;
|
||||
$back['s'] = $s;
|
||||
$back['success'] = true;
|
||||
$back['length'] = $key;
|
||||
echo json_encode($back);
|
||||
?>
|
||||
14
scripts/ajax/i_tour_a.php
Normal file
14
scripts/ajax/i_tour_a.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
$tmp0 = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE job!=0");
|
||||
if($tmp0['num_rows']!=0) {
|
||||
$anzeige=0;
|
||||
$nochmenge=$tmp0['num_rows'];
|
||||
$zeitraum=substr($tmp0['job'],4)."/".substr($tmp0['job'], 0,4);
|
||||
$template->assign('zeitraum', $zeitraum);
|
||||
$template->assign('nochmenge', $nochmenge);
|
||||
$template->assign('aktuell',$tmp0['tour']);
|
||||
} else {
|
||||
$template->assign('fehler', 1);
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/i_tour_a.tpl');
|
||||
?>
|
||||
24
scripts/ajax/info_ex.php
Normal file
24
scripts/ajax/info_ex.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
$kw_aktuell = (int)date('W'); $jahr_aktuell = (int)date('Y');
|
||||
// if(($week = date('W', mktime(0, 0, 0, 12, 31,$jahr_aktuell))) == 1) { $kwgesamt=52; } else { $kwgesamt=53; }
|
||||
$key=0; $tmp=0; $start=0;
|
||||
if($kw_aktuell<10) { $start=0; } else { $start=$kw_aktuell-9; }
|
||||
for ($i = $start; $i <= $kw_aktuell; $i++) {
|
||||
$s_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE jahr='".$jahr_aktuell."' and kw='".$i."' and typ=8 OR jahr='".$jahr_aktuell."' and kw='".$i."' and typ=14");
|
||||
$kws[$key]=$i;
|
||||
while($row = $s_tour->fetch_assoc()) {
|
||||
$tmp=$tmp+$row['gewicht'];
|
||||
|
||||
}
|
||||
$data[$key]=$tmp; $tmp=0;
|
||||
$key++;
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
$template->assign('data',json_encode($data));
|
||||
$template->assign('kws',json_encode($kws));
|
||||
$template->assign('content', 'tpl/ajax/info_ex.tpl');
|
||||
?>
|
||||
25
scripts/ajax/info_rs.php
Normal file
25
scripts/ajax/info_rs.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
$kw_aktuell = (int)date('W'); $jahr_aktuell = (int)date('Y');
|
||||
//if(($week = date('W', mktime(0, 0, 0, 12, 31,$jahr_aktuell))) == 1) { $kwgesamt=52; } else { $kwgesamt=53; }
|
||||
$key=0; $tmp=0; $start=0;
|
||||
if($kw_aktuell<10) { $start=0; } else { $start=$kw_aktuell-9; }
|
||||
for ($i = $start; $i <= $kw_aktuell; $i++) {
|
||||
$s_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE jahr='".$jahr_aktuell."' and kw='".$i."' and typ=7");
|
||||
$kws[$key]=$i;
|
||||
while($row = $s_tour->fetch_assoc()) {
|
||||
$tmp=$tmp+$row['gewicht'];
|
||||
|
||||
}
|
||||
$data[$key]=$tmp; $tmp=0;
|
||||
$key++;
|
||||
}
|
||||
//echo "<pre>"; print_r($kws); echo "</pre>";
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
$template->assign('data',json_encode($data));
|
||||
$template->assign('kws',json_encode($kws));
|
||||
$template->assign('content', 'tpl/ajax/info_rs.tpl');
|
||||
?>
|
||||
24
scripts/ajax/info_ss.php
Normal file
24
scripts/ajax/info_ss.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
$kw_aktuell = (int)date('W'); $jahr_aktuell = (int)date('Y');
|
||||
//if(($week = date('W', mktime(0, 0, 0, 12, 31,$jahr_aktuell))) == 1) { $kwgesamt=52; } else { $kwgesamt=53; }
|
||||
$key=0; $tmp=0; $start=0;
|
||||
if($kw_aktuell<10) { $start=0; } else { $start=$kw_aktuell-9; }
|
||||
for ($i = $start; $i <= $kw_aktuell; $i++) {
|
||||
$s_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE jahr='".$jahr_aktuell."' and kw='".$i."' and typ=8");
|
||||
$kws[$key]=$i;
|
||||
while($row = $s_tour->fetch_assoc()) {
|
||||
$tmp=$tmp+$row['gewicht'];
|
||||
|
||||
}
|
||||
$data[$key]=$tmp; $tmp=0;
|
||||
$key++;
|
||||
}
|
||||
//---------------------------------------------------------------------------------------------------------
|
||||
$template->assign('data',json_encode($data));
|
||||
$template->assign('kws',json_encode($kws));
|
||||
$template->assign('content', 'tpl/ajax/info_ss.tpl');
|
||||
?>
|
||||
26
scripts/ajax/infop.php
Normal file
26
scripts/ajax/infop.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
$tmptime=time()-2678400;
|
||||
//$infop = $GLOBALS['mysql']->query_array("SELECT * FROM infop WHERE zeit>'".$tmptime."'");
|
||||
|
||||
$test = $GLOBALS['mysql']->query("SELECT * FROM infop WHERE zeit>'".$tmptime."' ORDER BY zeit DESC");
|
||||
$key=0;
|
||||
while($row = $test->fetch_assoc()) {
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['mid']."'");
|
||||
$infop[$key]['von']=$row_fahrerx['name'];
|
||||
$infop[$key]['info']=$row['info'];
|
||||
$infop[$key]['zeit']=$row['zeit'];
|
||||
$infop[$key]['wichtig']=$row['wichtig'];
|
||||
// $infop[$key]['icon']=$row_icon['icon'];
|
||||
$key++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$template->assign('infop', $infop);
|
||||
$template->assign('content', 'tpl/ajax/infop.tpl');
|
||||
?>
|
||||
13
scripts/ajax/infos.php
Normal file
13
scripts/ajax/infos.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL); ini_set('display_errors',0);
|
||||
|
||||
//--------------------------------- auslesen ungelesene Nachrichten -------------------------------------------------------------
|
||||
$smsnotread = $GLOBALS['mysql']->query_array("SELECT * FROM log_sms WHERE gelesen = 0 and incoming = 1 ORDER BY senddate DESC");
|
||||
$template->assign('smsnotread', $smsnotread);
|
||||
$template->assign('notread', array_values($smsnotread));
|
||||
|
||||
$template->assign('content', 'tpl/ajax/infos.tpl');
|
||||
?>
|
||||
23
scripts/ajax/ip_status.php
Normal file
23
scripts/ajax/ip_status.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
$abfrage_online = $GLOBALS['mysql']->query("SELECT * FROM ipcheck"); $key=0;
|
||||
while($row = $abfrage_online->fetch_assoc()) {
|
||||
if($row['id']==1) {
|
||||
$so1['name']=$row['name'];
|
||||
$so1['time']=$row['time'];
|
||||
$template->assign('so1', $so1);
|
||||
}
|
||||
if($row['id']==2) {
|
||||
$so2['name']=$row['name'];
|
||||
$so2['time']=$row['time'];
|
||||
$template->assign('so2', $so2);
|
||||
}
|
||||
if($row['id']==3) {
|
||||
$so3['name']=$row['name'];
|
||||
$so3['time']=$row['time'];
|
||||
$template->assign('so3', $so3);
|
||||
}
|
||||
|
||||
$key++;
|
||||
}
|
||||
$template->assign('content', 'tpl/ajax/ip_status.tpl');
|
||||
?>
|
||||
281
scripts/ajax/isaso.php
Normal file
281
scripts/ajax/isaso.php
Normal file
|
|
@ -0,0 +1,281 @@
|
|||
<?php
|
||||
|
||||
if(isset($_GET['a']))
|
||||
$action=$_GET['a'];
|
||||
else
|
||||
$action='load_saso';
|
||||
switch($action):
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------- Zeit speichern laden --------------------------------------------
|
||||
case 'time_save';
|
||||
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET zeit='".$_POST['zeit']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Uhrzeit auf ".$_POST['time']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
//---------------------------------------------- exemplare speichern laden ---------------------------------------
|
||||
case 'save_exemplare';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET exemplare='".$_POST['exemplare']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Exemplare auf ".$_POST['exemplare']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
case 'save_amtsblatt';
|
||||
$tourx = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE id='".$_POST['tourID']."'");
|
||||
if($tourx['amtsblatt']!=0) {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET amtsblatt='0' WHERE id='".$_POST['tourID']."'");
|
||||
} else {
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET amtsblatt='1' WHERE id='".$_POST['tourID']."'");
|
||||
}
|
||||
$back['tour'] = $_POST['tourID'];
|
||||
$back['lastnote']=$tour['tour']." Amtsblatt/Mitnahme markiert";
|
||||
$back['success'] = true;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- ges.Gewicht speichern -------------------------------------
|
||||
case 'save_gewicht';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht='".$_POST['gewicht']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Rampengewicht auf ".$_POST['gewicht']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
//---------------------------------------------- saso.Gewicht speichern -------------------------------------
|
||||
case 'save_gewicht3';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht3='".$_POST['gewicht3']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Rampengewicht auf ".$_POST['gewicht3']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- saso. END_Gewicht speichern ---------------------------------
|
||||
case 'save_gewicht9';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht9='".$_POST['gewicht3']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Rampengewicht auf ".$_POST['gewicht9']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- Amtsblatt Menge speichern ---------------------------------
|
||||
case 'save_abst';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET amtsblatt='".$_POST['abst']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Amtsblatt Exemplare auf ".$_POST['abst']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- ges.Gewicht4 Car gewicht speichern -------------------------
|
||||
case 'save_gewicht4';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht4='".$_POST['gewicht4']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Gesamtgewicht Tour auf ".$_POST['gewicht4']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- pakete ahrzeugpakete speichern -------------------------------------
|
||||
case 'save_pakete';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET pakete2='".$_POST['pakete']."' WHERE id='".$_POST['tourID']."'");
|
||||
$abn_tour = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE id='".$_POST['tourID']."'");
|
||||
$cargewicht=$_POST['pakete']*$abn_tour['gewicht2'];
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht4='".$cargewicht."' WHERE id='".$_POST['tourID']."'");
|
||||
|
||||
$tid=$abn_tour['tour']-9;
|
||||
$pppp=ceil($abn_tour['Pakete']-$_POST['pakete']);
|
||||
$cargewicht=$pppp*$abn_tour['gewicht2'];
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht4='".$cargewicht."' WHERE tour='".$tid."' and kw='".$abn_tour['kw']."' and jahr='".$abn_tour['jahr']."' ");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET pakete2='".$pppp."' WHERE tour='".$tid."' and kw='".$abn_tour['kw']."' and jahr='".$abn_tour['jahr']."' ");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Für die Tour wurden die Pakete auf ".$_POST['pakete']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- pakete2 ahrzeugpakete speichern laden -------------------------------------
|
||||
case 'save_pakete2';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET pakete2='".$_POST['pakete2']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Paket auf dem Fahrzeug auf ".$_POST['pakete2']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- Norm speichern laden -------------------------------------
|
||||
case 'save_norm';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET Norm='".$_POST['norm']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Normplan auf ".$_POST['norm']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
//---------------------------------------------- Rampe speichern laden -------------------------------------
|
||||
case 'save_rampe';
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET rampe='".$_POST['rampe']."' WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Rampe auf ".$_POST['rampe']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
break;
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------
|
||||
//---------------------------------------------- SaSo laden ------------------------------------------------------
|
||||
case 'load_saso';
|
||||
default:
|
||||
//--------- jahrauswahl
|
||||
if(isset($jahr)) {
|
||||
$pjahr=date('W', (mktime(0, 0, 0, 1, 1, $jahr+1) - 4*86400));
|
||||
$ijahr=date('W', (mktime(0, 0, 0, 1, 1, $jahr) - 4*86400));
|
||||
$mjahr=date('W', (mktime(0, 0, 0, 1, 1, $jahr-1) - 4*86400));
|
||||
if($_GET['wahl']==1){ if($_GET['kw']==1) { $kw=$mjahr; $jahr=$_GET['jahr']-1;} else { $kw=$_GET['kw']-1; $jahr=$_GET['jahr'];}}
|
||||
elseif($_GET['wahl']==2){ if($_GET['kw']==$ijahr) { $kw=1; $jahr=$_GET['jahr']+1; } else { $kw=$_GET['kw']+1; $jahr=$_GET['jahr']; }
|
||||
} else {
|
||||
$jahr = (int)date('Y');
|
||||
$kw = (int)date('W');
|
||||
}
|
||||
} else {
|
||||
$jahr = (int)date('Y');
|
||||
$kw = (int)date('W');
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
if(isset($_POST['delete2'])) {
|
||||
if($_POST['delete2']>1000) {
|
||||
$GLOBALS['mysql']->query("DELETE FROM tourenliste WHERE id='".$_POST['delete2']."'");
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//------------------------- Paketmenge und Cargewichte berechnen ---------------------------------------------------------------------------------------
|
||||
//$saso_fail = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and typ=8 AND tour>1000 ORDER BY zeit"); $key=0;
|
||||
//-------------------------------------------------------------------------------------- Auslesen Touren
|
||||
$saso_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and typ=8 AND zeit >= 19 ORDER BY zeit"); $key=0;
|
||||
while($row = $saso_tour->fetch_assoc()) {
|
||||
$saso_tour2[$key]['zeit'] = $row['zeit'];
|
||||
$saso_tour2[$key]['id'] = $row['id'];
|
||||
$saso_tour2[$key]['utyp'] = $row['utyp'];
|
||||
$saso_tour2[$key]['tid'] = $key;
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='" . $row['tour'] . "'");
|
||||
$saso_tour2[$key]['tourid'] = $row['tour'];
|
||||
$saso_tour2[$key]['tour'] = $row_tour['tour'];
|
||||
$saso_tour2[$key]['tname'] = $row_tour['tour3'];
|
||||
if ($row['exemplare'] <1) {
|
||||
$saso_tour2[$key]['exemplare'] = $row_tour['exemplare'];
|
||||
} else {
|
||||
$saso_tour2[$key]['exemplare'] = $row['exemplare'];
|
||||
}
|
||||
$saso_tour2[$key]['gewicht'] = $row['gewicht'];
|
||||
$saso_tour2[$key]['gewicht4'] = $row['gewicht4'];
|
||||
|
||||
//------------------------------- Pakete anhand der
|
||||
if ($row['Pakete'] <1) {
|
||||
$saso_tour2[$key]['pakete'] = ceil($saso_tour2[$key]['exemplare']/ $row['Norm']);
|
||||
} else {
|
||||
$saso_tour2[$key]['pakete'] = $row['Pakete'];
|
||||
}
|
||||
$saso_tour2[$key]['pakete2']=$row['pakete2'];
|
||||
|
||||
$saso_tour2[$key]['gewicht2']=$row['gewicht']/$row['Pakete'];
|
||||
//$saso_tour2[$key]['gewicht3']=ceil($gewicht3);
|
||||
if($row['tour']<1000) {
|
||||
$temp_tour=$row['tour']+7200;
|
||||
$saso_temp = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and tour='".$temp_tour."'");
|
||||
if($saso_temp['num_rows']>0) {
|
||||
$saso_tour2[$key]['pakete2']=$row['Pakete'];
|
||||
$saso_temp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and tour='".$temp_tour."'");
|
||||
while($rowtemp = $saso_temp->fetch_assoc()) {
|
||||
$saso_tour2[$key]['pakete2']=$saso_tour2[$key]['pakete2']-$rowtemp['pakete2'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$saso_tour2[$key]['gewicht3']=ceil($saso_tour2[$key]['gewicht2']*$saso_tour2[$key]['pakete2']);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET Pakete='".$saso_tour2[$key]['pakete']."' WHERE id='".$row['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht2='".$saso_tour2[$key]['gewicht2']."' WHERE id='".$row['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht3='".$saso_tour2[$key]['gewicht3']."' WHERE id='".$row['id']."'");
|
||||
|
||||
|
||||
$saso_tour2[$key]['rampe']=$row['rampe'];
|
||||
$saso_tour2[$key]['norm']=$row['Norm']; if($row['Norm']<1) {$normtest=1;}
|
||||
$key++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$saso_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and typ=8 AND zeit <= 19 ORDER BY zeit");
|
||||
while($row = $saso_tour->fetch_assoc()) {
|
||||
$saso_tour2[$key]['zeit'] = $row['zeit'];
|
||||
$saso_tour2[$key]['id'] = $row['id'];
|
||||
$saso_tour2[$key]['utyp'] = $row['utyp'];
|
||||
$saso_tour2[$key]['tid'] = $key;
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='" . $row['tour'] . "'");
|
||||
$saso_tour2[$key]['tourid'] = $row['tour'];
|
||||
$saso_tour2[$key]['tour'] = $row_tour['tour'];
|
||||
$saso_tour2[$key]['tname'] = $row_tour['tour3'];
|
||||
if ($row['exemplare'] <1) {
|
||||
$saso_tour2[$key]['exemplare'] = $row_tour['exemplare'];
|
||||
} else {
|
||||
$saso_tour2[$key]['exemplare'] = $row['exemplare'];
|
||||
}
|
||||
$saso_tour2[$key]['gewicht'] = $row['gewicht'];
|
||||
$saso_tour2[$key]['gewicht4'] = $row['gewicht4'];
|
||||
$pakete2=$row['pakete2'];
|
||||
//------------------------------- Pakete anhand der
|
||||
if ($row['Pakete'] <1) {
|
||||
$saso_tour2[$key]['pakete'] = ceil($saso_tour2[$key]['exemplare']/ $row['Norm']);
|
||||
} else {
|
||||
$saso_tour2[$key]['pakete'] = $row['Pakete'];
|
||||
}
|
||||
|
||||
|
||||
$saso_tour2[$key]['gewicht2']=$row['gewicht']/$row['Pakete'];
|
||||
//$saso_tour2[$key]['gewicht3']=ceil($gewicht3);
|
||||
if($row['tour']<1000) {
|
||||
$temp_tour=$row['tour']+7200;
|
||||
$saso_temp = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and tour='".$temp_tour."'");
|
||||
if($saso_temp['num_rows']>0) {
|
||||
$pakete2=$row['Pakete'];
|
||||
$saso_temp = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw."' and jahr='".$jahr."' and tour='".$temp_tour."'");
|
||||
while($rowtemp = $saso_temp->fetch_assoc()) {
|
||||
$pakete2=$pakete2-$rowtemp['pakete2'];
|
||||
}
|
||||
$saso_tour2[$key]['pakete2']=$pakete2;
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET pakete2='".$pakete2."' WHERE id='".$row['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$saso_tour2[$key]['$pakete2']=$pakete2;
|
||||
$saso_tour2[$key]['gewicht3']=ceil($saso_tour2[$key]['gewicht2']*$pakete2);
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET Pakete='".$saso_tour2[$key]['pakete']."' WHERE id='".$row['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET pakete2='".$pakete2."' WHERE id='".$row['id']."'"); echo $pakete2;
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht2='".$saso_tour2[$key]['gewicht2']."' WHERE id='".$row['id']."'");
|
||||
$GLOBALS['mysql']->insert("UPDATE tourenliste SET gewicht3='".$saso_tour2[$key]['gewicht3']."' WHERE id='".$row['id']."'");
|
||||
|
||||
|
||||
|
||||
$saso_tour2[$key]['rampe']=$row['rampe'];
|
||||
$saso_tour2[$key]['norm']=$row['Norm']; if($row['Norm']<1) {$normtest=1;}
|
||||
$key++;
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
// echo "<pre>"; print_r($saso_tour2); echo "</pre>";
|
||||
//-----------------------------------------------
|
||||
//$tourplus = $GLOBALS['mysql']->query_array("SELECT * FROM touren WHERE typ=8 and id>8000 ORDER BY id");
|
||||
//-----------------------------------------------
|
||||
$template->assign('saso_tour2', $saso_tour2);
|
||||
$template->assign('jahr', $jahr);
|
||||
$template->assign('kw', $kw);
|
||||
// $template->assign('datum', $datum);
|
||||
$template->assign('content', 'tpl/ajax/isaso.tpl');
|
||||
|
||||
// echo json_encode($ersatz);
|
||||
|
||||
endswitch;
|
||||
|
||||
|
||||
|
||||
?>
|
||||
87
scripts/ajax/itour_save.php
Normal file
87
scripts/ajax/itour_save.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
//echo "<pre>"; print_r($_POST); echo "</pre>";
|
||||
|
||||
if(isset($_GET['a']))
|
||||
$action=$_GET['a'];
|
||||
else
|
||||
$action='load_free_urlaub';
|
||||
switch($action):
|
||||
|
||||
case 'user_save';
|
||||
$GLOBALS['mysql']->insert("UPDATE touren SET s_fahrer='".$_POST['user']."'WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$temp1=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_POST['user']."'");
|
||||
$back['lastnote']="Stammfahrer: ".$temp1['name']." geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
|
||||
break;
|
||||
|
||||
case 'car_save';
|
||||
$GLOBALS['mysql']->insert("UPDATE touren SET s_auto='".$_POST['car']."'WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Stammfahrzeug geändert.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
|
||||
break;
|
||||
|
||||
case 'info_save';
|
||||
$GLOBALS['mysql']->insert("UPDATE planer SET info='".$_POST['info']."'WHERE id='".$_POST['tourID']."'");
|
||||
$back['success'] = true;
|
||||
$back['lastnote']="Information: ".$_POST['info']." hinzugefügt.";
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
|
||||
break;
|
||||
|
||||
case 'date_save';
|
||||
$GLOBALS['mysql']->insert("UPDATE touren SET aktiv='".$_POST['istC']."' WHERE id='".$_POST['id']."'");
|
||||
$back['success'] = true;
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
|
||||
break;
|
||||
|
||||
case 'tdate_save';
|
||||
if($_POST['istC']==0) {
|
||||
echo $_POST['istC'];
|
||||
$GLOBALS['mysql']->query("DELETE FROM tourenliste WHERE tour='".$_POST['tid']."' AND tag='".$_POST['tag']."' AND monat='".$_POST['monat']."' AND jahr='".$_POST['jahr']."'");
|
||||
} else {
|
||||
$tmpitour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$_POST['tid']."'");
|
||||
$kw=date("W",mktime(0,0,0,$_POST['monat'],$_POST['tag'],$_POST['jahr']));
|
||||
$GLOBALS['mysql']->insert("INSERT INTO tourenliste (tour,kw,tag,monat,jahr,typ,utyp,auto,fahrer)
|
||||
VALUES(
|
||||
'".$_POST['tid']."',
|
||||
'".$kw."',
|
||||
'".$_POST['tag']."',
|
||||
'".$_POST['monat']."',
|
||||
'".$_POST['jahr']."',
|
||||
'".$tmpitour['typ']."',
|
||||
'".$tmpitour['utyp']."',
|
||||
'".$tmpitour['s_auto']."',
|
||||
'".$tmpitour['s_fahrer']."')
|
||||
");
|
||||
echo "save";
|
||||
}
|
||||
|
||||
$back['success'] = true;
|
||||
$back['alt'] = 5;
|
||||
echo json_encode($back);
|
||||
|
||||
break;
|
||||
|
||||
case 'load_free_urlaub';
|
||||
default:
|
||||
|
||||
//--------------------- freier Urlaub aktuelles Jahr
|
||||
$temp1=$GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$_POST['maID']."'");
|
||||
$temp2=$GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$_POST['maID']."' and jahr='".$_POST['jahr']."' and grund=4 ");
|
||||
$temp3=$temp1['urlaubprojahr']-$temp2['num_rows'];
|
||||
$temp4="Resturlaub ".$_POST['jahr'].": ".$temp3." Tag(e)";
|
||||
echo json_encode($temp4);
|
||||
// echo $temp4;
|
||||
|
||||
endswitch;
|
||||
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue