Setup database connection and attendance ajax call.