?? search.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" %>
<html>
<head>
<title>重慶杰諾軟件留言本</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/style" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.gl {
padding: 5px;
}
-->
</style>
</head>
<jsp:useBean id="guestbook" class="guestbook.GuestBookJdbc" scope="page"/>
<body bgcolor="#EBEBEB">
<%
{
=========================================================
重慶杰諾軟件開發研究所開發制作
(http://www.cnkami.com)
誠信,創新,你的最好選擇。。。。。。。。。。。
==========================================================
解壓密碼:www.cnkami.com
==========================================================
****************************************************
* 杰諾供求信息發布系統 v1.5 *
1. 本系統運行環境:
WINW2000+IIS+jdk1.4+odbc
由于本系統采用jsp寫成,所以要求服務器支持jsp
數據庫采用ACCESS庫,要求服務器具有ACCESS的驅動程序,
ADO版本要求2.5以上,
實際上,新裝好的WINDOWS SERVER+IIS+SP3就可以很好的運行本系統
本系統做有些修改時需要修改服務器上的文件,所以要求在服務器上有寫文件的權限.
2. 系統默認狀態下有一個系統管理員,用戶名admin,密碼admin.
3. 本程序商業版:商業用戶:50元
4. 商業版在重寫了系統核心以后新增了一些功能,界面美化,如果企業用戶可提供更加人性化的修改!
5. 如果你使用本系統,請到http://www.cnkami.com/guestbook/留言,發表自已的看法,謝謝!
6. 如有其它要求請與系統作者聯系。
7. 系統作者為可以為客戶提供各類大型網站系統,OA系統,數據處理系統等。
8. 系統作者優惠為客戶提供網站制作業務,為了讓這套系統能發展更好,為了給朋友們寫出更多,更好的程序,請大家支持作者。多給作者介紹一些商業客戶,不勝感激。
9.使用之前請先配置odbc 名稱為:faqaccess;
請保留版權信息!謝謝!請支持作者的工作,!謝謝!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
有意請聯系!:
QQ:1801099
QQ:171476439
郵件:flycomesoho@hotmail.com
電話:63700285 13608336048
如轉載,請不要刪除此信息!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
}%>
<table width="771" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#000000">
<tr >
<td height="23" align="center" background="images/table.gif"><strong><font color="#FFFFFF">杰諾軟件開發jsp+javabean留言本</font></strong></td>
</tr>
<tr>
<td height="56" align="center" bgcolor="#FFFFFF"><a href="add.jsp"><img src="images/new.jpg" width="50" height="49" border="0"></a>
<a href="index.jsp"><img src="images/read.jpg" width="50" height="49" border="0"></a> <a href="http://www.cnkami.com"><img src="images/home.jpg" width="50" height="49" border="0"></a>
<a href="mailto:soho_suport@163.com"><img src="images/email.jpg" width="50" height="49" border="0"></a>
<a href="update.jsp"><img src="images/uuser.jpg" width="50" height="49" border="0"></a> </td>
</tr>
<tr>
<td height="33" align="center" bgcolor="#FFFFFF"><form name="form1" method="post" action="/guestbook/search.jsp">
<input name="keyword" type="text" id="keyword">
<input type="submit" name="Submit" value="查詢">
</form></td>
</tr>
</table>
<br>
<%String keyword=request.getParameter("keyword");
Connection Conn=guestbook.GetConn();
Statement stmt=Conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE,java.sql.ResultSet.CONCUR_READ_ONLY);
String sql="select * from Guestbook where content like '%"+keyword+"%' or recontent like '%"+keyword+"%' order by id DESC";
ResultSet Rs=stmt.executeQuery(sql);
int intPageSize; //一頁顯示的記錄數
int intRowCount; //記錄總數
int intPageCount; //總頁數
int intPage; //待顯示頁碼
String strPage;
int i;
//設置一頁顯示的記錄數
intPageSize = 6;
//取得待顯示頁碼
strPage = request.getParameter("page");
if(strPage==null){//表明在QueryString中沒有page這一個參數,此時顯示第一頁數據
intPage = 1;
} else{//將字符串轉換成整型
intPage = java.lang.Integer.parseInt(strPage);
if(intPage< 1) intPage = 1;
}
//獲取記錄總數
Rs.last();
intRowCount = Rs.getRow();
//記算總頁數
intPageCount = (intRowCount+intPageSize-1) / intPageSize;
//調整待顯示的頁碼
if(intPage >intPageCount) intPage = intPageCount;
if(intPageCount >0){
//將記錄指針定位到待顯示頁的第一條記錄上
Rs.absolute((intPage-1) * intPageSize+1);
//顯示數據
i = 0;
while(i< intPageSize && !Rs.isAfterLast()){
int id=Rs.getInt("id");
String username=Rs.getString("username");
String tx=Rs.getString("tx");
String email=Rs.getString("email");
String sex=Rs.getString("sex");
String url=Rs.getString("url");
String qq=Rs.getString("qq");
String content=Rs.getString("content");
String ip=Rs.getString("ip");
String recontent=Rs.getString("recontent");
%>
<table width="771" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr bgcolor="#FFFFFF">
<td width="181" height="42" rowspan="3" align="center"><img src="<%=tx%>"><br>
<br>
網友性別:<%=sex%> <br>
網友大名:<%=username%><br>
騰訊OICQ :<%=qq%></td>
<td colspan="4" align="left" valign="top" class="gl">留言內容:
<%
if(content!="")
{
out.print(content);
}%>
</td>
</tr>
<%
if(recontent!=null)
{%>
<tr>
<td colspan="4" bgcolor="#FFFFFF" class="gl">回復內容:
<%out.print(recontent);%>
</td>
</tr> <%}%>
<tr>
<td width="157" height="19" align="center" bgcolor="#F7F7F7"><a href="<%=url%>">主頁</a>
</td>
<td width="139" height="19" align="center" bgcolor="#F7F7F7"><a href="mailto:<%=email%>">郵件</a>
</td>
<td width="139" height="19" align="center" bgcolor="#F7F7F7"><a href="reinfo.jsp?id=<%=id%>">回復</a></td>
<td width="143" height="19" align="center" bgcolor="#F7F7F7"><a href="del.jsp?id=<%=id%>">刪除</a></td>
</tr>
</table>
<br>
<%
Rs.next();
i++;
}
%>
<br>
<table width="776" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td height="22" align="center" bgcolor="#FFFFFF">第<%=intPage%>頁 共<%=intRowCount%>條記錄/共<%=intPageCount%>頁
<%
if(intPage<2){
out.print("首頁 | 上一頁");
}else{%>
<a href="search.jsp">首頁 </a> | <a href="search.jsp?page=<%=intPage-1%>">上一頁</a>
<%}%> |
<%
if((intPageCount-intPage)<1)
{
out.print("下一頁 | 尾頁");
}else{%>
<a href="search.jsp?page=<%=intPage+1%>">下一頁</a> | <a href="search.jsp?page=<%=intPageCount%>">尾頁</a>
<%}
}
else{
out.print("<center><table width=776 border=0 align=center cellpadding=0 cellspacing=1 bgcolor=#000000><tr><td bgcolor=#FFFFFF><center>目前還沒有你查找內容!</center></td></tr></table></centre>");
}%>
</td>
</tr>
</table>
<br>
<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="center">CopyRight 2003-2005 © 重慶杰諾軟件版權所有 </td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -