Tweaked database-interacting php files