/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. <PRE>
  17. <?php if ($_smarty_tpl->getConfigVariable('bold')){?><b><?php }?>
  18. Title: <?php echo $_smarty_tpl->smarty->plugin_handler->executeModifier('capitalize',array($_smarty_tpl->getConfigVariable('title')),true);?>
  19. <?php if ($_smarty_tpl->getConfigVariable('bold')){?></b><?php }?>
  20. The current date and time is <?php echo $_smarty_tpl->smarty->plugin_handler->executeModifier('date_format',array(time(),"%Y-%m-%d %H:%M:%S"),true);?>
  21. The value of global assigned variable $SCRIPT_NAME is <?php echo $_smarty_tpl->getVariable('SCRIPT_NAME')->value;?>
  22. Example of accessing server environment variable SERVER_NAME: <?php echo $_SERVER['SERVER_NAME'];?>
  23. The value of {$Name} is <b><?php echo '<?php echo $_smarty_tpl->getVariable(\'Name\')->value;?>
  24. ';?></b>
  25. variable modifier example of {$Name|upper}
  26. <b><?php echo '<?php echo $_smarty_tpl->smarty->plugin_handler->executeModifier(\'upper\',array($_smarty_tpl->getVariable(\'Name\')->value),true);?>
  27. ';?></b>
  28. An example of a section loop:
  29. <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']);
  30. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['name'] = 'outer';
  31. $_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);
  32. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show'] = true;
  33. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'];
  34. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'] = 1;
  35. $_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;
  36. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show']) {
  37. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'];
  38. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] == 0)
  39. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show'] = false;
  40. } else
  41. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] = 0;
  42. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show']):
  43. 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;
  44. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'];
  45. $_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']++):
  46. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'];
  47. $_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'];
  48. $_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'];
  49. $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] == 1);
  50. $_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']);
  51. if ((1 & $_smarty_tpl->getVariable('smarty')->value['section']['outer']['index'] / 2)){?>
  52. <?php echo $_smarty_tpl->getVariable('smarty')->value['section']['outer']['rownum'];?>
  53. . <?php echo $_smarty_tpl->getVariable('FirstName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
  54. <?php echo $_smarty_tpl->getVariable('LastName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
  55. <?php }else{ ?>
  56. <?php echo $_smarty_tpl->getVariable('smarty')->value['section']['outer']['rownum'];?>
  57. * <?php echo $_smarty_tpl->getVariable('FirstName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
  58. <?php echo $_smarty_tpl->getVariable('LastName')->value[$_smarty_tpl->getVariable('smarty')->value['section']['outer']['index']];?>
  59. <?php } endfor; else: ?>
  60. none
  61. <?php endif; ?>
  62. An example of section looped key values:
  63. <?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']);
  64. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['name'] = 'sec1';
  65. $_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);
  66. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show'] = true;
  67. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'];
  68. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['step'] = 1;
  69. $_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;
  70. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show']) {
  71. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['loop'];
  72. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] == 0)
  73. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show'] = false;
  74. } else
  75. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'] = 0;
  76. if ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['show']):
  77. 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;
  78. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['total'];
  79. $_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']++):
  80. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'];
  81. $_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'];
  82. $_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'];
  83. $_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['first'] = ($_smarty_tpl->tpl_vars['smarty']->value['section']['sec1']['iteration'] == 1);
  84. $_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']);
  85. ?>
  86. phone: <?php echo $_smarty_tpl->getVariable('contacts')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['phone'];?>
  87. <br>
  88. fax: <?php echo $_smarty_tpl->getVariable('contacts')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['fax'];?>
  89. <br>
  90. cell: <?php echo $_smarty_tpl->getVariable('contacts')->value[$_smarty_tpl->getVariable('smarty')->value['section']['sec1']['index']]['cell'];?>
  91. <br>
  92. <?php endfor; endif; ?>
  93. <p>
  94. testing strip tags
  95. <?php ob_start(); ?>
  96. <table border=0>
  97. <tr>
  98. <td>
  99. <A HREF="<?php echo $_smarty_tpl->getVariable('SCRIPT_NAME')->value;?>
  100. ">
  101. <font color="red">This is a test </font>
  102. </A>
  103. </td>
  104. </tr>
  105. </table>
  106. <?php echo preg_replace('![ ]*[
  107. ]+[ ]*!', '', ob_get_clean()); ?>
  108. </PRE>
  109. This is an example of the html_select_date function:
  110. <form>
  111. <?php echo $_smarty_tpl->smarty->plugin_handler->html_select_date(array(array('start_year'=>1998,'end_year'=>2010),$_smarty_tpl->smarty,$_smarty_tpl),'function');?>
  112. </form>
  113. This is an example of the html_select_time function:
  114. <form>
  115. <?php echo $_smarty_tpl->smarty->plugin_handler->html_select_time(array(array('use_24_hours'=>false),$_smarty_tpl->smarty,$_smarty_tpl),'function');?>
  116. </form>
  117. This is an example of the html_options function:
  118. <form>
  119. <select name=states>
  120. <?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');?>
  121. </select>
  122. </form>
  123. <?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
  124. compiled from "./templates/footer.tpl" */ ?>
  125. </BODY>
  126. </HTML>
  127. <?php /* End of included template "./templates/footer.tpl" */ $_smarty_tpl = array_pop($_tpl_stack); unset($_template); ?>