message.jsp

来自「采用j2ee架构做的bbs」· JSP 代码 · 共 65 行

JSP
65
字号
<%@ page contentType="text/html;charset=gb2312" language="java" errorPage="" %>
<%@include file="conn.jsp" %>
<%@include file="top.jsp" %>
<%@page pageEncoding="gb2312"%>
<%
String sql1="select count(*) from icefish_msg where msg_to='longlong' and msg_belong='true' and msg_del_msgbin='1'";
Statement stmt1=conn.createStatement();
ResultSet rs1=stmt1.executeQuery(sql1);

String sql2="select count(*) from icefish_msg where msg_to='longlong' and msg_new='true'and msg_belong='true'and msg_del_msgbin='1'";
Statement stmt2=conn.createStatement();
ResultSet rs2=stmt2.executeQuery(sql2);

String sql3="select count(*) from icefish_msg where msg_from='longlong'and msg_belong='false'";
Statement stmt3=conn.createStatement();
ResultSet rs3=stmt3.executeQuery(sql3);

    while(rs1.next()){
		while(rs2.next()){
		    while(rs3.next()){
%>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>短消息</title>
<style type="text/css">
<!--
a.zh{text-decoration:none;color:blue}a:hover.zh{text-decoration:underline;color:blue}
.STYLE3 {font-size: 12px}.STYLE4 {color: #FFFFFF}.STYLE5 {font-weight: bold}.STYLE6 {color: #FF0000;font-weight: bold;}
-->
</style>
</head>
<body>

<form>
<table  width="778" border="1" align="center" bordercolorlight="#7777FF" bordercolordark="#7777FF" style="border-collapse:collapse">
<tr>
  <td height="25"  background="images/skin/1/bg_td.gif"><span class="STYLE4 STYLE3 STYLE1 STYLE1 STYLE12"><strong>-=>论坛短消息</strong></span>  </td>
</tr>
<tr><td height="75"align="center">
  <a href="msgbin.jsp"  class=zh><img src="images/button/mgbin.gif" width="40" height="40"></a>&nbsp;
      <a href="draftbin.jsp" class=zh><img src="images/button/draftbin.gif" width="40" height="40"></a>&nbsp;
      <a href="forebin.jsp" class=zh><img src="images/button/fore.gif" width="40" height="40"></a>&nbsp;
    <a href="writemsg.jsp" target="_blank" class=zh><img src="images/button/write.gif" width="40" height="40"></a>
  </td>
</tr>
<tr>
  <td width="778" height="30" align="center" >
<span class="STYLE12 STYLE2 STYLE3"><a class=zh href="msgbin.jsp">收件箱</a>中有<span class="STYLE6">[<%=rs1.getString("count(*)")%>]</span>条短消息.其中有<span class="STYLE6">[<%=rs2.getString("count(*)")%>]</span>条<a class=zh href="newmsgbin.jsp">未读</a>短消息.草稿箱中有<span class="STYLE6">[<%=rs3.getString("count(*)")%>]</span>条<a class=zh href="draftbin.jsp">待发</a>短消息.</span></td>
</tr>
<%}
			rs3.close();
		stmt3.close();
}
			rs2.close();
		stmt2.close();
}
		    rs1.close();
		stmt1.close();
		conn.close();
		%>
</table>
</form>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?