当前位置: 首页>>代码示例>>PHP>>正文


PHP Smarty_Internal_Debug::display_debug方法代码示例

本文整理汇总了PHP中Smarty_Internal_Debug::display_debug方法的典型用法代码示例。如果您正苦于以下问题:PHP Smarty_Internal_Debug::display_debug方法的具体用法?PHP Smarty_Internal_Debug::display_debug怎么用?PHP Smarty_Internal_Debug::display_debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Smarty_Internal_Debug的用法示例。


在下文中一共展示了Smarty_Internal_Debug::display_debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: content_5467bc02e6f7f7_87226601

    function content_5467bc02e6f7f7_87226601($_smarty_tpl)
    {
        $_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug');
        Smarty_Internal_Debug::display_debug($_smarty_tpl);
        ?>
test<?php 
    }
开发者ID:pawelbienko,项目名称:ssnlab,代码行数:7,代码来源:e4bb86af7a1e4cb6e90080f9476d9869291aa00a.file.index.tpl.php

示例2:

 function _display($output = '')
 {
     parent::_display($output);
     if (class_exists('CI_Controller') && class_exists('Smarty_Internal_Debug') && (config_item('smarty_debug') || $this->enable_profiler)) {
         $CI =& get_instance();
         $smarty_debug = new Smarty_Internal_Debug();
         $smarty_debug->display_debug($CI->ci_smarty);
     }
 }
开发者ID:edemilson,项目名称:ci-hmvc-smarty-doctrine-seed,代码行数:9,代码来源:MY_Output.php

示例3: _display

 public function _display($output = '')
 {
     parent::_display($output);
     // If Smarty is active - NOTE: $this->output->enable_profiler(TRUE) active Smarty debug to simplify
     if (class_exists('CI_Controller') && class_exists('Smarty_Internal_Debug') && (config_item('smarty_debug') || $this->enable_profiler)) {
         $CI =& get_instance();
         Smarty_Internal_Debug::display_debug($CI->smarty);
     }
 }
开发者ID:sunnyzwh,项目名称:ci,代码行数:9,代码来源:MY_Output.php

示例4: fetch


//.........这里部分代码省略.........
             // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output);
             if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) {
                 // replace nocache_hash
                 $_output = preg_replace("/{$_template->properties['nocache_hash']}/", $_template->parent->properties['nocache_hash'], $_output);
                 $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code;
             }
         }
     } else {
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::start_cache($_template);
         }
         try {
             ob_start();
             array_unshift($_template->_capture_stack, array());
             //
             // render cached template
             //
             $_template->properties['unifunc']($_template);
             // any unclosed {capture} tags ?
             if (isset($_template->_capture_stack[0][0])) {
                 $_template->capture_error();
             }
             array_shift($_template->_capture_stack);
             $_output = ob_get_clean();
         } catch (Exception $e) {
             ob_get_clean();
             throw $e;
         }
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_cache($_template);
         }
     }
     if ((!$this->caching || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
         $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);
     }
     if (isset($this->error_reporting)) {
         error_reporting($_smarty_old_error_level);
     }
     // display or fetch
     if ($display) {
         if ($this->caching && $this->cache_modified_check) {
             $_isCached = $_template->isCached() && !$_template->has_nocache_code;
             $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
             if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) {
                 switch (PHP_SAPI) {
                     case 'cgi':
                         // php-cgi < 5.3
                     // php-cgi < 5.3
                     case 'cgi-fcgi':
                         // php-cgi >= 5.3
                     // php-cgi >= 5.3
                     case 'fpm-fcgi':
                         // php-fpm >= 5.3.3
                         header('Status: 304 Not Modified');
                         break;
                     case 'cli':
                         if (!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])) {
                             $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
                         }
                         break;
                     default:
                         header('HTTP/1.1 304 Not Modified');
                         break;
                 }
             } else {
                 switch (PHP_SAPI) {
                     case 'cli':
                         if (!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])) {
                             $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT';
                         }
                         break;
                     default:
                         header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT');
                         break;
                 }
                 echo $_output;
             }
         } else {
             echo $_output;
         }
         // debug output
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::display_debug($this);
         }
         if ($merge_tpl_vars) {
             // restore local variables
             $_template->tpl_vars = $save_tpl_vars;
             $_template->config_vars = $save_config_vars;
         }
         return;
     } else {
         if ($merge_tpl_vars) {
             // restore local variables
             $_template->tpl_vars = $save_tpl_vars;
             $_template->config_vars = $save_config_vars;
         }
         // return fetched content
         return $_output;
     }
 }
开发者ID:Tipkin-Commons,项目名称:tipkin,代码行数:101,代码来源:smarty_internal_templatebase.php

示例5: content_5658c1ca58b0a9_07432000

    function content_5658c1ca58b0a9_07432000($_smarty_tpl)
    {
        $_smarty_tpl->properties['nocache_hash'] = '139795658c1ca453b72_59622192';
        $_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug');
        Smarty_Internal_Debug::display_debug($_smarty_tpl);
        echo $_smarty_tpl->getSubTemplate("head.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0);
        ?>


<!--<nav>
	<ul>
		<?php 
        $_from = $_smarty_tpl->tpl_vars['items']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['item']->_loop = false;
        foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
            $_smarty_tpl->tpl_vars['item']->_loop = true;
            $foreach_item_Sav = $_smarty_tpl->tpl_vars['item'];
            ?>
			<li><a href="<?php 
            echo $_smarty_tpl->tpl_vars['item']->value['lien'];
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['item']->value['texte'];
            ?>
</a></li>
		<?php 
            $_smarty_tpl->tpl_vars['item'] = $foreach_item_Sav;
        }
        ?>
	</ul>
</nav>
-->
<?php 
        $_smarty_tpl->properties['nocache_hash'] = '139795658c1ca453b72_59622192';
        ?>


<form action="validation.php" method = "POST">

<p>Un seul vote par jour et par IP.</p>

<label for="categorie">Catégorie du vote :</label>
<select name="categorie" required>
	<option></option>
	<?php 
        $_from = $_smarty_tpl->tpl_vars['categories']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['categorie'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['categorie']->_loop = false;
        foreach ($_from as $_smarty_tpl->tpl_vars['categorie']->value) {
            $_smarty_tpl->tpl_vars['categorie']->_loop = true;
            $foreach_categorie_Sav = $_smarty_tpl->tpl_vars['categorie'];
            ?>
		<option value="<?php 
            echo $_smarty_tpl->tpl_vars['categorie']->value;
            ?>
"><?php 
            echo $_smarty_tpl->tpl_vars['categorie']->value;
            ?>
</option>
	<?php 
            $_smarty_tpl->tpl_vars['categorie'] = $foreach_categorie_Sav;
        }
        ?>
</select>
<br />

<label for="positif" required>Vote :</label>
<select name="positif">
	<option></option>
	<?php 
        $_from = $_smarty_tpl->tpl_vars['matieres']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        $_smarty_tpl->tpl_vars['matiere'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['matiere']->_loop = false;
        foreach ($_from as $_smarty_tpl->tpl_vars['matiere']->value) {
            $_smarty_tpl->tpl_vars['matiere']->_loop = true;
            $foreach_matiere_Sav = $_smarty_tpl->tpl_vars['matiere'];
            ?>
	<optgroup label="<?php 
            echo $_smarty_tpl->tpl_vars['matiere']->value;
            ?>
">
		<?php 
            $_from = $_smarty_tpl->tpl_vars['profs']->value;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            $_smarty_tpl->tpl_vars['prof'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['prof']->_loop = false;
            foreach ($_from as $_smarty_tpl->tpl_vars['prof']->value) {
                $_smarty_tpl->tpl_vars['prof']->_loop = true;
//.........这里部分代码省略.........
开发者ID:Amaras,项目名称:votes-rabelais,代码行数:101,代码来源:7fe2e57806ebcd1524d62e89890192d3acb8f82e_0.file.vote.html.php

示例6: content_55a67939f0d3f3_94272057

    function content_55a67939f0d3f3_94272057($_smarty_tpl)
    {
        ?>
	<?php 
        $_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug');
        Smarty_Internal_Debug::display_debug($_smarty_tpl);
        ?>
<!--<?php 
        if (!function_exists('smarty_template_function_displayReservation')) {
            function smarty_template_function_displayReservation($_smarty_tpl, $params)
            {
                $saved_tpl_vars = $_smarty_tpl->tpl_vars;
                foreach ($_smarty_tpl->smarty->template_functions['displayReservation']['parameter'] as $key => $value) {
                    $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                }
                foreach ($params as $key => $value) {
                    $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                }
                ?>
<tr class="reservation" >
	<td colspan="5"><?php 
                echo ($tmp = @$_smarty_tpl->tpl_vars['reservation']->value->Title) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['DefaultTitle']->value : $tmp;
                ?>
</td>
</tr>
<tr class="reservation" id="<?php 
                echo $_smarty_tpl->tpl_vars['reservation']->value->ReferenceNumber;
                ?>
">
	<td style="min-width: 250px;"><?php 
                echo ($tmp = @$_smarty_tpl->tpl_vars['reservation']->value->Title) === null || $tmp === '' ? $_smarty_tpl->tpl_vars['DefaultTitle']->value : $tmp;
                ?>
</td>
	<td style="min-width:150px;"><?php 
                echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['fullname'][0][0]->DisplayFullName(array('first' => $_smarty_tpl->tpl_vars['reservation']->value->FirstName, 'last' => $_smarty_tpl->tpl_vars['reservation']->value->LastName, 'ignorePrivacy' => $_smarty_tpl->tpl_vars['reservation']->value->IsUserOwner($_smarty_tpl->tpl_vars['UserId']->value)), $_smarty_tpl);
                ?>
 <?php 
                if (!$_smarty_tpl->tpl_vars['reservation']->value->IsUserOwner($_smarty_tpl->tpl_vars['UserId']->value)) {
                    echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['html_image'][0][0]->PrintImage(array('src' => "users.png", 'altKey' => 'Participant'), $_smarty_tpl);
                }
                ?>
</td>
	<td width="200px"><?php 
                echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['formatdate'][0][0]->FormatDate(array('date' => $_smarty_tpl->tpl_vars['reservation']->value->StartDate->ToTimezone($_smarty_tpl->tpl_vars['Timezone']->value), 'key' => 'dashboard'), $_smarty_tpl);
                ?>
</td>
	<td width="200px"><?php 
                echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['formatdate'][0][0]->FormatDate(array('date' => $_smarty_tpl->tpl_vars['reservation']->value->EndDate->ToTimezone($_smarty_tpl->tpl_vars['Timezone']->value), 'key' => 'dashboard'), $_smarty_tpl);
                ?>
</td>
	<td style="min-width: 150px; max-width: 250px;"><?php 
                echo $_smarty_tpl->tpl_vars['reservation']->value->ResourceName;
                ?>
</td>
</tr>
<?php 
                $_smarty_tpl->tpl_vars = $saved_tpl_vars;
                foreach (Smarty::$global_tpl_vars as $key => $value) {
                    if (!isset($_smarty_tpl->tpl_vars[$key])) {
                        $_smarty_tpl->tpl_vars[$key] = $value;
                    }
                }
            }
        }
        ?>
-->
<?php 
        if (!function_exists('smarty_template_function_displayReservation')) {
            function smarty_template_function_displayReservation($_smarty_tpl, $params)
            {
                $saved_tpl_vars = $_smarty_tpl->tpl_vars;
                foreach ($_smarty_tpl->smarty->template_functions['displayReservation']['parameter'] as $key => $value) {
                    $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                }
                foreach ($params as $key => $value) {
                    $_smarty_tpl->tpl_vars[$key] = new Smarty_variable($value);
                }
                ?>

<?php 
                $_smarty_tpl->tpl_vars = $saved_tpl_vars;
                foreach (Smarty::$global_tpl_vars as $key => $value) {
                    if (!isset($_smarty_tpl->tpl_vars[$key])) {
                        $_smarty_tpl->tpl_vars[$key] = $value;
                    }
                }
            }
        }
        ?>



<div class="dashboard upcomingReservationsDashboard" id="upcomingReservationsDashboard">
	<div class="dashboardHeader">
		<a href="javascript:void(0);" title="<?php 
        echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['translate'][0][0]->SmartyTranslate(array('key' => 'ShowHide'), $_smarty_tpl);
        ?>
"><?php 
        echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['translate'][0][0]->SmartyTranslate(array('key' => "UpcomingReservations"), $_smarty_tpl);
        ?>
//.........这里部分代码省略.........
开发者ID:eEksperimenti,项目名称:Booked,代码行数:101,代码来源:ffe2112ef342bcea346ddab269fb46e93f8d0c50.file.upcoming_reservations.tpl.php

示例7: fetch

 /**
  * fetches a rendered Smarty template
  * 
  * @param string $template the resource handle of the template file or template object
  * @param mixed $cache_id cache id to be used with this template
  * @param mixed $compile_id compile id to be used with this template
  * @param object $ |null $parent next higher level of Smarty variables
  * @return string rendered template output
  */
 public function fetch($template, $cache_id = null, $compile_id = null, $parent = null, $display = false)
 {
     if (is_object($cache_id)) {
         $parent = $cache_id;
         $cache_id = null;
     }
     if ($parent === null) {
         // get default Smarty data object
         $parent = $this;
     }
     array_push($this->block_data_stack, $this->block_data);
     $this->block_data = array();
     // create template object if necessary
     $template instanceof $this->template_class ? $_template = $template : ($_template = $this->createTemplate($template, $cache_id, $compile_id, $parent));
     $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) ? $this->error_reporting : error_reporting() & ~E_NOTICE);
     // obtain data for cache modified check
     if ($this->cache_modified_check && $this->caching && $display) {
         $_isCached = $_template->isCached() && !$_template->has_nocache_code;
         if ($_isCached) {
             $_gmt_mtime = gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT';
         } else {
             $_gmt_mtime = '';
         }
     }
     // return redered template
     if (isset($this->autoload_filters['output']) || isset($this->registered_filters['output'])) {
         $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_template->getRenderedTemplate(), $this, $_template);
     } else {
         $_output = $_template->getRenderedTemplate();
     }
     $_template->rendered_content = null;
     error_reporting($_smarty_old_error_level);
     // display or fetch
     if ($display) {
         if ($this->caching && $this->cache_modified_check) {
             $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
             if ($_isCached && $_gmt_mtime == $_last_modified_date) {
                 if (php_sapi_name() == 'cgi') {
                     header('Status: 304 Not Modified');
                 } else {
                     header('HTTP/1.1 304 Not Modified');
                 }
             } else {
                 header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->getCachedTimestamp()) . ' GMT');
                 echo $_output;
             }
         } else {
             echo $_output;
         }
         // debug output
         if ($this->debugging) {
             Smarty_Internal_Debug::display_debug($this);
         }
         $this->block_data = array_pop($this->block_data_stack);
         return;
     } else {
         // return fetched content
         $this->block_data = array_pop($this->block_data_stack);
         return $_output;
     }
 }
开发者ID:rousseau-christopher,项目名称:equinox-core,代码行数:70,代码来源:Smarty.class.php

示例8: fetch


//.........这里部分代码省略.........
                 $_output = str_replace("{$_template->properties['nocache_hash']}", $_template->parent->properties['nocache_hash'], $_output);
                 $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code;
             }
         }
     } else {
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::start_cache($_template);
         }
         try {
             ob_start();
             /// dark edit
             \Dark\SmartyView\SmartyEngine::integrateViewComposers($_template);
             /// end edit
             array_unshift($_template->_capture_stack, array());
             //
             // render cached template
             //
             $_template->properties['unifunc']($_template);
             // any unclosed {capture} tags ?
             if (isset($_template->_capture_stack[0][0])) {
                 $_template->capture_error();
             }
             array_shift($_template->_capture_stack);
             $_output = ob_get_clean();
         } catch (Exception $e) {
             ob_get_clean();
             throw $e;
         }
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_cache($_template);
         }
     }
     if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
         $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);
     }
     if (isset($this->error_reporting)) {
         error_reporting($_smarty_old_error_level);
     }
     // display or fetch
     if ($display) {
         if ($this->caching && $this->cache_modified_check) {
             $_isCached = $_template->isCached() && !$_template->has_nocache_code;
             $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
             if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) {
                 switch (PHP_SAPI) {
                     case 'cgi':
                         // php-cgi < 5.3
                     // php-cgi < 5.3
                     case 'cgi-fcgi':
                         // php-cgi >= 5.3
                     // php-cgi >= 5.3
                     case 'fpm-fcgi':
                         // php-fpm >= 5.3.3
                         header('Status: 304 Not Modified');
                         break;
                     case 'cli':
                         if (!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])) {
                             $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
                         }
                         break;
                     default:
                         header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
                         break;
                 }
             } else {
                 switch (PHP_SAPI) {
                     case 'cli':
                         if (!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])) {
                             $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT';
                         }
                         break;
                     default:
                         header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT');
                         break;
                 }
                 echo $_output;
             }
         } else {
             echo $_output;
         }
         // debug output
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::display_debug($_template);
         }
         if ($merge_tpl_vars) {
             // restore local variables
             $_template->tpl_vars = $save_tpl_vars;
             $_template->config_vars = $save_config_vars;
         }
         return;
     } else {
         if ($merge_tpl_vars) {
             // restore local variables
             $_template->tpl_vars = $save_tpl_vars;
             $_template->config_vars = $save_config_vars;
         }
         // return fetched content
         return $_output;
     }
 }
开发者ID:baiduXM,项目名称:gbpen,代码行数:101,代码来源:smarty_internal_templatebase.php

示例9: p

 /**
  * Same as flush() but with optional debugging.
  * @see Template::flush()
  */
 function p()
 {
     $this->flush();
     if ($this->smarty->debugging) {
         global $t2;
         $this->smarty->assign(array('AAAA_DEBUG_TOTAL_TIME__' => get_elapsed_time($t2, get_moment())));
         Smarty_Internal_Debug::display_debug($this->smarty);
     }
 }
开发者ID:squidjam,项目名称:Piwigo,代码行数:13,代码来源:template.class.php

示例10: display

 /**
  * displays a Smarty template
  * 
  * @param string $ |object $template the resource handle of the template file  or template object
  * @param mixed $cache_id cache id to be used with this template
  * @param mixed $compile_id compile id to be used with this template
  * @param object $parent next higher level of Smarty variables
  */
 public function display($template, $cache_id = null, $compile_id = null, $parent = null)
 {
     // display template
     echo $this->fetch($template, $cache_id, $compile_id, $parent);
     // debug output
     if ($this->debugging) {
         Smarty_Internal_Debug::display_debug($this);
     }
     return true;
 }
开发者ID:XolotSoft,项目名称:controlobra,代码行数:18,代码来源:Smarty.class.php

示例11: render


//.........这里部分代码省略.........
         if (!$_caching || !$this->cached->valid) {
             // render template (not loaded and not in cache)
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::start_render($this, null);
             }
             if (isset($this->cached)) {
                 $_savedContext = $this->context;
                 $this->context = new Smarty_Internal_Context(true);
             }
             if (!$this->source->uncompiled) {
                 // render compiled code
                 if (!isset($this->compiled)) {
                     $this->compiled = Smarty_Template_Compiled::load($this);
                 }
                 $this->compiled->render($this);
             } else {
                 $this->source->renderUncompiled($this);
             }
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::end_render($this, null);
             }
             // write to cache when necessary
             if ($_caching && !$this->source->recompiled) {
                 if ($this->smarty->debugging) {
                     Smarty_Internal_Debug::start_cache($this);
                 }
                 // write cache file content
                 if ($runOutputFilter && !$this->context->hasNocacheCode && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
                     $this->cached->writeCachedContent($this, $this->context, Smarty_Internal_Filter_Handler::runFilter('output', $this->context->getContent(), $this));
                 } else {
                     $this->cached->writeCachedContent($this, $this->context);
                 }
                 $this->context = $_savedContext;
                 $compile_check = $this->smarty->compile_check;
                 $this->smarty->compile_check = false;
                 if (!$this->cached->processed) {
                     $this->cached->process($this);
                 }
                 $this->smarty->compile_check = $compile_check;
                 $this->cached->compiledTplObj->getRenderedTemplateCode($this);
                 if ($this->smarty->debugging) {
                     Smarty_Internal_Debug::end_cache($this);
                 }
             }
         } else {
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::start_cache($this);
             }
             $this->cached->render($this);
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::end_cache($this);
             }
         }
         if ($runOutputFilter && (!$this->caching || $this->context->hasNocacheCode || $this->source->recompiled) && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
             $this->context->flushBuffer();
             $this->context->content = Smarty_Internal_Filter_Handler::runFilter('output', $this->context->content, $this);
         }
         // display or fetch
         if ($display) {
             $this->context->endBuffer();
             if ($this->caching && $this->smarty->cache_modified_check) {
                 $this->cached->cacheModifiedCheck($this, $this->context->content);
             } else {
                 echo $this->context->content;
             }
             $this->context = null;
         }
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_template($this);
         }
         if ($display) {
             // debug output
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::display_debug($this, true);
             }
         }
         if (!$isSubTemplate) {
             // restore local variables
             $this->tpl_vars = $savedTplVars;
             $this->config_vars = $savedConfigVars;
             if (isset($savedErrorLevel)) {
                 error_reporting($savedErrorLevel);
             }
         }
     } catch (Exception $e) {
         while (ob_get_level() > $level) {
             ob_end_clean();
         }
         throw $e;
     }
     if (!$display && $_contextObjIn === null) {
         // return fetched content
         $this->context->endBuffer();
         $output = $this->context->content;
         $this->context = null;
         return $output;
     }
     $this->context = null;
     return '';
 }
开发者ID:uwetews,项目名称:smarty-hhvm,代码行数:101,代码来源:smarty_internal_template.php

示例12: content_562260dc87f239_09371670


//.........这里部分代码省略.........
        ?>
|
	<?php 
        echo smarty_function_counter(array('direction' => 'down'), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	<?php 
        echo smarty_function_counter(array(), $_smarty_tpl);
        ?>
|
	
	
	<!-- 交替循环 -->
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>
	<p style="background:<?php 
        echo smarty_function_cycle(array('values' => 'red,green,blue,yellow'), $_smarty_tpl);
        ?>
;">1</p>

<!-- 	<?php 
        $_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug');
        Smarty_Internal_Debug::display_debug($_smarty_tpl);
        ?>
 


<?php 
        echo smarty_function_html_image(array('file' => "http://www.baidu.com/images/logo.jpg", 'alt' => "百度", 'href' => "http://www.baidu.com"), $_smarty_tpl);
        ?>
 
	
-->

	
	<?php 
        $_template = new Smarty_Internal_Template('eval:' . $_smarty_tpl->getConfigVariable('webname'), $_smarty_tpl->smarty, $_smarty_tpl);
        echo $_template->fetch();
        ?>
	
	

		<!---->
	
	
	
	
</body>
</html><?php 
    }
开发者ID:denson7,项目名称:phpstudy,代码行数:101,代码来源:1f1255cb245ec35124576402148aaa26d9a8c21b.file.test3.tpl.php

示例13: content_5592225f175194_79397738

    function content_5592225f175194_79397738($_smarty_tpl)
    {
        $_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug');
        Smarty_Internal_Debug::display_debug($_smarty_tpl);
        ?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
<!--     <link rel="icon" href="../../favicon.ico">
 --><title>我的课程</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/common.css" rel="stylesheet">
  </head>
<body>	
<?php 
        echo $_smarty_tpl->getSubTemplate("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array('session_username' => $_smarty_tpl->tpl_vars['session_username']->value), 0);
        ?>

<!-- <nav class="navbar navbar-fixed-top navbar-inverse">
      <div class="container">
      <div class="collapse navbar-collapse pull-left">
          <ul class="nav navbar-nav">
            <li><a href="#" class="active">首页</a></li>
            <li><a href="#">教学实验</a></li>
            <li><a href="#">科研合作</a></li>
            <li><a href="#">就业实习</a></li>
            <li><a href="#">关于我们</a></li>
          </ul>
        </div>
        <div class="collapse navbar-collapse">
          <ul class="nav navbar-nav pull-right">
            <div id="user">
                <img src="img/user.png" class="user-img">
                <div class="user-center hidden">
              <ul>
                <li><a href="#">个人中心</a></li>
                <li><a href="#">退出</a></li>
              </ul> 
                </div>
            </div>
          </ul>
        </div>
      </div>
    </nav> -->
    <div class="container">
      <div class="row">
        <ul class="breadcrumb">
          <li><a href="#">个人中心</a> <span class="divider"></span></li>
          <li><a href="#">我的课程</a></li>
        </ul>
      </div>
      <div class="row">
        <div class="col-xs-12 col-sm-9">
          <!-- 课程详情导航条 -->
          <div class="row">
            <div class="col-xs-12 horizon">
              <ul class="nav navbar-nav" id="s-nav">
                <li><a href="#s-part1" class="s-chosen">全部课程</a></li>
                <li><a href="#s-part2">公开课</a></li>
                <li><a href="#s-part3">校内课</a></li>
              </ul>
            </div>
          </div>
         <!--  4部分内容   -->
         <!-- s-part1 -->
          <div>
            <div class="row" id="s-part1">
              <?php 
        $_smarty_tpl->tpl_vars['course'] = new Smarty_Variable();
        $_smarty_tpl->tpl_vars['course']->_loop = false;
        $_from = $_smarty_tpl->tpl_vars['courses']->value;
        if (!is_array($_from) && !is_object($_from)) {
            settype($_from, 'array');
        }
        foreach ($_from as $_smarty_tpl->tpl_vars['course']->key => $_smarty_tpl->tpl_vars['course']->value) {
            $_smarty_tpl->tpl_vars['course']->_loop = true;
            ?>
              <div class="col-sm-5 col-md-3">
                <div class="thumbnail">
                  <a href="course_info.php?course_id=<?php 
            echo $_smarty_tpl->tpl_vars['course']->value['id'];
            ?>
"><img src="img/subject.png" alt="课程"></a>
                  <div class="caption">
                    <a href="course_info.php?course_id=<?php 
            echo $_smarty_tpl->tpl_vars['course']->value['id'];
            ?>
"><h3><?php 
            echo $_smarty_tpl->tpl_vars['course']->value['name'];
            ?>
</h3></a>
                    <p><?php 
            echo $_smarty_tpl->tpl_vars['course']->value['info'];
            ?>
</p>
//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:back,代码行数:101,代码来源:66def09568b75627bb6b0b8149bd0c246e6675fe.file.major.html.php

示例14: smarty

 public function smarty($file, $vars = array(), $testing = false)
 {
     global $bp, $ci, $page;
     $debug = !$testing && is_admin(2) && $ci->session->enable_profiler ? true : false;
     if ($debug) {
         $memory = memory_get_usage();
         $start = microtime(true);
         $time = $start - $ci->benchmark->marker['total_execution_time_start'];
     }
     static $smarty = null;
     if (is_null($smarty)) {
         $functions = array('preg_replace', 'number_format', 'implode', 'explode', 'array_keys', 'array_values', 'array_flip', 'array_reverse', 'array_shift', 'array_unshift', 'array_pop', 'array_push', 'array_combine', 'array_merge');
         if ($testing || $this->controller == '#post#') {
             $functions = array_merge(array('is_user', 'is_admin', 'in_group'), $functions);
         }
         $smarty = $page->plugin('Smarty', 'class');
         $smarty->setCompileDir($smarty->getCompileDir() . $page->get('domain'));
         $smarty->assign(array('bp' => new BootstrapClone($bp), 'page' => new PageClone($page, $this->controller == '#post#' ? 'post' : 'blog')));
         $security = new Smarty_Security($smarty);
         $security->php_functions = array_merge(array('isset', 'empty', 'count', 'in_array', 'is_array', 'time', 'nl2br'), $functions);
         // Smarty defaults
         $security->allow_super_globals = false;
         $security->allow_constants = false;
         $smarty->enableSecurity($security);
     }
     unset($vars['bp'], $vars['page']);
     $vars['blog'] = $this->blog;
     $smarty->assign($vars);
     $smarty->setTemplateDir(dirname($file) . '/');
     try {
         $html = $smarty->fetch(basename($file));
         if ($debug) {
             $smarty->loadPlugin('Smarty_Internal_Debug');
             $debug = Smarty_Internal_Debug::display_debug($smarty);
             if (!is_callable('smarty_modifier_debug_print_var')) {
                 include SMARTY_PLUGINS_DIR . 'modifier.debug_print_var.php';
             }
             foreach ($debug['vars'] as $key => $obj) {
                 if (strtolower($obj->scope) == 'global') {
                     unset($debug['vars'][$key]);
                 } else {
                     $debug['vars'][$key] = smarty_modifier_debug_print_var($obj->value, 0, 80);
                 }
             }
             $page->save('Smarty', array('memory' => $memory, 'file' => $file, 'start' => $time, 'time' => microtime(true) - $start, 'vars' => $debug['vars']));
         }
         if (!empty($vars)) {
             $smarty->clearAssign(array_keys($vars));
         }
     } catch (Exception $e) {
         $error = $e->getMessage();
         if ($testing) {
             return htmlspecialchars_decode($error);
         }
         $html = '<p>' . $error . '</p>';
     }
     return $testing ? true : $html;
 }
开发者ID:kikoseijo,项目名称:BootPress,代码行数:58,代码来源:Blog.php

示例15: render


//.........这里部分代码省略.........
         }
         if (!$this->source->recompiled && empty($this->properties['file_dependency'][$this->source->uid])) {
             $this->properties['file_dependency'][$this->source->uid] = [$this->source->filepath, $this->source->timestamp, $this->source->type];
         }
         if ($parentIsTpl) {
             $this->parent->properties['file_dependency'] = array_merge($this->parent->properties['file_dependency'], $this->properties['file_dependency']);
             //$this->parent->properties['tpl_function'] = array_merge($this->parent->properties['tpl_function'], $this->properties['tpl_function']);
         }
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_render($this);
         }
         // write to cache when necessary
         if (!$this->source->recompiled && $isCacheTpl) {
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::start_cache($this);
             }
             $this->cached->updateCache($this, $content, $no_output_filter);
             $compile_check = $this->smarty->compile_check;
             $this->smarty->compile_check = false;
             if ($parentIsTpl) {
                 $this->properties['tpl_function'] = $this->parent->properties['tpl_function'];
             }
             if (!$this->cached->processed) {
                 $this->cached->process($this);
             }
             $this->smarty->compile_check = $compile_check;
             $content = $this->getRenderedTemplateCode();
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::end_cache($this);
             }
         } else {
             if (!empty($this->properties['nocache_hash']) && !empty($this->parent->properties['nocache_hash'])) {
                 // replace nocache_hash
                 $content = str_replace("{$this->properties['nocache_hash']}", $this->parent->properties['nocache_hash'], $content);
                 $this->parent->has_nocache_code = $this->parent->has_nocache_code || $this->has_nocache_code;
             }
         }
     } else {
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::start_cache($this);
         }
         $content = $this->cached->render($this);
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_cache($this);
         }
     }
     if ((!$this->caching || $this->has_nocache_code || $this->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
         $content = Smarty_Internal_Filter_Handler::runFilter('output', $content, $this);
     }
     if (isset($_smarty_old_error_level)) {
         error_reporting($_smarty_old_error_level);
     }
     // display or fetch
     if ($display) {
         if ($this->caching && $this->smarty->cache_modified_check) {
             $this->cached->cacheModifiedCheck($this, $content);
         } else {
             echo $content;
         }
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_template($this);
         }
         // debug output
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::display_debug($this, true);
         }
         if ($merge_tpl_vars) {
             // restore local variables
             $this->tpl_vars = $save_tpl_vars;
             $this->config_vars = $save_config_vars;
         }
         return '';
     } else {
         if ($merge_tpl_vars) {
             // restore local variables
             $this->tpl_vars = $save_tpl_vars;
             $this->config_vars = $save_config_vars;
         }
         if ($this->smarty->debugging) {
             Smarty_Internal_Debug::end_template($this);
         }
         if ($this->smarty->debugging == 2 and $display === false) {
             if ($this->smarty->debugging) {
                 Smarty_Internal_Debug::display_debug($this, true);
             }
         }
         if ($parentIsTpl) {
             $this->parent->properties['tpl_function'] = array_merge($this->parent->properties['tpl_function'], $this->properties['tpl_function']);
             foreach ($this->required_plugins as $code => $tmp1) {
                 foreach ($tmp1 as $name => $tmp) {
                     foreach ($tmp as $type => $data) {
                         $this->parent->required_plugins[$code][$name][$type] = $data;
                     }
                 }
             }
         }
         // return cache content
         return $content;
     }
 }
开发者ID:hejxing,项目名称:jt,代码行数:101,代码来源:smarty_internal_template.php


注:本文中的Smarty_Internal_Debug::display_debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。