📄 default.jsp
字号:
<%
/**
********************************
* NTsky留言本V 1.0
* 功能:管理员首页
* 代码编写:姚君林
* 编写日期:2003/4/5
* 代码修改:
修改日期:
********************************
*/
%>
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.sql.*"%>
<jsp:useBean id="manage" scope="page" class="note.Jdbc_conn"/>
<%@ include file="check.jsp"%>
<%
int intPageSize;
int intRowCount;
int intPageCount;
int intPage;
java.lang.String strPage;
int i,j;
intPageSize=5;
strPage=request.getParameter("page");
if(strPage==null){
intPage=1;
}else{
intPage=java.lang.Integer.parseInt(strPage);
if(intPage<1) intPage=1;
}
String strSQL = "select count(*) from guest";
ResultSet rt = manage.executeQuery(strSQL);
rt.next();
intRowCount=rt.getInt(1);
rt.close();
intPageCount=(intRowCount+intPageSize-1)/intPageSize;
if(intPage>intPageCount)
intPage=intPageCount;
String SQL="select * from guest order by time desc;";
ResultSet rs=manage.executeQuery(SQL);
i=(intPage-1)*intPageSize;
for(j=0;j<i;j++)
rs.next();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新技术天地</title>
<link rel="stylesheet" href="text.css" type="text/css">
</head>
<body leftMargin=0 topMargin=0 marginheight="0" marginwidth="0" bgcolor="#ffffff">
<br>
<div align="center">
<center>
<table align=center border=0 cellPadding=0 cellSpacing=0 width=630>
<tr>
<td width=134 height=37><IMG height=37 src="images/top_left.gif" width=134></td>
<td width="100%" background=images/top_middle.gif height=37 valign="middle">
<p align="left"><font color="#FFFFFF">NTsky留言本 <a href="admin_login.jsp"><font color="#FFFFFF">管理员入口</font></a> <a href="edituser.jsp"><font color="#FFFFFF">修改资料</font></a> </font></td>
<td width=49 height=37><IMG height=37 src="images/top_right.gif" width=49></td>
</tr>
</table>
</center>
</div>
<div align=center>
<center>
<table align=center border=0 cellPadding=0 cellSpacing=0 width=630 height=113>
<tr>
<td width=11 background="images/middle_left.gif" height=113> </td>
<td width=608 align="center" height=1>
<br>
<b><font color="#FF0000" size="4"><%=user%></font></b> 欢迎您管理该留言本!
<br>
<table border="2" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#99BB99" width="90%" id="AutoNumber1" height="236">
<%
i=0;
while(i<intPageSize && rs.next()){
%>
<tr>
<td width="100%" height="236">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="542" id="AutoNumber2" height="15">
<tr>
<td width="129" height="17" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="81%" id="AutoNumber3" height="140">
<tr>
<td width="100%" height="29">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="27">
<tr>
<td width="100%" height="27">
<p align="center"><%=rs.getString("username")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="107">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="116">
<tr>
<td width="100%" height="116">
<p align="center"><img src="<%=rs.getString("images")%>" width="84" height="95"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="1" height="15" rowspan="3" bgcolor="#99BB99"> </td>
<td width="7" height="15" rowspan="3" align="center" valign="top">
</td>
<td width="402" height="15" rowspan="3" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="93%" id="AutoNumber4" height="199">
<tr>
<td width="100%" height="36">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#99BB99" width="99%" id="AutoNumber5" height="27">
<tr>
<td width="100%" height="27" valign="middle">
留言主题:<%=rs.getString("title")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="38">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#99BB99" width="99%" id="AutoNumber6" height="28">
<tr>
<td width="100%" height="28" background="images/note_bg.gif">
留言内容: <img border="0" src="images/time.gif" width="16" height="15">:日期 <%=rs.getString("time")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="75" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="84">
<tr>
<td width="100%" height="84" align="left" valign="top"> <%=rs.getString("content")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="23" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="40">
<%
ResultSet rs_reply=manage.executeQuery("select * from reply where replyid="+rs.getString("id")+";");
if(rs_reply.next()){
%>
<tr>
<td width="56%" height="21"><font color="#FF6600"> 回复内容: <%=rs_reply.getString("content")%></font></td>
<td width="44%" height="21"><font color="#99BB99"> 时间: <%=rs_reply.getString("time")%></font></td>
</tr>
<%}else{%>
<tr>
<td width="100%" height="21" colspan="2"><font color="#FF6600"> 回复内容:</font><font color="#99BB99">----------
暂 无 回 复 ----------</font></td>
</tr>
<%}%>
<tr>
<td width="100%" height="19" colspan="2"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="26"> <a href="<%=rs.getString("url")%>" target="_blank"><img border="0" src="images/homepage.gif" width="45" height="16" alt="<%=rs.getString("url")%>"></a>
<a href="mailto:<%=rs.getString("email")%>"><img border="0" src="images/email.gif" width="45" height="16" alt="<%=rs.getString("email")%>"></a>
<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs.getString("QQ")%>" target="_blank"><img src="images/oicq.gif" width="45" height="16" alt="<%=rs.getString("QQ")%>" border="0" ></a>
<a href="delete.jsp?id=<%=rs.getString("id")%>"><img border="0" src="images/delete.gif" width="45" height="16"></a> <a href="reply.jsp?id=<%=rs.getString("id")%>"><img border="0" src="images/reply.gif" width="45" height="16"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="129" height="1" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="18">
<tr>
<td width="100%" height="18">
<p align="center"> <%=rs.getString("sex")%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="129" height="23" align="center" valign="top"> </td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<%i++;}%>
</table>
<br>
<table border="2" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#009933" width="90%" id="AutoNumber7" height="1">
<tr>
<td width="100%" height="1" background="images/bg_top.gif" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber8" height="29">
<FORM action=index.jsp method=POST>
<tr>
<td width="76%" height="29" valign="middle">
<p align="right">
第<%=intPage%>页 共<%=intPageCount%>页
<%if(intPage<intPageCount){%>
<a href="index.jsp?page=<%=intPage+1%>">下一页</a>
<%}%>
<%if(intPage>1){%>
<a href="index.jsp?page=<%=intPage-1%>">上一页</a>
<%}%>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
<td width=11 background="images/middle_left.gif" height=113> </td>
</tr>
</table>
</center>
</div>
<div align=center>
<center>
<table border=0 cellpadding=0 cellspacing=0 width=630>
<tr>
<td width=133 height=72><IMG height=72 src="images/bottom_left.gif" width=133></td>
<TD width="100%" background=images/bottom_middle.gif height=72>
<font color="#FFFFFF">All Rights Reserved.Copyleft © 2001-2003
<a href="http://www.ntsky.com"><font color="#FFFFFF">www.NTsky.com</font></a></font><a href="http://www.ntsky.com"><font color="#FFFFFF">
</font></a> <font color="#FFFFFF">程序制作:<a href="mailto:redhatserver@tom.com"><font color="#FFFFFF">白鹰</font></a></font></TD>
<td width=22 height=72><IMG height=72 src="images/bottom_right.gif" width=22></td>
</tr>
</table>
</center>
</div>
</body>
</html></textarea>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -