<!--{if $action == 'manage'}-->
<!--{template 'head'}-->
<script type="text/javascript">
setSubject("{$channelname} >> 关键词汇管理");
</script>
<table width='100%' border='0' align='center' cellpadding='1' cellspacing='1' class='tableborder'>
	<tr bgColor='#F1F3F5'>
		<td class="tablerow">管理：
			<a href="system.php?sys=keyword&action=manage&channelid={$channelid}">关键词汇管理首页</a>  | 
			<a href="###" onclick="return searchTag();">搜索</a>   
		</td>
	</tr>
</table>

<script language=javascript src="{WW_P}images/js/pager.js"></script>
<script language=javascript src="{AW_P}images/js/keyword/manage.js"></script>
<script language=javascript>
var channelid = '{$channelid}';
var pg = new Pager("pg");

function delAction(obj){
	obj.disabled = true;
	var ids = getInputIds();
	var link = "system.php?sys=keyword&action=update&channelid="+channelid;
	AJAX.request( link,{
		method		: 'post',
		parameters  : 'type=2&tid='+ids.toString(),
		onComplete	: function(resp){
			showTags(pg.CurrentPage);
			obj.disabled = false;
		}
	});
}
</script>
	<table cellpadding="0" cellspacing="0" class="tableborder" id="mytable">
		<tr align=center>
			<td width="40"  class="tablerowhighlight">选中</td>
			<td width="40" class="tablerowhighlight">编号</td>
			<td width="100" class="tablerowhighlight">关键词汇</td>
			<td class="tablerowhighlight">所属内容</td>
			<td width="80" class="tablerowhighlight">词频</td>
			<td width="150" class="tablerowhighlight">管理操作</td>
		</tr>
		<tr height=24 align=center bgColor='#F1F3F5'>
			<td class="tablerow"><input name='chkall'  type='checkbox' id='chkall' onclick="checkall();" value='checkbox'></td>
			<td class="tablerow" colspan=2 style="text-align:left">
				<input type='button' class="f-button" onclick="delAction(this)" value='删除选中关联' />
			</td>
			<td class="tablerow" colspan=3 id='pg_pager' style="text-align:left">	</td>
		</tr>
	</table>
<script language=javascript>
	showTags(1);
</script>
<!--{template 'foot'}-->
<!--{elseif $action == 'modify'}-->
{$xml[0]}
	<!--{if $data}-->
	<form name="ajaxForm" id="ajaxForm" method="post" action="system.php?sys=keyword&action=modify&channelid={$channelid}&kid={$kid}" onsubmit="return false;">
		<table cellspacing="1" cellpadding="1" border="0">
			<tr>
				<td class="tablerow" align="right" width="60" >名称</td>
				<td class="tablerow" ><input name="name" type="text" class="f-text" value="{$data['name']}" /></td>
			</tr>
			<tr>
				<td class="tablerow" align="right" >介绍</td>
				<td class="tablerow" ><textarea class="f-text" name="detail" style="width:340px;height:60px"></textarea></td>
			</tr>
			<tr>
				<td class="tablerow" align="right" ><label for="keyword_del">删除</label></td>
				<td class="tablerow" ><input type="checkbox" value="1" name="delete" id="keyword_del" /></td>
			</tr>
		</table>
	</form>
	<script type="text/javascript" reload="1">
	(function(){
		var A = arguments;
		qmeCms.dialogView.setSubmit(true, "确定", function(){
			qmeCms.dialogView.setSubmit(true, "提交中...", function(){});
			Form.send('ajaxForm', function(resp){
				var json = evaljson(resp);
				if(json['status'] == 200){
					showTags(pg.CurrentPage);
					qmeCms.dialogView.close(500);
				}else{
					alert(json['msg']);
					A.callee();
				}
			});
		});
	})();
	</script>
	<!--{else}-->
	<p class="padding">没有找到该关键词</p>
	<!--{/if}-->
{$xml[1]}
<!--{/if}-->