?? search.asp
字號(hào):
<!--#include file="conn.asp"-->
<!--#include file="UBBencode.ini"-->
<!--#include file="textencode.ini"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<%
strSql="Select blogTitle From config"
Set rs=db.Execute(strSql)
%>
<title><%response.Write rs("blogTitle")%></title>
<%
rs.close
set rs=nothing
%>
<style type="text/css">
a.index:hover{
color:#333333;
text-decoration:none;
}
a.index:link{
color:#666666;
text-decoration:underline;
}
a.index:visited{
color:#333333;
text-decoration:none;
}
</style>
<script language="javascript" type="text/javascript">
function check1()
{
if (document.form1.keyword.value=="")
{
alert("請(qǐng)輸入關(guān)鍵字!");
}
return false;
}
</script>
<link href="blog.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
dim page_no
'page_no=request.QueryString("page_no"))
if request.QueryString("page_no")="" then
page_no=1
else
page_no=cint(request.QueryString("page_no"))
end if
%>
<div id="all">
<table border="1" bgcolor="#999999" width="100%" height="100%">
<tr>
<td bgcolor="#E7E7E7">
<!--#include file="top.asp"-->
<div id="left-bg">
<div id="body-top"><a href="index.asp" class="index">首頁</a>-->搜索結(jié)果</div>
<div id="left-title">搜索關(guān)鍵字。包含在以下的主題里</div>
<div id="left-body-content">
<%
dim keyword,flag
flag=1
keyword=request.form("keyword")
'if keyword="" then
'response.write "<script>alert('師兄不能為空哦!');history.back();</dscript>"
'else
'dim rs,strsql
set rs=server.createobject("adodb.recordset")
strsql="select * from article where body like '%"&keyword&"%' or title like '%"&keyword&"%'order by subdate desc"
rs.open strsql,db,1
if not rs.eof and not rs.bof then
rs.pagesize=20
dim page_total
page_total=rs.pagecount
articleRs.absolutepage=page_no
dim i
i=20
%>
<ul>
<%
do while not rs.eof and i>0
i=i-1
flag=0
%>
<li>
<a href="show_article.asp?articleid=<%=rs("articleid")%>" target="_blank" class="index"><%=replace(rs("title"),keyword,"<font color='red'>"&keyword&"</font>")%></a> </li>
<%
rs.movenext
loop
end if
%>
</ul>
<%
if flag=1 then
%>
<font color="#FF0000">沒得你要的結(jié)果</font>
<%end if
'end if%>
</div>
<div id="page">
<%
dim numpre,numnext
numpre=page_no-1
numnext=page_no+1
response.write " <a href='search.asp?page_no=1' class='page'>首頁</a>"
if numpre=0 then
response.write " 上一頁"
else
response.write " <a href='search.asp?page_no="&numpre&"' class='page'>上一頁</a>"
end if
if numnext>page_total then
response.write " 下一頁"
else
response.write " <a href='search.asp?page_no="&numnext&"' class='page'>下一頁</a>"
end if
response.write " <a href='search.asp?page_no="&page_total&"' class='page'>尾頁</a>"
%>
<%
response.write " 現(xiàn)在是第 <font color='red'>"&page_no&"</font> 頁,"
response.write " 共有 "&page_total&" 頁,"
%>
</div>
</div>
<!--#include file="right.asp"-->
<div id="bottom">文章可以任意轉(zhuǎn)載,只要注明出處就行了!這里也有轉(zhuǎn)載的一些精華!Copyright © MSMAX All Rights Reserved<br />
QQ:<a href="qq.html" target="_blank">278274384</a> Email:<a href="mailto:wangjinbo589@gmail.com">wangjinbo589@gmail.com </a><br />
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -