Use $OUTPUT stuff instead of deprecated top-level functions if your Moodle has them.