fixed some php warnings

ajax/functions