Look at the code, paying attention to the end of the file:
<?php include('./templates/'.$this->template.'/blocks/config.php'); ?>
<?php if(
You open a script block, open an
if
inside that, open a set of brackets - but you don't close any of them!
I'm not really surprised that you get an "unexpected end of file" error!