compiler = $compiler; $this->required_attributes = array('file'); $this->optional_attributes = array('once', 'assign'); // check and get attributes $_attr = $this->_get_attributes($args); $_output = 'smarty->security) { $this->smarty->security_handler->isTrustedPHPDir($_file); } if ($_file === false) { $this->compiler->trigger_template_error('include_php: file "' . $_attr['file'] . '" is not readable'); } if ($this->smarty->security) { $this->smarty->security_handler->isTrustedPHPDir($_file); } if (isset($_attr['assign'])) { // output will be stored in a smarty variable instead of being displayed $_assign = $_attr['assign']; } $_once = '_once'; if (isset($_attr['once'])) { if ($_attr['once'] == 'false') { $_once = ''; } } $_output = 'assign(' . $_assign . ',ob_get_contents()); ob_end_clean();?>'; } else { $this->compiler->has_output = true; $_output .= 'include' . $_once . ' (\'' . $_file . '\'); ?>'; } return $_output; } } ?>