Update arena.php

Big if sentence moved to a new file util.php.
Code for testing the form generator added.