- <%@ page language = "java" contentType = "text/html;charset=gb2312"%>
- <%@ page import = "java.sql.*" %>
- <jsp:useBean id = "sts" scope = "page" class = "wsxk.ConDB" />
- <%
- int intPage;
- int currentPage = 1;
- int PageNumbers = 5;
- if(request.getParameter("page")!= null && request.getParameter("page")!="")
- {intPage = Integer.parseInt(request.getParameter("page"));
- currentPage=intPage;}
- else
- intPage = 1;
- int totalRecord = 0;
- ResultSet counters = sts.executeQuery("select count(*) as mesid from message");
- if(counters.next())
- {
- totalRecord = Integer.parseInt(counters.getString("mesid"));
- }
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href="_notes/aaa.css" rel="stylesheet" type="text/css">
- <style type="text/css">
- <!--
- @import url("_notes/ccc");
- .style1 {color: #FFFFFF}
- body,td,th {
- color: #FFFFFF;
- font-weight: bold;
- font-size: 12px;
- }
- a:link {
- color: #FFFFFF;
- }
- a:visited {
- color: #FFFFFF;
- }
- -->
- </style>
- </HEAD>
- <BODY BGCOLOR=#0D85A6 BACKGROUND="images/bg.gif" >
- <br>
- <br>
- <TABLE WIDTH=750 height="494" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0>
- <TR>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=231 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=4 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=75 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=110 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=105 HEIGHT=1></TD>
- <TD> <IMG SRC="images/spacer.gif" WIDTH=5 HEIGHT=1></TD>
- </TR>
- <TR>
- <TD COLSPAN=4> <IMG SRC="images/temp_01.jpg" WIDTH=420 HEIGHT=15></TD>
- <TD COLSPAN=4> <IMG SRC="images/temp_02.jpg" WIDTH=330 HEIGHT=15></TD>
- </TR>
- <TR>
- <TD COLSPAN=8> <IMG SRC="images/temp_03.jpg" WIDTH=750 HEIGHT=5></TD>
- </TR>
- <TR>
- <TD>
- <table width="231" border="0" cellspacing="0" cellpadding="0" height="226" background="images/left_top.jpg">
- <tr>
- <td width="231" valign="bottom">
- <div align="center">
- <p><br>
- <font color="#2DFFFF" size="5"><strong> </strong></font></p>
- <table width="200" border="1">
- <tr>
- <td><div align="center"><strong><a href="adminstudent.jsp">【学生管理】</a></strong></div></td>
- </tr>
- <tr>
- <td><div align="center"><a href="adminteacher.jsp">【教师<strong>管理</strong>】</a></div></td>
- </tr>
- <tr>
- <td><div align="center"><a href="admincourse.jsp">【课程<strong>管理</strong>】</a></div></td>
- </tr>
- </table>
- <p> <strong><font color="#2DFFFF" size="5"> </font></strong></p>
- </div>
- </td>
- </tr>
- </table>
- </TD>
- <TD ROWSPAN=2> <IMG SRC="images/temp_05.jpg" WIDTH=4 HEIGHT=455></TD>
- <TD COLSPAN=5 ROWSPAN=2>
- <table width="510" border="0" cellspacing="0" cellpadding="0" height="455" background="images/main_bg.jpg">
- <tr>
- <td width="510">
- <table width="510" border="0" cellspacing="0" cellpadding="0" height="455">
- <tr>
- <td width="510" height="78">
- <div align="center"><img src="images/blank_banner.gif" width="468" height="60"></div>
- </td>
- </tr>
- <tr>
- <td valign="top"> <div align="left">
- <table width="483" height="217" border="0">
- <tr>
- <td height="14"><a href="index1.htm">首页</a>><a href="index3.jsp">后台管理</a>>查看留言</td>
- </tr>
- <tr>
- <td height="16"><span class="style1">分页: 留言总数:<%=totalRecord%> <a href="adminlyb.jsp?page=1">[首页]</a>
- <%
- if(intPage>1 && intPage<((totalRecord+PageNumbers)/PageNumbers))
- {
- out.print("<a href='adminlyb.jsp?page=" + (intPage-1) + "'>[前页] </a>");
- out.print("<a href='adminlyb.jsp?page=" + (intPage+1) +"'>[后页] </a>");
- out.print("<a href='adminlyb.jsp?page=" + ((totalRecord+PageNumbers)/PageNumbers) + "'>[尾页]</a>");
- }
- if(intPage ==((totalRecord+PageNumbers)/PageNumbers))
- out.print("<a href='adminlyb.jsp?page=" + (intPage-1) + "'>[前页] </a>");
- if(intPage == 1)
- {
- out.print("<a href='adminlyb.jsp?page=" + (intPage+1) +"'>[后页] </a>");
- out.print("<a href='adminlyb.jsp?page=" + ((totalRecord+PageNumbers)/PageNumbers) + "'>[尾页]</a>");
- }
- %>
- 页次:<%=currentPage%>/<%=(totalRecord+PageNumbers)/PageNumbers%> <%=PageNumbers%>篇/页</span></td>
- </tr>
- <tr>
- <td></td>
- </tr>
- <tr>
- <td>
- <%String strSQL = "select mesid ,stuname ,mescontent from message order by mesid desc ";
- ResultSet rs = sts.executeQuery(strSQL);
- int i=0;
- int tmpid;
- while(rs.next())
- {
- if(i >= (intPage-1)*PageNumbers && i < intPage*PageNumbers)
- {
- String stuname = rs.getString("stuname");
- String mescontent = rs.getString("mescontent");
- tmpid =rs.getInt("mesid");
- out.print(stuname);%>同学:
- <br><%//out.print(mescontent);
- int tmp =0;
- for ( int j=0 ; j < mescontent.length();j++)
- {
- if (mescontent.charAt(j)=='n'||j==mescontent.length()-1)
- {out.print(" ");
- out.print(mescontent.substring(tmp,j+1));
- out.print("<br>");
- tmp = j+1;
- }}
- %><%out.print(" <a href='adminlyb2.jsp?delpage=" +tmpid + "'>删除</a>");%><br><br><%
- //out.print("<TD>□ <a href="wz.jsp?id="+id+"">" + title + " (" + time + ")" + "</a></td><td></td></tr>");
- }
- i++;
- }
- %>
- <br></td>
- </tr>
- </table>
- </div></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </TD>
- <TD ROWSPAN=2> <IMG SRC="images/temp_07.jpg" WIDTH=5 HEIGHT=455></TD>
- </TR>
- <TR>
- <TD>
- <table width="231" border="0" cellspacing="0" cellpadding="0" height="229" background="images/left_bottom.jpg">
- <tr>
- <td width="231" height="222" valign="top"><div align="center">
- <p><font color="#2DFFFF" size="5"> </font></p>
- <table width="200" border="1">
- <tr>
- <td><div align="center"><a href="admincourse.jsp">【课程分配】</a></div></td>
- </tr>
- <tr>
- <td><div align="center"><a href="adminscore.jsp">【成绩录入】</a></div></td>
- </tr>
- </table>
- <br>
- <br>
- <table width="200" border="0">
- <tr>
- <td><div align="center">查看留言</div></td>
- </tr>
- </table>
- <p align="center"><br>
- <a href="index1.htm" class="ccc">[退出系统]</a></p>
- </div>
- </td>
- </tr>
- </table>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN=8> <IMG SRC="images/temp_09.jpg" WIDTH=750 HEIGHT=5></TD>
- </TR>
- <TR>
- <TD COLSPAN=8> <img src="images/temp_10.jpg" width=752 height=20></TD>
- </TR>
- </TABLE>
- </BODY>
- </HTML>