<%@page contentType="text/html; charset=UTF-8"%>
<%@include file="/inc/init.jsp"%>
<%@include file="/inc/checklogin.jsp"%>
<%
	//分页参数
	int pagex = pu.getInt("pagex", 1);
	if (pagex < 1) {
		pagex = 1;
	}
	int length = 15;
	int start = (pagex - 1) * length;
	int count = 0;
	String querystr = pu.getQueryString();
	querystr=request.getRequestURI()+"?"+querystr;
	//分页参数
	int orderid = pu.getInt("orderid");
	Order_SMS_db osdb=new Order_SMS_db();
	DOC[] docs=osdb.getListByOrderId(orderid,start,length);
	count = osdb.getRealCount();
%>
<!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" lang="zh-CN" style="overflow-x:hidden;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="nofollow" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
<meta name="description" content="" />
<meta content="" name="keywords" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>查询短信记录 - <%=Config.get("version")%></title>
<!-- 调用样式表 -->
<link href="skin/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript" src="/js/admin/script.js"></script>
<script type="text/javascript" src="/js/admin/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/js/jquery.insert.js"></script>
<script language="javascript" type="text/javascript" src="/js/admin/admin.js"></script>
<script language="javascript" type="text/javascript" src="/js/checkform.js"></script>
<script type="text/javascript" src="/js/calendar/WdatePicker.js"></script>
<script language='JavaScript'>
//去掉虚线框
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;
</script>
<script type="text/javascript">
//点击关闭提示信息层
function turnoff(obj){
document.getElementById(obj).style.display="none";
}
//设置表格的变色
<!--
function table(o,a,b,c,d){
 var t=document.getElementById(o).getElementsByTagName("tr");
 for(var i=0;i<t.length;i++){
  t[i].style.backgroundColor=(t[i].sectionRowIndex%2==0)?a:b;
  t[i].onclick=function(){
   if(this.x!="1"){
    this.x="1";
    this.style.backgroundColor=d;
   }else{
    this.x="0";
    this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
   }
  }
  t[i].onmouseover=function(){
   if(this.x!="1")this.style.backgroundColor=c;
  }
  t[i].onmouseout=function(){
   if(this.x!="1")this.style.backgroundColor=(this.sectionRowIndex%2==0)?a:b;
  }
 }
}
// -->
</script>
<!--用于PNG图片在IE6下透明-->
<!--[if IE 6]>
<script type="text/javascript" language="javascript" src="/js/admin/png.js"></script>
<script>
  DD_belatedPNG.fix('.logo');
  DD_belatedPNG.fix('#c'); 
  DD_belatedPNG.fix('.right'); 
  DD_belatedPNG.fix('#header'); 
  DD_belatedPNG.fix('#nav'); 
  DD_belatedPNG.fix('.nav li.on'); 
  DD_belatedPNG.fix('.nav li.on a'); 
  DD_belatedPNG.fix('#menu dd a'); 
  DD_belatedPNG.fix('.right_bottom'); 
  DD_belatedPNG.fix('.copy'); 
</script>
<![endif]--> 
</head>
<body style="font-size:12px">
		<table width="100%" align="center" cellpadding="1" cellspacing="1"
			bgcolor="#CCCCCC" class="table1" id="smsviewtable">
			<tr>
				<td width="13%" height="30" align="center" bgcolor="#FFFFFF">
					<strong>时间：</strong>
				</td>
				<td width="61%" height="30" bgcolor="#FFFFFF">
					<strong>内容：</strong>
				</td>
				<td width="12%" align="center" bgcolor="#FFFFFF"><strong>状态</strong></td>
				<td width="14%" align="center" bgcolor="#FFFFFF"><strong>备注</strong></td>
			</tr>
			<%for (int i = 0; i < docs.length; i++) {
				boolean isTime=StringUtil.isFine(docs[i].get(Order_SMS_db.Jretain2));//检查是否定时短信
				String contactColor="";//当天是定时发送
				if(isTime){
					contactColor="font-weight:bold;";
				}
				%>
			<tr>
				<td width="13%" height="30" align="center" bgcolor="#FFFFFF" onMouseOver="tooltip.show('<%=isTime?"定时："+docs[i].get(Order_SMS_db.Jretain2)+" 发送":""%>');" onMouseOut="tooltip.hide();">
					<font style="<%=contactColor%>"><%=docs[i].get(Order_SMS_db.JcreateTime) %></font>
				</td>
				<td width="61%" height="30" bgcolor="#FFFFFF">
					&nbsp;<%=docs[i].get(Order_SMS_db.Jcontent) %></td>
					<%
					String rs=null;
					if(docs[i].geti(Order_SMS_db.Jstate)<1){//假如状态不正常
						rs=Select.getText("smsstate",docs[i].get(Order_SMS_db.Jstate));//首先查找状态表
						if(!StringUtil.isFine(rs)){
						rs="发送失败！";
						}
					}else{
						rs="发送成功！";
					}
					boolean isAuto=docs[i].get(Order_SMS_db.Jretain3).equals("1");
					%>
				<td width="12%" align="center" bgcolor="#FFFFFF" <%if(isAuto){%> onMouseOver="tooltip.show('系统自动发送');" onMouseOut="tooltip.hide();"<%} %>><font style="<%=isAuto?contactColor:""%>"><%=rs%></font></td>
				<td width="14%" align="center" bgcolor="#FFFFFF"><%=docs[i].get(Order_SMS_db.Jretain1)%></td>
			</tr>
			<%} %>
			<tr>
				<td height="30" colspan="4" align="center" bgcolor="#FFFFFF">
				<div class="page" align="center">
					<%=PagingUtil.splitPages(pagex,querystr,count, length)%> 
				</div>
				</td>
			</tr>
		</table>
	</body>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
	try {
	window.parent.refreshSms();
	} catch (e) {}
});
</script>
</html>