<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" href="{{ kg['tpl_url'] }}style/comment_manage.css">
<script src="{{ kg['tpl_url'] }}script/jquery.min.js"></script>
<script src="{{ kg['server']['HTTP_HOST'] }}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/comment_manage.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				网站评论管理
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li class="am-active">网站评论管理</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;网站评论管理
					</div>
					<ul class="list-inline ngsty-boxR">
						<li>
							<div class="am-select-hover am-no-marginbtm am-no-outline">
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{sbtnSize: 'sm'}">
									<option {% if type==0 %} selected="selected" {% endif %} value="comment_manage?{{url['type']}}type=0">文章评论</option>
									<option {% if type==1 %} selected="selected" {% endif %} value="comment_manage?{{url['type']}}type=1">商品评论</option>
									<option {% if type==2 %} selected="selected" {% endif %} value="comment_manage?{{url['type']}}type=2">图片评论</option>
									<option {% if type==3 %} selected="selected" {% endif %} value="comment_manage?{{url['type']}}type=3">下载评论</option>
								</select>
							</div>
						</li>
						<li>
							<div class=" am-select-hover am-no-marginbtm am-no-outline" >
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{btnSize: 'sm'}">
									<option {% if filter==0 %} selected="selected" {% endif %} value="comment_manage?{{url['filter']}}filter=0">所有状态</option>
									<option {% if filter==1 %} selected="selected" {% endif %} value="comment_manage?{{url['filter']}}filter=1">已审核的内容</option>
									<option {% if filter==2 %} selected="selected" {% endif %} value="comment_manage?{{url['filter']}}filter=2">未审核的内容</option>
								</select>
							</div>
						</li>
						<li>
							<div class=" am-select-hover am-no-marginbtm am-no-outline" >
								<select onchange="window.open(this.options[this.selectedIndex].value,'_self')" data-am-selected="{sbtnSize: 'sm'}">
									<option {% if sort==0 %} selected="selected" {% endif %} value="comment_manage?{{url['sort']}}sort=0">提交时间降序</option>
									<option {% if sort==1 %} selected="selected" {% endif %} value="comment_manage?{{url['sort']}}sort=1">提交时间升序</option>
									<option {% if sort==2 %} selected="selected" {% endif %} value="comment_manage?{{url['sort']}}sort=2">顶帖数降序</option>
									<option {% if sort==3 %} selected="selected" {% endif %} value="comment_manage?{{url['sort']}}sort=3">顶帖数升序</option>
								</select>
							</div>
						</li>
						<li>
							<div class="portlet-input input-small input-inline">
								<form action="#" method="get" id="search">
									<div class="input-icon right">
										<i class="am-icon-search log-search"></i>
										<input type="text" class="ngar-Vxiugai-radius form-control am-hover form-control-solid ngco-Alo-Noborder" placeholder="搜索..." name="word" value="{{word}}" id="word">
									</div>
								</form>
							</div>
						</li>
						<li>
							<div class="am-btn-group am-btn-group-xs">
								<a href="comment_manage?{{ kg['run_start_time'][1] }}" class="am-btn am-btn-secondary ng-add-hightB" id="refresh" ><span class="am-icon-search"></span>&nbsp;刷新</a>
								<a class="am-btn am-btn-default am-btn-warning" href="comment_manage?good=1"><span class="am-icon-plus"></span>&nbsp;一键审核</a>
							</div>
						</li>
					</ul>
					
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngALL-AFenyeFu-marginT ngco-No-paddingR">
						<form class="am-form" action="#" method="get">
							<table class="am-table am-table-striped am-table-hover table-main ngco-Esz-mgibdr">
								<thead>
									<tr>
										<th class="table-check"><input type="checkbox" name="all" id="all"  onclick="kg.select_all(this.form);" class="tpl-table-fz-check checkbox-middle" /></th>
										<th class="table-id">ID</th>
										<th class="table-title">原文标题(评论总数)</th>
										<th class="table-title">用户</th>
										<th class="table-set">IP地址</th>
										<th class="table-title">评论时间</th>
										<th class="table-title">评论(顶贴数)</th>
										<th class="table-title">操作</th>
									</tr>
								</thead>
								<tbody>
									{% for row in data %}
									<tr>
										<td><input type="checkbox" value="{{row['id']}}" name="id[]" class="checkbox-middle"></td>
										<td>{{row['id']}}</td>
										<td>{{row['title']}}({{row['commenttotal']}})</td>
										{% if row['user'] == 0%}
										<td>{{row['nickname']}}</td>
										{% else %}
										<td>{{row['user']}}</td>
										{% endif %}
										<td>{{row['ip']}}</td>
										<td>{{row['addtime']}}</td>
										<td title="{{row['content']}}">{{row['cut_content']}}({{row['agree']}})</td>
										<td>
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													{% if row['audit'] == 1 %}
													<a href="comment_manage?action=unaudit&id={{row['id']}}"  title="取消审核" class="am-btn am-btn-default am-btn-xs am-hide-sm-only am-text-warning am-audit-bright title2div"><span class="am-icon-pencil "></span>&nbsp;取消</a>
													{% else %}
													<a href="comment_manage?action=audit&id={{row['id']}}"  title="设置为审核" class="am-btn am-btn-default am-btn-xs am-hide-sm-only am-text-warning am-button-dark title2div"><span class="am-icon-pencil "></span>&nbsp;审核</a>
													{% endif %}
													<a href="comment_manage?action=del&id={{row['id']}}" class="am-btn am-btn-default am-btn-xs am-text-danger ngro-Jclick-shanchubi title2div" title="删除留言信息"><span class="am-icon-trash-o"></span>&nbsp;删除</a>
												</div>
											</div>
										</td>
									</tr>
									{% endfor %}
								</tbody>
							</table>
							{% if not data %}<div class="no-data"><ul>没有相关数据</ul></div>{% endif %}
							{% if page_data['total_rows'] %}
							<div class="am-u-sm-12 am-u-md-6">
								<div class="am-btn-toolbar ng-xno-borderL" id="select-handle">
										<span class="am-input-group-btn add-span">
											<a class="add am-btn am-btn-default am-select am-back ngco-Ono-radiusR" href="javascript:;">全选</a>
										</span>
										<input type="hidden" name="action" id="action" value="">
										<select class="am-select-hover" data-am-selected="{btnSize: 'sm', dropUp: 1, maxHeight: 155}" style="display: none;">
											<option selected="selected" value='0'>将选中项：</option>
											<option value="audit">审核</option>
											<option value="unaudit">取消审核</option>
											<option value="del">删除</option>
										</select>
								</div>
							</div>
							{% endif %}
							{% if page_data['total_page'] > 1 %}
							{{ page_html }}
							{% endif %}
						</form>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	<script>
		 kg.title2div('title2div');	 //调用此方法， 把该元素的title属性替换成div
	</script>
</body>
</html>