init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
53
scripts/ajax/tinfo.php
Normal file
53
scripts/ajax/tinfo.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?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>';
|
||||
|
||||
$ist_jahr = (int)date('Y');
|
||||
$ma_data = $GLOBALS['mysql']->query_id("SELECT * FROM mitarbeiter WHERE aktiv=1 and typ<9 ORDER BY id");
|
||||
|
||||
$htour1 = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tour='".$_POST['tid']."' ORDER BY id"); $key=0; $zahl=0;
|
||||
while($trow = $htour1->fetch_assoc()) {
|
||||
//echo'<pre>'; print_r($row); echo'</pre>';
|
||||
if($ma_data[$trow['fahrer']]['id'] >0) {
|
||||
|
||||
if($ist_jahr==$trow['jahr']) {$status=1;}
|
||||
elseif($ist_jahr-1==$trow['jahr']) {$status=2;}
|
||||
else {$status=3;}
|
||||
|
||||
$fahrer=$trow['fahrer'];
|
||||
$temp=$hinfo[$fahrer]['zahl']+1;
|
||||
if($temp>20) { $menge=3; }
|
||||
elseif($temp>10) { $menge=2; }
|
||||
else { $menge=1; }
|
||||
|
||||
|
||||
$hinfo[$fahrer]['menge']=$menge;
|
||||
|
||||
|
||||
|
||||
$hinfo[$fahrer]['status']=$status;
|
||||
$hinfo[$fahrer]['zahl']=$hinfo[$fahrer]['zahl']+1;
|
||||
$hinfo[$fahrer]['name']=$ma_data[$trow['fahrer']]['name'];
|
||||
|
||||
|
||||
$jahr=$trow['jahr']-2000;
|
||||
$hinfo[$fahrer]['last']=$trow['tag'].".".$trow['monat'].".".$trow['jahr'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
|
||||
$ta_id= array_search($_POST['tid'], array_column($GLOBALS['a_touren'], 'id'));
|
||||
$tanz = $GLOBALS['a_touren'][$ta_id]['tour'];
|
||||
|
||||
$template->assign('touranz', $tanz);
|
||||
$template->assign('data', $hinfo);
|
||||
$template->assign('content', 'tpl/ajax/tinfo.tpl');
|
||||
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue