Added calendar id edit mode and made it mysqli