insert("UPDATE tourenliste SET lohnstatus='".$_POST['lohn']."' 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')); $back['lastnote']="Lohn ".$_POST['lohn']." für Tour ".$row_tourl['tour']." gespeichert."; $back['success'] = true; $back['zeile'] = $_POST['tourID']; $back['alt'] = 5; echo json_encode($back); break; case 'car_save'; $GLOBALS['mysql']->insert("UPDATE tourenliste SET auto='".$_POST['car']."' 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']="Fahrzeug ".$a_fahrzg[$aa_id]['kz']." für Tour ".$row_tourx['tour']." gespeichert."; $back['success'] = true; $back['zeile'] = $_POST['tourID']; $back['alt'] = 5; 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 OR $touri['fahrer']==49) { if($touri['auto']==0) { $anzeige=99; } if($touri['fahrer']==49) { $anzeige=49; } } 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']='