<!--{template 'article/head'}-->
<script  language=javascript>
	var groups = isNaN(parseInt('{$n}')) ? 0 : parseInt('{$n}');
	function myform_submit(){
		return true;
	}
</script>
<script type="text/javascript">
	function wl( url){if( url){ window.location=url;};}
	var rm = new qmeCms.rightMenu('mytable');
	rm.AddItem("添加"+channeltitle,"wl('module.php?mod='+mod+'&channelid='+channelid+'&action=add')");
	rm.AddItem("快速修改","setFilter(channelid,rm.id);");
	rm.AddItem("修改"+channeltitle,"wl('module.php?mod=article&channelid='+channelid+'&action=edit&id='+rm.id)");
	rm.AddItem("查看评论","qmeCms.dialogView.iframe('评论','system.php?sys=comment&channelid='+channelid+'&api=1&id='+rm.id,{width:800,type:'abs'});rm.Close();");
	rm.AddLine();
</script>
<script language=javascript src="{AW_P}images/js/manage.js"></script>
<form method="POST" name="myform" id="myform" action="system.php?sys=module&action={$action}" onsubmit="return  myform_submit();">
<input type='hidden' name='start' value='1'>
<table cellpadding="0" cellspacing="0" class="tableborder" id="mytable">
  <tr align=center>
	<td width="30" class="tablerowhighlight"> </td>
	<!--{if $ordering == 0}-->
	<td width="60" class="tablerowhighlight" onclick="setLocation('ordering', 1);" style=";cursor:pointer;">ID
			<img style="margin-left:6px;" width="7" height="7" border="0" src="{AW_P}images/sma/order_asc.gif" />
	</td>
	<!--{else}-->
	<td width="60" class="tablerowhighlight" onclick="setLocation('ordering', 0);" style=";cursor:pointer;" >ID
			<img style="margin-left:6px" width="7" height="7" border="0" src="{AW_P}images/sma/order_desc.gif" />
	</td>
	<!--{/if}-->
	<td width="50" class="tablerowhighlight">排序</td>
	<td  class="tablerowhighlight">标题</td>
	<td width="80" class="tablerowhighlight">编辑</td>
	<td width="80" class="tablerowhighlight">发表时间</td>
	<td width="60" class="tablerowhighlight">状态</td>
	<td width="120" class="tablerowhighlight">管理操作</td>
  </tr>
  <!--{if $data}-->
  <!--{loop $data $article}-->
  <tr id='item-{$article[id]}' height=24 align=center class="item">
	<td class="tablerowl"><input name='ids[]' type='checkbox' id='ids_{$article[id]}' value='{$article[id]}'  onclick="try{event.cancelBubble=true;}catch(e){event.stopPropagation();}"></td>
	<td class="tablerowl" align='left'>{$article['id']}</td>
	<td class="tablerow" align='center'>
		<input type="text" class="f-text" style="text-align:center;width:46px;height:18px;" maxlength="5" name="ordering[{$article['id']}]" value="{$article['ordering']}" rel="{$article['ordering']}" onkeyup="changeOrdering({$article['id']}, this)" />
	</td>
	<td align=left valign='middle'>
		<table cellpadding="0" cellspacing="0" border="0"  width=100%>
			<tr>
				<td>
					[<a href="system.php?sys=module&mod={$mod}&channelid={$article['channelid']}&action=manage&status={$status}&cid={$article[cid]}"><font color="blue">{$article['title']}</font></a>] 
					<a href="module.php?mod={$mod}&channelid={$channelid}&action=edit&id={$article[id]}&cid={$article[cid]}">{$article['subject']}</a>
				</td>
				<td width=18><!--{if $article['thumb']}--><a href="javascript:picEdit('{$article[thumb]}','{$_SET[webpath]}', config.channelid, imgEditorCallback.def ,{id:{$article['id']}});"><img border=0 src="images/viewpic.gif" width="18" height="18"></a><!--{/if}--></td>
			</tr>
		</table>
	</td>
	<td>{$article['editor']}</td>
	<td>{$article['dateline']}</td>
	<td title='{$article['alt']}'>{$article['des']}</td>
	<td>
	<!--{if $article['status'] == 0}-->
		<span id="view_{$article[id]}"><!--{if $article['html']}--><a href='{$article['ym']}' target=_blank><font color=blue>浏览</font></a><!--{/if}--></span> 
		 <a href="module.php?mod=article&channelid={$channelid}&action=edit&id={$article[id]}&cid={$article[cid]}">修改</a>
		<a onclick="if(makeSure()) edit('del',0,{$article[id]});"  href="###" id="a_delete_{$article[id]}">删除</a>
	<!--{elseif $article['status'] == 4}-->
		<a onclick="edit('go_back',1,{$article[id]});"  href="###" id="a_go_back_{$article[id]}">待审</a> 
		<a href="{$article['ym']}" target=_blank><font color=blue>预览</font></a>
		<a onclick="edit('del',1,{$article[id]});"  href="###" id="a_delete_{$article[id]}">彻底删除</a>
	<!--{else}-->
		<a href="{$article['ym']}" target=_blank><font color=blue>预览</font></a>
		<a href="module.php?mod=article&channelid={$channelid}&action=edit&id={$article[id]}&cid={$article[cid]}">修改</a>
		<a onclick="edit('del',1,{$article[id]});"  href="###" id="a_delete_{$article[id]}">彻底删除</a>
	<!--{/if}-->
	</td>
  </tr>
  <!--{/loop}-->
  <!--{else}-->
	<tr><td colspan="8">
		<p style="padding:25px;text-align:center">没有相关数据</p>
	</td></tr>
  <!--{/if}-->
  <tr>
	<td class="tablerow" align=center><input name='chkall' type='checkbox' id='chkall' onclick='checkall(this.form)' value='checkbox'></td>
	<td class="tablerow manage_act" colspan=7 >
	<!--{if $status == 4}-->
		<input class="f-button" class="f-button"  type='submit' value='彻底删除{$channeltitle}' onClick="if(!makeSure()) return false;document.myform.action='module.php?mod=article&channelid={$channelid}&action=updateinfo&actions=del&is_last=1&recycle=1';this.disabled=true;document.forms['myform'].submit();" />
		<input  class="f-button" class="f-button"  type='submit' value='成为待审' onClick="if(!makeSure()) return false;document.myform.action='module.php?mod=article&channelid={$channelid}&action=updateinfo&actions=go_back&recycle=1';this.disabled=true;document.forms['myform'].submit();" />
		<script type="text/javascript">
		rm.AddItem("还原","if(makeSure()) edit('go_back',1,rm.id);rm.Close();");
		rm.AddItem("彻底删除","if(makeSure()) edit('delete',1,rm.id);rm.Close();");
		</script>
	<!--{else}-->
		<script type="text/javascript">
			rm.AddItem("移到回收站","if(makeSure()) edit('delete',0,rm.id);rm.Close();");
			rm.AddItem("彻底删除","if(makeSure()) edit('delete',1,rm.id);rm.Close();");
		</script>
		<!--{if $status > 0}-->
			<input class="f-button" class="f-button" type='button' value='彻底删除{$channeltitle}' onClick="if(!makeSure()) return false;document.myform.action='module.php?mod=article&channelid={$channelid}&action=updateinfo&actions=del&is_last=1&recycle=1';this.disabled=true;document.forms['myform'].submit();" />
			<input class="f-button" class="f-button" type='button' value='通过审核' onClick="if(!makeSure()) return false;document.myform.action='module.php?mod=article&channelid={$channelid}&action=updateinfo&actions=status&status=0';this.disabled=true;document.forms['myform'].submit();" />
		<!--{else}-->
			<script type="text/javascript">
			rm.AddItem("预览当前"+channeltitle,"preview(rm.id);rm.Close();");
			</script>
			<input class="f-button" type='button' value='删除{$channeltitle}' onClick="if(!makeSure()) return false;document.myform.action='module.php?mod=article&channelid={$channelid}&action=updateinfo&actions=del';this.disabled=true;document.forms['myform'].submit();" />
			<input class="f-button" id='toHTML' type='button' value='生成{$channeltitle}' onClick="htmlCreateGoReady();" />
			<input class="f-button" type="button" value="导出内容" onclick="exportDataToExecl();" />
			<input  class="f-button" type='button' value='移动到>>' onClick="if(!makeSure()) return false;document.myform.action='module.php?mod=article&channelid={$channelid}&action=updateinfo&actions=move';this.disabled=true;document.forms['myform'].submit();" />
			<select name='cid'>{$strall}</select>
			<span>每页显示数据：</span><input type=text class="f-text"  value='{$pagesize}' size=5 onchange="myCookie.set('_ps', this.value.toString());window.location='system.php?sys=module&mod={$mod}&channelid={$channelid}&action={$action}&status={$status}&cid={$cid}&pagesize='+this.value" />
		<!--{/if}-->
	<!--{/if}-->
	</td>
  </tr>
 </table>
 </form>
 <form method=GET name=form action='system.php'>
<table cellpadding="2" cellspacing="1" class="tableborder">
	<tr>
		<td class="tablerow">
			<!--{template 'manage_search'}-->
		</td>
	</tr>
	<tr>
		<td class="tablerow"><!--{eval new Pager($total,$pagesize);}--></td>
	</tr>
</table>
</form>
	<script type="text/javascript">
	<!--{if $admin_info['groupid'] > 2 && !in_array($channelid, $manage_channel)}-->
	function disabledSubmit(){
		var obj = document.getElementsByTagName("INPUT");
		for( var i=0; i<obj.length; i++){
			if( obj[i].type == 'submit' && obj[i].name != 'Submit'){
				obj[i].disabled = true ;
			}
		}
	}
	disabledSubmit();
	<!--{/if}-->
	selectChecked('type','{$type}');
	</script>

<script type="text/javascript">
	rm.AddLine();
	<!--{if intval($close_index) == 0}-->rm.AddItem("预览频道首页","previewUrl(config.url + 'index.php?mod={$channelid}&ac=index&preview=1')");<!--{/if}-->
	rm.AddItem("频道HTML生成","wl('system.php?sys=tohtml&channelid='+channelid+'&channelselect='+channelselect+'&action=tohtml')");
	domReady(function(){
		rm.Setup();
	});
</script>
<!--{template 'foot'}-->