Added the server side function for the events function(The database has ...

...not been updated to cater for the events), integrated the server side push notification with the database