<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>{#$title#}</title>
	<meta name="author" content="骑士CMS" />
	<meta name="copyright" content="74cms.com" />
	<link rel="shortcut icon" href="{#$QISHI.site_dir#}favicon.ico" />
	<link rel="stylesheet" href="{#$QISHI.site_template#}css/user_common.css" />
	<link rel="stylesheet" href="{#$QISHI.site_template#}css/user_hunter.css" />
	<script src="{#$QISHI.site_template#}js/png24fix.js"></script>
	<script src="{#$QISHI.site_template#}js/jquery.js"></script>
	<script src="{#$QISHI.site_template#}js/jquery.checkboxui.js"></script>
	<script src="{#$QISHI.site_template#}js/jquery.checkboxrelated.js"></script>
	<script src="{#$QISHI.site_template#}js/jquery.radioui.js"></script>
	<script>
		$(document).ready(function() {
			//批量删除消息
			$("#del_all").click(function(){
				if (!confirm("确认要删除么？")) {
                    return false;
                } else {
					$("#del_form").attr("action","?act=del_pms");
					$("#del_form").submit();
                }
			});
			// 标为已读
			$("#set_look").click(function()
			{
				$("#del_form").attr("action","?act=set_look");
				$("#del_form").submit();
			});
			// 美化
			$('#Form1 :radio').RadioUI();
			// 已看，未看，全部
			$("#Form1 .radioui").bind('click',function()
			{
				$("#Form1").submit();
			});
			
			$('#del_form :checkbox').CheckboxUI();
			// 全选反选
			var che_tbody = $('.message_item :checkbox');
			if(che_tbody.length < 1){
				return false;
			}
			$('.chk_all :checkbox').CheckboxRelated(che_tbody);
		});
	</script>
</head>
<body>
	<!-- 顶部 -->
	{#include file="member_personal/header.htm"#}
	<!-- 顶部结束 -->
	<div class="container">
		<div class="message_box">
			<div class="message_title clearfix">
				<h3>系统消息</h3>
			</div>
			<div class="message_main">
				<div class="filter">
					<form method="get" id="Form1">
						<input type="hidden" name="act" value="pms_list"/>
						筛选条件：
						<label><input type="radio" name="is_look" value="0" {#if $smarty.get.is_look==0 || $smarty.get.is_look==""#}checked{#/if#} /> 全部</label>
						<label><input type="radio" name="is_look" value="1" {#if $smarty.get.is_look==1#}checked{#/if#}/> 未查看</label>
						<label><input type="radio" name="is_look" value="2" {#if $smarty.get.is_look==2#}checked{#/if#}/> 已查看</label>
					</form>
				</div>
				<div class="messages_list">
					{#if $list#}
					{#foreach from=$list item=li#}
					<form action="" method="post" id="del_form">
					<div class="message_item clearfix">
						<div class="message_item_li m_title">
							<input type="checkbox" name="pid[]" value="{#$li.spmid#}" />
							<a href="?act=pms_show&id={#$li.spmid#}">{#$li.message#}</a>
						</div>
						<div class="message_item_li m_date">{#$li.dateline|date:"Y-m-d"#}</div>
						<div class="message_item_li m_control link_blue"><a href="?act=del_pms&pid={#$li.spmid#}" onclick="return confirm('确认要删除么？')">删除</a></div>
					</div>
					{#/foreach#}
					<div class="message_bottom_control clearfix">
						<div class="chk_all">
							<input type="checkbox" id="checkAll" name="selectall"/>
						</div>
						<div class="bottom_control"><a href="javascript:void(0)" id="set_look" >标为已读</a><a href="javascript:void(0)" id="del_all">删除</a></div>
						<!-- 分页 -->
						<div class="page h_page clearfix">
							{#$page#}
						</div><!-- 分页结束 -->
					</div>
					</form>
					{#else#}
					<div class="message_item">
						 没有您要找的信息！
					</div>
					{#/if#}

				</div>
			</div>
		</div>
	</div>
	<!-- 底部 -->
	{#include file="./footer.htm"#}
	<!-- 底部结束 -->
</body>
</html>