Update ajaxcalls.php

Switch accordance to action param