<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=popbox}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>互动社区&nbsp;&gt;&nbsp;论坛管理&nbsp;&gt;&nbsp;日志管理
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=Forum.postlist" class="link">帖子管理</a>
				<a href="index.php?r=SiteSet.forumset" class="link">属性设置</a>
				<a href="index.php?r=Forum.postallreplylist" class="link">回复信息审核</a>
				<a href="index.php?r=Forum.accusationlist" class="link">举报信息管理</a>
				<a href="index.php?r=Forum.shortcutreplylist" class="link">快速回复语</a>
				<a href="index.php?r=Forum.postloglist" class="nolink">日志管理</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent2">
					<form id="searchForm" name="searchForm" action="index.php" onSubmit="setDisabled(':button',window.document);">
						<input type="hidden" name="r" value="Forum.postallreplylist"/>
						<input type="hidden" id="status" name="status" value="<!--{$status}-->"/>
					</form>
					<div class="operation"><button type="button" class="but2font" onClick="batchOperate('index.php?r=Forum.deletepostlog&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button></div>
					<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tbl_list">
						<tr class="thead">
							<td><input type="checkbox" class="checkall"/></td>
							<td>操作者</td>
							<td>操作</td>
							<td>内容</td>
							<td>贴主</td>
							<td>频道ID</td>
							<td>频道名称</td>
							<td>操作时间</td>
						</tr>
						<!--{foreach from=$datalist item=data name=foo}-->
						<tr onMouseOver="chgTrColor(this)" onMouseOut="chgTrColor(this)">
							<td><input id="record<!--{$smarty.foreach.foo.index+1}-->" type="checkbox" class="checkid" name="recordId" postId ="<!--{$data.post_id}-->" value="<!--{$data.id}-->"/></td>
							<td><!--{$data.operation_user_pet_name}--></td>
							<td><!--{$data.operation_name}--></td>
							<td><!--{$data.post_title}--></td>
							<td><!--{$data.post_pet_name}--></td>
							<td><!--{$data.post_channel_id}--></td>
							<td><!--{$data.channel_text}--></td>
							<td><!--{$data.operation_date|date_format:"%Y-%m-%d %H:%M:%S"}--></td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="8">没有对应数据</td></tr>
						<!--{/foreach}-->
					</table>
					<div class="operation"><button type="button" class="but2font" onClick="batchOperate('index.php?r=Forum.deletepostlog&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button></div>
					<div class="page"><!--{$pager}--></div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
function deleteReply(msg){
	var returnParams = '<!--{$returnParams}-->';
	var postReplyIds = '';
	var postIds = '';
	$("input[name=recordId]").each(function(index,element){
		if($(element).attr("checked")==true){
			postReplyIds = postReplyIds+','+$(element).val();
			postIds = postIds + "," + $(element).attr("postId");
		}
	});
	if(postReplyIds!=null&&postReplyIds!=''){
		postReplyIds = postReplyIds.substr(1);
		postIds = postIds.substr(1);
		if(confirm(msg)){
			window.location.href='index.php?r=Forum.deletepostreply&returnParams='+returnParams+'&reply_ids='+postReplyIds+'&source_post_ids='+postIds;
		}
	}else{
		alert('请选择回复');
	}
}	

function checkStatus(status,msg){
	var returnParams = '<!--{$returnParams}-->';
	var postReplyIds = '';
	var postIds = '';
	var errorFlag = 0;
	$("input[name=recordId]").each(function(index,element){
		if($(element).attr("checked")==true){
			var idName = $(element).attr("id");
			var index = idName.substr(6);
			var checkStatus = $("#check_status"+index).val();
			if(checkStatus==1){
				errorFlag=1;
				return false;
			}
			postReplyIds = postReplyIds+','+$(element).val();
			postIds = postIds + "," + $(element).attr("postId");
		}
	});
	if(errorFlag==1){
		alert('不能对已审核的帖子重复审核！');
		return false;
	}
	if(postReplyIds!=null&&postReplyIds!=''){
		postReplyIds = postReplyIds.substr(1);
		postIds = postIds.substr(1);
		if(confirm(msg)){
			window.location.href='index.php?r=Forum.checkpostreply&returnParams='+returnParams+'&status='+status+'&reply_ids='+postReplyIds+'&source_post_ids='+postIds;
		}
	}else{
		alert('请选择回复');
	}
}	

function showStatusCheck(replyId,postId){
	var returnParams = '<!--{$returnParams}-->';
	var str= '<table width="100%"><tr><td height=50 align="center">';
	str += '<button onclick="window.location.href=\'index.php?r=Forum.checkpostreply&source_post_id='+postId+'&returnParams='+returnParams+'&status=1&reply_id='+replyId+'\'">审核通过</button>&nbsp;&nbsp;';
	str += '<button style="width:auto" onclick="window.location.href=\'index.php?r=Forum.checkpostreply&source_post_id='+postId+'&returnParams='+returnParams+'&status=9&reply_id='+replyId+'\'">审核不通过</button>&nbsp;&nbsp;';
	str += '</td></tr></table>';
	$.popbox({title:"回帖审核", content:str});
}
</script>
</html>