36 lines
No EOL
2 KiB
PHP
36 lines
No EOL
2 KiB
PHP
<?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');
|
|
|
|
|
|
?>
|