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

  1. <?php /* Smarty version 2.5.0, created on 2003-04-23 18:11:47
  2.          compiled from source_loop.tpl */ ?>
  3.  
  4. <?php if (count((array)$this->_tpl_vars['source'])):
  5.     foreach ((array)$this->_tpl_vars['source'] as $this->_tpl_vars['code']):
  6. ?>
  7. <text size="16" justification="centre"><C:rf:3Package <?php echo $this->_tpl_vars['package']; ?>
  8. >Package <?php echo $this->_tpl_vars['package']; ?>
  9.  
  10. </text>
  11. <?php if (isset($this->_sections['code'])) unset($this->_sections['code']);
  12. $this->_sections['code']['name'] = 'code';
  13. $this->_sections['code']['loop'] = is_array($this->_tpl_vars['code']) ? count($this->_tpl_vars['code']) : max(0, (int)$this->_tpl_vars['code']);
  14. $this->_sections['code']['show'] = true;
  15. $this->_sections['code']['max'] = $this->_sections['code']['loop'];
  16. $this->_sections['code']['step'] = 1;
  17. $this->_sections['code']['start'] = $this->_sections['code']['step'] > 0 ? 0 : $this->_sections['code']['loop']-1;
  18. if ($this->_sections['code']['show']) {
  19.     $this->_sections['code']['total'] = $this->_sections['code']['loop'];
  20.     if ($this->_sections['code']['total'] == 0)
  21.         $this->_sections['code']['show'] = false;
  22. } else
  23.     $this->_sections['code']['total'] = 0;
  24. if ($this->_sections['code']['show']):
  25.  
  26.             for ($this->_sections['code']['index'] = $this->_sections['code']['start'], $this->_sections['code']['iteration'] = 1;
  27.                  $this->_sections['code']['iteration'] <= $this->_sections['code']['total'];
  28.                  $this->_sections['code']['index'] += $this->_sections['code']['step'], $this->_sections['code']['iteration']++):
  29. $this->_sections['code']['rownum'] = $this->_sections['code']['iteration'];
  30. $this->_sections['code']['index_prev'] = $this->_sections['code']['index'] - $this->_sections['code']['step'];
  31. $this->_sections['code']['index_next'] = $this->_sections['code']['index'] + $this->_sections['code']['step'];
  32. $this->_sections['code']['first']      = ($this->_sections['code']['iteration'] == 1);
  33. $this->_sections['code']['last']       = ($this->_sections['code']['iteration'] == $this->_sections['code']['total']);
  34. ?>
  35. <?php echo $this->_tpl_vars['code'][$this->_sections['code']['index']]; ?>
  36.  
  37. <?php endfor; endif; ?>
  38. <?php endforeach; endif; ?>