assign('site_outside', TRUE); } $smarty->assign('path', $site_prefix); $smarty->assign('site_included_file', $file); //including files if (is_readable("pages/$file.php") == TRUE) { //including php file include("pages/$file.php"); } $smarty->display('header.tpl'); $smarty->display('page.tpl'); if (is_readable("templates/site/$file.tpl") == TRUE) { //including template file $smarty->display("templates/site/$file.tpl"); } $smarty->display('footer.tpl'); ?>