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 'info_save'; $GLOBALS['mysql']->insert("UPDATE tourenliste SET infotext='".$_POST['info']."' WHERE id='".$_POST['tourID']."'"); $GLOBALS['mysql']->insert("UPDATE tourenliste SET m_update='".$_SESSION['benutzer']."' WHERE id='".$_POST['tourID']."'"); $back['success'] = true; $back['lastnote']="Information: ".$_POST['info']." hinzugefügt."; $back['alt'] = 5; echo json_encode($back); break; case 'smscheck'; $tempsms = $GLOBALS['mysql']->query("SELECT * FROM tourenliste WHERE tag='".$_POST['tag']."' and monat='".$_POST['monat']."' and jahr='".$_POST['jahr']."' ORDER BY tour"); $key=0; while($row = $tempsms->fetch_assoc()) { $tour=0; $tour=$row['tour']; //$stat=" "; $stat=[$row['status']]; if($row['smsstatus']==0) { $stat=""; } if($row['smsstatus']==1) { $stat=""; } if($row['smsstatus']==2) { $stat=""; } if($row['smsstatus']==8) { $stat=""; } if($row['smsstatus']==20){ $stat=""; } if($row['smsstatus']==3) { $stat=""; } if($row['smsstatus']==4) { $stat=""; } if($row['smsstatus']==5) { $stat=""; } $key++; $t[$key]=$row['tour']; $s[$key]=$stat; } $back['t'] = $t; $back['s'] = $s; $back['success'] = true; $back['length'] = $key; echo json_encode($back); //echo'
'; print_r($back); echo''; break; endswitch; ?>