PageRenderTime 14ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/smarty3/lib/demo/templates_c/1172603085.file.index.tpl.cache.php

http://zoop.googlecode.com/
PHP | 160 lines | 127 code | 33 blank | 0 comment | 18 complexity | fe55a759860e039b477a44c847528a31 MD5 | raw file
  1<?php if(!defined('SMARTY_DIR')) exit('no direct access allowed'); ?>
  2<?php $_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;}}}'); ?>
  3<?php /* Smarty version Smarty3-SVN$Rev: 3286 $, created on 2009-11-12 11:53:15
  4         compiled from "./templates/index.tpl" */ ?>
  5<?php  $_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
  6         compiled from "./templates/header.tpl" */ ?>
  7<HTML>
  8<HEAD>
  9<?php echo $_smarty_tpl->smarty->plugin_handler->popup_init(array(array('src'=>"/javascripts/overlib.js"),$_smarty_tpl->smarty,$_smarty_tpl),'function');?>
 10<TITLE><?php echo $_smarty_tpl->getVariable('title')->value;?>
 11 - <?php  echo '<?php echo $_smarty_tpl->getVariable(\'Name\')->value;?>
 12';?></TITLE>
 13</HEAD>
 14<BODY bgcolor="#ffffff">
 15<?php /*  End of included template "./templates/header.tpl" */   $_smarty_tpl = array_pop($_tpl_stack); unset($_template); ?>
 16
 17<PRE>
 18
 19
 20<?php if ($_smarty_tpl->getConfigVariable('bold')){?><b><?php }?>
 21
 22Title: <?php echo $_smarty_tpl->smarty->plugin_handler->executeModifier('capitalize',array($_smarty_tpl->getConfigVariable('title')),true);?>
 23
 24<?php if ($_smarty_tpl->getConfigVariable('bold')){?></b><?php }?>
 25
 26The current date and time is <?php echo $_smarty_tpl->smarty->plugin_handler->executeModifier('date_format',array(time(),"%Y-%m-%d %H:%M:%S"),true);?>
 27
 28
 29The value of global assigned variable $SCRIPT_NAME is <?php echo $_smarty_tpl->getVariable('SCRIPT_NAME')->value;?>
 30
 31
 32Example of accessing server environment variable SERVER_NAME: <?php echo $_SERVER['SERVER_NAME'];?>
 33
 34
 35The value of {$Name} is <b><?php  echo '<?php echo $_smarty_tpl->getVariable(\'Name\')->value;?>
 36';?></b>
 37
 38variable modifier example of {$Name|upper}
 39
 40<b><?php  echo '<?php echo $_smarty_tpl->smarty->plugin_handler->executeModifier(\'upper\',array($_smarty_tpl->getVariable(\'Name\')->value),true);?>
 41';?></b>
 42
 43
 44An example of a section loop:
 45
 46<?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']);
 47$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['name'] = 'outer';
 48$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('FirstName')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
 49$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show'] = true;
 50$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'];
 51$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'] = 1;
 52$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop']-1;
 53if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show']) {
 54    $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'];
 55    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] == 0)
 56        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show'] = false;
 57} else
 58    $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] = 0;
 59if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show']):
 60
 61            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] = 1;
 62                 $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'];
 63                 $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration']++):
 64$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'];
 65$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'];
 66$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'];
 67$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] == 1);
 68$_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total']);
 69 if ((1 & $_smarty_tpl->getVariable('smarty')->value['section']['outer']['index'] / 2)){?>
 70	<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['outer']['rownum'];?>
 71 . <?php echo $_smarty_tpl->getVariable('FirstName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
 72 <?php echo $_smarty_tpl->getVariable('LastName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
 73
 74<?php }else{ ?>
 75	<?php echo $_smarty_tpl->getVariable('smarty')->value['section']['outer']['rownum'];?>
 76 * <?php echo $_smarty_tpl->getVariable('FirstName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
 77 <?php echo $_smarty_tpl->getVariable('LastName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
 78
 79<?php } endfor; else: ?>
 80	none
 81<?php endif; ?>
 82
 83An example of section looped key values:
 84
 85<?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']);
 86$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['name'] = 'sec1';
 87$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('contacts')->value) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
 88$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show'] = true;
 89$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'];
 90$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'] = 1;
 91$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop']-1;
 92if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show']) {
 93    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'];
 94    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] == 0)
 95        $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show'] = false;
 96} else
 97    $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] = 0;
 98if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show']):
 99
100            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] = 1;
101                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'];
102                 $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration']++):
103$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'];
104$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'];
105$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'];
106$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] == 1);
107$_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total']);
108?>
109	phone: <?php echo $_smarty_tpl->getVariable('contacts')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['phone'];?>
110<br>
111	fax: <?php echo $_smarty_tpl->getVariable('contacts')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['fax'];?>
112<br>
113	cell: <?php echo $_smarty_tpl->getVariable('contacts')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['cell'];?>
114<br>
115<?php endfor; endif; ?>
116<p>
117
118testing strip tags
119<?php ob_start(); ?>
120<table border=0>
121	<tr>
122		<td>
123			<A HREF="<?php echo $_smarty_tpl->getVariable('SCRIPT_NAME')->value;?>
124">
125			<font color="red">This is a  test     </font>
126			</A>
127		</td>
128	</tr>
129</table>
130<?php echo preg_replace('![	 ]*[
131]+[	 ]*!', '', ob_get_clean()); ?>
132
133
134</PRE>
135
136This is an example of the html_select_date function:
137
138<form>
139<?php echo $_smarty_tpl->smarty->plugin_handler->html_select_date(array(array('start_year'=>1998,'end_year'=>2010),$_smarty_tpl->smarty,$_smarty_tpl),'function');?>
140</form>
141
142This is an example of the html_select_time function:
143
144<form>
145<?php echo $_smarty_tpl->smarty->plugin_handler->html_select_time(array(array('use_24_hours'=>false),$_smarty_tpl->smarty,$_smarty_tpl),'function');?>
146</form>
147
148This is an example of the html_options function:
149
150<form>
151<select name=states>
152<?php echo $_smarty_tpl->smarty->plugin_handler->html_options(array(array('values'=>$_smarty_tpl->getVariable('option_values')->value,'selected'=>$_smarty_tpl->getVariable('option_selected')->value,'output'=>$_smarty_tpl->getVariable('option_output')->value),$_smarty_tpl->smarty,$_smarty_tpl),'function');?>
153</select>
154</form>
155
156<?php $_template = new Smarty_Template ("footer.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id,  $_smarty_tpl->compile_id);$_template->caching = 1; $_tpl_stack[] = $_smarty_tpl; $_smarty_tpl = $_template; /* Smarty version Smarty3-SVN$Rev: 3286 $, created on 2009-11-12 11:53:15
157         compiled from "./templates/footer.tpl" */ ?>
158</BODY>
159</HTML>
160<?php /*  End of included template "./templates/footer.tpl" */   $_smarty_tpl = array_pop($_tpl_stack); unset($_template); ?>