www.gusucode.com > 共享世纪内容管理系统 2.1 build 080704 全站开源版 > search.asp

    <!--#include file="admin/md5.asp"-->
<%
MDBpath="admin/"
if request("cd")="" and request("k")="" then
  MaxPerPage=50 '###每页显示条数
  sePAGE="no"
else
  MaxPerPage=20 '###每页显示条数
end if

if request("pl")<>"" then
  pl=request("pl")
else
  pl="date"
end if

'过滤skn中的“'”
skN=replace(request("k"),"'","")
skN=replace(request("k"),"[","")
skP="更新日期"
if request("pl")="hits" then
  skP="人气"
elseif request("pl")="hot" then
  skP="软件评价"
end if 
  
if request("type")="title" then
  skT="按照标题搜索"
else
  skT="按照内容搜索"
  if request("cd")<>"" then
    skN=request("cd")
    skCD=" and cd='"&request("cd")&"'"
  end if
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

<script language="javascript">
function lovertysearch () {
var wd=document.getElementsByName("wd")[0].value;
var link="http://www.baidu.com/s?si=" + website + "&ct=2097152&tn=baidulocal&word="+wd;
//website + "&wd=" + to_search[0].value;
window.open(link);
}
</script>

<script language="javascript">
var website="2ky.cn";
//不要带http://
</script>
<TITLE>[共 享 世 纪] 信息查询引擎 > 2KY.CN </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK href="skin4/main.css" rel=stylesheet>
</HEAD>
<BODY text=#000000 bgColor=#ffffff leftMargin=0 topMargin=0><CENTER>
<table width="760" border="0" align="center" cellpadding="0" bgcolor="#FFFFFF">
  <tr> 
    <td height="74"><table width="100%" border=0 align=center cellpadding=0 cellspacing=0>
        <tr> 
          <td width="180" align="center" bgcolor="#00AEEF"><img src="../images/sharecentury.gif"></td>
          <td width="500" align="center" valign="middle" bgcolor="#00AEEF"> </td>
          <td width="90" height="70" align="center" nowrap bgcolor="#00AEEF"><font color="#FFFFFF">■</font> 
            <a onclick="this.style.behavior='url(#default#homepage)';this.sethomepage('http://www.2ky.cn');return false;" href="http://www.2ky.cn" title="将本站设为你的首页">设为首页</a><br> 
            <font color="#FFFFFF">■</font> <a href="javascript:window.external.AddFavorite(location.href,document.title)" title="将本站加入到你的收藏夹">加入收藏</a><br> 
            <font color="#FFFFFF">■</font> <a href="mailto:for_yang@126.com">联系我们</a></td>
        </tr>
      </table></td>
  </tr>
</table>
<TABLE width=760 border=0 align=center cellPadding=0 cellSpacing=0 bgcolor="#CCCCCC">
  <TBODY>
    <TR> 
      <TD> <TABLE cellSpacing=0 cellPadding=0 width=760 border=0 height="375">
          <TBODY>
            <TR> 
              <TD vAlign=top bgColor=#f6f6f6 height="375"> <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
                  <TBODY>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width=100% border=0 height="1">
                          <TBODY>
                            <TR> 
                              <TD height=1 width="100%"> </TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD> <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
                          <TBODY>
                            <TR> 
                              <TD height=3><IMG height=1
src="../skin4/witer.gif"
width=1></TD>
                            </TR>
                          </TBODY>
                        </TABLE>
                        <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
                          <TBODY>
                            <TR> 
                              <TD width="100%"
height=3 background=../skin4/dot_line.gif><IMG height=3
src="../skin4/dot_line.gif"
width=3></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                  </TBODY>
                </TABLE>
                <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY>
                    <TR> 
                      <TD height=3><IMG height=1 src="../skin4/witer.gif"
width=1></TD>
                    </TR>
                  </TBODY>
                </TABLE>
                <TABLE cellSpacing=0 cellPadding=3 width=100% align=center border=0>
                  <TBODY>
                    <TR> 
                      <TD width=29 bgColor=#cccccc> <DIV align=center><STRONG><IMG
src="skin4/ico.gif"></STRONG><FONT
color=#cccccc> </FONT></DIV></TD>
                      <TD width=494 bgcolor="#cccccc"><font color="#FFFFFF"> 
                        <a href="d/">下载首页</a> / <a href="search.asp">教程检索 
                        </a></font><font color="#000000"> | </font><font color="#FFFFFF"> 
                        <a href="down_search.asp">源码检索</a></font></TD>
                    </TR>
                  </TBODY>
                </TABLE>
                <TABLE cellPadding=5 width="95%" align=center border=0 height="1">
                  <TBODY>
                    <TR> 
                      <TD height="1"></TD>
                    </TR>
                  </TBODY>
                </TABLE>
                <TABLE height=279 cellSpacing=1 cellPadding=5 width=98% align=center border=0>
                  <TBODY>
                    <TR> 
                      <TD class=c vAlign=top colSpan=3 height="268" width="544"> 
                        <table border="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="160">
                          <TR> 
                            <TD width="98%"  height="1"> 
                              <form method="post" action="search.asp">
                                本站搜索 [<font color="#993300">检索文章</font>]: 
                                <input name="k" size="50" style="border: 1px dotted #CCCCCC; ">
                                &nbsp;&nbsp;
								<select name="type">
                                  <option value="title" selected>按照标题搜索</option>
                                  <option value="info">按照内容搜索</option>
                                </select>
                                  <input name="Submit" src="../images/d_search.gif" type="image" value="Submit" align="absmiddle" border="0">
                              </form>
                            </TD>
                          </TR>

                          <tr> 
                            <td width="98%" valign="top" height="137"><div align="center"> 
                                <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="700">
                                  <tr> 
                                    <td width="511" height="18"> 教程标题</td>
                                    <td width="84" height="18" align="center"> </td>
                                    <td width="92" height="18" align="center"><a href="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=date&k=<%=skN%>" title="按人气值重新排列软件"><font color="#000000"><u> 
                                      更新时间</u></font></a></td>
                                    <td width="134" height="18" align="right"><a href="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=hits&k=<%=skN%>" title="按人气值重新排列软件"><font color="#000000"><u> 
                                      人气&nbsp;</u></font></a></td>
                                  </tr>
                                  <tr bgcolor="#00AEEF"> 
                                    <td width="771" colspan="4" height="1"></td>
                                  </tr>
                                  <%if skN="" and request("pl")="" and request("cd")="" then%>
                                  <tr> 
                                    <td width="770" colspan="4" height="250" align="center">欢迎使用 
                                      [<strong>共 享 世 纪</strong>] 检索引擎&nbsp;&nbsp;&nbsp;<strong><font color="#993300">&nbsp;<font size="3">注意</font></font></strong>:关键词不可为留空!</td>
                                  </tr>
                                  <%else
    set rs=server.CreateObject("ADODB.RecordSet")
    if request("type")="title" then
      KN=split(skN," ")
      for i = 0 to ubound(KN)
        KNN=KNN&" or title like '%"&KN(i)&"%'"
      next%>
                                  <!--#include file="admin/mdb_path_info.asp"-->
                                  <%
      sql="select * from info where title like '%"&skN&"%'"&KNN&" order by "&pl&" desc"
    else 
    KN=split(skN," ")
      for i = 0 to ubound(KN)
        KNN=KNN&" or title like '%"&KN(i)&"%' or info like '%"&KN(i)&"%'"
      next%>
                                  <!--#include file="admin/mdb_path_info.asp"-->
                                  <%
      sql="select * from info where info like '%"&skN&"%'"&KNN&" order by "&pl&" desc"
    end if
rs.open sql,conn,1,1
if rs.eof then
%>
                                <tr> 
                                    <td width="768" height="250" colspan="4"> 
                                      抱歉!没有搜索到您想要的教程,我们的引擎已经记录了您的查询,我们会尽快为您提供此教程!<p align="center"><strong><font color="#993300">您可以:</font></strong><a href="javascript:" onclick="window.open(&quot;http://www1.baidu.com/baidu?tn=site65658&amp;cl=3&amp;rn=10&amp;ct=0&amp;lm=0&amp;submit4=搜索&amp;word=<%=request("k")%>&quot;)"><br><a href="javascript:" onclick="window.open(&quot;http://www1.baidu.com/baidu?tn=site65658&amp;cl=3&amp;rn=10&amp;ct=0&amp;lm=0&amp;submit4=搜索&amp;word=<%=request("k")%>&quot;)">
                                        <br>
                                        先点击这里在百度里尝试查找!</a></td>
                                  </tr>
                                  <%else
if sePAGE<>"no" then '###排行方式时只显示指定数目
rs.pagesize=MaxPerPage '得到每页数
mpage=rs.pagecount     '得到总页数
allshu=rs.recordcount
page=request("page")
   if request("page")<>"" then
      if cint(request("page"))<1 or cint(request("page"))>mpage then
         currentPage=1
      else
         currentPage=cint(request("page"))
      end if
   else        
      currentPage=1        
   end if
rs.move  (currentPage-1)*MaxPerPage
end if '###排行方式时只显示指定数目
do while not rs.eof%>
                                  <%softname=rs("title")
filename=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
       if skN<>"" then
          for i = 0 to ubound(KN)
          softname=replace(softname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
          next
       end if%>
                                  <tr height="22"> 
                                    <td width="511"><a target="_blank" href="html/<%=filename%>-1.html">◎ 
                                      <%=softname%></a></td>
                                    <td width="84" align="center"> </td>
                                    <td width="84" align="left"><%=formatdatetime(rs("date"),vbshortdate)%></td>
                                    <td width="134" align="right"><%=rs("hits")%></td>
                                  </tr>
                                  <%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
    <br>
                                  <table>
                                    <tr> 
                                      <td width="98%"  height="1"> 用 <strong>Baidu</strong> 检索全站 
                                        // 
                                        <input name="wd" type="text" size="60" style="border: 1px dotted #CCCCCC;"/> 
                                        &nbsp;&nbsp;
                                        <input type="button" value="百 度 搜 索 处" onclick="javascript:lovertysearch()"/> 
                                      </td>
                                    </tr>
                                  </table>
                                </table>
                              </div></td>
                          </tr>
                          <tr> 
                            <td width="526" height="15" colspan="2" align="right" valign="bottom"> 
                              <%if allshu>0 and skPAGE<>"no" then%>
                             
                                
                                  
                              <table width="98%" border="0" cellpadding="0" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse">
                                <tr> 
                                      
                                  <td nowrap width="200">结果:<b><%=allshu%></b> 
                                    页次<b><%=currentPage%></b>/<b><%=mpage%></b> 
                                    &nbsp;每页<b><%=MaxPerPage%></b></td>
                                      <td width="565" align="right"> 
                                        <%
pageno=currentPage
%>
                                        <%if cint(pageno)>1 then%>
                                        <a href="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>" title="首页"> 
                                        <%end if%>
                                        首页</a>&nbsp; 
                                        <%if cint(pageno)>1 then%>
                                        <a href="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=request("k")%>&page=<%=pageno-1%>" title="上一页"> 
                                        <%end if%>
                                        上一页</a> 
                                        <%                                                                             
pp=cint(pageno)-5            
  if pp<1 then            
  pp=1            
  end if            
%>
                                        <%if cint(pageno)< mpage then%>
                                        <a href="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=skN%>&page=<%=pageno+1%>" title="下一页"> 
                                        <%end if%>
                                        下一页</a>&nbsp; 
                                        <%if cint(pageno)< mpage then%>
                                        <a href="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=skN%>&page=<%=mpage%>" title="最后1页"> 
                                        <%end if%>
                                        尾页</a> </td>
                                      <form method="POST" action="search.asp?type=<%=request("type")%>&cd=<%=request("cd")%>&pl=<%=request("pl")%>&k=<%=skN%>">
                                        <td nowrap width="109"> <p align="right">到 
                                            <input name="page" size="3">
                                            页 
                                            <input align="absmiddle" height="21" name="Submit2" src="images/d_goto.gif" type="image" value="Submit" width="27">
                                        </td>
                                      </form>
                                    </tr>
                                  </table>
                                
                              
                              <%end if%>
                              <br>
                            </td>
                          </tr>
                        </table></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 height=1 width=760>
  <TBODY>
    <TR> 
      <TD height=1> <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
          <TBODY>
            <TR> 
              <TD background=../images/hline_bg.gif height=1></TD>
            </TR>
          </TBODY>
        </TABLE></TD>
    </TR>
    <TR> 
      <TD align=middle height=4> </TD>
    </TR>
    <TR> 
      <TD height=1> <img src="../ads/755.gif" border="0" width="760" height="60"></TD>
    </TR>
    <TR> 
      <TD bgColor=#00AEEF height=1></TD>
    </TR>
    <TR> 
      <TD height=52 align=center> 本站欢迎相关的广告商与我们洽谈合作 QQ:406006595<br>
          Copyright&copy; 2005 2KY.CN All Rights Reserved 陕ICP备06000505号 版权所有<br>
          网站导航 | 关于我们 | 意见建议 | 广告服务 | 媒体合作<br>
<script language="JavaScript" type="text/javascript" src="http://www3.itsun.com/counter.php?uuid=1600568&style=icon"></script>
</TD>
    </TR>
  </TBODY>
</TABLE>
</BODY>
</HTML>