php: refactoring (admin) php