home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / tutorial_toc.tpl < prev    next >
Encoding:
Text File  |  2004-03-24  |  3.7 KB  |  63 lines

  1. <?php /* Smarty version 2.5.0, created on 2003-04-23 16:54:33
  2.          compiled from tutorial_toc.tpl */ ?>
  3. <?php $this->_load_plugins(array(
  4. array('function', 'assign', 'tutorial_toc.tpl', 6, false),)); ?><?php if (count ( $this->_tpl_vars['toc'] )): ?>
  5. <h1 align="center">Table of Contents</h1>
  6. <ul>
  7. <?php if (isset($this->_sections['toc'])) unset($this->_sections['toc']);
  8. $this->_sections['toc']['name'] = 'toc';
  9. $this->_sections['toc']['loop'] = is_array($this->_tpl_vars['toc']) ? count($this->_tpl_vars['toc']) : max(0, (int)$this->_tpl_vars['toc']);
  10. $this->_sections['toc']['show'] = true;
  11. $this->_sections['toc']['max'] = $this->_sections['toc']['loop'];
  12. $this->_sections['toc']['step'] = 1;
  13. $this->_sections['toc']['start'] = $this->_sections['toc']['step'] > 0 ? 0 : $this->_sections['toc']['loop']-1;
  14. if ($this->_sections['toc']['show']) {
  15.     $this->_sections['toc']['total'] = $this->_sections['toc']['loop'];
  16.     if ($this->_sections['toc']['total'] == 0)
  17.         $this->_sections['toc']['show'] = false;
  18. } else
  19.     $this->_sections['toc']['total'] = 0;
  20. if ($this->_sections['toc']['show']):
  21.  
  22.             for ($this->_sections['toc']['index'] = $this->_sections['toc']['start'], $this->_sections['toc']['iteration'] = 1;
  23.                  $this->_sections['toc']['iteration'] <= $this->_sections['toc']['total'];
  24.                  $this->_sections['toc']['index'] += $this->_sections['toc']['step'], $this->_sections['toc']['iteration']++):
  25. $this->_sections['toc']['rownum'] = $this->_sections['toc']['iteration'];
  26. $this->_sections['toc']['index_prev'] = $this->_sections['toc']['index'] - $this->_sections['toc']['step'];
  27. $this->_sections['toc']['index_next'] = $this->_sections['toc']['index'] + $this->_sections['toc']['step'];
  28. $this->_sections['toc']['first']      = ($this->_sections['toc']['iteration'] == 1);
  29. $this->_sections['toc']['last']       = ($this->_sections['toc']['iteration'] == $this->_sections['toc']['total']);
  30. ?>
  31. <?php if ($this->_tpl_vars['toc'][$this->_sections['toc']['index']]['tagname'] == 'refsect1'): ?>
  32. <?php echo smarty_function_assign(array('var' => 'context','value' => 'refsect1'), $this) ; ?>
  33.  
  34. <?php echo $this->_tpl_vars['toc'][$this->_sections['toc']['index']]['link']; ?>
  35. <br />
  36. <?php endif; ?>
  37. <?php if ($this->_tpl_vars['toc'][$this->_sections['toc']['index']]['tagname'] == 'refsect2'): ?>
  38. <?php echo smarty_function_assign(array('var' => 'context','value' => 'refsect2'), $this) ; ?>
  39.  
  40.    <?php echo $this->_tpl_vars['toc'][$this->_sections['toc']['index']]['link']; ?>
  41. <br />
  42. <?php endif; ?>
  43. <?php if ($this->_tpl_vars['toc'][$this->_sections['toc']['index']]['tagname'] == 'refsect3'): ?>
  44. <?php echo smarty_function_assign(array('var' => 'context','value' => 'refsect3'), $this) ; ?>
  45.  
  46.       <?php echo $this->_tpl_vars['toc'][$this->_sections['toc']['index']]['link']; ?>
  47. <br />
  48. <?php endif; ?>
  49. <?php if ($this->_tpl_vars['toc'][$this->_sections['toc']['index']]['tagname'] == 'table'): ?>
  50. <?php if ($this->_tpl_vars['context'] == 'refsect2'): ?>   <?php endif; ?>
  51. <?php if ($this->_tpl_vars['context'] == 'refsect3'): ?>   <?php endif; ?>
  52. Table: <?php echo $this->_tpl_vars['toc'][$this->_sections['toc']['index']]['link']; ?>
  53.  
  54. <?php endif; ?>
  55. <?php if ($this->_tpl_vars['toc'][$this->_sections['toc']['index']]['tagname'] == 'example'): ?>
  56. <?php if ($this->_tpl_vars['context'] == 'refsect2'): ?>   <?php endif; ?>
  57. <?php if ($this->_tpl_vars['context'] == 'refsect3'): ?>   <?php endif; ?>
  58. Table: <?php echo $this->_tpl_vars['toc'][$this->_sections['toc']['index']]['link']; ?>
  59.  
  60. <?php endif; ?>
  61. <?php endfor; endif; ?>
  62. </ul>
  63. <?php endif; ?>