00001 <?php 00019 // $file, $assign, $once, $_smarty_include_vars 00020 00021 function smarty_core_smarty_include_php($params, &$smarty) 00022 { 00023 $_params = array('resource_name' => $params['smarty_file']); 00024 require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php'); 00025 smarty_core_get_php_resource($_params, $smarty); 00026 $_smarty_resource_type = $_params['resource_type']; 00027 $_smarty_php_resource = $_params['php_resource']; 00028 00029 if (!empty($params['smarty_assign'])) { 00030 ob_start(); 00031 if ($_smarty_resource_type == 'file') { 00032 $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']); 00033 } else { 00034 $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']); 00035 } 00036 $smarty->assign($params['smarty_assign'], ob_get_contents()); 00037 ob_end_clean(); 00038 } else { 00039 if ($_smarty_resource_type == 'file') { 00040 $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']); 00041 } else { 00042 $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']); 00043 } 00044 } 00045 } 00046 00047 00048 /* vim: set expandtab: */ 00049 00050 ?>
| Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved. MyOOS [Shopsystem] is Free Software released under the GNU/GPL License. Webmaster: info@r23.de (Impressum) |
|
