?? index.jsp
字號:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ntsky.persistence.*" %>
<jsp:useBean id="guest" scope="page" class="com.ntsky.news.note.Guest"/>
<jsp:useBean id="Pagination" class="com.ntsky.common.Pagination"/>
<%-- 分頁 --%>
<%
int curPages = Pagination.curPages(Pagination.strPage(request,"page"));
Pagination.setRows(5);//每頁顯示5條
int totalPages = Pagination.getPages(guest.sumNote());//取出總頁數
%>
<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">
<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"><a href="www.ntsky.com"><font color="#FFFFFF">進入</font></a><font color="#FFFFFF"><a href="http://www.ntsky.com"><font color="#FFFFFF">文章發布</font></a>
<a href="login.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>
<tr>
<td width=11 background="images/middle_left.gif"> </td>
<td width=608 align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; margin-top:1; margin-bottom:1" bordercolor="#111111" width="90%" id="AutoNumber9" height="25">
<tr>
<td width="100%" height="25"> <p align="right"><a href="add.jsp">
<img border="0" src="images/post.gif" width="99" height="25"></a></td>
</tr>
</table>
<%if(guest.sumNote()==0){%>
對不起,還沒有數據!
<%}else{%>
<table border="2" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#99BB99" width="90%" id="AutoNumber1" height="186">
<%
Iterator rs = Pagination.getPageSetNote(guest.listNote(),curPages);
//Iterator rs = Pagination.getPageSet(guest.listNote(),curPages);
int i=1;//變量獲得每頁顯示的條數
while(rs.hasNext()){
NOTEGuest tableGuest = (NOTEGuest)rs.next();
%>
<tr>
<td width="100%">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="542" id="AutoNumber2">
<tr>
<td width="129"align="center">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="81%" id="AutoNumber3" height="139">
<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"><%=tableGuest.getUserName()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="110">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="109">
<tr>
<td width="100%" height="109">
<p align="center"><img src="<%=tableGuest.getImage()%>" width="84" height="95"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="1" height="10" 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="166">
<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">
留言主題:<%=tableGuest.getHeadTitle()%></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">:日期 <%=tableGuest.getNoteTime()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="56" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="word-break:break-all" bordercolor="#111111" width="100%" height="56">
<tr>
<td width="100%" height="56" align="left" valign="top">
<table width="360" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="18"> <%=tableGuest.getContent()%></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<%
if(guest.isReply(tableGuest.getNoteId())){
%>
<tr>
<td width="100%" height="13" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="18">
<%
Iterator rs_reply = guest.listReply(tableGuest.getNoteId());
while(rs_reply.hasNext()){
NOTEReply tableReply = (NOTEReply)rs_reply.next();
%>
<tr>
<td width="61%" height="18"> <font color="#FF6600"><%=tableReply.getContent()%></font></td>
<td width="39%"><font color="#99BB99">回復時間:<%=tableReply.getReplyTime()%></font></td>
</tr>
<%}%>
</table></td>
</tr>
<%}%>
<tr>
<td width="100%" height="18"> <a href="<%=tableGuest.getUrl()%>" target="_blank"><img border="0" src="images/homepage.gif" width="45" height="16" alt="<%=tableGuest.getUrl()%>"></a> <a href="mailto:<%=tableGuest.getEmail()%>"><img border="0" src="images/email.gif" width="45" height="16" alt="<%=tableGuest.getEmail()%>"></a>
<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=tableGuest.getQq()%>" target="_blank"><img src="images/oicq.gif" width="45" height="16" alt="<%=tableGuest.getQq()%>" border="0" ></a>
<img border="0" src="images/delete.gif" width="45" height="16"> <img border="0" src="images/reply.gif" width="45" height="16">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="129" height="18" 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"> <%=guest.sexStr(tableGuest.getSex())%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="129" height="14" align="center" valign="top"> </td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<%
i=i+1;
if(i>5)
break;
}
%>
</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">
<tr>
<td width="76%" height="29" valign="middle">
<p align="right">
第<%=curPages%>頁 共<%=totalPages%>頁
<%if(curPages>1){%>
<a href="index.jsp?page=<%=curPages-1%>">上一頁</a>
<%}%>
<%if(curPages<totalPages){%>
<a href="index.jsp?page=<%=curPages+1%>">下一頁</a>
<%}%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
</td>
<td width=11 background="images/middle_left.gif" height=302> </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:lovehere2@163.net"><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 + -