init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
68
scripts/sskw.php
Normal file
68
scripts/sskw.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
$_SESSION['m1']=0; $_SESSION['m2']=6;
|
||||
|
||||
$kw_aktuell = (int)date('W');
|
||||
$jahr_aktuell = (int)date('Y');
|
||||
$key=0;
|
||||
$mp_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE kw='".$kw_aktuell."' and jahr='".$jahr_aktuell."' and typ=8");
|
||||
while($row = $mp_tour->fetch_assoc()) {
|
||||
$mpkw[$key]['datum']=$row['tag'].".".$row['monat'].".".$row['jahr'];
|
||||
$mpkw[$key]['id']=$row['id'];
|
||||
$row_tour = $GLOBALS['mysql']->query_single("SELECT * FROM touren WHERE id='".$row['tour']."'");
|
||||
$mpkw[$key]['tour']=$row_tour['tour'];
|
||||
$row_fahrerx = $GLOBALS['mysql']->query_single("SELECT * FROM mitarbeiter WHERE id='".$row['fahrer']."'");
|
||||
$mpkw[$key]['fahrer']=$row_fahrerx['name'];
|
||||
$mpkw[$key]['zeit']=$row['zeit'];
|
||||
$mpkw[$key]['gewicht']=$row['gewicht'];
|
||||
$mpkw[$key]['norm']=$row['Norm'];
|
||||
$mpkw[$key]['exemplare']=$row['exemplare'];
|
||||
$mpkw[$key]['pakete']=$row['Pakete'];
|
||||
$row_autox = $GLOBALS['mysql']->query_single("SELECT * FROM fahrzeuge WHERE id='".$row['auto']."'");
|
||||
$mpkw[$key]['kennz']=$row_autox['kz'];
|
||||
$mpkw[$key]['infotext']=$row_tour['infotitel'];
|
||||
$mpkw[$key]['sms']="OK";
|
||||
$key++;
|
||||
}
|
||||
|
||||
//$kwg=date('W',strtotime('04.01.'.$jahr_aktuell));
|
||||
//echo $kwg; **** geht irgendwie nicht, hatte ich aber schon mal
|
||||
|
||||
if(($week = date('W', mktime(0, 0, 0, 12, 31,$jahr_aktuell))) == 1) { $kwgesamt=52; } else { $kwgesamt=53; }
|
||||
$key=0; $tmp=0;
|
||||
for ($i = 1; $i <= $kwgesamt; $i++) {
|
||||
$s_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE jahr='".$jahr_aktuell."' and kw='".$i."' and typ=8 ORDER BY kw");
|
||||
$kws[$key]=$i;
|
||||
while($row = $s_tour->fetch_assoc()) {
|
||||
$tmp=$tmp+$row['gewicht3'];
|
||||
|
||||
}
|
||||
$data[$key]=$tmp; $tmp=0;
|
||||
$key++;
|
||||
}
|
||||
/*
|
||||
//---------------------------------- vorjahr
|
||||
$vorjahr=$jahr_aktuell-1;
|
||||
if(($week = date('W', mktime(0, 0, 0, 12, 31,$vorjahr))) == 1) { $kwgesamt=52; } else { $kwgesamt=53; }
|
||||
$key=0; $tmp=0;
|
||||
for ($i = 1; $i <= $kwgesamt; $i++) {
|
||||
$s_tour = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE jahr='".$vorjahr."' and kw='".$i."' and typ=8 ORDER BY kw");
|
||||
$kws[$key]=$i;
|
||||
while($row = $s_tour->fetch_assoc()) {
|
||||
$tmp=$tmp+$row['gewicht'];
|
||||
|
||||
}
|
||||
$line[$key]=$tmp; $tmp=0;
|
||||
$key++;
|
||||
}
|
||||
*/
|
||||
|
||||
//echo json_encode($data);
|
||||
$template->assign('data',json_encode($data));
|
||||
//$template->assign('line',json_encode($line));
|
||||
$template->assign('kws',json_encode($kws));
|
||||
|
||||
$template->assign('rskw', $rskw);
|
||||
$template->assign('mpkw', $mpkw);
|
||||
$template->assign('kw', $kw_aktuell);
|
||||
$template->assign('content', 'tpl/sskw.tpl');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue