query("SELECT * FROM touren WHERE aktiv=1 ORDER BY typ,id"); $key=0; while($row = $tt->fetch_assoc()) { $tour=0; $tour=[$row['tour']]; $tmp2 = $GLOBALS['mysql']->query_single("SELECT * FROM tourenliste WHERE monat='".$monat."' and jahr='".$jahr."' and tour='".$row['id']."'"); $touraktiv[$key]['wert']=$tmp2['num_rows']; $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=""; } $t[]=$tour; $s[]=$stat; $key++; } $back['t'] = $t; $back['s'] = $s; $back['success'] = true; $back['length'] = $key; echo json_encode($back); ?>