📄 search.asp
字号:
<!--#include file="conn.asp"-->
<%
dim rs,classid,pid,keyword
pid=0
pname="作品展示"
keyword=trim(request("keyword"))
classid=pid
set rs=conn.execute("select top 1 name,title,keywords,Description from data_class where name<>'' and id="&classid&" ")
if not rs.eof then
name_p=rs("name")
title_p=rs("name")
if rs("title")<>"" then
title_p=rs("title")
end if
keywords_p=rs("keywords")
Description_p=rs("Description")
else
name_p=pname
title_p=pname
end if
rs.close
set rs=nothing
%>
<!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=utf-8" />
<title><%=keyword&" "%> <%=title_p%>-<%=websitename%></title>
<%
if keywords_p<>"" then
response.write("<meta name=""keywords"" content="""&keywords_p&""" />" & vbcrlf)
end if
if Description_p<>"" then
response.write("<meta name=""Description"" content="""&Description_p&""" />" & vbcrlf)
end if
%><script src="inc/functions.js" type="text/javascript"></script>
<link href="images/style.css" rel="stylesheet" type="text/css" />
</head>
<body class="product">
<div id="page">
<!--#include file="top.asp"-->
<div id="body">
<div id="left">
<%
str_products=","&get_pids(classid)&","
%>
<!--#include file="left.asp"-->
</div>
<div id="right">
<div id="list_product">
<div class="title"><span class="t"><span><h1><%=name_p%></h1></span></span></div>
<%
sql_where=keyword_sousuo("item,content",keyword)
set rs=server.CreateObject("adodb.recordset")
if classid<>"" then
rs.open "select * from data_Product where item<>'' and classid in ("&get_sids(classid)&") and display=1 and "&sql_where&" order by updatetime desc,id desc",conn,1,2
else
rs.open "select * from data_Product where item<>'' and display=1 and "&sql_where&" order by updatetime desc,id desc",conn,1,2
end if
if not rs.eof then
PageSize=20
rs.PageSize=PageSize
recordcount=rs.recordcount
pagecount=rs.pagecount
'获得当前页码
if request("page") = "" then
page = 1
else
page = cint(request("page"))
if page > pagecount then page=pagecount
end if
rs.AbsolutePage=page
response.Write("<div class=""content"" >")
response.Write(" <ul>")
for i=1 to rs.PageSize
if (i-1) mod 5=0 then
response.write("<li class=""first"">" & vbcrlf)
else
response.write("<li>" & vbcrlf)
end if
response.write("<div class=""box"" >" & vbcrlf)
response.write("<a href=""product.asp?id="&rs("id")&""" target=""_blank""><img src="""&rs("img_s")&""" alt="""&rs("item")&""" border=""0"" align=""absmiddle"" width="""&c_product_width_s&""" height="""&c_product_height_s&""" onload=""ResizeImage(this, "&c_product_width_s&", "&c_product_height_s&");"" ></a></div>" & vbcrlf)
response.write(" <div class=""txt""><h2><a href=""product.asp?id="&rs("id")&""" target=""_blank"">"&keyword_tag(strleft(rs("item"),16,".."),keyword)&"</a></h2></div>" & vbcrlf)
response.write(" </li>" & vbcrlf)
rs.movenext
if rs.eof then exit for
next
response.Write("</ul>")
response.Write("<div class=""page"">共"&recordcount&"个产品 ")
call showpage_fun(pagecount,page,4)
response.Write("</div>")
response.Write("</div>")
else
response.Write("<div class=""content"" >无信息</div>")
end if
rs.close
set rs=nothing
%>
</div>
</div>
<div class="clear"></div>
</div>
<!--#include file="bottom.asp"-->
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -