⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.asp

📁 汇集了1万种成语
💻 ASP
字号:
<!-- #include file="top.asp"-->
<center>
<%
dim totalcs,Currentpage,totalpages,i
fl1=request("fl1")
fl2=request("fl2")
if request("keyword")<>"" and request("select")<>"" then
sql="select * from pic where "&request("select")&" like '%"&request("keyword")&"%'"
elseif  request("keyword")<>"" and request("select")="all" then
sql="select * from pic where sg like '%"&request("keyword")&"%' or biaoti like '%"&request("keyword")&"%'"
else
response.redirect("index.asp")
end if
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
totalcs=rs.recordcount
%>
<%
perpage=50
if not rs.eof then
rs.movefirst
rs.pagesize=perpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   end if
else
   currentpage=1
end if
   if currentpage<>1 then
       if (currentpage-1)*perpage<totalcs then
	       rs.move(currentpage-1)*perpage
		   dim bookmark
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalcs mod perpage)=0 then
      totalpages=totalcs\perpage
   else
      totalpages=totalcs\perpage+1
   end if
i=0%>

<TABLE cellSpacing=0 cellPadding=0 width="777" align=center border=0 bgcolor=#EFFAFF>
<TBODY>
<form name="form1" method="post" action="search.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>">
<TR> 
<TD align=middle width="35%" height=25> 共[<font color="#FF6666"><%=totalcs%></font>]个作品 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle >
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=search.asp?page=1&select="&request("select")&"&keyword="&request("keyword")&">首页</a> "
response.write "<a href=search.asp?page="&CurrentPage-1&"&select="&request("select")&"&keyword="&request("keyword")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=search.asp?page="&CurrentPage+1&"&select="&request("select")&"&keyword="&request("keyword")&""
response.write ">下一页</a> <a href=search.asp?page="&totalpages&"&select="&request("select")&"&keyword="&request("keyword")&">尾页</a>"
end if
%>
</TD>
<TD align=middle width="25%">
<select name="page" class="lanyu">
<%
f=1
for f=1 to totalpages
if f=currentpage then
%>
<option value=<%=f%> selected>第<%=f%>页</option> 
<%else%>
<option value=<%=f%>>第<%=f%>页</option> 
<%end if
next%>
</select><input type="submit" name="Submit2" value="转向" class="button"> </TD>
</TR>
</FORM></table>
<table width="777"  bgColor=#ffffff border=1 borderColor=#cccccc cellPadding=0 
      cellSpacing=0 style="BORDER-COLLAPSE: collapse" >
        <TBODY>
<tr height="24" align="center" bgcolor="#aaaa33">
<td colspan="4" style="padding-left:10px;padding-right:10px">&nbsp;&nbsp;<font color=#ffffff><b>成语查询</b>&nbsp;&nbsp;&nbsp;&nbsp;<font color=#ffffff><b>本站需要大家帮忙宣传,请把本站地址(<font color=#ffffcf> www.mtv51.com </font>)发给你QQ上的5位好友!!</b></td>
</tr>

<%
do while not rs.eof and i<perpage
i=i+1
j=j+1
%> 

<tr height=24 align=center>
<td width=30% ><a  href=search.asp?select=sg&keyword=<%=rs("sg")%>><%=rs("sg")%></a></td>
<td width=25% align=left><a  href=javascript:cy('<%=rs("id")%>')><%=rs("biaoti")%></a></td>
<td width=25%  align=left><a  href=javascript:cy('<%=rs("id")%>')><%=left(rs("content"),12)%>....</a></td>
<td width=20% ><%=rs("hits")%></td></tr>

<%

rs.movenext
loop
else
if rs.eof and rs.bof then%>
            谢谢您的支持,当前还没这类作品
<%
end if
%>
<%end if%>
</table>
<TABLE cellSpacing=0 cellPadding=0 width="777" align=center border=0 bgcolor=#cfffcf>
<TBODY>
<form name="form1" method="post" action="search.asp?select=<%=request("select")%>&keyword=<%=request("keyword")%>">
<TR> 
<TD align=middle width="35%" height=25> 共[<font color="#FF6666"><%=totalcs%></font>]个作品 分[<font color="#FF6666"><%=totalpages%></font>]页</TD>
<TD width="40%" align=middle >
<%
if CurrentPage<2 then
response.write "<font color='999966'>首页 上一页</font> "
else
response.write "<a href=search.asp?page=1&select="&request("select")&"&keyword="&request("keyword")&">首页</a> "
response.write "<a href=search.asp?page="&CurrentPage-1&"&select="&request("select")&"&keyword="&request("keyword")&">上一页</a> "
end if
if totalpages-currentpage<1 then
response.write "<font color='999966'>下一页 尾页</font>"
else
response.write "<a href=search.asp?page="&CurrentPage+1&"&select="&request("select")&"&keyword="&request("keyword")&""
response.write ">下一页</a> <a href=search.asp?page="&totalpages&"&select="&request("select")&"&keyword="&request("keyword")&">尾页</a>"
end if
%>
</TD>
<TD align=middle width="25%">
<select name="page" class="lanyu">
<%
i=1
for i=1 to totalpages
if i=currentpage then
%>
<option value=<%=i%> selected>第<%=i%>页</option> 
<%else%>
<option value=<%=i%>>第<%=i%>页</option> 
<%end if
next%>
</select><input type="submit" name="Submit2" value="转向" class="button"> </TD>
</TR>
</FORM></table>
<%if request("id")<>"" then%>
<%set rs1=server.CreateObject("adodb.recordset")
	sql1="select * from pic where id="&request("id")&""
	rs1.open sql1,conn,1,1
if not rs1.bof and not rs1.eof then%>
<table><tr><td><%=rs1("shuzi")%></td><td align=center>
<%=rs1("biaoti")%></td></tr><tr>
<td colspan=2 align=center><%=rs1("content")%></td></tr></table>
<%end if%>
<%end if%>
</center>
<table width="777" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="2" bgcolor="#808080"></td>
  </tr>
  <tr>
    <td height="15" background="images/diandian.gif"><div align="center"></div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="738" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="170"><img src="images/end1.gif" width="170" height="60"></td>
        <td><table width="400" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="16"><div class="style6666"><a href="#"><span class="style6666" >关于我们</span></a> ┋ <a href="http://www.mmok.com/book.asp"><span class="style6666" >网站留言</span></a> ┋ <a href="search.asp"><span class="style6666" >全站搜索</span></a> ┋ <a href="#"><span class="style6666" >浏览帮助</span></a> ┋ <a href="#"><span class="style6666" >网站地图</span></a> ┋ <a href="http://www.mmok.com/book.asp"><span class="style6666" >报告错误</span></a></div></td>
            </tr>
            <tr>
              <td height="16"><span class="style6666" >Mail:moshang@263.sina.com</span> </td>
            </tr>
            <tr>
              <td><div align="left"><img src="images/end2.gif" width="270" height="16">

</div></td>
            </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
</table></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -