$time"; $flea_q = q("SELECT * FROM flea_fleas$where ORDER BY time ASC"); if (rows()) while ($flea = assoc($flea_q)) { $open = ($flea['booking_open_time'] < $time && $flea['booking_close_time'] > $time); if ($LOGGED_IN && $open) $color = "#007c16"; else if ($LOGGED_IN && !$open) $color = "#8e231d"; else $color = "#007c16"; tprint("flea", "".str_date($flea['time']).""); } else print "Ei kirpputoreja"; $fleaq = q("SELECT * FROM flea_fleas WHERE booking_open_time > $time ORDER BY time ASC LIMIT 3"); if (rows() && !$LOGGED_IN) { tprint("fleas_future"); while ($flea = assoc($fleaq)) tprint("flea", str_date($flea['time'])."
(Avautuu ".date("j.n.Y", $flea['booking_open_time']).")"); } tprint("fleas_end"); tprint_end(); ?>