📄 fashion.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030"%>
<%@ page import="java.sql.*" errorPage="" %>
<jsp:useBean id="connBean" scope="page" class="JavaBean.connDB"/>
<%
ResultSet rs = connBean.executeQuery("SELECT * FROM fashion");
%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<table width="190" height="34" border="0" align="center" bgcolor="#CC99FF">
<tr>
<td align="left" valign="bottom"><h1><span class="STYLE1">Freedom</span></h1>
<p> welcome to my forum </p></td>
</tr>
</table>
<table width="482" height="34" border="0" align="right" bgcolor="#999999">
<tr>
<td width="28" height="22" bgcolor="#CCCCCC"></td>
<td width="33" bgcolor="#CCCC99"><div align="center" class="STYLE1"><a href="HomePage.jsp">主页</a></div></td>
<td width="33" align="center" valign="middle" bgcolor="#999999"><div align="center" class="STYLE1"><a href="PersonalFile.jsp">资料</a></div></td>
<td width="33" align="center" valign="middle" bgcolor="#CCCCCC"><div align="center" class="STYLE1"><a href="myForum.jsp">论坛</a></div></td>
<td width="33" align="center" valign="middle" bgcolor="#CCFF99"><div align="center" class="STYLE1"><a href="help.jsp">帮助</a></div></td>
<td width="47" align="center" valign="middle"><div align="center" class="STYLE1"><a href="LoginOut.jsp">退出</a></div></td>
</tr>
</table>
<p> </p>
<table width="594" height="1" border="0" bgcolor="#000000">
<tr>
<td width="558"> </td>
</tr>
</table>
<table width="484" border="0" align="right" bgcolor="#FFCC66">
<tr>
<td width="596" height="23"> <p>
<label>
<select name="SearchSelect" size="1">
<option selected="selected" value="http://www.google.com/search?h1=zh-CN&q=">google</option>
<option value="http://page.zhongsou.com/zspage.cgi?dt=1&word=">中国搜索</option>
<option value="http://e.pku.edu.cn/cgi-bin/allsearch?cdtype=GB&word=">北大天网</option>
<option value="http://www.baidu.com/s?wd=">百度搜索</option>
<option value="http://search.sina.com.cn/cgi-bin/search/search.cgi/_searchkey=">新浪网</option>
<option value="http://nisearch163.com/search.;php?q=">网易搜索</option>
<option value="http://www.tom.com/search.php?word=">TOM搜索</option>
<option value="http://www.sohu.com/web?query=">搜狐</option>
<option value="http://search.21cn.com/result.php?word=">21CN搜索</option>
</select>
</label>
<label>
<input name="SearchText" type="text" size="15" />
</label>
<label>
<input type="button" name="Submit" value="搜索" onclick="window.open(SearchSelect.value+SearchText.value)"/>
</label> </p></td>
</tr>
</table>
<form id="form1" name="form1" method="post" action="">
<%
String str = (String)request.getParameter("page");
if(str == null) str="0";
int RecordCount=0,MaxPage=0,Pagesize=5;
rs.last();
RecordCount = rs.getRow();
MaxPage = (RecordCount%Pagesize==0)?(RecordCount/Pagesize):(RecordCount/Pagesize+1);
int Page=0;
page = Integer.getInteger(str);
if(Page<1) page=1;
else{
if(((Page-1)*Pagesize+1)>RecordCount)
Page = MaxPage;
}
rs.absolute((Page-1)*Pagesize+1);
for(int i=1;i<=Pagesize;i++){%>
<table width="611" height="198" border="0" bgcolor="#CCFFCC">
<tr>
<td width="605">所有论坛>主题:</td>
</tr>
<tr>
<td>所检索到信息量为:<%=rs.getString("ID")%></td>
</tr>
<tr>
<td> <%=rs.getString("topic") %></td>
<td><%=rs.getString("author")%></td>
</tr>
<tr>
<td> <%=rs.getString("content") %></td>
</tr>
<%}%>
</table>
<%
try{
if(!rs.next()) break;
}catch(Exception e){}
%>
<table>
<tr>
<td>当前的页数为:[<%=Page%>/<%=MaxPage%>]
<%if(Page >1){%><a href="software.jsp?page=1">第一页</a><a href="software.jsp?page=<%=page-1 %>">上一页</a>
<%}if(Page < MaxPage){ %>
<a href="software.jsp?page=<%=page+1 %>">下一页</a><a href="software.jsp?page=MaxPage">最后一页</a>
<%} %>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -