Update calendarClass.php

Line 302 Is terrible. because we use more 20 sql query and it is very very bad.
Here we use 1 sql query.

May be I have errors In my calendar.But it is better than before