📄 msgbin.jsp
字号:
<%@ page contentType="text/html;charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<script language=JavaScript>
function selectUrl()
{
var aUrl=document.getElementsByName("checkbox");
for(icount=0;icount<aUrl.length;icount++)
{aUrl[icount].checked=(document.getElementById("selchk").checked==true)?true:false;}
}
</script>
<%@include file="conn.jsp" %>
<%
java.lang.String strPage;
java.lang.String strCon;
java.lang.String strSQL;
int intPageSize; //每页显示记录数
int intRowCount; //记录总数
int intPageCount; //总页数
int intPage; //待显示页码
int i;
intPageSize=10; //取出pagesize设置每页显示记录数
//取得待显示页码
strPage=request.getParameter("page");
if(strPage==null){
intPage=1;
}else{
intPage=java.lang.Integer.parseInt(strPage);
if(intPage<1)intPage=1;
}
String sql1="select * from icefish_msg where msg_to='longlong' and msg_belong='true'and msg_del_msgbin='1' order by msg_new<>true, msg_time desc";
Statement stmt1=conn.createStatement();
ResultSet rs1=stmt1.executeQuery(sql1);
//获取记录总数
rs1.last();
intRowCount=rs1.getRow();
//计算总页数
intPageCount=(intRowCount+intPageSize-1)/intPageSize;
//调整待显示的页码
if(intPage>intPageCount)intPage=intPageCount;
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>收件箱</title>
<style type="text/css">
<!--
a:hover.xh{text-decoration:underline}a.zh{text-decoration:none;color:#000000}a:hover.zh{text-decoration:underline;color:blue}
.STYLE10 {font-weight: bold; font-size: 12px; }
.STYLE12 {font-weight: bold; font-size: 12px; color: #FFFFFF; }
.STYLE14 {font-size: 12px}
.STYLE18 {font-size: 12px;}
.STYLE25 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>
<body>
<form name=frmCheckBox action="delAll_choose_msgbin.jsp" method="post">
<table width="778" border="1" align="center" bordercolorlight="#7777FF" bordercolordark="#7777FF" style="border-collapse:collapse">
<tr>
<td height="25" colspan="4" background="images/skin/1/bg_td.gif"align="left"><span class="STYLE12">-=>收件箱</span></td>
<td align="right"background="images/skin/1/bg_td.gif"><a href="message.jsp"class=zh><span class="STYLE12">-=><span class="STYLE25">Message</span></span></a></td>
</tr>
<tr>
<td width="42" height="25" bgcolor="#EBEBEB" align="center"><span class="STYLE10">状态</span></td>
<td width="157" height="25" bgcolor="#EBEBEB" align="center"><span class="STYLE10">发件人</span></td>
<td width="295" height="25" bgcolor="#EBEBEB" align="center"><span class="STYLE10">主题</span></td>
<td width="147" height="25" bgcolor="#EBEBEB" align="center"><span class="STYLE10">日期</span></td>
<td width="103" height="25" bgcolor="#EBEBEB" align="center"><span class="STYLE10">选择</span></td>
</tr>
<%
if(intPageCount>0){
rs1.absolute((intPage-1)*intPageSize+1);
i=0;
while(i<intPageSize&&!rs1.isAfterLast()){
String msg_id=rs1.getString("msg_id");
boolean msg_new=rs1.getBoolean("msg_new");
%>
<tr>
<td width="42" height="25" align="center">
<%if (msg_new==true){%>
<img src="images/button/folder.gif" width="18" height="12">
<%}else{%>
<img src="images/button/olds.gif" width="21" height="14">
<%}%>
</td>
<td width="157" height="25" align="center"><span class="STYLE14"><%=rs1.getString("msg_from")%></span></td>
<td width="295" height="25" > <a href="receivemsg.jsp?msg_id=<%=rs1.getString("msg_id")%>" class=zh><span class="STYLE14"><%=rs1.getString("msg_topic")%></span></a></td>
<td width="147" height="25" align="center"><span class="STYLE14"><%=rs1.getString("msg_time")%></span></td>
<td width="103" height="25" align="center"><input type= checkbox name= checkbox value="<%=rs1.getString("msg_id")%>">
</td>
</tr>
<%rs1.next();
i++;
}
}
%>
<tr>
<td height="25" colspan="6" align="right" bgcolor="#EBEBEB" class="STYLE18">节省每一份空间,请及时清理无用信息.
全选/反选<input type=checkbox onClick="selectUrl()" id=selchk>
<input type = submit name="Submit" value=" 删除所选 " onClick="return confirm(' 确定要删除所选信息?')"></td>
</tr>
<tr>
<td height="25" colspan="5" align="right"><span class="STYLE14">页次:<%=intPage%>/<%=intPageCount%>页.
<%if(intPage>1){%><a href="msgbin.jsp?page=<%=intPage-1%>"class=zh>上一页</a>
<%}if(intPage<intPageCount){%>
<a href="msgbin.jsp?page=<%=intPage+1%>"class=zh>下一页</a></span>
</td>
</tr>
<%}
rs1.close();
stmt1.close();
conn.close();
%>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -