complete rework of PHP files v1

Files regroupment and fonction management.
(v1a will come later)