Пример #1
0
 /**
  * Opens a window for the Smarty Debugging Consol and display the data
  */
 public static function display_debug($smarty)
 {
     // prepare information of assigned variables
     $_assigned_vars = $smarty->tpl_vars;
     ksort($_assigned_vars);
     $_config_vars = $smarty->config_vars;
     ksort($_config_vars);
     $_template = new Smarty_Template($smarty->debug_tpl, $smarty);
     $_template->caching = false;
     $_template->force_compile = false;
     $_template->security = false;
     $_template->assign('template_data', self::$template_data);
     $_template->assign('assigned_vars', $_assigned_vars);
     $_template->assign('config_vars', $_config_vars);
     $_template->assign('execution_time', $smarty->_get_time() - $smarty->start_time);
     echo $smarty->fetch($_template);
 }
Пример #2
0
 /**
  * Opens a window for the Smarty Debugging Consol and display the data
  */
 public static function display_debug($smarty)
 {
     // prepare information of assigned variables
     $_assigned_vars = $smarty->tpl_vars;
     ksort($_assigned_vars);
     $_config_vars = $smarty->config_vars;
     ksort($_config_vars);
     $ldelim = $smarty->left_delimiter;
     $rdelim = $smarty->right_delimiter;
     $smarty->left_delimiter = '{';
     $smarty->right_delimiter = '}';
     $_template = new Smarty_Template($smarty->debug_tpl, $smarty);
     $_template->caching = false;
     $_template->force_compile = false;
     $_template->security = false;
     $_template->cache_id = null;
     $_template->compile_id = null;
     $_template->assign('template_data', self::$template_data);
     $_template->assign('assigned_vars', $_assigned_vars);
     $_template->assign('config_vars', $_config_vars);
     $_template->assign('execution_time', microtime(true) - $smarty->start_time);
     echo $smarty->fetch($_template);
     $smarty->left_delimiter = $ldelim;
     $smarty->right_delimiter = $rdelim;
 }
<?php

if (!defined('SMARTY_DIR')) {
    exit('no direct access allowed');
}
$_smarty_tpl->decodeProperties('a:1:{s:15:"file_dependency";a:3:{s:10:"F384501455";a:2:{i:0;s:21:"./templates/index.tpl";i:1;i:1257977415;}s:11:"F1129582534";a:2:{i:0;s:22:"./templates/header.tpl";i:1;i:1257977415;}s:11:"F1159251177";a:2:{i:0;s:22:"./templates/footer.tpl";i:1;i:1257977415;}}}');
/* Smarty version Smarty3-SVN$Rev: 3286 $, created on 2009-11-12 11:53:15
   compiled from "./templates/index.tpl" */
$_config = new Smarty_Internal_Config("test.conf", $_smarty_tpl->smarty, $_smarty_tpl);
$_config->loadConfigVars("setup", $_smarty_tpl->smarty);
$_template = new Smarty_Template("header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id);
$_template->assign('title', 'foo');
$_template->caching = 1;
$_tpl_stack[] = $_smarty_tpl;
$_smarty_tpl = $_template;
/* Smarty version Smarty3-SVN$Rev: 3286 $, created on 2009-11-12 11:53:15
   compiled from "./templates/header.tpl" */
?>
<HTML>
<HEAD>
<?php 
echo $_smarty_tpl->smarty->plugin_handler->popup_init(array(array('src' => "/javascripts/overlib.js"), $_smarty_tpl->smarty, $_smarty_tpl), 'function');
?>
<TITLE><?php 
echo $_smarty_tpl->getVariable('title')->value;
?>
 - <?php 
echo '<?php echo $_smarty_tpl->getVariable(\'Name\')->value;?>
';
?>
</TITLE>