Fixed the retrieval of the state of activities.
Improved database methods.
Added a method to delete a photo in the db.
Fixed some bugs.

Added the possibility to delete photo from entryActivity  ( mr. tamagno
will find a more fashionable way) with some check like grace period and
days with no photo.