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); ?> "test.conf",'section' => 'setup'), $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); ?>
_config[0]['vars']['bold']): ?>
Title: _config[0]['vars']['title'])) ? $this->_run_mod_handler('capitalize', true, $_tmp) : smarty_modifier_capitalize($_tmp)); ?>
_config[0]['vars']['bold']): ?>
The current date and time is _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 _tpl_vars['SCRIPT_NAME']; ?>
Example of accessing server environment variable SERVER_NAME:
The value of {$Name} is _tpl_vars['Name']; ?>
variable modifier example of {$Name|upper}
_tpl_vars['Name'])) ? $this->_run_mod_handler('upper', true, $_tmp) : smarty_modifier_upper($_tmp)); ?>
An example of a section loop:
_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']);
?>
_sections['outer']['index'] / 2))): ?>
_sections['outer']['rownum']; ?>
. _tpl_vars['FirstName'][$this->_sections['outer']['index']]; ?>
_tpl_vars['LastName'][$this->_sections['outer']['index']]; ?>
_sections['outer']['rownum']; ?>
* _tpl_vars['FirstName'][$this->_sections['outer']['index']]; ?>
_tpl_vars['LastName'][$this->_sections['outer']['index']]; ?>
none
An example of section looped key values:
_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: _tpl_vars['contacts'][$this->_sections['sec1']['index']]['phone']; ?>
fax: _tpl_vars['contacts'][$this->_sections['sec1']['index']]['fax']; ?>
cell: _tpl_vars['contacts'][$this->_sections['sec1']['index']]['cell']; ?>
testing strip tags
This is a test '; ?>
This is an example of the html_select_date function:
This is an example of the html_select_time function:
This is an example of the html_options function:
_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);
?>