fix possible sql injection
fixed date format
Merge pull request #257 from dhoffend/master

Security Fix & more