<!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/guestbook_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/guestbook_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>
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngALL-AFenyeFu-marginT ngco-No-paddingR">
						<form class="am-form" action="#" method="post">
							<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-title">留言主题</th>
										<th class="table_id">留言者</th>
										<!-- <th class="table-id">留言者</th> -->
										<th class="table-title">留言时间</th>
										<th class="table-set">操作</th>
									</tr>
								</thead>
								<tbody>
									{% for row in data %}
									<tr>
										<td><input type="checkbox" value="{{row['id']}}" name="id[]" class="checkbox-middle"></td>
										<td>{{row['title']}}</td>
										<td>{{row['nickname']}}</td>
										<td>{{row['addtime']}}</td>
										<td>
											<div class="am-btn-toolbar">
												<div class="am-btn-group am-btn-group-xs">
													{% if row['audit'] == 1 %}
													<a href="guestbook_manage?action=unaudit&id={{row['id']}}"  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="guestbook_manage?action=audit&id={{row['id']}}"  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 class="am-btn am-btn-default am-btn-xs am-hide-sm-only title2div am-btn doc-prompt-toggle" title="点击回复留言">
														<span class="am-icon-mail-reply"></span>&nbsp;回复
													</a>
													<a href="guestbook_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>
	<!-- 模拟窗 -->
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
  <div class="am-modal-dialog">
	<div class="am-modal-hd">test.kgcms.com</div>
	<div class="am-modal-bd">留言信息回复
		<form action="/" method="post" id="reply_form">
			<input type="text" name="reply" value="" class="am-modal-prompt-input" id="nggu-inpu-huifu">
			<input type="hidden" name="reply_id" value="" id="act_id"/>
		</form>
	</div>
	<div class="am-modal-footer">
		<span class="am-modal-btn" data-am-modal-cancel>取消</span>
		<span class="am-modal-btn" data-am-modal-confirm>发送</span>
	</div>
  </div>
</div>
<script>
	 kg.title2div('title2div');	 //调用此方法， 把该元素的title属性替换成div
</script>
</body>
</html>