query_single("SELECT * FROM tourenliste WHERE id='".$_POST['tourID']."'"); $unixdate=mktime(0,0,0, $touri['monat'],$touri['tag'],$touri['jahr']); if($touri['auto']==0) { $anzeige=1; } 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']."'"); if($plani['num_rows']== 0) { $anzeige=3; } else { $fplani = $GLOBALS['mysql']->query_single("SELECT * FROM fplaner_bez WHERE id='".$plani['grund']."'"); if($fplani['aktiv']== 1) { $anzeige=2; } if($fplani['aktiv']== 0) { $anzeige=1; } } } } //echo json_encode($_POST['tourID']); $template->assign('anzeige', $anzeige); $template->assign('tourID', $tourID); // tourID $template->assign('content', 'tpl/ajax/cicon.tpl'); ?>