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

📄 search.asp

📁 html生成静态页的小程序
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%Const dbdns=""%>
<!--#include file="AppCode/Conn.asp"-->
<!--#include file="AppCode/fun/function.asp"-->
<!--#include file="AppCode/Pager.asp"-->
<!--#include file="vbs.asp"-->
<%
keyword=CmdSafeLikeSqlStr(Request.QueryString("keyword"))
If keyword="" Then
	Call MessageBox("请输入需要查询的关键词。","")
End If
%>
<!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" />
<title><%=keyword%> - <%=SysSiteName%></title>
<link href="css/css2.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/page.css">
</head>

<body>
<!--#include file="top.asp"-->
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40">您当前位置:<a href="">网站首页</a> &gt;&gt;
    搜索结果</td>
    <form id="form1" name="form1" method="get" action="search.asp">
      <td width="344"><span style="font-weight: bold">站内查找:</span>
          <input name="keyword" type="text" id="keyword" size="29" />
          <input type="submit" name="Submit" value="搜索" />
      </td>
    </form>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #AEE1DC;">
        <tr>
          <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/index5_37.gif" style="border-bottom:1px solid #AEE1DC;">
              <tr>
                <td width="10" align="left" class="black14b">&nbsp;</td>
                <td align="left" class="black14b">“<%=keyword%>”搜索结果&gt;&gt;</td>
                <td width="35" align="right"><img src="images/index5_39.gif" width="35" height="29" /></td>
              </tr>
          </table>
          </td>
        </tr>
        <tr>
          <td valign="top"><table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
<%		  
Set Page = New TurnPage
Sql="select Id,Title,AddTime from Ok3w_Article where IsPass=1 and IsDelete=0 and ChannelID=1 and (Title like '%" & keyword & "%' or Content like '%" & keyword & "%') order by AddTime desc,ID desc"
Call Page.GetRs(Conn,Rs,Sql,20)
If Not(Rs.Eof And Rs.Bof) Then
i_Count = 0
Do While Not Rs.Eof And Not Page.Eof
i_Count = i_Count + 1
%>			
            <tr>
              <td width="3%" height="30" align="center"><span class="gray">·</span></td>
              <td width="78%" align="left"><a href="article/<%=Rs("Id")%>.html" class="gray14"><%=Rs("Title")%></a></td>
              <td width="19%" align="right" class="gray"><%=FormatDateTime(Rs("AddTime"),2)%></td>
            </tr>
<%
	Rs.MoveNext
	Page.MoveNext
	If i_Count Mod 5 = 0 Or Rs.Eof Then
%>
			<tr>
              <td colspan="3"><hr size="1" color="#EBEBEB" /></td>
            </tr>
<%
	End If
Loop
Else
%>
			<tr>
              <td colspan="3" class="red18b"><br /><br />Sorry!没有找到任何相关内容。<br /><br /></td>
            </tr>
<%
End If
Rs.Close
%>			
          </table>
            <table width="92%" border="0" align="center" cellpadding="5" cellspacing="0">
              <tr>
                <td align="left"><%Call Page.GetPageList()%></td>
              </tr>
          </table></td>
        </tr>
      </table>
     </td>
    <td width="360" align="right" valign="top"><table width="344" border="0" cellpadding="0" cellspacing="1" bgcolor="#AEE1DC">
      <tr>
        <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/index5_37.gif">
            <tr>
              <td width="4%">&nbsp;</td>
              <td width="53%" align="left" class="black14b">其它文章</td>
              <td width="43%" align="right"><img src="images/index5_39.gif" width="35" height="29" /></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td bgcolor="#FFFFFF"><%Call News_List_S1("",15,20,"","new")%></td>
      </tr>
    </table>
      <table width="344" border="0" cellpadding="3" cellspacing="1" bgcolor="#AEE1DC" style="margin-top:12px;">
        <tr>
          <td align="center" bgcolor="#FFFFFF"><%=GetAdSense(5)%></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="12"></td>
  </tr>
</table>
<!--#include file="foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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