Sounds like your server has been hacked or a virus/worm...(do you have any other software, besides 4images, installed on your site? if not, have you apply all the bug fixes yet?)
Anyways I'd suggest you contact your hoster as soon as possible so they could check the logs and such.
While they do that, you could check "last updated" time stamp on each file. That way you can see which files were changed besides categories.php
Good luck.