{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}

{foreach from=$channel_list item=list key = key name=foo}
<table width="100%" cellspacing="0" cellpadding="0" class="list-table" {if $smarty.foreach.foo.index>0} style="display:none;border-top:1px #d6dfe7 solid;"{else}style="border-top:1px #d6dfe7 solid;"{/if} id="language_{$key}-table">
	<tr class="thead">
	<th width="10%" align="left">栏目ID</th>	
	<th width="30%" align="left">栏目名称</th>
	<th width="15%">栏目类型</th>
	<th width="15%">导航显示</th>
	<th width="15%">排序</th>
	<th width="15%" align="left">操作</th>
	</tr>
	{foreach from=$list item=channel}
	{if $channel.name <> ''}
	<tr align="center" {if $channel.is_leaf eq 1}onclick="rowClicked(this,{$key})"{/if} class="{$channel.level}">
	
	<td  align="left">{$channel.channel_id}</td>
	
	<td align="left" class="first-cell" >
	{if $channel.is_leaf eq 0}
		<img src="images/menu_minus.gif" width="9" height="9" border="0" style="margin-left:{$channel.level}em" />
	{else}
		<img src="images/menu_arrow.gif" width="9" height="9" border="0" style="margin-left:{$channel.level}em" />
	{/if}
	<span>{$channel.name}</span>
	</td>
	<td align="center">
	{$channel_type_txt[$channel.show_type]}
	</td>
	<td align="center"><img src="images/{if $channel.status}yes{else}no{/if}.gif" onclick="listTable.toggle(this,'toggle_status',{$channel.channel_id})" /></td>
	<td align="center"><span onclick="listTable.edit(this, 'edit_sort_order', {$channel.channel_id})">{$channel.sort_order}</span></td>
	<td align="left" class="operation">
		<a href="channel.php?act=edit&id={$channel.channel_id}" title="编辑" class="op_edit"></a>
	
		{if $channel.channel_id == $sys_channel.channel_home}
			<span class="op_column_off"></span>
		{else}
			{if $channel.channel_id == $sys_channel.channel_product}
				<a href="product.php?act=list" title="栏目内容管理" class="op_column"></a>
			{elseif $channel.channel_id == $sys_channel.channel_inquiry}
				<a href="inquiry.php?act=list" title="栏目内容管理" class="op_column"></a>
			{else}
				{if $channel.show_type == $channel_type.channel_type_page || $channel.show_type == $channel_type.channel_type_link || $channel.channel_id == $sys_channel.channel_mobile}
					<a href="channel.php?act=edit&id={$channel.channel_id}&is_page=1" title="栏目内容管理" class="op_column"></a>
				{elseif $channel.channel_id == $sys_channel.channel_about}
					<span class="op_column_off"></span>
				{else}
					<a href="information.php?act=list&channel_id={$channel.channel_id}" title="栏目内容管理" class="op_column"></a>
				{/if}
			{/if}
		{/if}
		{if $channel.show_type == $channel_type.channel_type_sys || ($channel.channel_id >13 && $channel.channel_id < 20)}
		<span class="op_del_off"></span>
		{else}
		<a href="javascript:;" onclick="listTable.remove({$channel.channel_id}, '您确认要删除吗?')" title="删除" class="op_del"></a>
		{/if}
	</td>
	</tr>
	{/if}
	{/foreach}
</table>
{/foreach}
{if $full_page}
</div>
</form>
{literal}
<script language="JavaScript">
<!--
var imgPlus = new Image();
imgPlus.src = "images/menu_plus.gif";

function rowClicked(obj,language_id)
{
    var tbl = document.getElementById("channel_"+language_id+"-table");
    var lvl = parseInt(obj.className);
    var fnd = false;
    for (i = 0; i < tbl.rows.length; i++)
    {
        var row = tbl.rows[i];
        if (tbl.rows[i] == obj)
        {
            fnd = true;
        }
        else
        {
            if (fnd == true)
            {
                var cur = parseInt(row.className);
                if (cur > lvl)
                {
                    row.style.display = (row.style.display != 'none') ? 'none' : (Browser.isIE) ? 'block' : 'table-row';
                }
                else
                {
                    fnd = false;
                    break;
                }
            }
        }
    }
    for (i = 0; i < obj.cells[0].childNodes.length; i++)
    {
        var imgObj = obj.cells[0].childNodes[i];
        if (imgObj.tagName == "IMG" && imgObj.src != 'images/menu_arrow.gif')
        {
            imgObj.src = (imgObj.src == imgPlus.src) ? 'images/menu_minus.gif' : imgPlus.src;
        }
    }
}
//-->
</script>
{/literal}
{insert_scripts files="tab.js"}
{include file="page_footer.htm"}
{/if}