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

📄 search.asp

📁 这是一个ASP+VBScript+Access开发的网上家园源程序
💻 ASP
字号:
<!--#include file="connect.asp" -->
<html>
<head>
<BASE onmouseover=window.status="<%=Unit%>个人主页空间——您理想的网上家园!";return true>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=Unit%>>><%=softname%></title>
<style type="text/css">
<!--
a:link {
	color: #333333;text-decoration:none
}
a:visited {
	color: #666666;text-decoration:none
}
a:active {
	color: #999999;text-decoration:none
}
A:hover {
	color: #FF0000;text-decoration:underline
	}
-->
</style>
<script Language="JavaScript">
function click() {
if (event.button==2 | event.button==3) {
alert('对不起,请不要使用鼠标右键!')
}
}
document.onmousedown=click
</script>
<SCRIPT LANGUAGE = JAVAScript>
function OpenWEB(ID)
{
        window.open("open.asp?ID="+ID)
   }
</Script>
</head>
<%
	keyword=Trim(Request.form("keyword"))
	if keyword="输入关键字" then keyword=""
	if keyword="" then keyword=Request.queryString("keyword")

	keyword=replace(replace(replace(keyword,"'","‘"),"<","&lt;"),">","&gt;")
		if request("action")="wwwname" then
			findword="wwwname like '%"&keyword&"%' "
			find="网站名称"
			else
			findword="wwwfunction like '%"&keyword&"%' "
			find="网站简介"
		end if
%>
<BODY bgcolor="#E1EBF4" style="font-size: 9pt">
<!--#include file="head.asp" -->
<!--#include file="NavBar.Asp" -->
<div align="center">
  <center>
  <table border="0" width="750" style="font-size: 9pt; border: 1 solid #000000" cellspacing="0" cellpadding="4" bgcolor="#F7F1FE">
  </center>
  <center>
  </center>
    <tr>
      <td align="center" valign="top">
        <div align="center">
<%
CurrentPage=request("page")
if CurrentPage="" then CurrentPage=1
strSQL= "select * from information where admin > 1 and check = True and " & findword & "order by id"
'response.write strSQL
'response.end
dim rs
set rs=server.createobject("adodb.recordset")
rs.open strSQL,objCnn,1,3
maxperpage=10
RS.PageSize= MaxPerPage
    
if not isempty(request("page")) and request("page")<>"" then
			currentPage=cint(request("page"))
   		else
      		currentPage=1
   	end if
    
    totalPut = Rs.recordcount 
    
    if totalPut > 0 then
      	if currentpage < 1 then currentpage=1 
	 	RS.AbsolutePage = currentpage
	end if
%>
<table border="0" width="723" style="font-size: 9pt; border-top: 1 solid #808080; border-bottom: 1 solid #808080" bordercolorlight="#808080" bordercolordark="#C0C0C0" cellspacing="0">
            <tr>
      <td width="721" height="20" style="border-bottom: 1 solid #C0C0C0" colspan="6">
        <%
        response.write "查询条件 <font color=red>"&keyword&"</font> "
		response.write "在"&find&"中"
		%>
</td>                 
            </tr>
  <center>
          <center>
            <tr>
      <td width="36" height="20" align="center">序号</td>
      <td width="200" height="20" style="border-left: 1 solid #C0C0C0; border-right: 1 solid #C0C0C0" align="center">图片链接</td>
      <td width="240" height="20" align="center">网站名称</td>
      <td width="97" height="20" style="border-left: 1 solid #C0C0C0; border-right: 1 solid #C0C0C0" align="center">作者(呢称)</td>
      <td width="61" height="20" align="center">建站时间</td>
      <td width="71" height="20" style="border-left: 1 solid #C0C0C0" align="center">月访问量<br>
        总访问量</td>
            </tr>
<%for i=1 to MaxPerPage%>
<%ss=rs("wwwfunction")%>
            <tr>
      <td width="36" height="20" style="border-top: 1 solid #C0C0C0" align="center" rowspan="2"><%=i+(currentpage-1)*MaxPerPage%></td>
      <td width="200" height="20" style="border-left: 1 solid #C0C0C0; border-right: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0" rowspan="2"><a href='JAVAScript:OpenWEB(<%=rs("ID")%>)' title='<%=ss%>'><%if rs("pic")<>"" then%><img border="0" src="uppic\<%=rs("pic")%>" width="200" height="30"><%else%><img border="0" src="images\def.gif" width="200" height="30"><%end if%></a></td>
      <td width="238" height="20" style="border-top: 1 solid #C0C0C0" rowspan="2"><a href='JAVAScript:OpenWEB(<%=rs("ID")%>)' title='<%=ss%>'><%=rs("wwwname")%></a></td>
      <td width="97" height="20" style="border-left: 1 solid #C0C0C0; border-right: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0" rowspan="2">
        <p align="center">
        <%if rs("wname")<>"" then%>
        <%=rs("wname")%>
        <%else%>
        <%="不详"%>
        <%end if%></p>
      </td>
      <td width="61" height="20" style="border-top: 1 solid #C0C0C0" align="center" rowspan="2"><%=rs("CreateDate")%></td>
      <td width="71" height="16" style="border-left: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0" align="center"><%=rs("MCount")%></td>
            </tr>
            <tr>
      <td width="71" height="16" style="border-left: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0" align="center"><%=rs("AccessCount")%></td>
            </tr>
<%rs.movenext%>
<%if rs.eof then exit for%>
<%next%>
<%
showpage totalPut,maxperpage,"search.asp"
%>


          </table>
          </center>
        </div>
        </center>
      </td>
    </tr>
  </table>
</div>
<!--#include file="food.asp" -->
<Script language=VBScript>
</Script>
</body>
</html>
<%
function showpage(totalnumber,maxperpage,filename)
  	dim n

  	if totalnumber mod maxperpage=0 then
     		n= totalnumber \ maxperpage
  	else
     		n= totalnumber \ maxperpage+1
  	end if
  	response.write "<table width='98%' border='0' align='center' style='font-size: 9pt'><form method=Post action="&filename&"?action="&request("action")&"&keyword="&keyword&"><tr><td align='center'> "
  	response.write "<font color='red'>"&SubCateName&"</font>"

  	if CurrentPage<2 then
    		response.write "共 "&totalnumber&" 个网站&nbsp;首页 上一页&nbsp;"
  	else
    		response.write "共 "&totalnumber&" 个网站&nbsp;<a href="&filename&"?page=1&action="&request("action")&"&keyword="&keyword&">首页</a>&nbsp;"
    		response.write "<a href="&filename&"?page="&CurrentPage-1&"&action="&request("action")&"&keyword="&keyword&">上一页</a>&nbsp;"
  	end if

  	if n-currentpage<1 then
    		response.write "下一页 尾页"
  	else
    		response.write "<a href="&filename&"?page="&(CurrentPage+1)&"&action="&request("action")&"&keyword="&keyword&">"
    		response.write "下一页</a> <a href="&filename&"?page="&n&"&action="&request("action")&"&keyword="&keyword&">尾页</a>"
  	end if
   	response.write "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
    	response.write "&nbsp;<b>"&maxperpage&"</b>个网站/页 "
end function
%>



























⌨️ 快捷键说明

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