<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li>
			<i class="home-icon fa fa-home"></i>
			<a href="#">会员</a>
		</li>
		<li>
			<a href="#">会员管理</a>
		</li>
		<li class="active">会员消息</li>
	</ul>
</div>

<form action="{url:/comment/message_del}" method="post" name="message_list" onsubmit="return checkboxCheck('check[]','尚未选中任何记录！')">
<div class="content">
	<table class="table list-table">
		<colgroup>
			<col width="35px" />
			<col />
			<col width="170px" />
			<col width="300px" />
			<col width="100px" />
		</colgroup>
		<caption>
            <a class="btn btn-default" onclick="sendMessage()">
                <i class="fa fa-send"></i>发送
            </a>
            <a class="btn btn-default" onclick="selectAll('check[]')">
                <i class="fa fa-check"></i>全选
            </a>
            <a class="btn btn-default" onclick="delModel({'form':'message_list',msg:'确定要删除选中的记录吗？'})">
                <i class="fa fa-close"></i>批量删除
            </a>
		</caption>
		<thead>
			<tr>
				<th></th>
				<th>标题</th>
				<th>时间</th>
				<th>接收条件</th>
				<th>操作</th>
			</tr>
		</thead>

		<tbody>
			{set:$queryObj=Api::run('getListByMessage');$resultData=$queryObj->find()}
            {foreach:items=$resultData}
			<tr>
				<td><input name="check[]" type="checkbox" value="{$item['id']}" /></td>
				<td>{$item['title']}</td>
				<td>{$item['time']}</td>
				<td>{$item['rev_info']}</td>
				<td>
					<a href="{url:/comment/message_show/id/$item['id']}"><i class='operator fa fa-eye'></i></a>
					<a onclick="delModel({link:'{url:/comment/message_del/check/$item[id]}'})"><i class='operator fa fa-close'></i></a>
				</td>
			</tr>
			{/foreach}
		</tbody>
	</table>
</div>
{$queryObj->getPageBar()}
</form>

<script language="javascript">
//发送短消息
function sendMessage()
{
	art.dialog.open('{url:/comment/message_send}',{
		'id':'sendWindow',
		'title':'会员消息',
		'width':'790px',
		'ok':function(iframeWin, topWin)
		{
			var iframeObj = $(iframeWin.document);
			iframeWin.kindEditorObj.sync();
			iframeObj.find('form').submit();
			return false;
		}
	});
}

//发送短消息后回调
function startMessageCallback(msg)
{
	if(msg == 'success')
	{
		tips('发送短信成功');
		setTimeout(function(){
			window.location.reload();
		},1200);
	}
	else
	{
		alert(msg);
	}
	art.dialog({'id':'sendWindow'}).close();
}
</script>
