www.gusucode.com > 爱美尔女性商城源码 1.0源码程序 > wen/Search.asp

    <!--#include file="Inc/conn.asp"-->
<!--#include file="Inc/Function_Page.asp"-->
<!--#include file="Inc.asp"-->
<%
Dim KeyWord,stype,ID
KeyWord=CheckStr(request("KeyWord"))
stype=LaoYRequest(request("type"))
%><!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" />
<meta name="keywords" content="<%=Sitekeywords%>" />
<meta name="description" content="<%=Sitedescription%>" />
<link href="<%=SitePath%>images/8586.css" type=text/css rel=stylesheet>
<link href="<%=SitePath%>images/Css8.css" ID="skin" type=text/css rel=stylesheet>
<link rel="shortcut icon" href="<%=SitePath%>images/myfav.ico" type="image/x-icon" />
<script type="text/javascript" src="<%=SitePath%>inc/main.asp"></script>
<title>搜索<%=KeyWord%>-<%=SiteTitle%></title>
</head>
<body>
<div class="mwall">
<%=Head%>
<%=Menu%><div class="mw">
	<div class="dh" style="border:1px #CCCCCC solid; margin-top:5px; margin-bottom:5px;">
		<%=search%>您现在的位置:<a href="Index.asp">首页</a> >> 搜索"<%=KeyWord%>"
    </div>
	<div id="nw_left">
		<div id="web2l">
        	<h6>站内搜索</h6>
			<div id="content">
				<ul id="listul">
<%
Set mypage=new xdownpage
mypage.getconn=conn

If KeyWord<>"" then
mypage.getsql=server.createobject("adodb.recordset")
If stype=1 or stype="" then
mypage.getsql="select top 100 ID,Title,DateAndTime,Hits,IsTop,Images,TitleFontColor,Artdescription from "&tbname&"_Article Where yn = 0 and (InStr(1,LCase(Title),LCase('"&keyword&"'),0)<>0 or InStr(1,LCase(Artdescription),LCase('"&keyword&"'),0)<>0) order by DateAndTime desc"
elseIf stype=2 then
mypage.getsql="select top 100 ID,Title,DateAndTime,Hits,IsTop,Images,TitleFontColor,Artdescription from "&tbname&"_Article Where yn = 0 and UserName = '"&KeyWord&"' order by DateAndTime desc"
end if

mypage.pagesize=""&artlistnum&""
set rs=mypage.getrs()
for i=1 to mypage.pagesize
    if not rs.eof then 
%>
				<li style="border-bottom:1px dashed #ccc;"><%if rs("Images")<>"" then%><div style="float:left;margin:5px 5px 0 5px;"><img src="<%=SitePath%><%=SiteUp%>/<%if IsAspJpeg=1 then Response.Write("s90/") End if%><%=rs("Images")%>" style="width:90px;height:90px;"/></div><%end if%><%If rs("IsTop")=1 then Response.Write("<font color=red>[顶]</font>") end if%><a href="<%=IIF(html=1,"List.asp?ID="&rs("ID")&"","Html/?"&rs("ID")&".html")%>" target="_blank"><%if rs("TitleFontColor")<>"" then Response.Write("<font style=""color:"&rs("TitleFontColor")&""">"&replacecolor(rs("Title"))&"</font>") else Response.Write(""&replacecolor(rs("Title"))&"") end if%></a>
				<span style="color:#AAA;font-size:12px;"><%=FormatDate(rs("DateAndTime"),11)%> 点击:<%=rs("Hits")%> 评论:<%=Mydb("Select Count([ID]) From ["&tbname&"_Pl] Where yn=1 And ArticleID="&rs("id")&"",1)(0)%></span></li>
				<%If artlist=0 then%>
                <div class="box"<%if rs("Images")<>"" then Response.Write(" style=""height:65px;""") end if%>><%=left(LoseHtml(rs("Artdescription")),90)%>...</div><%End if%>
<%
        rs.movenext
    else
         exit for
    end if
next
%>
        		</ul>
			</div>
<div id="clear"></div>
<div id="page">
	<ul>
    <%=mypage.showpage()%>
    </ul>
</div>
<%else%>
		<li style="text-align:center">请在上面输入关键字后搜索</li>
        		</ul>
			</div><%end if%>
		</div>
	</div>
	<div id="nw_right">
		<%Call ShowAD(20)%>
		<div id="web2r">
			<h5>图片文章</h5>
			<ul class="topimg">
                <%Call ShowImgArticle(0,4,20,"no","DateAndTime desc,ID desc")%>
            </ul>
  		</div>
		<div id="web2r">
			<h5>推荐文章</h5>
			<ul id="list10">
            	<%Call ShowArticle(0,10,5,"·",100,"IsHot=1","ID desc",0,0)%>
            </ul>
  		</div>
</div>
<%=Copy%></div>
</body>
</html>