{include file="pageheader.htm"}
{insert_scripts files='../js/quickView.js'}
<div class="BodyRight">
	<div class="RightDetill">
		<ul>
			<li class="Green"><a href="http://www.nitc.cc/About-nitc/488.html#_Toc239504377" target="_blank">查看演示文件</a></li>
			<li class="SkyBlue"><a href="help_document.php?action=download">下载演示文档</a></li>
			<li class="Black">操作帮助请详见演示文件!</li>
			<li class="DetillRigh"></li>
		</ul>
	</div>
	<div class="PageContent">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		 {if $language|@count>1}
		  <tr>
			<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				{section name=loop loop=$language}
					{if $smarty.section.loop.index == 0}
						<td width="85" height="29" align="center" id="languagesel{$language[loop].language_id}" {if $language[loop].language_id==$default_language} class="Move" {else} class="Out" {/if}><a href="javascript:void(0);" onclick="javascript:languageselect('{$language[loop].language_id}')">{$language[loop].name}</a></td>
					{else}
						<td width="5" align="center"><img src="images/{$skin}/tiao.gif"></td>
						<td width="85" align="center" id="languagesel{$language[loop].language_id}" {if $language[loop].language_id==$default_language} class="Move" {else} class="Out" {/if}><a href="javascript:void(0);" onclick="javascript:languageselect('{$language[loop].language_id}')">{$language[loop].name}</a></td>	
					{/if}
				{/section}
				<td align="left" class="LineRight" style="padding-left:10px;">点击左侧语言选项,查找不同栏目分类信息.</td>
			  </tr>
			  
			</table></td>
		  </tr>
		  
			<tr>
			<td class="LineRightBlue">
		  {else}
		  	<tr>
			<td class="LineRightBlue1">	  	
		  {/if}
			<table width="95%" border="0" cellpadding="0" cellspacing="0" style="margin-left:20px;">
			  <tr>
				<td width="88%" height="24">栏目管理 > 栏目列表</td>
				<td width="12%" align="right" class="bt_add">{if $channel_manage==true}<a href="channel_category.php?action=add">添加</a>{/if}</td>
			  </tr>
			</table>
			</td>
		  </tr>
		</table>
		
		<form name="theForm" method="post" action="">
        <div class="tablelisthead">
        <ul>
        <li class="li_10">排序</li>
		<li class="li_10">栏目ID</li>
        <li class="li_25">栏目名称</li>
        <li class="li_15">栏目类型</li>
        {if $channel_setting==true}
        <li class="li_15">导航显示状态</li>
        {/if}
        <li class="li_20">编辑</li>
        </ul>
        </div>
		 {if $category_arr}
				 {section name=loop loop=$category_arr}
					 <div id="languageBox{$category_arr[loop].language_id}" {if $category_arr[loop].language_id == $default_language} class=""  {else} class="close"  {/if}>
					<div class="tablelist">
                    {foreach from=$category_arr[loop].category item=category}
                    <ul onmouseover="this.style.background ='#FFFDD7'" onmouseout="this.style.background ='#FFFFFF'">
                    <li class="li_10"><input type="text" value="{$category.sort_order}" onblur="updatesort('{$category.category_id}','{$category_arr[loop].language_id}')" name="sortOrder[{$category.category_id}]" id="sort{$category.category_id}l{$category_arr[loop].language_id}" class="listinput"/></li>
					<li class="li_10">{$category.category_id}</li>
                    <li class="li_25">{$category.name}</li>
                    <li class="li_15">{$category.type}</li>
                    {if $channel_setting==true}
                    <li class="li_15">
                        <a href="channel_category.php?action=state&category_id={$category.category_id}">{$category.state}</a>				
                    </li>
                    {/if}
                    <li class="li_20 operation">
									{if $channel_manage==true}
										<a href="channel_category.php?action=edit&category_id={$category.category_id}" title="编辑" class="op_edit"></a>
									{else}
										<span class="op_edit_off"></span>
									{/if}
									{if $channel_manage==true}
										<a href="{$category.url}" title="栏目内容管理" class="op_column"></a>
									{else}
										<span class="op_column_off"></span>
									{/if}
									{if $channel_manage==true and $category.flag!='index'}
										<a href="channel_category.php?action=seo&category_id={$category.category_id}" title="优化设置" class="op_seo"></a> 
									{else}
										<span class="op_seo_off"></span>
									{/if}
									{if $channel_del==true && $category.is_lock==0}
										<a href="channel_category.php?action=del&category_id={$category.category_id}" onClick="javascript: return confirm('删除分类将删除分类下面的所有内容,确认删除?');" title="删除" class="op_del"></a>
									{else}
										<span class="op_del_off"></span>
									{/if}
									</li>
                    </ul>
                  <!--
                    <div class="Clear"></div>
                    {foreach from=$category.sub_category item=sub_category}
                    <ul onmouseover="this.style.background ='#FFFDD7'" onmouseout="this.style.background ='#FFFFFF'">
                    <li class="li_10"><input type="text" value="{$sub_category.sort_order}" onblur="updatesort('{$sub_category.category_id}','{$category_arr[loop].language_id}')" name="sortOrder[{$sub_category.category_id}]" id="sort{$sub_category.category_id}l{$category_arr[loop].language_id}" class="listinput"/></li>
					<li class="li_10">{$sub_category.category_id}</li>
                    <li class="li_25">&nbsp;&nbsp;├─&nbsp;&nbsp;{$sub_category.name}</li>
                    <li class="li_15">{$sub_category.type}</li>
                    {if $channel_setting==true}
                    <li class="li_15"><a href="channel_category.php?action=state&category_id={$sub_category.category_id}">{$sub_category.state}</a></li>
                    {/if}
                    <li class="li_20 operation">
										{if $channel_manage==true}
											<a href="channel_category.php?action=edit&category_id={$sub_category.category_id}" title="编辑" class="op_edit"></a>
										{else}
											<span class="op_edit_off"></span>
										{/if}
                                        
                                        {if $channel_manage==true}
                                            <a href="{$sub_category.url}" title="栏目内容管理" class="op_column"></a>
                                        {else}
                                            <span class="op_column_off"></span>
                                        {/if}
 
										{if $channel_manage==true}
											<a href="channel_category.php?action=seo&category_id={$sub_category.category_id}" title="优化设置" class="op_seo"></a> 
										{else}
											<span class="op_seo_off"></span>
										{/if}
										{if $channel_del==true && $sub_category.is_lock==0}
											<a href="channel_category.php?action=del&category_id={$sub_category.category_id}" onClick="javascript: return confirm('删除分类将删除分类下面的所有内容,确认删除?');" title="删除" class="op_del"></a> 
										{else}
											<span class="op_del_off"></span>
										{/if}
									    </li>
                    </ul>
                    {/foreach}
					-->
                    {/foreach}
                    <div class="Clear"></div>
                    </div>
					</div>
				{/section}
			 {else}
				{section name=loop loop=$language}
					 <div id="languageBox{$language[loop].language_id}" {if $language[loop].language_id == $default_language} class=""  {else} class="close"  {/if}>
					 <div class="tablelist">
                     <ul onmouseover="this.style.background ='#FFFDD7'" onmouseout="this.style.background ='#FFFFFF'">
                     <li>您还没有添加栏目分类!</li>
                     </ul>
                     <div class="Clear"></div>
                     </div>
					 </div>
				{/section}
			 {/if}
		{if $channel_setting==true}
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td height="36" class="BotNavBg">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td style="padding-left:5px;">
				<input type="button" value=" 排序 " name="button" OnClick="javascript:dosort();">
				 </td>
			  </tr>
			</table>
			</td>
		  </tr>
		</table>
		{/if}	
		</form>
	</div>

</div>
<script type="text/javascript">
{literal}
function clearSearchText(searchText){
	if(document.getElementById(searchText).value=="查找栏目信息..."){
		document.getElementById(searchText).value="";
	}
}
function doSearchSubmit(){
	if(document.getElementById("searchText").value=="查找栏目信息..."){
		document.getElementById("searchText").value="";
	}
	if(document.getElementById("searchText1").value=="查找栏目信息..."){
		document.getElementById("searchText1").value="";
	}	
}

function searchBox() {
	if (document.getElementById('searchBox').className=="close"){
		document.getElementById('searchBox').className ="exp";
	}else{
		document.getElementById('searchBox').className="close";
	}
}

function updatesort(category_id,language_id){
	{/literal}
	{section name=loop loop=$language}
	{literal}
		document.getElementById('sort'+category_id+'l{/literal}{$language[loop].language_id}{literal}').value=document.getElementById('sort'+category_id+'l'+language_id).value;
	{/literal}
	{/section}
	{literal}
}


function languageselect(id){
	{/literal}
	{section name=loop loop=$language}
	{literal}
		document.getElementById('languageBox{/literal}{$language[loop].language_id}{literal}').className="close";
		document.getElementById('languagesel{/literal}{$language[loop].language_id}{literal}').className="Out";
	{/literal}
	{/section}
	{literal}
	document.getElementById('languagesel'+id).className="Move";
	document.getElementById('languageBox'+id).className="";
	document.getElementById('language').value=id;
	document.getElementById('language1').value=id;
}

function dosort(){
	document.theForm.action="channel_category.php?action=order";
	document.theForm.submit();
}
{/literal}
</script>
{include file="pagefooter.htm"}