Search.asp
资源名称:eat.rar [点击查看]
上传用户:jisenq
上传日期:2014-06-29
资源大小:7216k
文件大小:31k
源码类别:
数据库编程
开发平台:
ASP/ASPX
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
- <% Option Explicit %>
- <%session.CodePage="936"%>
- <!--#include file="FS_Inc/Const.asp" -->
- <!--#include file="FS_InterFace/MF_Function.asp" -->
- <!--#include file="FS_Inc/Function.asp" -->
- <!--#include file="FS_Inc/Func_Page.asp" -->
- <%'Copyright (c) 2006 Foosun Inc. Code by awen
- Server.ScriptTimeOut=999
- Response.Buffer = True
- Response.Expires = -1
- Response.ExpiresAbsolute = Now() - 1
- Response.CacheControl = "no-cache"
- response.Charset = "gb2312"
- Dim starttime,endtime
- starttime=timer()
- function morestr(str,length)
- if len(str)>length then
- morestr = left(str,length)&"<strong>...</strong>"
- else
- morestr = str
- end if
- end function
- Dim Conn,Old_News_Conn,Search_Sql,Search_RS,strShowErr,Cookie_Domain,Cookie_Copyright,Cookie_eMail,Cookie_Site_Name
- Dim Server_Name,Server_V1,Server_V2
- Dim TmpStr,TmpArr,SqlDateType,FileSize,FileEditDate,TmpStr1,TmpStr2
- Dim Keyword,s_type,SubSys,ClassId,s_date,e_date ,GetType
- Dim ChildDomain,ClassPath
- Dim LocalUrl
- GetType = NoSqlHack(request.QueryString("GetType")) ''内部
- if GetType = "" then response.Write("请指定必要的参数.") : response.End()
- ''日期
- If G_IS_SQL_DB = 1 Then
- SqlDateType = "'"
- else
- SqlDateType = "#"
- end if
- Function Get_MF_Config()
- if request.Cookies("FoosunSearchCookie")("Cookie_Domain") = Get_MF_Domain() then exit Function
- set Search_RS=Conn.execute("select top 1 MF_Domain,MF_Site_Name,MF_eMail,MF_Copyright_Info from FS_MF_Config")
- Response.Cookies("FoosunSearchCookie")("Cookie_Domain")=Search_RS("MF_Domain")
- Response.Cookies("FoosunSearchCookie")("Cookie_Copyright")=Search_RS("MF_Copyright_Info")
- Response.Cookies("FoosunSearchCookie")("Cookie_eMail")=Search_RS("MF_eMail")
- Response.Cookies("FoosunSearchCookie")("Cookie_Site_Name")=Search_RS("MF_Site_Name")
- Response.Cookies("FoosunSearchCookie").Expires=Date()+1
- Search_RS.close
- End Function
- '得到新闻单个地址____________________________________________________________
- Function get_NewsLink(f_id)
- get_NewsLink = ""
- dim rs,config_rs,config_mf_rs,class_rs
- dim SaveNewsPath,FileName,FileExtName,ClassId,LinkType,MF_Domain,Url_Domain,ClassEName,c_Domain,c_SavePath,IsDomain
- set rs = Conn.execute("select ID,IsURL,URLAddress,ClassId,NewsId,SaveNewsPath,FileName,FileExtName From FS_NS_News where NewsId='"&f_id&"'")
- SaveNewsPath = rs("SaveNewsPath")
- FileName = rs("FileName")
- FileExtName = rs("FileExtName")
- ClassId = rs("ClassId")
- LinkType = Conn.execute("select top 1 LinkType from FS_NS_SysParam")(0)
- IsDomain = Conn.execute("select top 1 IsDomain from FS_NS_SysParam")(0)
- MF_Domain = Cookie_Domain
- set class_rs = Conn.execute("select ClassEName,IsURL,URLAddress,[Domain],SavePath From FS_NS_NewsClass where ClassId='"&ClassId&"'")
- if not class_rs.eof then
- ClassEName = class_rs("ClassEName")
- c_Domain = class_rs("Domain")
- c_SavePath = class_rs("SavePath")
- class_rs.close:set class_rs=nothing
- else
- ClassEName = ""
- class_rs.close:set class_rs=nothing
- end if
- if not rs.eof then
- if rs("IsURL")=0 then
- if LinkType = 1 then
- if trim(c_Domain)<>"" then
- Url_Domain = "http://"&c_Domain
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = MF_Domain
- end if
- end if
- else
- if trim(c_Domain)<>"" then
- Url_Domain = "http://"&c_Domain
- else
- if trim(IsDomain)<>"" then
- Url_Domain = "http://"&IsDomain
- else
- Url_Domain = ""
- end if
- end if
- end if
- if trim(c_Domain)<>"" then
- get_NewsLink = Url_Domain & SaveNewsPath &"/"&FileName&"."&FileExtName
- LocalUrl = SaveNewsPath &"/"&FileName&"."&FileExtName
- else
- get_NewsLink = Url_Domain & c_SavePath& "/" & ClassEName &SaveNewsPath &"/"&FileName&"."&FileExtName
- LocalUrl = c_SavePath& "/" & ClassEName &SaveNewsPath &"/"&FileName&"."&FileExtName
- end if
- else
- get_NewsLink = rs("URLAddress")
- end if
- rs.close:set rs=nothing
- else
- get_NewsLink = ""
- rs.close:set rs=nothing
- end if
- get_NewsLink = get_NewsLink
- End Function
- ''++++++++++++++++++++++++++++++++++++
- '检查本地文件 返回大小和修改日期
- Function CheckFile(PhFileName)
- dim fsv1,fsv2
- fsv1="":fsv2=""
- On Error Resume Next
- if isnull(PhFileName) or PhFileName="" then CheckFile="|":exit Function
- Dim Fso,MyFile
- Set Fso = CreateObject(G_FS_FSO)
- If Fso.FileExists(server.MapPath(PhFileName)) Then
- set MyFile = Fso.GetFile(server.MapPath(PhFileName))
- fsv1 = formatnumber(MyFile.Size/1024,2,-1)&"K"
- fsv2 = MyFile.DateLastModified
- set MyFile = nothing
- End if
- if Err<>0 then CheckFile="|":exit Function
- Set Fso = Nothing
- CheckFile = fsv1&"|"&fsv2
- End Function
- MF_Default_Conn
- MF_Old_News_Conn
- Get_MF_Config
- Cookie_Domain = request.Cookies("FoosunSearchCookie")("Cookie_Domain")
- Cookie_Copyright = request.Cookies("FoosunSearchCookie")("Cookie_Copyright")
- Cookie_eMail = request.Cookies("FoosunSearchCookie")("Cookie_eMail")
- Cookie_Site_Name = request.Cookies("FoosunSearchCookie")("Cookie_Site_Name")
- if Cookie_Domain="" then
- Cookie_Domain = "http://localhost"
- else
- if left(lcase(Cookie_Domain),len("http://"))<>"http://" then Cookie_Domain = "http://"&Cookie_Domain
- if right(Cookie_Domain,1)="/" then Cookie_Domain = mid(Cookie_Domain,1,len(Cookie_Domain) - 1)
- end if
- ''防盗连
- Server_Name = Len(Request.ServerVariables("SERVER_NAME"))
- Server_V1 = Left(Replace(Cstr(Request.ServerVariables("HTTP_REFERER")),"http://",""),Server_Name)
- Server_V2 = Left(Cstr(Request.ServerVariables("SERVER_NAME")),Server_Name)
- if Server_V1 <> Server_V2 and Server_V1 <> "" and Server_V2 <> "" then
- response.Write("没有权限,请访问<a href="""&Cookie_Domain&""">"&Cookie_Domain&"</a>.")
- response.End()
- end if
- ''+++++++++++++++++++++++++++++++++++++++++++
- select case GetType
- case "LoginHtml"
- %>
- <FONT size=-1><A href="<%=Cookie_Domain&"/User/Login.asp"%>" target="_blank">登录</A></FONT>
- <%case "FootHTML"%>
- <BR>
- <BR>
- <FONT
- size=-1><%=Cookie_Copyright%></FONT><BR><BR>
- <%case "CopyrightHTML"
- TmpStr = "<TABLE cellSpacing=0 cellPadding=2 width=""100%"" border=0>"&vbNewLine _
- &"<TR>"&vbNewLine _
- &"<TD align=right height=25><font size=-1>"&vbNewLine _
- &"<a class=fl href=""javascript:window.external.AddFavorite('"&Cookie_Domain&"', '"&Cookie_Site_Name&"')"">加入收藏</a>"&vbNewLine _
- &" - <a class=fl href=""#"" onClick=""this.style.behavior='url(#default#homepage)';this.setHomePage('"&Cookie_Domain&"')"">设为主页</a>"&vbNewLine _
- &" - <A class=fl href=""#"">Top</A>"&vbNewLine _
- &"</font></TD>"&vbNewLine _
- &"</TR>"&vbNewLine _
- &"</TABLE>"&vbNewLine _
- &"</CENTER>"&vbNewLine
- response.Write(TmpStr)
- case "MainInfo"
- SubSys = Ucase(NoHtmlHackInput(NoSqlHack(request.QueryString("SubSys"))))
- Keyword = NoHtmlHackInput(NoSqlHack(request.QueryString("Keyword")))
- s_type = NoHtmlHackInput(NoSqlHack(request.QueryString("s_type")))
- ClassId = NoHtmlHackInput(NoSqlHack(request.QueryString("ClassId")))
- s_date = trim(request.QueryString("s_date"))
- e_date = trim(request.QueryString("e_date"))
- if Keyword = "" then strShowErr=strShowErr&"<li>关键字不能为空</li>"&vbnewLine
- if s_date<>"" then if not isdate(s_date) then strShowErr=strShowErr&"<li>开始日期"&s_date&"非法</li>"&vbnewLine
- if e_date<>"" then if not isdate(e_date) then strShowErr=strShowErr&"<li>结束日期"&e_date&"非法</li>"&vbnewLine
- if strShowErr<>"" then strShowErr=strShowErr&"<li><a href="""&Cookie_Domain&""">"&Cookie_Domain&"</a>.</li>": response.Write(strShowErr):response.End()
- if SubSys="" then SubSys = "NS"
- '===========================================
- ''sql的处理
- select case SubSys
- case "NS"
- TmpStr = "新闻"
- select case s_type
- case "title"
- s_type="NewsTitle"
- case "stitle"
- s_type = "CurtTitle"
- case "content"
- s_type = "Content"
- case "NaviContent"
- s_type ="NewsNaviContent"
- case "author","source"
- s_type = s_type
- case "keyword"
- s_type = "Keywords"
- case else
- s_type = "NewsTitle,CurtTitle,NewsNaviContent,Content,author,source,Keywords"
- end select
- Search_Sql = "select NewsID,NewsTitle,CurtTitle,NewsNaviContent,Content,A.addtime,PopId,ClassName,A.IsURL,isPicNews,NewsSmallPicFile,NewsPicFile," _
- &"Source,Author,Hits,TodayNewsPic,ClassEName,SaveNewsPath,FileName,A.FileExtName from FS_NS_News A,FS_NS_NewsClass B where A.ClassID=B.ClassID" _
- &" and isLock=0 and isRecyle=0 and isdraft=0 "
- if Keyword<>"" then
- if instr(s_type,",")=0 then
- Search_Sql = and_where(Search_Sql) & Search_TextArr(Keyword,s_type,"")
- else
- TmpArr = split(s_type,",")
- TmpStr2 = ""
- for each TmpStr1 in TmpArr
- TmpStr2 = TmpStr2 & " or " & Search_TextArr(Keyword,TmpStr1,"")&""
- next
- if left(TmpStr2,len(" or "))=" or " then
- TmpStr2 = mid(TmpStr2,len(" or ")+1) : TmpStr2 = " ("&TmpStr2&") " :Search_Sql = and_where(Search_Sql) & TmpStr2
- end if
- end if
- end if
- if ClassID<>"" then Search_Sql = and_where(Search_Sql) & Search_TextArr(ClassId,"A.ClassID","")
- if s_date<>"" then Search_Sql = and_where(Search_Sql) & " A.addtime>="&SqlDateType&s_date&SqlDateType
- if e_date<>"" then Search_Sql = and_where(Search_Sql) & " A.addtime<="&SqlDateType&e_date&SqlDateType
- case "WS"
- TmpStr = "留言本"
- select case s_type
- case "title"
- s_type="Topic"
- case "content"
- s_type = "Body"
- case "author"
- s_type = "User"
- case else
- s_type = "Topic,Body,User"
- end select
- Search_Sql = "select A.ID,ClassName,ParentID,User,Topic,Body,A.AddDate,IsTop,State,Style,IsAdmin,Answer,Hit,LastUpdateDate,LastUpdateUser," _
- &"Face,IP,Isonline,Vistor,isUpoad " _
- &" from FS_WS_BBS A,FS_WS_Class B where A.ClassID=B.ClassID "
- if Keyword<>"" then
- if instr(s_type,",")=0 then
- Search_Sql = and_where(Search_Sql) & Search_TextArr(Keyword,s_type,"")
- else
- TmpArr = split(s_type,",")
- TmpStr2 = ""
- for each TmpStr1 in TmpArr
- TmpStr2 = TmpStr2 & " or " & Search_TextArr(Keyword,TmpStr1,"")&""
- next
- if left(TmpStr2,len(" or "))=" or " then
- TmpStr2 = mid(TmpStr2,len(" or ")+1) : TmpStr2 = " ("&TmpStr2&") " :Search_Sql = and_where(Search_Sql) & TmpStr2
- end if
- end if
- end if
- if ClassID<>"" then Search_Sql = and_where(Search_Sql) & Search_TextArr(ClassId,"A.ClassID","")
- if s_date<>"" then Search_Sql = and_where(Search_Sql) & " A.AddDate>="&SqlDateType&s_date&SqlDateType
- if e_date<>"" then Search_Sql = and_where(Search_Sql) & " A.AddDate<="&SqlDateType&e_date&SqlDateType
- case "DS"
- TmpStr = "下载"
- select case s_type
- case "title"
- s_type="Name"
- case "content"
- s_type = "Description"
- case else
- s_type = "Name,Description"
- end select
- Search_Sql = "select ClassName,Name,Description,A.AddTime,ClickNum,ClassEName,A.SavePath,A.FileExtName,A.FileName," _
- &"FileSize,RecTF,Types,Hits,ConsumeNum,A.Pic from FS_DS_List A,FS_DS_Class B where A.ClassID=B.ClassID" _
- &" and AuditTF=1 and (OverDue=0 or (OverDue>0 and datediff('d',A.AddTime,'"&date()&"') <= OverDue)) "
- if Keyword<>"" then
- if instr(s_type,",")=0 then
- Search_Sql = and_where(Search_Sql) & Search_TextArr(Keyword,s_type,"")
- else
- TmpArr = split(s_type,",")
- TmpStr2 = ""
- for each TmpStr1 in TmpArr
- TmpStr2 = TmpStr2 & " or " & Search_TextArr(Keyword,TmpStr1,"")&""
- next
- if left(TmpStr2,len(" or "))=" or " then
- TmpStr2 = mid(TmpStr2,len(" or ")+1) : TmpStr2 = " ("&TmpStr2&") " :Search_Sql = and_where(Search_Sql) & TmpStr2
- end if
- end if
- end if
- if ClassID<>"" then Search_Sql = and_where(Search_Sql) & Search_TextArr(ClassId,"A.ClassID","")
- if s_date<>"" then Search_Sql = and_where(Search_Sql) & " A.addtime>="&SqlDateType&s_date&SqlDateType
- if e_date<>"" then Search_Sql = and_where(Search_Sql) & " A.addtime<="&SqlDateType&e_date&SqlDateType
- case "MS"
- TmpStr = "商城"
- select case s_type
- case "title"
- s_type="ProductTitle"
- case "content"
- s_type = "ProductContent"
- case "keyword"
- s_type = "Keywords"
- case else
- s_type = "ProductTitle,ProductContent,Keywords"
- end select
- Search_Sql = "select ProductTitle,ClassCName,Stockpile,StockpileWarn,OldPrice,NewPrice,IsWholesale,ProductContent,MakeFactory," _
- &"ProductsAddress,Click,smallPic,BigPic,StyleFlagBit,SaleStyle,A.AddTime,Discount,DiscountStartDate,DiscountEndDate," _
- &" ClassEName,A.SavePath,A.FileExtName,A.FileName from FS_MS_Products A,FS_MS_ProductsClass B where A.ClassID=B.ClassID "
- if Keyword<>"" then
- if instr(s_type,",")=0 then
- Search_Sql = and_where(Search_Sql) & Search_TextArr(Keyword,s_type,"")
- else
- TmpArr = split(s_type,",")
- TmpStr2 = ""
- for each TmpStr1 in TmpArr
- TmpStr2 = TmpStr2 & " or " & Search_TextArr(Keyword,TmpStr1,"")&""
- next
- if left(TmpStr2,len(" or "))=" or " then
- TmpStr2 = mid(TmpStr2,len(" or ")+1) : TmpStr2 = " ("&TmpStr2&") " :Search_Sql = and_where(Search_Sql) & TmpStr2
- end if
- end if
- end if
- if ClassID<>"" then Search_Sql = and_where(Search_Sql) & Search_TextArr(ClassId,"A.ClassID","")
- if s_date<>"" then Search_Sql = and_where(Search_Sql) & " A.addtime>="&SqlDateType&s_date&SqlDateType
- if e_date<>"" then Search_Sql = and_where(Search_Sql) & " A.addtime<="&SqlDateType&e_date&SqlDateType
- case "RD"
- TmpStr = "总站归档搜索"
- select case s_type
- case "title"
- s_type="NewsTitle"
- case "stitle"
- s_type = "CurtTitle"
- case "content"
- s_type = "Content"
- case "NaviContent"
- s_type ="NewsNaviContent"
- case "author","source"
- s_type = s_type
- case "keyword"
- s_type = "Keywords"
- case else
- s_type = "NewsTitle,CurtTitle,NewsNaviContent,Content,author,source,Keywords"
- end select
- Search_Sql = "select ID,NewsID,NewsTitle,CurtTitle,NewsNaviContent,Content,addtime,PopId,IsURL,isPicNews,NewsSmallPicFile,NewsPicFile," _
- &"Source,Author,Hits,TodayNewsPic,SaveNewsPath,FileName,FileExtName,FileTime from FS_Old_News " _
- &" where isLock=0 and isRecyle=0 and isdraft=0 "
- if Keyword<>"" then
- if instr(s_type,",")=0 then
- Search_Sql = and_where(Search_Sql) & Search_TextArr(Keyword,s_type,"")
- else
- TmpArr = split(s_type,",")
- TmpStr2 = ""
- for each TmpStr1 in TmpArr
- TmpStr2 = TmpStr2 & " or " & Search_TextArr(Keyword,TmpStr1,"")&""
- next
- if left(TmpStr2,len(" or "))=" or " then
- TmpStr2 = mid(TmpStr2,len(" or ")+1) : TmpStr2 = " ("&TmpStr2&") " :Search_Sql = and_where(Search_Sql) & TmpStr2
- end if
- end if
- end if
- if s_date<>"" then Search_Sql = and_where(Search_Sql) & " addtime>="&SqlDateType&s_date&SqlDateType
- if e_date<>"" then Search_Sql = and_where(Search_Sql) & " addtime<="&SqlDateType&e_date&SqlDateType
- case else
- strShowErr="<li>错误的参数传递.SubSys</li><li><a href="""&Cookie_Domain&""">"&Cookie_Domain&"</a>.</li>": response.Write(strShowErr):response.End()
- end select
- On Error Resume Next
- 'response.Write("["&Search_Sql&"]") '测试用
- 'Response.end
- Set Search_RS = CreateObject(G_FS_RS)
- if SubSys="RD" then
- Search_RS.Open Search_Sql,Old_News_Conn,1,1
- Else
- Search_RS.Open Search_Sql,Conn,1,1
- end if
- if Err<>0 then
- response.Write("<li>查询条件不匹配.无法继续.<br />"&Err.Number&":"&Err.description&"</li>")
- response.End()
- end if
- Dim int_RPP,int_Start,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo
- int_RPP=10 '设置每页显示数目
- int_showNumberLink_=10 '数字导航显示数目
- showMorePageGo_Type_ = 1 '是下拉菜单还是输入值跳转,当多次调用时只能选1
- str_nonLinkColor_="#999999" '非热链接颜色
- toF_="<font face=webdings>9</font>" '首页
- toP10_=" <font face=webdings>7</font>" '上十
- toP1_=" <font face=webdings>3</font>" '上一
- toN1_=" <font face=webdings>4</font>" '下一
- toN10_=" <font face=webdings>8</font>" '下十
- toL_="<font face=webdings>:</font>" '尾页
- IF Search_RS.eof THEN%>
- <TABLE class="t bt" cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD noWrap><FONT size=+1> <B><FONT size=+1> <B><%=TmpStr%></B></FONT> </B></FONT> </TD>
- <TD noWrap align=right>
- <FONT size=-1>共有<B>0</B>项符合<B><%=Keyword%></B>的查询结果
- (搜索用时 <B><%=FormatNumber((timer()-starttime),2,-1)%></B>毫秒) </FONT>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- <p><font size=-1 color=#666666>未查询到符合条件的记录。</font></p>
- <%else
- Dim UrlAndTitle,SaveNewsPath,Content,NewsSmallPicFile,NewsPicFile,addtime,NaviContent ,SysRs_Tmp,ChildPath,picShuXing,picShuXingB
- Search_RS.PageSize=int_RPP
- cPageNo=Request.QueryString("Page")
- If cPageNo="" or not isnumeric(cPageNo) Then cPageNo = 1
- cPageNo = Clng(cPageNo)
- If cPageNo<1 Then cPageNo=1
- If cPageNo>Search_RS.PageCount Then cPageNo=Search_RS.PageCount
- Search_RS.AbsolutePage=cPageNo
- FOR int_Start=1 TO int_RPP
- select case SubSys
- case "NS"
- SaveNewsPath = get_NewsLink(Search_RS("NewsID"))
- UrlAndTitle = "<A class=l href="""&SaveNewsPath&""" target=_blank>"&Search_RS("NewsTitle")&"</A>"
- addtime = Search_RS("addtime")
- if isnull(addtime) then addtime=""
- if isdate(addtime) then addtime = FormatDateTime(addtime,0)
- NewsSmallPicFile = Search_RS("NewsSmallPicFile")
- NewsPicFile = Search_RS("NewsPicFile")
- if NewsSmallPicFile = "" then
- NewsSmallPicFile = "sys_images/NoPic.jpg"
- end if
- NaviContent = Search_RS("Content")
- if isnull(NaviContent) or NaviContent="" then
- NaviContent = "暂无"
- else
- NaviContent = morestr(Lose_Html(NaviContent),255)
- NaviContent = Search_TextArr(Keyword,"Content",NaviContent)
- end if
- FileSize = split(CheckFile(LocalUrl),"|")(0)
- FileEditDate = split(CheckFile(LocalUrl),"|")(1)
- case "RD"
- SaveNewsPath = ""&Cookie_Domain&"/historynews.asp?id="&Search_RS("ID")&""
- UrlAndTitle = "<A class=l href="""&SaveNewsPath&""" target=_blank>"&Search_RS("NewsTitle")&"</A>"
- addtime = Search_RS("addtime")
- if isnull(addtime) then addtime=""
- if isdate(addtime) then addtime = FormatDateTime(addtime,0)
- NewsSmallPicFile = Search_RS("NewsSmallPicFile")
- NewsPicFile = Search_RS("NewsPicFile")
- if NewsSmallPicFile = "" then
- NewsSmallPicFile = "sys_images/NoPic.jpg"
- end if
- NaviContent = Search_RS("Content")
- if isnull(NaviContent) or NaviContent="" then
- NaviContent = "暂无"
- else
- NaviContent = morestr(Lose_Html(NaviContent),255)
- NaviContent = Search_TextArr(Keyword,"Content",NaviContent)
- end if
- FileSize = ""
- FileEditDate = addtime
- case "WS"
- SaveNewsPath = ""&Cookie_Domain&"/historynews.asp?id="&Search_RS("ID")&""
- UrlAndTitle = "<A class=l href="""&SaveNewsPath&""" target=_blank>"&Search_RS("Topic")&"</A>"
- addtime = Search_RS("AddDate")
- if isnull(addtime) then addtime=""
- if isdate(addtime) then addtime = FormatDateTime(addtime,0)
- NewsSmallPicFile = Search_RS("Face")
- NewsPicFile = Search_RS("Face")
- if NewsSmallPicFile = "" then
- NewsSmallPicFile = "sys_images/NoPic.jpg"
- else
- NewsSmallPicFile = Cookie_Domain&"/sys_images/emot/face"&NewsSmallPicFile&".gif"
- end if
- NaviContent = Search_RS("Body")
- if isnull(NaviContent) or NaviContent="" then
- NaviContent = "暂无"
- else
- NaviContent = morestr(Lose_Html(NaviContent),255)
- NaviContent = Search_TextArr(Keyword,"Body",NaviContent)
- end if
- FileSize = ""
- FileEditDate = addtime
- case "DS"
- set SysRs_Tmp = Conn.execute("select DownDir,IsDomain From FS_DS_SysPara")
- if not SysRs_Tmp.eof then
- if not isnull(SysRs_Tmp("IsDomain")) and SysRs_Tmp("IsDomain") <> "" then
- ChildDomain = SysRs_Tmp("IsDomain")
- else
- ChildDomain =Cookie_Domain&"/"&SysRs_Tmp("DownDir")
- end if
- LocalUrl = "/"&SysRs_Tmp("DownDir")
- end If
- SysRs_Tmp.close
- if isnull(ChildDomain) then ChildDomain = ""
- ClassPath = Search_RS("ClassEName")
- if isnull(ClassPath) then ClassPath = ""
- if right(ChildDomain,1)="/" then ChildDomain = mid(ChildDomain,1,len(ChildDomain) - 1)
- if ChildDomain<>"" then
- if left(lcase(ChildDomain),len("http://"))<>"http://" then ChildDomain = "http://"&ChildDomain
- else
- ChildDomain = Cookie_Domain
- end if
- if ClassPath<>"" then ClassPath = replace(ClassPath,"/","")
- if len(ChildDomain&"/"&ClassPath)>1 then ChildPath = ChildDomain&"/"&ClassPath
- SaveNewsPath = ChildPath & Search_RS("SavePath")
- if right(SaveNewsPath,1)<>"/" then SaveNewsPath = SaveNewsPath&"/"
- SaveNewsPath = SaveNewsPath & Search_RS("FileName") &"."& Search_RS("FileExtName")
- UrlAndTitle = "<A class=l href="""&SaveNewsPath&""" target=_blank>"&Search_RS("Name")&"</A>"
- addtime = Search_RS("addtime")
- if isnull(addtime) then addtime=""
- if isdate(addtime) then addtime = FormatDateTime(addtime,0)
- NewsSmallPicFile = Search_RS("Pic")
- NewsPicFile = Search_RS("Pic")
- if NewsSmallPicFile = "" then
- NewsSmallPicFile = "sys_images/NoPic.jpg"
- end if
- NaviContent = Search_RS("Description")
- if isnull(NaviContent) or NaviContent="" then
- NaviContent = "暂无"
- else
- NaviContent = morestr(Lose_Html(NaviContent),255)
- NaviContent = Search_TextArr(Keyword,"Description",NaviContent)
- end if
- LocalUrl = LocalUrl&"/"&ClassPath&Search_RS("SavePath")&"/"&Search_RS("FileName") &"."& Search_RS("FileExtName")
- FileSize = split(CheckFile(LocalUrl),"|")(0)
- FileEditDate = split(CheckFile(LocalUrl),"|")(1)
- case "MS"
- set SysRs_Tmp = Conn.execute("select SavePath,IsDomain From FS_MS_SysPara")
- if not SysRs_Tmp.eof then
- if not isnull(SysRs_Tmp("IsDomain")) and SysRs_Tmp("IsDomain") <> "" then
- ChildDomain = SysRs_Tmp("IsDomain")
- else
- ChildDomain = SysRs_Tmp("SavePath")
- end if
- LocalUrl = "/"&SysRs_Tmp("SavePath")
- end if
- SysRs_Tmp.close
- if isnull(ChildDomain) then ChildDomain = ""
- ClassPath = Search_RS("ClassEName")
- if isnull(ClassPath) then ClassPath = ""
- if right(ChildDomain,1)="/" then ChildDomain = mid(ChildDomain,1,len(ChildDomain) - 1)
- if ChildDomain<>"" then
- if left(lcase(ChildDomain),len("http://"))<>"http://" then ChildDomain = "http://"&ChildDomain
- else
- ChildDomain =Cookie_Domain&"/"&SysRs_Tmp("NewsDir")
- end if
- if ClassPath<>"" then ClassPath = replace(ClassPath,"/","")
- if len(ChildDomain&"/"&ClassPath)>1 then ChildPath = ChildDomain&"/"&ClassPath
- SaveNewsPath = ChildPath & Search_RS("SavePath")
- if right(SaveNewsPath,1)<>"/" then SaveNewsPath = SaveNewsPath&"/"
- SaveNewsPath = SaveNewsPath & Search_RS("FileName") &"."& Search_RS("FileExtName")
- UrlAndTitle = "<A class=l href="""&SaveNewsPath&""" target=_blank>"&Search_RS("ProductTitle")&"</A>"
- addtime = Search_RS("addtime")
- if isnull(addtime) then addtime=""
- if isdate(addtime) then addtime = FormatDateTime(addtime,0)
- NewsSmallPicFile = Search_RS("smallPic")
- NewsPicFile = Search_RS("BigPic")
- if NewsSmallPicFile = "" then
- NewsSmallPicFile = "sys_images/NoPic.jpg"
- end if
- NaviContent = Search_RS("ProductContent")
- if isnull(NaviContent) or NaviContent="" then
- NaviContent = "暂无"
- else
- NaviContent = morestr(Lose_Html(NaviContent),255)
- NaviContent = Search_TextArr(Keyword,"ProductContent",NaviContent)
- end if
- LocalUrl = LocalUrl&"/"&ClassPath&Search_RS("SavePath")&"/"&Search_RS("FileName") &"."& Search_RS("FileExtName")
- FileSize = split(CheckFile(LocalUrl),"|")(0)
- FileEditDate = split(CheckFile(LocalUrl),"|")(1)
- end select
- Content="<TABLE cellSpacing=1 cellPadding=1 border=0 width=""80%"">"&vbNewLine _
- &"<TBODY>"&vbNewLine _
- &"<TR>"&vbNewLine _
- &"<TD class=pic rowspan=2 align=center>"&vbNewLine
- if NewsPicFile<>"" then
- picShuXingB = CheckFile(NewsPicFile)
- if len(picShuXingB)>5 then picShuXingB = "["&picShuXingB&"]" else picShuXingB="" end if
- Content=Content&"<a href="""&NewsPicFile&""" target=""_blank""><img border=0 src="""&NewsSmallPicFile&""" alt=""点击看大图"&picShuXingB&""" onload=""if(this.offsetWidth>120)this.width=120;""></a></TD>"&vbNewLine
- else
- Content=Content&"<img border=0 src=""sys_images/NoPic.jpg"" onload=""if(this.offsetWidth>120)this.width=120;""></TD>"&vbNewLine
- end if
- picShuXing="":picShuXingB=""
- Content=Content &"<TD class=content valign=top>"&vbNewLine _
- &"<font size=-1>"&NaviContent&"</font>"&vbNewLine _
- &"</TD>"&vbNewLine _
- &"</TR>"&vbNewLine _
- &"<TR>"&vbNewLine _
- &"<TD height=21><font size=-1>"&vbNewLine _
- &"<font color=#008000>"&SaveNewsPath&" - "&FileSize&" "&FileEditDate&" </font>" _
- &"<a class=fl href=""javascript:window.external.AddFavorite('"&SaveNewsPath&"', '"&Cookie_Site_Name&"')"">加入收藏</a>"&vbNewLine _
- &" - <a class=fl href=""#"" onClick=""this.style.behavior='url(#default#homepage)';this.setHomePage('"&SaveNewsPath&"')"">设为主页</a>"&vbNewLine
- 'Content=Content &" - <a class=fl href=""#"" onClick=""window.open('http://www.ueuo.cn/?URL="&server.URLEncode(SaveNewsPath)&"&KeyWord="&server.URLEncode(Keyword)&"');"">加入网络收藏夹</a>"&vbNewLine
- Content=Content &"</font></TD>"&vbNewLine _
- &"</TR>"&vbNewLine _
- &"</TBODY>"&vbNewLine _
- &"</TABLE>"&vbNewLine
- if int_Start = 1 then%>
- <TABLE class="t bt" cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD noWrap><FONT size=+1> <B><FONT size=+1> <B><%=TmpStr%></B></FONT> </B></FONT> </TD>
- <TD noWrap align=right>
- <FONT size=-1>共有<B><%=Search_RS.recordcount%></B>项符合 <B><%=morestr(Keyword,30)%></B> 的查询结果,
- 以下是第 <B>1</B> - <B>10</B> 项。(搜索用时 <B><%=FormatNumber((timer()-starttime),2,-1)%></B> 秒) </FONT>
- </TD></TR></TBODY></TABLE>
- <%end if%>
- <DIV>
- <div>
- <P class=g>
- <%
- ''标题
- response.Write(UrlAndTitle)
- response.Write("<font size=-2 color=#666666>")
- select case SubSys
- case "NS","RD"
- response.Write(" "&addtime&vbNewLine)
- response.Write(" ")
- if SubSys="NS" then response.Write("<img border=0 src=""sys_images/alert.gif"">"&Replacestr(Search_Rs("ClassName"),":,else:"&Search_Rs("ClassName")))
- response.Write(Replacestr(Search_Rs("PopId"),"5:总置顶,4:栏目置顶,3:总推荐文章,else:普通")&vbNewLine)
- response.Write(Replacestr(Search_Rs("IsURL"),"0:,else: | 标题新闻"))
- response.Write(Replacestr(Search_Rs("isPicNews"),"0:,else: | <img border=0 title=""图"" src=""sys_images/img.jpg"">"))
- response.Write(Replacestr(Search_Rs("TodayNewsPic"),":,else: | 图片头条"))
- response.Write(Replacestr(Search_Rs("Source"),":,else: | "&Search_Rs("Source")))
- response.Write(Replacestr(Search_Rs("Author"),":,else: | "&Search_Rs("Author")))
- response.Write(Replacestr(Search_Rs("Hits"),":,else: | ["&Search_Rs("Hits")&"]"))
- case "DS"
- response.Write(" "&addtime&vbNewLine)
- response.Write(" "&Replacestr(Search_Rs("ClassName"),":,else:"&Search_Rs("ClassName")))
- response.Write(Replacestr(Search_Rs("RecTF"),"1: | 推荐,else:"))
- response.Write(Replacestr(Search_Rs("Types"),"1: | 图片,2: | 文件,3: | 程序,4: | Flash,5: | 音乐,6: | 影视,7: | 其它"))
- response.Write(Replacestr(Search_Rs("ClickNum"),":,else: | 热度["&Search_Rs("ClickNum")))
- response.Write(Replacestr(Search_Rs("Hits"),":,else: | "&Search_Rs("Hits")&"]"))
- response.Write(Replacestr(Search_Rs("ConsumeNum"),"0:,else: | 需要点数["&Search_Rs("ConsumeNum")&"]"))
- case "WS"
- response.Write(" "&addtime&vbNewLine)
- response.Write(" "&Replacestr(Search_Rs("ClassName"),":,else:"&Search_Rs("ClassName")))
- response.Write(Replacestr(Search_Rs("ParentID"),"0: | <strong>话题</strong>,else:回复"))
- response.Write(Replacestr(Search_Rs("User"),":未知用户,else:"&Search_Rs("User")))
- response.Write(Replacestr(Search_Rs("IsTop"),"1: | 推荐,else:"))
- response.Write(Replacestr(Search_Rs("Answer"),":,else: | 回复["&Search_Rs("Answer")&"]"))
- response.Write(Replacestr(Search_Rs("Hit"),":,else: | Hit["&Search_Rs("Hit")&"]"))
- response.Write(Replacestr(Search_Rs("LastUpdateDate"),":,else: | LastTime["&Search_Rs("LastUpdateDate")&""))
- response.Write(Replacestr(Search_Rs("LastUpdateUser"),":,else: | "&Search_Rs("LastUpdateUser")&"]"))
- response.Write(Replacestr(Search_Rs("IP"),":,else:"&Search_Rs("IP")))
- response.Write(Replacestr(Search_Rs("Vistor"),"0: | 游客可访,else:"))
- case "MS"
- response.Write(" "&addtime&vbNewLine)
- response.Write(" "&Replacestr(Search_Rs("ClassCName"),":,else:"&Search_Rs("ClassCName")))
- response.Write(Replacestr(Search_Rs("StyleFlagBit"),":,else:"&Replacestr(split(Search_Rs("StyleFlagBit"),",")(0),"1: | 推荐,else:")))
- response.Write(Replacestr(Search_Rs("StyleFlagBit"),":,else:"&Replacestr(split(Search_Rs("StyleFlagBit"),",")(1),"1: | 热点,else:")))
- response.Write(Replacestr(Search_Rs("StyleFlagBit"),":,else:"&Replacestr(split(Search_Rs("StyleFlagBit"),",")(2),"1: | 置顶,else:")))
- response.Write(Replacestr(Search_Rs("StyleFlagBit"),":,else:"&Replacestr(split(Search_Rs("StyleFlagBit"),",")(3),"1: | 特价,else:")))
- response.Write(Replacestr(Search_Rs("StyleFlagBit"),":,else:"&Replacestr(split(Search_Rs("StyleFlagBit"),",")(4),"1: | 锁定,else:")))
- response.Write(Replacestr(Search_Rs("StyleFlagBit"),":,else:"&Replacestr(split(Search_Rs("StyleFlagBit"),",")(5),"1: | 促销,else:")))
- response.Write(Replacestr(Search_Rs("Click"),":,else: | ["&Search_Rs("Click")&"]"))
- response.Write(Replacestr(Search_Rs("Stockpile"),":,else: | 库存"&Search_Rs("Stockpile")))
- response.Write(Replacestr(Search_Rs("StockpileWarn"),"1:[<font color=red>库存不够</font>],else:"))
- response.Write(Replacestr(Search_Rs("OldPrice"),"0:,else: | [市场价"&Search_Rs("OldPrice")))
- response.Write(Replacestr(Search_Rs("NewPrice"),"0:0],else: | 商城价"&Search_Rs("NewPrice")&"]"))
- response.Write(Replacestr(left(Search_Rs("IsWholesale"),1),"1: | 可批发,else:"))
- response.Write(Replacestr(Search_Rs("MakeFactory"),":,else: | "&Search_Rs("MakeFactory")))
- response.Write(Replacestr(Search_Rs("ProductsAddress"),":,else: | "&replace(Search_Rs("ProductsAddress"),","," ")))
- response.Write(" | "&Replacestr(Search_Rs("SaleStyle"),"0:正常,1:竞拍,2:一口价,3:特价,4:降价"))
- response.Write(Replacestr(Search_Rs("Discount"),":,else: | 折率["&Search_Rs("Discount")&"]"))
- response.Write(Replacestr(Search_Rs("DiscountStartDate"),":,else:["&Search_Rs("DiscountStartDate")&"-"))
- response.Write(Replacestr(Search_Rs("DiscountEndDate"),":,else:"&Search_Rs("DiscountEndDate")&"]"))
- end select
- response.Write("</font>")
- response.Write(Content)
- %>
- </div>
- <%
- ''+++++++++++++++++++++++++++++++++++++++
- Search_RS.MoveNext
- if Search_RS.eof or Search_RS.bof then exit for
- NEXT
- %>
- <BR clear=all>
- <DIV class=n id=navbar>
- <TABLE cellSpacing=0 cellPadding=0 width="1%" align=center border=0>
- <TBODY>
- <TR style="TEXT-ALIGN: center" vAlign=top align=middle>
- <TD vAlign=bottom noWrap class=i><FONT size=-1>结果页码: </FONT>
- <TD noWrap class="i"><font size=-1>
- <%response.Write( fPageCount(Search_RS,int_showNumberLink_,str_nonLinkColor_,toF_,toP10_,toP1_,toN1_,toN10_,toL_,showMorePageGo_Type_,cPageNo) & vbcrlf )%>
- </font></TR>
- </TBODY>
- </TABLE>
- </DIV>
- <%
- END IF
- RsClose
- end select
- Sub RsClose()
- Search_RS.Close
- Set Search_RS = Nothing
- end Sub
- Set Old_News_Conn = Nothing
- Set Conn = Nothing
- response.End()
- %>