finish php part and some js