Migration SVN
This commit is contained in:
5
system/libs/smarty/demo/configs/test.conf
Executable file
5
system/libs/smarty/demo/configs/test.conf
Executable file
@@ -0,0 +1,5 @@
|
||||
title = Welcome to Smarty!
|
||||
cutoff_size = 40
|
||||
|
||||
[setup]
|
||||
bold = true
|
||||
25
system/libs/smarty/demo/index.php
Executable file
25
system/libs/smarty/demo/index.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
require '../libs/Smarty.class.php';
|
||||
|
||||
$smarty = new Smarty;
|
||||
|
||||
$smarty->compile_check = true;
|
||||
$smarty->debugging = true;
|
||||
|
||||
$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill");
|
||||
$smarty->assign("FirstName",array("John","Mary","James","Henry"));
|
||||
$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
|
||||
$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
|
||||
array("I", "J", "K", "L"), array("M", "N", "O", "P")));
|
||||
|
||||
$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
|
||||
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
|
||||
|
||||
$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
|
||||
$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
|
||||
$smarty->assign("option_selected", "NE");
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
2
system/libs/smarty/demo/templates/footer.tpl
Executable file
2
system/libs/smarty/demo/templates/footer.tpl
Executable file
@@ -0,0 +1,2 @@
|
||||
</BODY>
|
||||
</HTML>
|
||||
6
system/libs/smarty/demo/templates/header.tpl
Executable file
6
system/libs/smarty/demo/templates/header.tpl
Executable file
@@ -0,0 +1,6 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
{popup_init src="/javascripts/overlib.js"}
|
||||
<TITLE>{$title} - {$Name}</TITLE>
|
||||
</HEAD>
|
||||
<BODY bgcolor="#ffffff">
|
||||
81
system/libs/smarty/demo/templates/index.tpl
Executable file
81
system/libs/smarty/demo/templates/index.tpl
Executable file
@@ -0,0 +1,81 @@
|
||||
{config_load file=test.conf section="setup"}
|
||||
{include file="header.tpl" title=foo}
|
||||
|
||||
<PRE>
|
||||
|
||||
{* bold and title are read from the config file *}
|
||||
{if #bold#}<b>{/if}
|
||||
{* capitalize the first letters of each word of the title *}
|
||||
Title: {#title#|capitalize}
|
||||
{if #bold#}</b>{/if}
|
||||
|
||||
The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
|
||||
|
||||
The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}
|
||||
|
||||
Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME}
|
||||
|
||||
The value of {ldelim}$Name{rdelim} is <b>{$Name}</b>
|
||||
|
||||
variable modifier example of {ldelim}$Name|upper{rdelim}
|
||||
|
||||
<b>{$Name|upper}</b>
|
||||
|
||||
|
||||
An example of a section loop:
|
||||
|
||||
{section name=outer loop=$FirstName}
|
||||
{if $smarty.section.outer.index is odd by 2}
|
||||
{$smarty.section.outer.rownum} . {$FirstName[outer]} {$LastName[outer]}
|
||||
{else}
|
||||
{$smarty.section.outer.rownum} * {$FirstName[outer]} {$LastName[outer]}
|
||||
{/if}
|
||||
{sectionelse}
|
||||
none
|
||||
{/section}
|
||||
|
||||
An example of section looped key values:
|
||||
|
||||
{section name=sec1 loop=$contacts}
|
||||
phone: {$contacts[sec1].phone}<br>
|
||||
fax: {$contacts[sec1].fax}<br>
|
||||
cell: {$contacts[sec1].cell}<br>
|
||||
{/section}
|
||||
<p>
|
||||
|
||||
testing strip tags
|
||||
{strip}
|
||||
<table border=0>
|
||||
<tr>
|
||||
<td>
|
||||
<A HREF="{$SCRIPT_NAME}">
|
||||
<font color="red">This is a test </font>
|
||||
</A>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{/strip}
|
||||
|
||||
</PRE>
|
||||
|
||||
This is an example of the html_select_date function:
|
||||
|
||||
<form>
|
||||
{html_select_date start_year=1998 end_year=2010}
|
||||
</form>
|
||||
|
||||
This is an example of the html_select_time function:
|
||||
|
||||
<form>
|
||||
{html_select_time use_24_hours=true}
|
||||
</form>
|
||||
|
||||
This is an example of the html_options function:
|
||||
|
||||
<form>
|
||||
<select name=states>
|
||||
{html_options values=$option_values selected=$option_selected output=$option_output}
|
||||
</select>
|
||||
</form>
|
||||
|
||||
{include file="footer.tpl"}
|
||||
4
system/libs/smarty/demo/templates_c/%%0E^0E4^0E407559%%footer.tpl.php
Executable file
4
system/libs/smarty/demo/templates_c/%%0E^0E4^0E407559%%footer.tpl.php
Executable file
@@ -0,0 +1,4 @@
|
||||
<?php /* Smarty version 2.6.19, created on 2008-06-06 13:02:20
|
||||
compiled from footer.tpl */ ?>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php $_config_vars = array (
|
||||
'title' => 'Welcome to Smarty!',
|
||||
'cutoff_size' => '40',
|
||||
'bold' => true,
|
||||
); ?>
|
||||
147
system/libs/smarty/demo/templates_c/%%45^45E^45E480CD%%index.tpl.php
Executable file
147
system/libs/smarty/demo/templates_c/%%45^45E^45E480CD%%index.tpl.php
Executable file
@@ -0,0 +1,147 @@
|
||||
<?php /* Smarty version 2.6.19, created on 2008-06-06 13:10:14
|
||||
compiled from index.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('function', 'config_load', 'index.tpl', 1, false),array('function', 'html_select_date', 'index.tpl', 64, false),array('function', 'html_select_time', 'index.tpl', 70, false),array('function', 'html_options', 'index.tpl', 77, false),array('modifier', 'capitalize', 'index.tpl', 9, false),array('modifier', 'date_format', 'index.tpl', 12, false),array('modifier', 'upper', 'index.tpl', 22, false),)), $this); ?>
|
||||
<?php echo smarty_function_config_load(array('file' => "test.conf",'section' => 'setup'), $this);?>
|
||||
|
||||
<?php $_smarty_tpl_vars = $this->_tpl_vars;
|
||||
$this->_smarty_include(array('smarty_include_tpl_file' => "header.tpl", 'smarty_include_vars' => array('title' => 'foo')));
|
||||
$this->_tpl_vars = $_smarty_tpl_vars;
|
||||
unset($_smarty_tpl_vars);
|
||||
?>
|
||||
|
||||
<PRE>
|
||||
|
||||
<?php if ($this->_config[0]['vars']['bold']): ?><b><?php endif; ?>
|
||||
Title: <?php echo ((is_array($_tmp=$this->_config[0]['vars']['title'])) ? $this->_run_mod_handler('capitalize', true, $_tmp) : smarty_modifier_capitalize($_tmp)); ?>
|
||||
|
||||
<?php if ($this->_config[0]['vars']['bold']): ?></b><?php endif; ?>
|
||||
|
||||
The current date and time is <?php echo ((is_array($_tmp=time())) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
|
||||
|
||||
|
||||
The value of global assigned variable $SCRIPT_NAME is <?php echo $this->_tpl_vars['SCRIPT_NAME']; ?>
|
||||
|
||||
|
||||
Example of accessing server environment variable SERVER_NAME: <?php echo $_SERVER['SERVER_NAME']; ?>
|
||||
|
||||
|
||||
The value of {$Name} is <b><?php echo $this->_tpl_vars['Name']; ?>
|
||||
</b>
|
||||
|
||||
variable modifier example of {$Name|upper}
|
||||
|
||||
<b><?php echo ((is_array($_tmp=$this->_tpl_vars['Name'])) ? $this->_run_mod_handler('upper', true, $_tmp) : smarty_modifier_upper($_tmp)); ?>
|
||||
</b>
|
||||
|
||||
|
||||
An example of a section loop:
|
||||
|
||||
<?php unset($this->_sections['outer']);
|
||||
$this->_sections['outer']['name'] = 'outer';
|
||||
$this->_sections['outer']['loop'] = is_array($_loop=$this->_tpl_vars['FirstName']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['outer']['show'] = true;
|
||||
$this->_sections['outer']['max'] = $this->_sections['outer']['loop'];
|
||||
$this->_sections['outer']['step'] = 1;
|
||||
$this->_sections['outer']['start'] = $this->_sections['outer']['step'] > 0 ? 0 : $this->_sections['outer']['loop']-1;
|
||||
if ($this->_sections['outer']['show']) {
|
||||
$this->_sections['outer']['total'] = $this->_sections['outer']['loop'];
|
||||
if ($this->_sections['outer']['total'] == 0)
|
||||
$this->_sections['outer']['show'] = false;
|
||||
} else
|
||||
$this->_sections['outer']['total'] = 0;
|
||||
if ($this->_sections['outer']['show']):
|
||||
|
||||
for ($this->_sections['outer']['index'] = $this->_sections['outer']['start'], $this->_sections['outer']['iteration'] = 1;
|
||||
$this->_sections['outer']['iteration'] <= $this->_sections['outer']['total'];
|
||||
$this->_sections['outer']['index'] += $this->_sections['outer']['step'], $this->_sections['outer']['iteration']++):
|
||||
$this->_sections['outer']['rownum'] = $this->_sections['outer']['iteration'];
|
||||
$this->_sections['outer']['index_prev'] = $this->_sections['outer']['index'] - $this->_sections['outer']['step'];
|
||||
$this->_sections['outer']['index_next'] = $this->_sections['outer']['index'] + $this->_sections['outer']['step'];
|
||||
$this->_sections['outer']['first'] = ($this->_sections['outer']['iteration'] == 1);
|
||||
$this->_sections['outer']['last'] = ($this->_sections['outer']['iteration'] == $this->_sections['outer']['total']);
|
||||
?>
|
||||
<?php if ((1 & ($this->_sections['outer']['index'] / 2))): ?>
|
||||
<?php echo $this->_sections['outer']['rownum']; ?>
|
||||
. <?php echo $this->_tpl_vars['FirstName'][$this->_sections['outer']['index']]; ?>
|
||||
<?php echo $this->_tpl_vars['LastName'][$this->_sections['outer']['index']]; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<?php echo $this->_sections['outer']['rownum']; ?>
|
||||
* <?php echo $this->_tpl_vars['FirstName'][$this->_sections['outer']['index']]; ?>
|
||||
<?php echo $this->_tpl_vars['LastName'][$this->_sections['outer']['index']]; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endfor; else: ?>
|
||||
none
|
||||
<?php endif; ?>
|
||||
|
||||
An example of section looped key values:
|
||||
|
||||
<?php unset($this->_sections['sec1']);
|
||||
$this->_sections['sec1']['name'] = 'sec1';
|
||||
$this->_sections['sec1']['loop'] = is_array($_loop=$this->_tpl_vars['contacts']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['sec1']['show'] = true;
|
||||
$this->_sections['sec1']['max'] = $this->_sections['sec1']['loop'];
|
||||
$this->_sections['sec1']['step'] = 1;
|
||||
$this->_sections['sec1']['start'] = $this->_sections['sec1']['step'] > 0 ? 0 : $this->_sections['sec1']['loop']-1;
|
||||
if ($this->_sections['sec1']['show']) {
|
||||
$this->_sections['sec1']['total'] = $this->_sections['sec1']['loop'];
|
||||
if ($this->_sections['sec1']['total'] == 0)
|
||||
$this->_sections['sec1']['show'] = false;
|
||||
} else
|
||||
$this->_sections['sec1']['total'] = 0;
|
||||
if ($this->_sections['sec1']['show']):
|
||||
|
||||
for ($this->_sections['sec1']['index'] = $this->_sections['sec1']['start'], $this->_sections['sec1']['iteration'] = 1;
|
||||
$this->_sections['sec1']['iteration'] <= $this->_sections['sec1']['total'];
|
||||
$this->_sections['sec1']['index'] += $this->_sections['sec1']['step'], $this->_sections['sec1']['iteration']++):
|
||||
$this->_sections['sec1']['rownum'] = $this->_sections['sec1']['iteration'];
|
||||
$this->_sections['sec1']['index_prev'] = $this->_sections['sec1']['index'] - $this->_sections['sec1']['step'];
|
||||
$this->_sections['sec1']['index_next'] = $this->_sections['sec1']['index'] + $this->_sections['sec1']['step'];
|
||||
$this->_sections['sec1']['first'] = ($this->_sections['sec1']['iteration'] == 1);
|
||||
$this->_sections['sec1']['last'] = ($this->_sections['sec1']['iteration'] == $this->_sections['sec1']['total']);
|
||||
?>
|
||||
phone: <?php echo $this->_tpl_vars['contacts'][$this->_sections['sec1']['index']]['phone']; ?>
|
||||
<br>
|
||||
fax: <?php echo $this->_tpl_vars['contacts'][$this->_sections['sec1']['index']]['fax']; ?>
|
||||
<br>
|
||||
cell: <?php echo $this->_tpl_vars['contacts'][$this->_sections['sec1']['index']]['cell']; ?>
|
||||
<br>
|
||||
<?php endfor; endif; ?>
|
||||
<p>
|
||||
|
||||
testing strip tags
|
||||
<?php echo '<table border=0><tr><td><A HREF="'; ?><?php echo $this->_tpl_vars['SCRIPT_NAME']; ?><?php echo '"><font color="red">This is a test </font></A></td></tr></table>'; ?>
|
||||
|
||||
|
||||
</PRE>
|
||||
|
||||
This is an example of the html_select_date function:
|
||||
|
||||
<form>
|
||||
<?php echo smarty_function_html_select_date(array('start_year' => 1998,'end_year' => 2010), $this);?>
|
||||
|
||||
</form>
|
||||
|
||||
This is an example of the html_select_time function:
|
||||
|
||||
<form>
|
||||
<?php echo smarty_function_html_select_time(array('use_24_hours' => true), $this);?>
|
||||
|
||||
</form>
|
||||
|
||||
This is an example of the html_options function:
|
||||
|
||||
<form>
|
||||
<select name=states>
|
||||
<?php echo smarty_function_html_options(array('values' => $this->_tpl_vars['option_values'],'selected' => $this->_tpl_vars['option_selected'],'output' => $this->_tpl_vars['option_output']), $this);?>
|
||||
|
||||
</select>
|
||||
</form>
|
||||
|
||||
<?php $_smarty_tpl_vars = $this->_tpl_vars;
|
||||
$this->_smarty_include(array('smarty_include_tpl_file' => "footer.tpl", 'smarty_include_vars' => array()));
|
||||
$this->_tpl_vars = $_smarty_tpl_vars;
|
||||
unset($_smarty_tpl_vars);
|
||||
?>
|
||||
263
system/libs/smarty/demo/templates_c/%%5A^5AE^5AE3C49A%%debug.tpl.php
Executable file
263
system/libs/smarty/demo/templates_c/%%5A^5AE^5AE3C49A%%debug.tpl.php
Executable file
@@ -0,0 +1,263 @@
|
||||
<?php /* Smarty version 2.6.19, created on 2008-06-06 13:10:14
|
||||
compiled from file:/data/www/dev.verygames.net/htdocs/lib/smarty/libs/debug.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('function', 'assign_debug_info', 'file:/data/www/dev.verygames.net/htdocs/lib/smarty/libs/debug.tpl', 3, false),array('function', 'cycle', 'file:/data/www/dev.verygames.net/htdocs/lib/smarty/libs/debug.tpl', 119, false),array('modifier', 'escape', 'file:/data/www/dev.verygames.net/htdocs/lib/smarty/libs/debug.tpl', 102, false),array('modifier', 'string_format', 'file:/data/www/dev.verygames.net/htdocs/lib/smarty/libs/debug.tpl', 105, false),array('modifier', 'debug_print_var', 'file:/data/www/dev.verygames.net/htdocs/lib/smarty/libs/debug.tpl', 121, false),)), $this); ?>
|
||||
<?php echo smarty_function_assign_debug_info(array(), $this);?>
|
||||
|
||||
<?php ob_start(); ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Smarty Debug Console</title>
|
||||
<?php echo '
|
||||
<style type="text/css">
|
||||
/* <![CDATA[ */
|
||||
body, h1, h2, td, th, p {
|
||||
font-family: sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 0.9em;
|
||||
margin: 1px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
text-align: left;
|
||||
padding: 2px;
|
||||
background-color: #f0c040;
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
background-color: #9B410E;
|
||||
color: white;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
padding: 2px;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
body {
|
||||
background: black;
|
||||
}
|
||||
|
||||
p, table, div {
|
||||
background: #f0ead8;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
font-family: monospace;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
td {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.odd {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
|
||||
.even {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.exectime {
|
||||
font-size: 0.8em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#table_assigned_vars th {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
#table_config_vars th {
|
||||
color: maroon;
|
||||
}
|
||||
/* ]]> */
|
||||
</style>
|
||||
'; ?>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Smarty Debug Console</h1>
|
||||
|
||||
<h2>included templates & config files (load time in seconds)</h2>
|
||||
|
||||
<div>
|
||||
<?php unset($this->_sections['templates']);
|
||||
$this->_sections['templates']['name'] = 'templates';
|
||||
$this->_sections['templates']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_tpls']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['templates']['show'] = true;
|
||||
$this->_sections['templates']['max'] = $this->_sections['templates']['loop'];
|
||||
$this->_sections['templates']['step'] = 1;
|
||||
$this->_sections['templates']['start'] = $this->_sections['templates']['step'] > 0 ? 0 : $this->_sections['templates']['loop']-1;
|
||||
if ($this->_sections['templates']['show']) {
|
||||
$this->_sections['templates']['total'] = $this->_sections['templates']['loop'];
|
||||
if ($this->_sections['templates']['total'] == 0)
|
||||
$this->_sections['templates']['show'] = false;
|
||||
} else
|
||||
$this->_sections['templates']['total'] = 0;
|
||||
if ($this->_sections['templates']['show']):
|
||||
|
||||
for ($this->_sections['templates']['index'] = $this->_sections['templates']['start'], $this->_sections['templates']['iteration'] = 1;
|
||||
$this->_sections['templates']['iteration'] <= $this->_sections['templates']['total'];
|
||||
$this->_sections['templates']['index'] += $this->_sections['templates']['step'], $this->_sections['templates']['iteration']++):
|
||||
$this->_sections['templates']['rownum'] = $this->_sections['templates']['iteration'];
|
||||
$this->_sections['templates']['index_prev'] = $this->_sections['templates']['index'] - $this->_sections['templates']['step'];
|
||||
$this->_sections['templates']['index_next'] = $this->_sections['templates']['index'] + $this->_sections['templates']['step'];
|
||||
$this->_sections['templates']['first'] = ($this->_sections['templates']['iteration'] == 1);
|
||||
$this->_sections['templates']['last'] = ($this->_sections['templates']['iteration'] == $this->_sections['templates']['total']);
|
||||
?>
|
||||
<?php unset($this->_sections['indent']);
|
||||
$this->_sections['indent']['name'] = 'indent';
|
||||
$this->_sections['indent']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['depth']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['indent']['show'] = true;
|
||||
$this->_sections['indent']['max'] = $this->_sections['indent']['loop'];
|
||||
$this->_sections['indent']['step'] = 1;
|
||||
$this->_sections['indent']['start'] = $this->_sections['indent']['step'] > 0 ? 0 : $this->_sections['indent']['loop']-1;
|
||||
if ($this->_sections['indent']['show']) {
|
||||
$this->_sections['indent']['total'] = $this->_sections['indent']['loop'];
|
||||
if ($this->_sections['indent']['total'] == 0)
|
||||
$this->_sections['indent']['show'] = false;
|
||||
} else
|
||||
$this->_sections['indent']['total'] = 0;
|
||||
if ($this->_sections['indent']['show']):
|
||||
|
||||
for ($this->_sections['indent']['index'] = $this->_sections['indent']['start'], $this->_sections['indent']['iteration'] = 1;
|
||||
$this->_sections['indent']['iteration'] <= $this->_sections['indent']['total'];
|
||||
$this->_sections['indent']['index'] += $this->_sections['indent']['step'], $this->_sections['indent']['iteration']++):
|
||||
$this->_sections['indent']['rownum'] = $this->_sections['indent']['iteration'];
|
||||
$this->_sections['indent']['index_prev'] = $this->_sections['indent']['index'] - $this->_sections['indent']['step'];
|
||||
$this->_sections['indent']['index_next'] = $this->_sections['indent']['index'] + $this->_sections['indent']['step'];
|
||||
$this->_sections['indent']['first'] = ($this->_sections['indent']['iteration'] == 1);
|
||||
$this->_sections['indent']['last'] = ($this->_sections['indent']['iteration'] == $this->_sections['indent']['total']);
|
||||
?> <?php endfor; endif; ?>
|
||||
<font color=<?php if ($this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['type'] == 'template'): ?>brown<?php elseif ($this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['type'] == 'insert'): ?>black<?php else: ?>green<?php endif; ?>>
|
||||
<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['filename'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
</font>
|
||||
<?php if (isset ( $this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['exec_time'] )): ?>
|
||||
<span class="exectime">
|
||||
(<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_tpls'][$this->_sections['templates']['index']]['exec_time'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.5f") : smarty_modifier_string_format($_tmp, "%.5f")); ?>
|
||||
)
|
||||
<?php if ($this->_sections['templates']['index'] == 0): ?>(total)<?php endif; ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<br />
|
||||
<?php endfor; else: ?>
|
||||
<p>no templates included</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<h2>assigned template variables</h2>
|
||||
|
||||
<table id="table_assigned_vars">
|
||||
<?php unset($this->_sections['vars']);
|
||||
$this->_sections['vars']['name'] = 'vars';
|
||||
$this->_sections['vars']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_keys']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['vars']['show'] = true;
|
||||
$this->_sections['vars']['max'] = $this->_sections['vars']['loop'];
|
||||
$this->_sections['vars']['step'] = 1;
|
||||
$this->_sections['vars']['start'] = $this->_sections['vars']['step'] > 0 ? 0 : $this->_sections['vars']['loop']-1;
|
||||
if ($this->_sections['vars']['show']) {
|
||||
$this->_sections['vars']['total'] = $this->_sections['vars']['loop'];
|
||||
if ($this->_sections['vars']['total'] == 0)
|
||||
$this->_sections['vars']['show'] = false;
|
||||
} else
|
||||
$this->_sections['vars']['total'] = 0;
|
||||
if ($this->_sections['vars']['show']):
|
||||
|
||||
for ($this->_sections['vars']['index'] = $this->_sections['vars']['start'], $this->_sections['vars']['iteration'] = 1;
|
||||
$this->_sections['vars']['iteration'] <= $this->_sections['vars']['total'];
|
||||
$this->_sections['vars']['index'] += $this->_sections['vars']['step'], $this->_sections['vars']['iteration']++):
|
||||
$this->_sections['vars']['rownum'] = $this->_sections['vars']['iteration'];
|
||||
$this->_sections['vars']['index_prev'] = $this->_sections['vars']['index'] - $this->_sections['vars']['step'];
|
||||
$this->_sections['vars']['index_next'] = $this->_sections['vars']['index'] + $this->_sections['vars']['step'];
|
||||
$this->_sections['vars']['first'] = ($this->_sections['vars']['iteration'] == 1);
|
||||
$this->_sections['vars']['last'] = ($this->_sections['vars']['iteration'] == $this->_sections['vars']['total']);
|
||||
?>
|
||||
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
|
||||
">
|
||||
<th>{$<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_keys'][$this->_sections['vars']['index']])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
}</th>
|
||||
<td><?php echo smarty_modifier_debug_print_var($this->_tpl_vars['_debug_vals'][$this->_sections['vars']['index']]); ?>
|
||||
</td></tr>
|
||||
<?php endfor; else: ?>
|
||||
<tr><td><p>no template variables assigned</p></td></tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
|
||||
<h2>assigned config file variables (outer template scope)</h2>
|
||||
|
||||
<table id="table_config_vars">
|
||||
<?php unset($this->_sections['config_vars']);
|
||||
$this->_sections['config_vars']['name'] = 'config_vars';
|
||||
$this->_sections['config_vars']['loop'] = is_array($_loop=$this->_tpl_vars['_debug_config_keys']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
|
||||
$this->_sections['config_vars']['show'] = true;
|
||||
$this->_sections['config_vars']['max'] = $this->_sections['config_vars']['loop'];
|
||||
$this->_sections['config_vars']['step'] = 1;
|
||||
$this->_sections['config_vars']['start'] = $this->_sections['config_vars']['step'] > 0 ? 0 : $this->_sections['config_vars']['loop']-1;
|
||||
if ($this->_sections['config_vars']['show']) {
|
||||
$this->_sections['config_vars']['total'] = $this->_sections['config_vars']['loop'];
|
||||
if ($this->_sections['config_vars']['total'] == 0)
|
||||
$this->_sections['config_vars']['show'] = false;
|
||||
} else
|
||||
$this->_sections['config_vars']['total'] = 0;
|
||||
if ($this->_sections['config_vars']['show']):
|
||||
|
||||
for ($this->_sections['config_vars']['index'] = $this->_sections['config_vars']['start'], $this->_sections['config_vars']['iteration'] = 1;
|
||||
$this->_sections['config_vars']['iteration'] <= $this->_sections['config_vars']['total'];
|
||||
$this->_sections['config_vars']['index'] += $this->_sections['config_vars']['step'], $this->_sections['config_vars']['iteration']++):
|
||||
$this->_sections['config_vars']['rownum'] = $this->_sections['config_vars']['iteration'];
|
||||
$this->_sections['config_vars']['index_prev'] = $this->_sections['config_vars']['index'] - $this->_sections['config_vars']['step'];
|
||||
$this->_sections['config_vars']['index_next'] = $this->_sections['config_vars']['index'] + $this->_sections['config_vars']['step'];
|
||||
$this->_sections['config_vars']['first'] = ($this->_sections['config_vars']['iteration'] == 1);
|
||||
$this->_sections['config_vars']['last'] = ($this->_sections['config_vars']['iteration'] == $this->_sections['config_vars']['total']);
|
||||
?>
|
||||
<tr class="<?php echo smarty_function_cycle(array('values' => "odd,even"), $this);?>
|
||||
">
|
||||
<th>{#<?php echo ((is_array($_tmp=$this->_tpl_vars['_debug_config_keys'][$this->_sections['config_vars']['index']])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>
|
||||
#}</th>
|
||||
<td><?php echo smarty_modifier_debug_print_var($this->_tpl_vars['_debug_config_vals'][$this->_sections['config_vars']['index']]); ?>
|
||||
</td></tr>
|
||||
<?php endfor; else: ?>
|
||||
<tr><td><p>no config vars assigned</p></td></tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('debug_output', ob_get_contents());ob_end_clean(); ?>
|
||||
<?php if (isset ( $this->_tpl_vars['_smarty_debug_output'] ) && $this->_tpl_vars['_smarty_debug_output'] == 'html'): ?>
|
||||
<?php echo $this->_tpl_vars['debug_output']; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
if ( self.name == '' ) {
|
||||
var title = 'Console';
|
||||
}
|
||||
else {
|
||||
var title = 'Console_' + self.name;
|
||||
}
|
||||
_smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
|
||||
_smarty_console.document.write('<?php echo ((is_array($_tmp=$this->_tpl_vars['debug_output'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
|
||||
');
|
||||
_smarty_console.document.close();
|
||||
// ]]>
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
13
system/libs/smarty/demo/templates_c/%%F7^F7F^F7F34188%%header.tpl.php
Executable file
13
system/libs/smarty/demo/templates_c/%%F7^F7F^F7F34188%%header.tpl.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php /* Smarty version 2.6.19, created on 2008-06-06 13:02:20
|
||||
compiled from header.tpl */ ?>
|
||||
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
|
||||
smarty_core_load_plugins(array('plugins' => array(array('function', 'popup_init', 'header.tpl', 3, false),)), $this); ?>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<?php echo smarty_function_popup_init(array('src' => "/javascripts/overlib.js"), $this);?>
|
||||
|
||||
<TITLE><?php echo $this->_tpl_vars['title']; ?>
|
||||
- <?php echo $this->_tpl_vars['Name']; ?>
|
||||
</TITLE>
|
||||
</HEAD>
|
||||
<BODY bgcolor="#ffffff">
|
||||
Reference in New Issue
Block a user