[ticket/10737] FIx code layout and use ajax_response class

PHPBB3-10737
[ticket/10737] Fix SQL injection

PHPBB3-10737
Merge pull request #3 from nickvergessen/ticket/piyushparkash/10737

Ticket/piyushparkash/10737