<!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=date}-->
</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=Article.commentlist" class="link">文章评论</a>
				<a href="index.php?r=Software.commentlist" class="link">软件评论</a>
				<a href="index.php?r=Game.commentlist" class="link">游戏评论</a>
				<a href="index.php?r=Theme.commentlist" class="nolink">主题评论</a>
				<a href="index.php?r=Picture.commentlist" class="link">图片评论</a>
				<a href="index.php?r=Music.commentlist" class="link">音乐评论</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent2">
					<form name="searchForm" action="index.php" method="get" onSubmit="setDisabled('button', window.document);">
						<input type="hidden" name="r" value="Theme.commentlist"/>
						<input type="hidden" id="status" name="status" value="<!--{$status}-->"/>
						<input type="hidden" id="orderby" name="orderby" value="<!--{$orderby}-->"/>
						<div class="searchbar">
							主题名称&nbsp;<input type="text" class="text" name="title" value="<!--{$title}-->"/>
							&nbsp;评论时间&nbsp;<input type="text" class="date" id="begin_date" name="begin_date" value="<!--{$begin_date}-->"/>-<input type="text" class="date" id="end_date" name="end_date" value="<!--{$end_date}-->"/>
							&nbsp;<button type="submit" class="but2font">查询</button>
						</div>
					</form>
					<div class="operation">
						<button type="button" class="but4font" onClick="batchOperate('index.php?r=Theme.updatecommentstatus&status=1&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定审核通过？')">审核通过</button>
						<button type="button" class="but2font" onClick="batchOperate('index.php?r=Theme.deletecomment&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button>
					</div>
					<table class="tbl_list" cellpadding="0" cellspacing="0" width="100%" border="0">
						<tr class="thead">
							<td width="5%"><input type="checkbox" class="checkall"/></td>
							<td width="20%">主题名称</td>
							<td width="35%">评论内容</td>
							<td width="10%"><select onChange="$('#status').val(this.value);document.forms['searchForm'].submit();">
								<option value="">状态</option>
								<option value="1" <!--{if $status eq 1}-->selected<!--{/if}-->>已审核</option>
								<option value="2" <!--{if $status eq 2}-->selected<!--{/if}-->>待审核</option>
							</select></td>
							<td width="10%">评论用户</td>
							<td width="15%">
								<!--{if $orderby eq create_date0}-->
								<a class="link" onClick="$('#orderby').val('create_date1');document.forms['searchForm'].submit();">评论时间↑</a>
								<!--{elseif $orderby eq create_date1}-->
								<a class="link" onClick="$('#orderby').val('create_date0');document.forms['searchForm'].submit();">评论时间↓</a>
								<!--{else}-->
								<a class="link" onClick="$('#orderby').val('create_date0');document.forms['searchForm'].submit();">评论时间↓</a><!--{/if}-->
							</td>
						</tr>
						<!--{foreach from=$datalist item=item name=list}-->
						<tr onMouseOver="chgTrColor(this)" onMouseOut="chgTrColor(this)">
							<td><input type="checkbox" class="checkid" name="recordId" value="<!--{$item.id}-->"/></td>
							<td class="left"><a href="index.php?r=Theme.edit&id=<!--{$item.theme_id}-->&returnParams=<!--{$returnParams}-->"><!--{$item.title}--></a></td>
							<td class="left split"><!--{$item.comment|cutstrCN:"0":"20"}--></td>
							<td class="left"><!--{if $item.status eq 1}-->已审核<!--{elseif $item.status eq 2}-->待审核<!--{/if}--></td>
							<td class="left">
								<!--{if !empty($item.create_user_id)}-->
								<a href="index.php?r=User.update&userId=<!--{$item.create_user_id}-->&returnParams=<!--{$returnParams}-->"><!--{$item.create_user_pet_name}--></a>
								<!--{else}--><!--{$item.create_user_pet_name}--><!--{/if}-->
							</td>
							<td><!--{$item.create_date|date_format:"%Y-%m-%d"}--></td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="7">没有对应数据</td></tr>
						<!--{/foreach}-->
					</table>
					<div class="operation">
						<button type="button" class="but4font" onClick="batchOperate('index.php?r=Theme.updatecommentstatus&status=1&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定审核通过？')">审核通过</button>
						<button type="button" class="but2font" onClick="batchOperate('index.php?r=Theme.deletecomment&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button>
					</div>
					<div class="page"><!--{$pager}--></div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
function customRange(input){
	return {
		minDate : (input.id == "end_date" ? $("#begin_date").datepicker("getDate") : null),
		maxDate : (input.id == "begin_date" ? $("#end_date").datepicker("getDate") : null)
	}
}
$("#begin_date, #end_date").datepicker({
    beforeShow : customRange, buttonImageOnly : false
});
</script>
</html>