init
This commit is contained in:
commit
72a26edcff
22092 changed files with 2101903 additions and 0 deletions
69
scripts/ajax/ue_planung3.php
Normal file
69
scripts/ajax/ue_planung3.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
//-------------------------- wichtige noch zu bearbeitende Änderungen !!!!!!!!!!! --------- HEUTE
|
||||
$tp1 = strtotime("+1 day");
|
||||
$tag = date("d",$tp1);
|
||||
$monat = date("m",$tp1);
|
||||
$jahr = date("Y",$tp1);
|
||||
$datum=$tag.".".$monat.".". $jahr;
|
||||
$key=0; $kay=0; $kai=0; $noplan=0; $aender=0; $fertig=0; $sms=0; $summe=0;
|
||||
|
||||
//-------------------- 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'];
|
||||
//----------------------------------------------------------------------------------------------
|
||||
|
||||
$abfrage = $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 = $abfrage->fetch_assoc()) {
|
||||
$ta_id= array_search($row['tour'], array_column($a_touren, 'id'));
|
||||
$aa_id= array_search($row['auto'], array_column($a_fahrzg, 'id'));
|
||||
$ma_id= array_search($row['fahrer'], array_column($a_fahrer, 'id'));
|
||||
|
||||
//-------------------------------------------- zurücksetzten
|
||||
$tw1[$key]['nocar']=0;
|
||||
$tw1[$key]['nodriver']=0;
|
||||
$tw2[$kai]['acar']=0;
|
||||
$tw2[$kai]['adriver']=0;
|
||||
$noplan=0;
|
||||
//-------------------------------------------- sms versendet ? fertig
|
||||
$summe++;
|
||||
if($row['smsstatus']!=0) { $fertig++; }
|
||||
if($row['smsstatus']==2) { $sms++; }
|
||||
//-------------------------------------------- Fahrer hat kalendereintrag
|
||||
$row_nichtda = $GLOBALS['mysql']->query_single("SELECT * FROM planer WHERE mid='".$row['fahrer']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($row_nichtda['num_rows'] != 0) {
|
||||
$ptemp=$row_nichtda['grund']; $pa_id= array_search($ptemp, array_column($a_planbz, 'id'));
|
||||
if($a_planbz[$pa_id]['nichtda']==1) { $noplan=1; $tw1[$key]['nodriver']=1; }
|
||||
if($a_planbz[$pa_id]['nichtda']==2) { $noplan=1; $tw1[key]['nodriver']=1; }
|
||||
}
|
||||
//-------------------------------------------- Fahrzeug hat einen Kalendereintrag
|
||||
$row_fnichtda = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner WHERE fid='".$row['auto']."' AND tag='".$tag."' AND monat='".$monat."' AND jahr='".$jahr."'");
|
||||
if($row_fnichtda['num_rows'] != 0 && $row_fnichtda['id']!=51) { $noplan=1; $tw1[$key]['nocar']=1; }
|
||||
//-------------------------------------------- Fahrer nicht ausgewählt
|
||||
if($row['fahrer']==0) { $noplan=1; $tw1[$key]['nodriver']=1; }
|
||||
//-------------------------------------------- Fahrzeug nicht ausgewählt
|
||||
if($row['auto']==0) { $noplan=1; $tw1[$key]['nocar']=1; }
|
||||
//-------------------------------------------- fehlerhafte / ungeplante Touren übergeben
|
||||
if($noplan>0) {
|
||||
$tw1[$key]['tour']=$a_touren[$ta_id]['tour'];
|
||||
$tw1[$key]['fahrer']=$a_fahrer[$ma_id]['name'];
|
||||
$tw1[$key]['kennz']=$a_fahrzg[$aa_id]['kz'];
|
||||
$key++;
|
||||
}
|
||||
}
|
||||
if ($fertig>0) {
|
||||
$template->assign('fertig', $fertig);
|
||||
$template->assign('sms', $sms);
|
||||
}
|
||||
//------------------------ Übergabe offene Touren
|
||||
if ($key>0) {
|
||||
$template->assign('plan', $key);
|
||||
$template->assign('tw1', $tw1);
|
||||
}
|
||||
//--------------------------------------------
|
||||
if (isset($summe)) { $template->assign('summe', $summe); }
|
||||
$template->assign('datum', $datum);
|
||||
$template->assign('content', 'tpl/ajax/ue_planung1.tpl');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue