adopt php to modularize html scripts