rework of php scripts; added mode and time to value recording