<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>刀客建站系统   管理中心  - 修改频道 </title>
<%{include file="header.html"}%>
</head>
<body>
<h1>

<span class="action-span"><a href="index.php?act=channel.dlist">频道管理</a></span>
<span class="action-span1"><a href="index.php?act=index.default_page">刀客建站系统   管理中心 </a>  - 修改频道 </span>
<span style='float:right;margin-right:10px;'><img src='images/top_help.gif'><a href="http://sitepub.cn/help"> 帮助 </a></span>
<span style='float:right;margin-right:10px;'><img src='images/top_forum.gif'><a href="http://bbs.sitepub.cn"> 论坛 </a></span>
<div style="clear:both"></div>
</h1>
<div class="tab-div">
    <div id="tabbar-div">
      <p>
        <span class="tab-front" id="general-tab">基本信息</span>
		  <span class="tab-back" id="article-tab">自定义内容</span>
        <span class="tab-back" id="seo-tab">SEO</span>
		</p>
    </div>
<div id="tabbody-div">
<form method="post" action="index.php?act=channel.save_updatechannel&channel_id=<%{$out.channel_res.channel_id}%>" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
<table  width="100%" id='general-table'>
  <tr>
    <td class="label">频道名称</td>
    <td><input type="text" name="channel_name" id='channel_name_id' maxlength="60" value="<%{$out.channel_res.channel_name|escape:html}%>" /><span class="require-field">*</span></td>

  </tr>
  <tr>
    <td class="label">频道链接</td>
	 <%{if $out.channel_res.type=='system'}%> 
    <td>
		 <a href="<%{$out.glo_domain_directory}%><%{$out.channel_res.go_to_link}%>"><%{$glo_domain_directory}%><%{$out.channel_res.go_to_link}%></a>
		 <input type='hidden' name='go_to_link' value='<%{$out.channel_res.go_to_link}%>'>
	  </td>
	<%{else}%>
    <td>
		<%{if $out.channel_res.go_to_link}%>
		 <a href="<%{$out.channel_res.go_to_link}%>"><%{$out.channel_res.go_to_link|escape:html}%></a>
	  	<%{else}%>	
	 	<a href="<%{$out.glo_domain_directory}%>channel.php?channel_id=<%{$out.channel_res.channel_id}%>">/channel.php?channel_id=<%{$out.channel_res.channel_id}%></a><br>
		<%{/if}%>
		自定义链接 <input size=40 name='go_to_link' value='<%{$out.channel_res.go_to_link}%>'><br>
		<span style='color:#9CACAF' onmouseover='this.style.color="#192E32";' onmouseout='this.style.color="#9CACAF";' >如果自定义链接,则无法显示自定义内容</span> 
	 </td>
	<%{/if}%> 	
  </tr>
  <tr>
    <td class="label">排序</td>
    <td><input type="text" name="sort_order" size="5"  value="<%{$out.channel_res.sort_order}%>"/><br>
	<span style='color:#9CACAF' onmouseover='this.style.color="#192E32";' onmouseout='this.style.color="#9CACAF";' >数字0,1,2,3,4...按降序排序</span> 
  </tr>
  <tr>
    <td class="label">频道下拉菜单选项</td>
	 <td >
    	<%{if $out.channel_res.menu_arr}%>
	 	<%{foreach from =$out.channel_res.menu_arr item=v key=k}%>
 		 <span>选项名<input type="text" name="menu_name[]"  size="25" value="<%{$v.name|escape:html}%>" />&nbsp;&nbsp;选项链接<input type="text" name="menu_url[]"  size="45" value='<%{$v.url|escape:html}%>' />&nbsp;&nbsp;<a href="javascript:void(0);" onclick="menu_del(this)">[-]</a>  <br></span>
		<%{/foreach}%>
		<%{/if}%>
		<span id='menu_box' >
 		 <p>	选项名  <input type="text" name="menu_name[]"  size="25"  /><br>选项链接 &nbsp;&nbsp;&nbsp; <input type="text" name="menu_url[]"  size="45" value="http://"  />&nbsp;&nbsp;<a href="javascript:void(0);" onclick='menu_add()'>[+]</a></p>
		</span>
		
		</td>
  </tr>	
	<tr>
    <td class="label">是否显示</td>
    <td><input type="radio" name="is_open" value="1" <%{if $out.channel_res.is_open}%>checked="checked"<%{/if}%> /> 是 <input type="radio" name="is_open" value="0" <%{if $out.channel_res.is_open==0}%>checked="checked"<%{/if}%> /> 否 
    </td>
  </tr>
  
</table>

<table  width="100%" id='seo-table' style='display:none;'>
<tr>
    <td class="label">页面Title</td>
    <td><input size=50 name='seo_title' value="<%{$out.channel_res.seo_title|escape:html}%>"><br>
	<span style='color:#9CACAF' onmouseover='this.style.color="#192E32";' onmouseout='this.style.color="#9CACAF";' >默认为站点名称 + 频道名称</span> 
	 </td>
  </tr> 
  
  <tr>
    <td class="label">页面Keywords</td>
    <td><input size=50 name='seo_keywords' value="<%{$out.channel_res.seo_keywords|escape:html}%>"><br>
	<span style='color:#9CACAF' onmouseover='this.style.color="#192E32";' onmouseout='this.style.color="#9CACAF";' >默认为站点名称 + 频道名称</span> 
	 </td>
  </tr>
  
  <tr>
    <td class="label">页面Description</td>
    <td><textarea style='width:350px;height:40px' name='seo_desc'><%{$out.channel_res.seo_desc|escape:html}%></textarea></td>
	<tr><td></td><td>
					<a href="index.php?act=help.get&h=seo&width=450"  class="jTip"  name="我希望获得更多帮助"><img src='images/help.png'></a>	
	</td>
</tr> 
</table>

<table   width="100%" id='article-table' style='display:none;'>
	<td><%{$FCKeditor}%><br>
		<a href="index.php?act=help.get&h=channel_desc&width=450"  class="jTip"  name="我希望获得更多帮助"><img src='images/help.png'></a>	
	</td>
	</table>
<div class="button-div">
             <input type="hidden" value="<%{$out.channel_res.type}%>" name='type'/>
             <input type="submit" value=" 提交 " class="button" />
</div>

</form>
</div>
</div>
<script>
function menu_add()
{
	$("#menu_box").before('<p>选项名 <input type="text" name="menu_name[]"  size="25" />  <br>选项链接 &nbsp;&nbsp;&nbsp; <input type="text" name="menu_url[]" size="45" value="http://" />&nbsp;&nbsp;<a href="javascript:void(0);" onclick="menu_del(this)">[-]</a></p>');	
}
function menu_del(obj)
{
	$(obj).parent().remove();
}

function validate()
{
	if(jQuery.trim($("#channel_name_id").val())==''){
		alert('Name of the channel');
		$("#channel_name_id")[0].focus();
		return false;
	}	
}
$(document).ready(function(){
	change_table(['article-tab','general-tab','seo-tab']);	
});


</script>


</body>
</html>

