<?php /* Smarty version 2.6.19, created on 2008-08-15 10:47:48
         compiled from channel_left.tpl */ ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<script src="js/channel_left.js"></script>
<script src="js/channel_conment.js"></script>
<body>




<table width="200" height="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg_10.jpg">

        <tr>
          <td width="200" height="65" align="center" valign="top"><img src="images/bg_10 (4).jpg" width="200" height="65"></td>
        </tr>
        <tr> 
          <td height="25" align="center" valign="top"> 
<?php $i=0; ?><!--定义一个变量，用于设置表格的ID-->
<?php unset($this->_sections['channel_group_id']);
$this->_sections['channel_group_id']['name'] = 'channel_group_id';
$this->_sections['channel_group_id']['loop'] = is_array($_loop=$this->_tpl_vars['channel_group']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['channel_group_id']['show'] = true;
$this->_sections['channel_group_id']['max'] = $this->_sections['channel_group_id']['loop'];
$this->_sections['channel_group_id']['step'] = 1;
$this->_sections['channel_group_id']['start'] = $this->_sections['channel_group_id']['step'] > 0 ? 0 : $this->_sections['channel_group_id']['loop']-1;
if ($this->_sections['channel_group_id']['show']) {
    $this->_sections['channel_group_id']['total'] = $this->_sections['channel_group_id']['loop'];
    if ($this->_sections['channel_group_id']['total'] == 0)
        $this->_sections['channel_group_id']['show'] = false;
} else
    $this->_sections['channel_group_id']['total'] = 0;
if ($this->_sections['channel_group_id']['show']):

            for ($this->_sections['channel_group_id']['index'] = $this->_sections['channel_group_id']['start'], $this->_sections['channel_group_id']['iteration'] = 1;
                 $this->_sections['channel_group_id']['iteration'] <= $this->_sections['channel_group_id']['total'];
                 $this->_sections['channel_group_id']['index'] += $this->_sections['channel_group_id']['step'], $this->_sections['channel_group_id']['iteration']++):
$this->_sections['channel_group_id']['rownum'] = $this->_sections['channel_group_id']['iteration'];
$this->_sections['channel_group_id']['index_prev'] = $this->_sections['channel_group_id']['index'] - $this->_sections['channel_group_id']['step'];
$this->_sections['channel_group_id']['index_next'] = $this->_sections['channel_group_id']['index'] + $this->_sections['channel_group_id']['step'];
$this->_sections['channel_group_id']['first']      = ($this->_sections['channel_group_id']['iteration'] == 1);
$this->_sections['channel_group_id']['last']       = ($this->_sections['channel_group_id']['iteration'] == $this->_sections['channel_group_id']['total']);
?>  <!--循环读取动态页中模板变量中的数据，输出频道组的数据-->      
<?php $i++; ?>	<!--增加ID值-->
              <table width="85%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
<!--根据单元格的ID值，输出不同的图片-->
<td width="30%"><img src="images/bg_10 (1).jpg" id="images<?php echo $i; ?>"></td>
<!--应用onclick事件调用自定义函数，实现树状菜单的折叠和展开-->                  
<td width="70%" align="left" height="24" class="STYLE12" onClick="javascript:open_close('id<?php echo $i; ?>','images<?php echo $i; ?>');" ><?php echo $this->_tpl_vars['channel_group'][$this->_sections['channel_group_id']['index']]['tb_channel_group_name']; ?>
</td>
                </tr>
              </table>
<!--定义表格的ID值，设置表格的样式--> 
<table width="85%" border="0" cellspacing="0" cellpadding="0" id="id<?php echo $i; ?>" style="display:none;">
	
<!--通过section函数，循环输出指定频道组中频道的数据--> 
<?php unset($this->_sections['channel_id']);
$this->_sections['channel_id']['name'] = 'channel_id';
$this->_sections['channel_id']['loop'] = is_array($_loop=$this->_tpl_vars['channel']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['channel_id']['show'] = true;
$this->_sections['channel_id']['max'] = $this->_sections['channel_id']['loop'];
$this->_sections['channel_id']['step'] = 1;
$this->_sections['channel_id']['start'] = $this->_sections['channel_id']['step'] > 0 ? 0 : $this->_sections['channel_id']['loop']-1;
if ($this->_sections['channel_id']['show']) {
    $this->_sections['channel_id']['total'] = $this->_sections['channel_id']['loop'];
    if ($this->_sections['channel_id']['total'] == 0)
        $this->_sections['channel_id']['show'] = false;
} else
    $this->_sections['channel_id']['total'] = 0;
if ($this->_sections['channel_id']['show']):

            for ($this->_sections['channel_id']['index'] = $this->_sections['channel_id']['start'], $this->_sections['channel_id']['iteration'] = 1;
                 $this->_sections['channel_id']['iteration'] <= $this->_sections['channel_id']['total'];
                 $this->_sections['channel_id']['index'] += $this->_sections['channel_id']['step'], $this->_sections['channel_id']['iteration']++):
$this->_sections['channel_id']['rownum'] = $this->_sections['channel_id']['iteration'];
$this->_sections['channel_id']['index_prev'] = $this->_sections['channel_id']['index'] - $this->_sections['channel_id']['step'];
$this->_sections['channel_id']['index_next'] = $this->_sections['channel_id']['index'] + $this->_sections['channel_id']['step'];
$this->_sections['channel_id']['first']      = ($this->_sections['channel_id']['iteration'] == 1);
$this->_sections['channel_id']['last']       = ($this->_sections['channel_id']['iteration'] == $this->_sections['channel_id']['total']);
?>
         <?php if ($this->_tpl_vars['channel_group'][$this->_sections['channel_group_id']['index']]['tb_channel_group_id'] == $this->_tpl_vars['channel'][$this->_sections['channel_id']['index']]['tb_channel_group']): ?>
    <tr>
    	<td width="30%" align="center">-|</td>
<!--设置超级链接，通过onclick调用指定的函数，实现频道内容的输出--> 
        <td height="24" width="70%" align="left" class="STYLE12">
<a href="channel_content.php" target="mainwindow" onClick="return ReqXml('<?php echo $this->_tpl_vars['channel'][$this->_sections['channel_id']['index']]['tb_channel_address']; ?>
');">
				<?php echo $this->_tpl_vars['channel'][$this->_sections['channel_id']['index']]['tb_channel_name']; ?>
			</a>		</td>
    </tr>
<?php endif; ?>             
	<?php endfor; endif; ?>
    <tr><td height="2" colspan="2" align="right"></td></tr>
</table>
<?php endfor; endif; ?></td></tr>
<tr><td height="100%" background="images/bg_10.jpg"></td></tr>
</table>
</body>
</html>
