public static function load_form() { global $a; AC::clean_pending_reservations(); $a = AC::load_current_activity(); if (AC::get_current_step() < 1) { $_SESSION['edgimo-reservation-form']['current-step'] = 1; } if (AC::is_active_timer_expired() || !AC::current_user_has_pending_reservation()) { AC::reset_all(); } if (AC::valid_waitlist_code()) { include 'templates/reservation.template.php'; return; } switch ($a->status) { case 'sold_out': case 'closed': AC::reset_timer(); include 'templates/soldout.template.php'; break; case 'pending': AC::reset_timer(); include 'templates/pending.template.php'; break; case 'waitlist': AC::reset_timer(); include 'templates/waitlist.template.php'; break; case 'reservation': include 'templates/reservation.template.php'; break; } }