add SQL logic to events show page, only show available events