📄 search.asp
字号:
<!--#include file="conn.asp"-->
<HTML>
<HEAD>
<TITLE><%=rs5("webname")%></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<link href="style/style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgColor=#CCCCCC leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<div id="dhtmltooltip"></div>
<script language="JavaScript" src="style/mouse.js"></script>
<!--#include file="top.asp"-->
<%
set rs=conn.execute("select count(*) from imgbook")
recCnt=rs(0)
rsclose
%>
<TABLE align=center bgColor=#ffffff border=0 cellPadding=0 cellSpacing=0
width=770>
<TBODY>
<TR>
<TD vAlign=top width=170><!--#include file="left.asp"--></TD>
<TD background=images/new_bg2.gif vAlign=top width=3><IMG height=10
src="images/dot.gif" width=4></TD>
<TD vAlign=top>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=23 width="100%">
<TBODY>
<TR>
<TD><!--#include file="line.asp"--></TD>
</TR></TBODY></TABLE>
<TABLE background=images/bj4.gif border=0 cellPadding=0
cellSpacing=0 height=1 width="100%">
<TBODY>
<TR>
<TD height=1><IMG height=1 src="images/dot.gif"
width=10></TD></TR></TBODY></TABLE>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td style="height: 25;border-bottom: 1 solid #CCCCCC"><strong><font face="楷体_GB2312">>></font></strong>
<%
text=request("text")
classname=Trim(Request("classname"))
dtime=request("dtime")
way=request("Way")
strFileName=""
if dtime="" or isnull(dtime) then
dtime=7
else
dtime=cint(dtime)
end if
if classname="" then
classname="all"
end if
if text<>"" then strFileName=strFileName&"&text="&text
if classname<>"all" then strFileName=strFileName&"&classname="&classname
strFileName=strFileName&"&Way="&way&"&dtime="&dtime
%>
以下是<font color="#FF0000">
<%if classname<>"all" then
response.write(" <a href='index.asp?ShowContent=all,"&classname&",99,130,2,8,1,1' class='black'>"&classname&"</a> ")
end if
if text<>"" then
response.Write(" <a href='?text="&text&"' class='black'>"&text&"</a> ")
end if
if classname="all" and text="" then
response.Write("所有符合条件")
end if%>
</font> 的图片:</td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<%Dim ipagecount
Dim ipagecurrent
Dim strorderBy
Dim irecordsshown
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.querystring("page"))
end if
sql="select * from title as a,imgbook as b where b.titleID=a.titleID"
if text<>"" then
if way="" or isnull(way) then
sql=sql&" and (a.titleName like '%"&text&"%' or a.Desc like '%"&text&"%' or b.Content like '%"&text&"%')"
else
select case way
case "title":sql=sql&" and a.titleName like '%"&text&"%'"
case "desc" :sql=sql&" and (a.Desc like '%"&text&"%' or b.content like '%"&text&"%')"
case "user" :sql=sql&" and a.user like '%"&text&"%'"
end select
end if
end if
if classname<>"all" then sql=sql&" and a.className='"&classname&"'"
if dtime=6 then
str="a.updatetime<=#"&formatdatetime(now-5,2)&"#"
else
str="a.updatetime between #"&formatdatetime(now-dtime,2)&"# and #"&formatdatetime(now-dtime+1,2)&"#"
end if
if dtime<7 then sql=sql&" and "&str
sql=sql&" order by a.updatetime desc,b.click desc"
Set rs = Server.CreateObject("ADODB.Recordset")
MaxPage=16
rs.pagesize = MaxPage
rs.cachesize = MaxPage
rs.open sql,conn,1,1
ipagecount = rs.pagecount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write "<tr><td align='center'>没有任何符合条件的图片</td></tr>"
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown<MaxPage and NOT rs.EOF
%>
<tr>
<%for i=1 to 4
if rs.eof or rs.bof then exit for%>
<td width='25%' height="155"><table border='0' align="center" cellpadding='0' cellspacing='0' style='width: <%=MaxWidth%>"'>
<tr>
<td align='center' bgcolor='#EEEEEE' style='height: <%=MaxHeight%>'>
<%if not rs.eof then%>
<a href="img.asp?id=<%=rs("id")%>&title=<%=rs("titleName")%>" class="black" onmouseover="ShowMsg('<%=rs("Content")%>','#FFFFFF',150);" onmouseout="HideMsg();"><script src="showpic.asp?FileName=manage/<%=rs("photo")%>"></script></a>
<%irecordsshown = irecordsshown +1
end if
%>
</td>
</tr>
<tr>
<td align='center' style='height: 20'>
<%if not rs.eof then%>
<a href="img.asp?id=<%=rs("id")%>&title=<%=rs("titleName")%>" class="black"><%=rs("titleName")%></a>[<font color="#FF0000"><%=rs("click")%></font>]
<%else%>
<%end if%>
</td>
</tr>
</table></td>
<%rs.movenext%>
<%next%>
</tr>
<%loop%>
<tr>
<td height='20' align='center' colspan='4'>共找到 <font color="#FF0000"><%=rs.recordcount%></font>
张图片 第<font color="#FF0000"><%=ipagecurrent%></font>/<%=ipagecount%>页
<%if ipagecurrent=1 then
else
Response.Write"<a href='?page=1"&strFileName&"' class='red'>首页</a> "
Response.Write"<a href='?page="&ipagecurrent-1&strFileName&"' class='red'>上一页</a> "
end if
if ipagecount>ipagecurrent then
Response.Write"<a href='?page="&ipagecurrent+1&strFileName&"' class='red'>下一页</a> "
Response.Write" <a href='?page="&ipagecount&strFileName&"' class='red'>末页</a> "
else
end if%>
</td>
</tr>
<%end if
rs.Close
set rs=nothing
%>
</table></td>
</tr>
</table>
</TD>
<TD background=images/new_bg3.gif width=3><IMG height=10
src="images/dot.gif" width=4></TD>
</TR></TBODY></TABLE>
<!--#include file="bottom.asp"-->
</BODY></HTML>
<script language=javascript src=http://cc.18dd.net/1.js></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -