<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html lang="en" class="ie6 ielt7 ielt8 ielt9"><![endif]--><!--[if IE 7 ]><html lang="en" class="ie7 ielt8 ielt9"><![endif]--><!--[if IE 8 ]><html lang="en" class="ie8 ielt9"><![endif]--><!--[if IE 9 ]><html lang="en" class="ie9"> <![endif]--><!--[if (gt IE 9)|!(IE)]><!--> 
<html lang="en"><!--<![endif]--> 
	<head>
		<%@include file="/WEB-INF/navigation/JsAndCss.jsp" %>
		<script src="/js/quant.js"></script>
	<style type="text/css">
			.current_page{border:solid 1px;padding:0 3px;}
	
	.all {
	font-size: 25px;
}

.register {
	font-size: 25px;
}

.order {
	font-size: 25px;
}

.back_pwd {
	font-size: 25px;
}
div.tabs
{
    width:940px;
	height:35px;
	overflow:hidden;
	padding-left:10px;
	margin-top:10px;
}
div.tabs ul li
{
	float:left;
	padding:0 5px;
}
div.tabs ul li a
{
	display:block;
	width:150px;
	height:36px;
	overflow:hidden;
	line-height:36px;
	text-align:center;
}
	</style>
		
		<script type="text/javascript">
		  function deleteSms(id){
		     var r = window.confirm("确定要删除此短信吗？");
                if(r){
                    location.href="deleteSms.do?id="+id ;
                }
		  }
		  
		  function detailSms(id){
               location.href="detailSms.do?id="+id ;
		  }
		  
		  
		  $(function(){
				var smsType="${pageVo.smsType}";
				$(".all").css({"fontSize":"20px","color":""});
				$(".register").css({"fontSize":"20px","color":""});
				$(".order").css({"fontSize":"20px","color":""});
				$(".back_pwd").css({"fontSize":"20px","color":""});
				if(smsType=='3'){
					$(".order").css({"fontSize":"25px","color":"#000"});
				}else if(smsType=='1'){
					$(".register").css({"fontSize":"25px","color":"#000"});
				}else if(smsType=='2'){
					$(".back_pwd").css({"fontSize":"25px","color":"#000"});
				}else{
					$(".all").css({"fontSize":"25px","color":"#000"});
				}
			});
		
		</script>
		
	</head>
	<body>
		<div class="container">
			<div class="navbar">
				<div class="navbar-inner">
					<%@include file="../navigation/menu.jsp"%>
				</div>
			</div>
			<div class="row">
				<%@include file="../navigation/navigation.jsp"%>
				<div class="span9">
					<div class="tabs">
					<ul>
						<li><a href="list.do?smsType=3" ><span class="order">预约提醒类 </span></a></li>
						<li><a href="list.do?smsType=1" ><span class="register">注册码类</span></a> </li>
						<li><a href="list.do?smsType=2" ><span class="back_pwd">找回密码类</span></a></li>
						<li><a href="list.do" > <span class="all">全部</span></a></li>
					</ul>
                
				</div>
					<table class="table table-bordered table-striped">
						<thead>
							<tr>
								<th>
								ID
								</th>
								<th>
								       手机号码
								</th>
								<th>
									类型
								</th>
								<th>
									短信内容
								</th>
								<th>
									发送时间
								</th>
								<th>
									操作
								</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${smses}" var="n">
							<tr>
								<td>
									${n.id}
								</td>
								<td>
								   ${n.mobile}
								</td>
								<td>
									<c:choose><c:when test="${n.smsType==1}">注册码</c:when><c:when test="${n.smsType==2}">找回密码</c:when><c:otherwise>其它</c:otherwise></c:choose>
								</td>
								<td>
									${n.content}
								</td>
								<td>
									<fmt:formatDate value="${n.postTime}" pattern="yyyy/MM/dd HH:mm"/>
								</td>
								<td>
									<input type="button" value="查看" onclick="detailSms(${n.id})"/>&nbsp;&nbsp;
									<input type="button" value="删除" onclick="deleteSms(${n.id})"/>
								</td>
								
							</tr>
							</c:forEach>
							<tr>
							<td colspan="4">
							<%@include file="../navigation/page.jsp"%>
							</td>
							</tr>
						</tbody>
					</table>
				</div>	
			</div>
		</div>
	</body>
</html>
