It is best to tell us what exactly is wrong with your mod and if you are getting any errors
by the way, looking at your code, let's say "$ese_schedule['do'] == 'main'", what exactly is your script suppose to do?
I can't see following variables declared anywhere in your php file
PHP Code:
$templater->register('tue', $tue);
$templater->register('wed', $wed);
$templater->register('thu', $thu);
$templater->register('fri', $fri);
$templater->register('sat', $sat);
$templater->register('sun', $sun);