You should enable "Parse Smarty tags in the content of embedded static pages" option.
Second, you should assign the necessary variables via PHP to access them in Smarty.
e.g. to be able to use login on static pages you should add:
PHP Code:
$smarty->assign("login", $login);
before call to func_display function in the pages.php script.